@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg:        #f7f9fc;
  --bg-alt:    #eef2fb;
  --surface:   #ffffff;
  --accent:    #2563eb;
  --accent2:   #7c3aed;
  --gold:      #f59e0b;
  --text:      #0f172a;
  --muted:     #64748b;
  --card:      #ffffff;
  --border:    rgba(37,99,235,0.18);
  --border-s:  rgba(37,99,235,0.08);
  --shadow:    0 2px 10px rgba(0,0,0,0.06), 0 8px 28px rgba(37,99,235,0.09);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 2px 8px rgba(37,99,235,0.06);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  height: 100vh;
}

/* ── NAV ───────────────────────────────── */
nav.topnav {
  position: fixed; top:0; left:0; right:0; z-index:100;
  display: flex; align-items:center; justify-content:space-between;
  padding: 1.1rem 3rem;
  background: rgba(247,249,252,0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-s);
  box-shadow: 0 1px 14px rgba(37,99,235,0.06);
}
nav.topnav .logo {
  font-family:'Sora',sans-serif; font-size:1.15rem; font-weight:800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing:-0.3px; text-decoration:none;
}
nav.topnav .logo span {
  background: none; -webkit-text-fill-color: var(--muted);
  font-weight:400; font-size:0.8rem; margin-left:0.4rem;
}
.nav-links { display:flex; gap:2rem; list-style:none; }
.nav-links a {
  color:var(--muted); text-decoration:none; font-size:0.88rem;
  font-weight:500; transition:color 0.2s; letter-spacing:0.2px;
}
.nav-links a:hover { color:var(--accent); }
.burger { display:none; flex-direction:column; gap:5px; cursor:pointer; }
.burger span { width:24px; height:2px; background:var(--text); border-radius:2px; transition:0.3s; }

/* ── DOT NAV ────────────────────────────── */
.dot-nav {
  position:fixed; right:1.2rem; top:50%; transform:translateY(-50%);
  z-index:200; display:flex; flex-direction:column; gap:14px;
}
.dot-nav a {
  width:7px; height:7px; border-radius:50%;
  background:var(--muted); display:block; opacity:0.28;
  transition:all 0.3s; outline:none;
}
.dot-nav a.active {
  background:var(--accent); opacity:1; transform:scale(1.5);
  box-shadow:0 0 8px rgba(37,99,235,0.45);
}

/* ── SECTIONS ───────────────────────────── */
.section {
  height:100vh; display:flex; align-items:center;
  justify-content:center; padding:5rem 4rem 3rem 3rem;
}
.section-inner { max-width:1080px; width:100%; }
.section-label {
  color:var(--accent); font-size:0.72rem; font-weight:700;
  letter-spacing:2.5px; text-transform:uppercase; margin-bottom:0.7rem;
  font-family:'JetBrains Mono',monospace;
}
.section-label::before { content:'/ '; opacity:0.45; }
.section-title {
  font-family:'Sora',sans-serif; font-size:clamp(1.7rem,3vw,2.5rem);
  font-weight:700; margin-bottom:1.2rem; line-height:1.2; color:var(--text);
}
.section-title em {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-style:normal;
}
.section-text { color:var(--muted); line-height:1.85; font-size:0.97rem; max-width:680px; }

/* ── HERO ───────────────────────────────── */
#hero { flex-direction:column; text-align:center; gap:0.9rem; }
#hero h1 {
  font-family:'Sora',sans-serif; font-size:clamp(2.2rem,5vw,3.8rem);
  font-weight:800; line-height:1.12; color:var(--text);
}
#hero h1 em {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-style:normal;
}
#hero > p { max-width:620px; color:var(--muted); font-size:1.05rem; line-height:1.75; }
.hero-cta { display:flex; gap:1rem; flex-wrap:wrap; justify-content:center; margin-top:0.3rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  color:#fff; padding:0.75rem 1.8rem; border-radius:0.5rem;
  text-decoration:none; font-weight:700; font-size:0.9rem;
  transition:0.22s; box-shadow:0 4px 16px rgba(37,99,235,0.28);
}
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(37,99,235,0.38); }
.btn-outline {
  border:1.5px solid var(--border); color:var(--accent);
  padding:0.75rem 1.8rem; border-radius:0.5rem;
  text-decoration:none; font-weight:600; font-size:0.9rem;
  transition:0.2s; background:transparent;
}
.btn-outline:hover { background:rgba(37,99,235,0.06); border-color:rgba(37,99,235,0.35); }

