[hidden]{ display:none !important; }

/* ====== Theme ====== */
:root{
  --bg: #0b0b12;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.88);
  --muted: rgba(255,255,255,.68);
  --line: rgba(255,255,255,.12);
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --accent: #7cf0ff;
  --accent2: #e7b2ff;
  --warn: #ffc37c;
  --radius: 20px;
  --radius2: 28px;
  --max: 1100px;
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --serif: "Playfair Display", ui-serif, Georgia, serif;
}

:root[data-theme="light"]{
  --bg: #faf9ff;
  --panel: rgba(10,10,18,.06);
  --panel2: rgba(10,10,18,.08);
  --text: rgba(10,10,18,.88);
  --muted: rgba(10,10,18,.68);
  --line: rgba(10,10,18,.12);
  --shadow: 0 12px 26px rgba(10,10,18,.12);
  --accent: #006bff;
  --accent2: #8b33ff;
  --warn: #ff7a00;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background: radial-gradient(1200px 900px at 10% 10%, rgba(124,240,255,.15), transparent 60%),
              radial-gradient(1000px 900px at 80% 0%, rgba(231,178,255,.16), transparent 65%),
              radial-gradient(900px 700px at 60% 90%, rgba(255,195,124,.10), transparent 60%),
              var(--bg);
  color:var(--text);
  font-family:var(--font);
  overflow-x:hidden;
}

/* Canvas background */
#bg-canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events:none;
  opacity:.55;
}

/* ====== Topbar ====== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 18px;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--line);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--text);
}
.brandMark{
  width:38px; height:38px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  font-weight:800;
  letter-spacing:.02em;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 70%, transparent), color-mix(in oklab, var(--accent2) 70%, transparent));
  box-shadow: var(--shadow);
}
.brandText{ font-weight:700; }

.nav{
  display:flex;
  gap: 14px;
  align-items:center;
}
.nav a{
  text-decoration:none;
  color:var(--muted);
  font-weight:600;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 12px;
}
.nav a:hover{
  color: var(--text);
  background: var(--panel);
}
.nav a.pill{
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
}

.iconBtn{
  width: 40px; height:40px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow: none;
}
.iconBtn:hover{ background: var(--panel2); }
.mobileOnly{ display:none; }


/* ====== Main ====== */
.main{ width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* ====== Hero ====== */
.hero{ padding: 60px 0 24px; position: relative; }
.heroGrid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 22px;
  align-items: start;
}
.kicker{
  margin:0 0 12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size: 12px;
  color: var(--muted);
}
.headline{
  margin:0;
  font-family: var(--serif);
  font-weight:700;
  font-size: clamp(34px, 4vw, 56px);
  line-height:1.06;
}
.accent{ color: var(--accent); }
.accent2{ color: var(--accent2); }
.subhead{
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 56ch;
}

.ctaRow{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
  margin-bottom: 18px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 11px 14px;
  border-radius: 16px;
  font-weight: 750;
  font-size: 14px;
  text-decoration:none;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  cursor:pointer;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }
.btn.primary{
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 70%, transparent), color-mix(in oklab, var(--accent2) 65%, transparent));
  border-color: color-mix(in oklab, var(--accent) 22%, var(--line));
}
.btn.ghost{
  background: transparent;
}
.btn.tiny{
  padding: 9px 12px;
  border-radius: 14px;
  font-weight: 750;
  font-size: 13px;
}

