:root{
  --bg:#0a0e17;
  --bg-alt:#0d1320;
  --surface:#121928;
  --surface-2:#1a2336;
  --text:#e8edf5;
  --text-dim:#9aa7bd;
  --accent:#5eb8ff;
  --accent-2:#8b7bff;
  --border:rgba(255,255,255,0.08);
  --shadow: 0 10px 40px rgba(0,0,0,0.35);
  --font-head:'Space Grotesk', sans-serif;
  --font-body:'Inter', sans-serif;
}
[data-theme="light"]{
  --bg:#f5f7fb;
  --bg-alt:#ffffff;
  --surface:#ffffff;
  --surface-2:#eef2f8;
  --text:#16202e;
  --text-dim:#5a6678;
  --accent:#2f7fd6;
  --accent-2:#6c5ce7;
  --border:rgba(0,0,0,0.08);
  --shadow: 0 10px 30px rgba(20,30,50,0.08);
}

*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
  transition:background .4s ease, color .4s ease;
  overflow-x:hidden;
}

/* background grid + particles */
.bg-grid{
  position:fixed; inset:0; z-index:-2;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size:48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}
#particles{position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.6;}

/* NAV */
#navbar{
  position:fixed; top:0; left:0; right:0; z-index:100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom:1px solid transparent;
  transition: border-color .3s, background .3s;
}
#navbar.scrolled{ border-bottom-color:var(--border); }
.nav-inner{
  max-width:1200px; margin:0 auto; padding:1rem 2rem;
  display:flex; align-items:center; justify-content:space-between;
}
.logo{
  font-family:var(--font-head); font-weight:700; font-size:1.4rem;
  color:var(--text); text-decoration:none; letter-spacing:1px;
}
.logo .dot{color:var(--accent);}
.nav-links{ display:flex; gap:2rem; list-style:none; }
.nav-links a{
  color:var(--text-dim); text-decoration:none; font-size:.92rem; font-weight:500;
  transition:color .25s; position:relative;
}
.nav-links a:hover{color:var(--text);}
.nav-links a::after{
  content:''; position:absolute; left:0; bottom:-6px; width:0; height:2px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  transition:width .25s;
}
.nav-links a:hover::after{width:100%;}

#theme-toggle{
  background:var(--surface); border:1px solid var(--border); color:var(--text);
  width:38px; height:38px; border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:transform .3s, background .3s;
}
#theme-toggle:hover{ transform:rotate(20deg); }
#theme-toggle #moon{display:none;}
[data-theme="light"] #theme-toggle #sun{display:none;}
[data-theme="light"] #theme-toggle #moon{display:block;}

#hamburger{
  display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:8px;
}
#hamburger span{ width:24px; height:2px; background:var(--text); border-radius:2px; transition:.3s; }