/* ── ABOUT ──────────────────────────────── */
#about { background:var(--bg-alt); }
#about .grid-2 { display:grid; grid-template-columns:1fr 1.4fr; gap:4rem; align-items:center; }
.avatar {
  width:140px; height:140px; border-radius:50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display:flex; align-items:center; justify-content:center;
  font-family:'Sora',sans-serif; font-size:2.4rem; font-weight:800; color:#fff;
  margin-bottom:1.5rem; box-shadow:0 8px 32px rgba(37,99,235,0.22);
}
.tag-list { display:flex; flex-wrap:wrap; gap:0.5rem; margin-top:1.2rem; }
.tag {
  background: linear-gradient(135deg, rgba(37,99,235,0.07), rgba(124,58,237,0.07));
  border:1px solid var(--border);
  border-radius:3rem; padding:0.3rem 0.9rem;
  font-size:0.78rem; color:var(--accent); font-family:'JetBrains Mono',monospace;
  transition:0.2s;
}
.tag:hover { background:rgba(37,99,235,0.12); transform:translateY(-1px); }

/* Research metrics */
.research-stats {
  display:flex; gap:1rem; margin-top:1.5rem; flex-wrap:wrap;
}
.rs-item {
  display:flex; flex-direction:column; align-items:center;
  background:var(--surface); border:1px solid var(--border-s);
  border-radius:0.75rem; padding:0.65rem 1.1rem; min-width:76px;
  box-shadow:var(--shadow-sm);
}
.rs-num {
  font-family:'Sora',sans-serif; font-size:1.35rem; font-weight:800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.rs-item span:last-child { font-size:0.68rem; color:var(--muted); margin-top:0.1rem; text-align:center; }

/* ── PROJECTS ───────────────────────────── */
#projects .proj-grid { display:flex; flex-direction:column; gap:0.7rem; margin-top:1.2rem; }
.proj-card {
  display:flex; align-items:flex-start; gap:1rem;
  background:var(--surface); border:1px solid var(--border-s);
  border-radius:0.85rem; padding:1.05rem 1.3rem;
  transition:0.25s; box-shadow:var(--shadow-sm);
}
.proj-card:hover { border-color:var(--border); transform:translateX(4px); box-shadow:var(--shadow); }
.proj-num {
  font-family:'JetBrains Mono',monospace; font-size:0.75rem;
  color:var(--accent); opacity:0.65; min-width:2rem; padding-top:0.15rem;
}
.proj-card h3 { font-size:0.95rem; font-weight:600; margin-bottom:0.28rem; color:var(--text); }
.proj-card p  { font-size:0.83rem; color:var(--muted); line-height:1.6; }

/* ── PUBLICATIONS ───────────────────────── */
#publications .pub-scroll {
  height: calc(100vh - 220px);
  overflow-y: auto; padding-right:0.5rem; margin-top:1rem;
}
#publications .pub-scroll::-webkit-scrollbar { width:4px; }
#publications .pub-scroll::-webkit-scrollbar-thumb { background:var(--border); border-radius:2px; }
.pub-item {
  background:var(--surface);
  border:1px solid var(--border-s);
  border-left:3px solid var(--accent);
  border-radius:0 0.55rem 0.55rem 0;
  padding:0.8rem 1rem 0.8rem 1.2rem; margin-bottom:0.5rem;
  transition:border-left-color 0.2s, box-shadow 0.2s;
  box-shadow:var(--shadow-sm);
}
.pub-item:hover { border-left-color:var(--accent2); box-shadow:var(--shadow); }
.pub-year {
  font-family:'JetBrains Mono',monospace; font-size:0.68rem;
  color:var(--accent); font-weight:700; margin-bottom:0.25rem;
  display:inline-block;
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(124,58,237,0.08));
  border:1px solid var(--border-s); border-radius:0.3rem; padding:0.08rem 0.4rem;
}
.pub-item p  { font-size:0.83rem; color:var(--text); line-height:1.65; }
.pub-item em { color:var(--muted); font-style:italic; }

/* ── CONTACT ────────────────────────────── */
#contact { background:var(--bg-alt); }
#contact .grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:3rem; align-items:start; }
.contact-cards { display:flex; flex-direction:column; gap:0.8rem; margin-top:1rem; }
.contact-card {
  display:flex; align-items:center; gap:1rem;
  background:var(--surface); border:1px solid var(--border-s);
  border-radius:0.75rem; padding:1rem 1.2rem;
  transition:0.2s; box-shadow:var(--shadow-sm);
}
.contact-card:hover { border-color:var(--border); box-shadow:var(--shadow); }
.contact-card .ci { font-size:1.1rem; min-width:1.5rem; }
.contact-card a { color:var(--accent); text-decoration:none; font-size:0.88rem; font-weight:500; }
.contact-card a:hover { text-decoration:underline; }
.contact-card span.ct { font-size:0.88rem; color:var(--muted); }
.info-box {
  background: linear-gradient(135deg, rgba(37,99,235,0.04), rgba(124,58,237,0.04));
  border:1px solid var(--border);
  border-radius:1rem; padding:1.5rem; box-shadow:var(--shadow-sm);
}
.info-box h4 { font-family:'Sora',sans-serif; color:var(--accent); font-size:0.95rem; margin-bottom:0.8rem; font-weight:700; }
.info-box p { font-size:0.85rem; color:var(--muted); line-height:1.7; }