.quickFacts{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
.fact{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.factLabel{
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  letter-spacing:.08em;
  text-transform: uppercase;
}
.factValue{
  font-weight: 750;
  font-size: 14px;
  line-height: 1.35;
}

.heroCard{
  border-radius: var(--radius2);
  background: linear-gradient(180deg, color-mix(in oklab, var(--panel2) 70%, transparent), var(--panel));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.avatarWrap{
  position:relative;
  padding: 18px;
}
.avatar{
  width:100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: calc(var(--radius2) - 6px);
  border: 1px solid var(--line);
  filter: saturate(1.06) contrast(1.02);
}
.glow{
  position:absolute;
  inset: 10px;
  border-radius: 26px;
  background:
    radial-gradient(350px 250px at 20% 20%, rgba(124,240,255,.20), transparent 60%),
    radial-gradient(320px 240px at 80% 30%, rgba(231,178,255,.22), transparent 60%),
    radial-gradient(320px 240px at 40% 90%, rgba(255,195,124,.14), transparent 60%);
  filter: blur(18px);
  z-index:-1;
}
.heroCardBody{ padding: 6px 18px 18px; }
.cardTitle{ margin: 0 0 8px; }
.cardText{ color: var(--muted); line-height: 1.65; margin: 0 0 14px; }
.cardActions{ display:flex; gap: 10px; }

.scrollHint{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:center;
  margin-top: 26px;
  color: var(--muted);
  font-weight:700;
  font-size: 12px;
  letter-spacing:.12em;
  text-transform: uppercase;
}
.scrollHint .dot{
  width: 8px; height:8px;
  border-radius: 99px;
  background: var(--muted);
  animation: bounce 1.4s infinite ease-in-out;
}
@keyframes bounce{
  0%, 100% { transform: translateY(0); opacity: .65; }
  50% { transform: translateY(-6px); opacity: 1; }
}

/* ====== Sections ====== */
.section{ padding: 54px 0; }
.sectionHead{ margin-bottom: 18px; }
.sectionHead h2{
  margin:0;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing:.01em;
}
.sectionHead p{
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.twoCol{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3{ margin:0 0 10px; }
.muted{ color: var(--muted); }
.small{ font-size: 13px; line-height: 1.5; }
.bigQuote{
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
  margin: 0;
}
.divider{
  height:1px;
  background: var(--line);
  margin: 14px 0;
}

.bullets{ margin: 10px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.75; }
.bullets li{ margin: 6px 0; }

.chips{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chips.big .chip{ font-size: 13px; padding: 10px 12px; border-radius: 999px; }
.chip{
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}

.filters{
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
#projectSearch{
  flex: 1;
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  outline: none;
}
#projectSearch::placeholder{ color: color-mix(in oklab, var(--muted) 80%, transparent); }

.chipBtn{
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  cursor:pointer;
}
.chipBtn.active{
  background: var(--panel2);
  color: var(--text);
}

.projectCard{
  background: linear-gradient(180deg, color-mix(in oklab, var(--panel2) 60%, transparent), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  overflow:hidden;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  min-height: 320px;
}
.projectThumb{
  height: 160px;
  background: var(--panel2);
  border-bottom: 1px solid var(--line);
  position:relative;
}
.projectThumb img{
  width:100%; height:100%;
  object-fit: cover;
  filter: saturate(1.04);
}
.projectBody{
  padding: 14px 14px 16px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  flex:1;
}
.projectTitle{
  margin:0;
  font-size: 16px;
  line-height: 1.25;
}
.projectKicker{
  color: var(--muted);
  font-size: 12px;
  letter-spacing:.10em;
  text-transform: uppercase;
}
.projectMeta{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.projectActions{
  margin-top:auto;
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}
.linkBtn{
  border:none;
  background:none;
  color: var(--text);
  font-weight: 900;
  cursor:pointer;
  padding: 0;
}
.linkBtn:hover{ text-decoration: underline; }

.miniGallery{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.miniThumb{
  width: 160px;
  text-decoration:none;
  color: var(--muted);
}
.miniThumb img{
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.miniLabel{
  display:block;
  font-size: 12px;
  margin-top: 8px;
  font-weight: 700;
}

.timeline{
  display:grid;
  gap: 12px;
}
.tItem{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.tTop{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  align-items:flex-start;
  margin-bottom: 8px;
}
.tTitle{ font-weight: 900; }
.tWhen{ color: var(--muted); font-weight: 800; font-size: 12px; letter-spacing:.10em; text-transform: uppercase; }
.tWhere{ color: var(--muted); font-weight: 700; font-size: 13px; }
.tBullets{ margin: 8px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.stack{ display:grid; gap: 10px; }
.stackItem{
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel2);
}
.stackItem .title{ font-weight: 900; margin-bottom: 2px; }
.stackItem .meta{ color: var(--muted); font-weight: 700; font-size: 13px; }
.stackItem .desc{ margin-top: 8px; color: var(--muted); line-height: 1.6; }

.row{ display:flex; gap: 10px; flex-wrap: wrap; }

.contactList{
  display:grid;
  gap: 10px;
}
.contactItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel2);
}
.contactItem a{
  color: var(--text);
  text-decoration:none;
  font-weight: 900;
}
.contactItem a:hover{ text-decoration: underline; }
.contactItem .hint{ color: var(--muted); font-weight: 700; font-size: 12px; }

.footer{
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  color: var(--muted);
  gap: 14px;
  flex-wrap: wrap;
}
.footerLinks{ display:flex; gap: 14px; }
.footerLinks a{ color: var(--muted); text-decoration:none; font-weight: 800; }
.footerLinks a:hover{ color: var(--text); }

/* ====== Modal ====== */
.modal{
  position: fixed;
  inset: 0;
  z-index: 50;
  display:grid;
  place-items:center;
  padding: 18px;
}
.modalOverlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}
.modalPanel{
  position: relative;
  width: min(920px, 100%);
  max-height: min(84vh, 760px);
  overflow: auto;
  background: color-mix(in oklab, var(--bg) 55%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 30px 100px rgba(0,0,0,.45);
}
.modalTop{
  position: sticky;
  top: 0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  padding: 16px 16px 10px;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.modalTitle{ margin:0; font-size: 18px; }
.modalKicker{
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  letter-spacing:.10em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.modalBody{ padding: 14px 16px 18px; }

.modalGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.modalText{
  color: var(--muted);
  line-height: 1.7;
}
.modalText h4{
  margin: 14px 0 6px;
  color: var(--text);
}
.gallery{
  display:grid;
  gap: 10px;
}
.gallery img{
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.pdfFrame{
  width: 100%;
  height: 70vh;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}


/* Light mode: stronger modal contrast */
:root[data-theme="light"] .modalOverlay{
  background: rgba(10,10,18,.22);
  backdrop-filter: blur(4px);
}
:root[data-theme="light"] .modalPanel{
  background: rgba(255,255,255,.96);
  border-color: rgba(10,10,18,.16);
  box-shadow: 0 40px 120px rgba(10,10,18,.18);
}
:root[data-theme="light"] .modalTop{
  background: rgba(255,255,255,.92);
}
:root[data-theme="light"] .gallery img,
:root[data-theme="light"] .pdfFrame{
  border-color: rgba(10,10,18,.14);
}

/* ====== Responsive ====== */
@media (max-width: 980px){
  .heroGrid{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .twoCol{ grid-template-columns: 1fr; }
  .quickFacts{ grid-template-columns: 1fr; }
}
@media (max-width: 760px){
  .topbar{ position: sticky; flex-wrap: wrap; }
  .mobileOnly{ display:grid; }

  /* Hamburger nav */
  .nav{
    display:none;
    width: 100%;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: color-mix(in oklab, var(--bg) 88%, transparent);
    border: 1px solid var(--line);
    border-radius: 18px;
  }
  body[data-nav-open="true"] .nav{ display:flex; }

  .nav a{
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    width: 100%;
  }

  .grid{ grid-template-columns: 1fr; }

  /* Modal on phones */
  .modal{ padding: 10px; }
  .modalPanel{ max-height: 92vh; border-radius: 22px; }
  .modalGrid{ grid-template-columns: 1fr; }
  .pdfFrame{ height: 62vh; }
}