/* HERO */
.hero{
  min-height:100vh; display:flex; align-items:center; justify-content:space-between;
  max-width:1200px; margin:0 auto; padding:7rem 2rem 4rem; gap:3rem; flex-wrap:wrap;
  position:relative;
}
.hero-content{ flex:1; min-width:320px; }
.kicker{
  font-family:var(--font-head); color:var(--accent); letter-spacing:3px;
  text-transform:uppercase; font-size:.85rem; margin-bottom:.8rem; font-weight:600;
}
.hero h1{
  font-family:var(--font-head); font-size:clamp(2.8rem,7vw,5rem); font-weight:700;
  line-height:1.05; margin-bottom:1.2rem;
}
.hero h1 .accent{
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero-sub{ font-size:1.15rem; color:var(--text-dim); max-width:560px; margin-bottom:1.6rem; }
.hero-sub .hl{ color:var(--text); font-weight:600; border-bottom:2px solid var(--accent); }
.hero-tags{ display:flex; flex-wrap:wrap; gap:.6rem; margin-bottom:2rem; }
.hero-tags span{
  font-size:.8rem; padding:.4rem .9rem; border-radius:999px;
  background:var(--surface); border:1px solid var(--border); color:var(--text-dim);
}
.hero-buttons{ display:flex; gap:1rem; flex-wrap:wrap; }

.btn{
  display:inline-block; padding:.85rem 1.7rem; border-radius:10px; font-weight:600;
  text-decoration:none; font-size:.95rem; transition:transform .25s, box-shadow .25s, background .25s, color .25s;
  border:1px solid transparent;
}
.btn-primary{
  background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#0a0e17;
}
.btn-primary:hover{ transform:translateY(-3px); box-shadow:0 12px 30px rgba(94,184,255,0.25); }
.btn-outline{ border-color:var(--border); color:var(--text); background:var(--surface); }
.btn-outline:hover{ transform:translateY(-3px); border-color:var(--accent); color:var(--accent); }

.hero-photo{ flex-shrink:0; }
.photo-ring{
  width:260px; height:260px; border-radius:50%; padding:6px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  display:flex; align-items:center; justify-content:center;
  position:relative;
}
.photo-ring img{
  width:100%; height:100%; object-fit:cover; border-radius:50%;
  border:6px solid var(--bg); display:block;
}
.photo-fallback{
  display:none; width:100%; height:100%; border-radius:50%; border:6px solid var(--bg);
  background:var(--surface-2); align-items:center; justify-content:center;
  font-family:var(--font-head); font-size:4rem; font-weight:700; color:var(--accent);
}

.scroll-cue{
  position:absolute; bottom:1.5rem; left:50%; transform:translateX(-50%);
  width:26px; height:42px; border:2px solid var(--border); border-radius:20px;
  display:flex; justify-content:center; padding-top:8px;
}
.scroll-cue span{
  width:4px; height:8px; border-radius:2px; background:var(--accent);
  animation:scroll-bounce 1.6s infinite;
}
@keyframes scroll-bounce{
  0%{ transform:translateY(0); opacity:1;}
  60%{ transform:translateY(14px); opacity:0;}
  100%{opacity:0;}
}

/* SECTIONS */
.section{ max-width:1200px; margin:0 auto; padding:6rem 2rem; }
.section.alt{ background:var(--bg-alt); max-width:none; padding-left:0; padding-right:0; }
.section.alt > *{ max-width:1200px; margin-left:auto; margin-right:auto; padding-left:2rem; padding-right:2rem; }

.section-head{ display:flex; align-items:baseline; gap:1rem; margin-bottom:2.5rem; }
.section-head .num{
  font-family:var(--font-head); font-size:1rem; color:var(--accent); font-weight:700;
  border:1px solid var(--border); border-radius:50%; width:36px; height:36px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.section-head h2{ font-family:var(--font-head); font-size:2.2rem; font-weight:700; }

.section-intro{ font-size:1.05rem; color:var(--text-dim); max-width:800px; margin-bottom:2.5rem; }

/* ABOUT */
.about-grid{ display:grid; grid-template-columns:1.3fr 1fr; gap:3rem; }
.about-text p{ margin-bottom:1.1rem; color:var(--text-dim); }
.about-text strong, .about-text em{ color:var(--text); }
.about-cards{ display:flex; flex-direction:column; gap:1rem; }
.info-card{
  background:var(--surface); border:1px solid var(--border); border-radius:14px;
  padding:1.4rem; transition:transform .3s, border-color .3s;
}
.info-card:hover{ transform:translateY(-4px); border-color:var(--accent); }
.info-card h3{ font-family:var(--font-head); font-size:1rem; margin-bottom:.5rem; color:var(--accent); }
.info-card p{ color:var(--text-dim); font-size:.92rem; }
.link-list{ display:flex; flex-direction:column; gap:.4rem; }
.link-list a{ color:var(--text-dim); text-decoration:none; transition:color .2s; }
.link-list a:hover{ color:var(--accent); }

/* CARD GRID */
.card-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1.5rem; }
.topic-card{
  background:var(--surface); border:1px solid var(--border); border-radius:16px;
  padding:1.8rem; transition:transform .35s, box-shadow .35s, border-color .35s;
}
.topic-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow); border-color:var(--accent); }
.topic-card .icon{ font-size:2rem; margin-bottom:1rem; }
.topic-card h3{ font-family:var(--font-head); margin-bottom:.6rem; font-size:1.15rem; }
.topic-card p{ color:var(--text-dim); font-size:.93rem; }
.link-arrow{ display:inline-block; margin-top:1rem; color:var(--accent); text-decoration:none; font-weight:600; font-size:.9rem; }
.link-arrow:hover{ text-decoration:underline; }