/* ── FOOTER ─────────────────────────────── */
footer {
  position:fixed; bottom:0; left:0; right:0; z-index:90;
  background:rgba(247,249,252,0.96);
  border-top:1px solid var(--border-s);
  box-shadow:0 -1px 14px rgba(37,99,235,0.06);
  padding:0.75rem 3rem;
  display:flex; justify-content:space-between; align-items:center;
  font-size:0.76rem; color:var(--muted);
  backdrop-filter:blur(14px);
}
footer a { color:var(--muted); text-decoration:none; }
footer a:hover { color:var(--accent); }

/* ── COOKIE BANNER ──────────────────────── */
#cookie-banner {
  position:fixed; bottom:0; left:0; right:0; z-index:999;
  background:rgba(247,249,252,0.98); border-top:1px solid var(--border);
  backdrop-filter:blur(18px);
  box-shadow:0 -4px 28px rgba(37,99,235,0.1);
  padding:1.2rem 3rem;
  display:flex; align-items:center; justify-content:space-between; gap:1.5rem;
  flex-wrap:wrap;
  transform:translateY(0); transition:transform 0.35s ease;
}
#cookie-banner.hidden { transform:translateY(110%); }
#cookie-banner p { font-size:0.83rem; color:var(--muted); line-height:1.6; max-width:720px; }
#cookie-banner p a { color:var(--accent); }
.cookie-btns { display:flex; gap:0.75rem; flex-shrink:0; }
.cookie-btns button {
  padding:0.6rem 1.3rem; border-radius:0.45rem;
  border:none; cursor:pointer; font-size:0.83rem; font-weight:600;
  transition:0.2s; font-family:'Inter',sans-serif;
}
.btn-accept { background:linear-gradient(135deg,var(--accent),#1d4ed8); color:#fff; }
.btn-accept:hover { box-shadow:0 4px 14px rgba(37,99,235,0.3); }
.btn-decline { background:transparent; color:var(--muted); border:1px solid var(--border) !important; }
.btn-decline:hover { color:var(--text); border-color:var(--muted) !important; }

/* ── LEGAL PAGES ─────────────────────────── */
.legal-page { max-width:740px; margin:0 auto; padding:7rem 2rem 5rem; min-height:100vh; }
.legal-page h1 { font-family:'Sora',sans-serif; font-size:2rem; font-weight:800; color:var(--accent); margin-bottom:2rem; }
.legal-page h2 { font-family:'Sora',sans-serif; font-size:1.05rem; font-weight:700; color:var(--text); margin:2rem 0 0.5rem; }
.legal-page h3 { font-size:0.92rem; font-weight:600; color:var(--text); margin:1.2rem 0 0.3rem; }
.legal-page p, .legal-page address { font-size:0.9rem; color:var(--muted); line-height:1.85; font-style:normal; }
.legal-page ul { padding-left:1.2rem; color:var(--muted); font-size:0.9rem; line-height:1.85; }
.legal-page a { color:var(--accent); }
.back-link {
  display:inline-flex; align-items:center; gap:0.5rem;
  color:var(--muted); text-decoration:none; font-size:0.85rem;
  margin-bottom:2rem; transition:color 0.2s;
}
.back-link:hover { color:var(--accent); }

/* ── MOBILE ──────────────────────────────── */
@media(max-width:768px){
  body { overflow:auto; }
  nav { padding:1rem 1.5rem; }
  .nav-links {
    display:none; flex-direction:column; position:absolute;
    top:100%; left:0; right:0; background:var(--surface);
    padding:1rem 2rem; gap:1rem; border-bottom:1px solid var(--border-s);
    box-shadow:0 4px 14px rgba(37,99,235,0.08);
  }
  .nav-links.open { display:flex; }
  .burger { display:flex; }
  .dot-nav { display:none; }
  .section { padding:5rem 1.5rem 5rem; height:auto; min-height:100vh; }
  #about .grid-2, #contact .grid-2 { grid-template-columns:1fr; }
  footer { padding:0.75rem 1.5rem; flex-direction:column; gap:0.4rem; text-align:center; }
  #cookie-banner { padding:1rem 1.5rem; }
  #publications .pub-scroll { height:auto; max-height:60vh; }
  .research-stats { gap:0.75rem; }
}