/* TIMELINE */
.timeline{ display:flex; flex-direction:column; gap:2rem; position:relative; }
.timeline::before{
  content:''; position:absolute; left:23px; top:10px; bottom:10px; width:2px;
  background:linear-gradient(var(--accent),var(--accent-2));
  opacity:.3;
}
.timeline-item{ display:flex; gap:1.5rem; align-items:flex-start; position:relative; }
.timeline-marker{
  width:48px; height:48px; border-radius:50%; flex-shrink:0;
  background:var(--surface); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-head); font-weight:700; font-size:1.1rem; color:var(--accent);
  z-index:1; transition:transform .3s, border-color .3s;
}
.timeline-item:hover .timeline-marker{ transform:scale(1.1); border-color:var(--accent); }
.timeline-content{
  background:var(--surface); border:1px solid var(--border); border-radius:14px;
  padding:1.5rem 1.8rem; flex:1; transition:border-color .3s, transform .3s;
}
.timeline-item:hover .timeline-content{ border-color:var(--accent); transform:translateX(4px); }
.timeline-content h3{ font-family:var(--font-head); margin-bottom:.6rem; font-size:1.2rem; }
.timeline-content p{ color:var(--text-dim); font-size:.95rem; margin-bottom:1rem; }
.tag-row{ display:flex; flex-wrap:wrap; gap:.5rem; }
.tag-row span{
  font-size:.75rem; padding:.3rem .8rem; border-radius:999px;
  background:var(--surface-2); color:var(--accent); border:1px solid var(--border);
}

/* PUBLICATIONS */
.pub-list{ display:flex; flex-direction:column; gap:1rem; }
.pub-item{
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  padding:1.2rem 1.5rem; transition:border-color .3s, transform .3s;
}
.pub-item:hover{ border-color:var(--accent); transform:translateX(4px); }
.pub-item h3{ font-size:1rem; font-weight:600; margin-bottom:.4rem; }
.pub-item h3 a{ color:var(--text); text-decoration:none; transition:color .2s; }
.pub-item h3 a:hover{ color:var(--accent); text-decoration:underline; }
.pub-meta{ color:var(--text-dim); font-size:.85rem; }

/* CONTACT */
.contact-wrap{ text-align:left; }
.social-grid{ display:flex; flex-wrap:wrap; gap:1rem; }
.social-btn{
  padding:.9rem 1.8rem; border-radius:10px; background:var(--surface);
  border:1px solid var(--border); color:var(--text); text-decoration:none;
  font-weight:600; transition:all .3s;
}
.social-btn:hover{
  background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#0a0e17;
  transform:translateY(-4px); box-shadow:var(--shadow);
}

/* MEDIA SECTION */
.video-wrap{ position:relative; width:100%; padding-top:56.25%; border-radius:10px; overflow:hidden; margin-bottom:1rem; background:var(--surface-2); }
.video-wrap iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.doc-list{ display:flex; flex-wrap:wrap; gap:1rem; }
.doc-link{
  display:inline-flex; align-items:center; gap:.5rem; padding:.9rem 1.6rem;
  border-radius:10px; background:var(--surface); border:1px solid var(--border);
  color:var(--text); text-decoration:none; font-weight:600; transition:all .3s;
}
.doc-link:hover{ border-color:var(--accent); color:var(--accent); transform:translateY(-3px); }

/* FOOTER */
footer{ text-align:center; padding:2rem; color:var(--text-dim); font-size:.85rem; border-top:1px solid var(--border); }
footer a{ color:var(--accent); text-decoration:none; }

/* ANIMATIONS */
.fade-up{ opacity:0; transform:translateY(24px); animation:fadeUp .8s forwards ease; }
@keyframes fadeUp{ to{ opacity:1; transform:translateY(0);} }

.reveal{ opacity:0; transform:translateY(30px); transition:opacity .7s ease, transform .7s ease; }
.reveal.visible{ opacity:1; transform:translateY(0); }

/* TAB SYSTEM */
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.nav-links a.tab-active { color: var(--text); }
.nav-links a.tab-active::after { width: 100%; }
.scroll-cue { display: none; }

/* RESPONSIVE */
@media (max-width:900px){
  .nav-links{
    position:absolute; top:100%; left:0; right:0; flex-direction:column;
    background:var(--bg); border-bottom:1px solid var(--border);
    padding:1rem 2rem; gap:1rem; display:none;
  }
  .nav-links.open{ display:flex; }
  #hamburger{ display:flex; }
  .hero{ flex-direction:column-reverse; text-align:center; padding-top:6rem; }
  .hero-content{ text-align:center; }
  .hero-sub{ margin-left:auto; margin-right:auto; }
  .hero-tags, .hero-buttons{ justify-content:center; }
  .about-grid{ grid-template-columns:1fr; }
}
