/* ==========================================================
   Arghyadeep Basu — personal site
   ========================================================== */

:root {
  --bg: #060914;
  --bg-2: #0b1020;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #e9edf6;
  --muted: #9ba5bc;
  --faint: #6b7590;
  --amber: #ffb259;
  --rose: #ff7a6b;
  --blue: #79acff;
  --grad: linear-gradient(120deg, var(--amber) 0%, var(--rose) 45%, var(--blue) 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --max: 1160px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background: starfield canvas + soft nebula glows */
#stars {
  position: fixed; inset: 0; z-index: -2;
  width: 100%; height: 100%;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(255, 140, 80, 0.13), transparent 60%),
    radial-gradient(800px 600px at -10% 30%, rgba(90, 140, 255, 0.12), transparent 60%),
    radial-gradient(700px 500px at 60% 110%, rgba(170, 90, 255, 0.10), transparent 60%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p a, li a, .link {
  color: var(--amber);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .3s ease, color .2s;
}
p a:hover, li a:hover, .link:hover { background-size: 100% 1px; }

::selection { background: rgba(255, 178, 89, 0.35); }

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.15rem; color: var(--text); }
.muted { color: var(--muted); }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
em.serif { font-family: var(--serif); font-style: italic; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(6, 9, 20, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(6, 9, 20, 0.82); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--serif); font-size: 1.2rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 6%, var(--amber) 22%, var(--rose) 48%, #3b2a78 75%, transparent 76%);
  box-shadow: 0 0 22px rgba(255, 160, 90, .45);
}
.nav-links { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a {
  display: block; padding: .5rem .85rem; border-radius: 999px;
  font-size: .93rem; color: var(--muted); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.nav-links .nav-cta a {
  color: #1a1206; background: var(--amber); font-weight: 600; margin-left: .5rem;
}
.nav-links .nav-cta a:hover { background: #ffc47f; color: #1a1206; }

.menu-btn {
  display: none; background: none; border: 1px solid var(--line-2); color: var(--text);
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 18px; height: 1.5px; background: currentColor; margin: auto; position: relative; transition: .3s;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.nav-open .menu-btn span { background: transparent; }
.nav-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
.nav-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .25rem;
    padding: 1rem 20px 1.5rem; background: rgba(6, 9, 20, 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s ease;
  }
  .nav-links a { padding: .85rem 1rem; font-size: 1.05rem; border-radius: 12px; }
  .nav-links .nav-cta a { margin: .5rem 0 0; text-align: center; }
  .nav-open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.35rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--surface-2); border-color: rgba(255,255,255,.28); }
.btn-primary { background: var(--grad); color: #160d05; border: 0; box-shadow: 0 10px 30px -10px rgba(255, 140, 90, .6); }
.btn-primary:hover { background: var(--grad); box-shadow: 0 14px 36px -10px rgba(255, 140, 90, .8); }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.icon-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.icon-link {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--muted); background: var(--surface);
  transition: .2s; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.icon-link:hover { color: var(--text); border-color: var(--amber); transform: translateY(-2px); box-shadow: 0 0 18px rgba(255,178,89,.3); }
.icon-link svg { width: 19px; height: 19px; }

/* ---------- Sections ---------- */
section { padding: 96px 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); border: 0; margin: 0; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Hero (home) ---------- */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 64px; align-items: center; }
.hero h1 { margin-bottom: .2em; }
.pronounce { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.15rem; margin-bottom: 1.4rem; }
.hero .tagline { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--muted); max-width: 36ch; margin-bottom: 2rem; }
.hero .tagline strong { color: var(--text); font-weight: 500; }
.hero .btn-row { margin-bottom: 2rem; }

.portrait-wrap { position: relative; aspect-ratio: 1; max-width: 440px; margin-inline: auto; width: 100%; }
.portrait-wrap::before {
  content: ""; position: absolute; inset: -10%; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--amber), var(--rose), var(--blue), #7c5cff, var(--amber));
  filter: blur(46px); opacity: .45; animation: spin 18s linear infinite;
}
.portrait-wrap .orbit {
  position: absolute; inset: -5%; border-radius: 50%; border: 1px dashed rgba(255,255,255,.18);
  animation: spin 60s linear infinite;
}
.portrait-wrap .orbit::after {
  content: ""; position: absolute; top: 50%; right: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 16px var(--amber);
}
.portrait-wrap img {
  position: relative; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
}
.hero-badge {
  position: absolute; left: -6%; bottom: 8%;
  padding: .7rem 1rem; border-radius: 14px; font-size: .85rem; line-height: 1.35;
  background: rgba(10, 14, 28, .82); border: 1px solid var(--line-2); backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.hero-badge b { display: block; color: var(--amber); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .portrait-wrap { max-width: 300px; }
  .hero-badge { left: 0; }
}

/* Affiliation strip */
.affil {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
}
.affil > a, .affil > div {
  background: rgba(8, 12, 24, .92); padding: 1.4rem 1.5rem; transition: background .2s;
}
.affil > a:hover { background: rgba(20, 26, 46, .95); }
.affil small { display: block; color: var(--faint); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .3rem; }
.affil span { font-family: var(--serif); font-size: 1.08rem; }
@media (max-width: 900px) { .affil { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .affil { grid-template-columns: 1fr; } }

/* Intro prose + figure */
.intro-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: start; }
.intro-grid .prose p:first-of-type::first-letter {
  font-family: var(--serif); float: left; font-size: 3.6em; line-height: .85; padding: .08em .12em 0 0; color: var(--amber);
}
.sticky-fig { position: sticky; top: 100px; }
@media (max-width: 900px) { .intro-grid { grid-template-columns: 1fr; } .sticky-fig { position: static; } }

figure { margin: 0; }
figure img { border-radius: var(--radius-sm); border: 1px solid var(--line); background: #0a0e1c; }
figcaption { font-size: .84rem; color: var(--faint); margin-top: .7rem; line-height: 1.5; }

/* News timeline */
.news { display: grid; gap: 1rem; }
.news-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; align-items: center;
  padding: 1.4rem 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, transform .2s;
}
.news-item:hover { border-color: var(--line-2); transform: translateX(4px); }
.news-date { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); font-weight: 600; }
.news-item p { margin: 0; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); margin-right: .5rem; vertical-align: middle;
}
.tag.amber { color: var(--amber); border-color: rgba(255,178,89,.4); background: rgba(255,178,89,.08); }
.tag.blue { color: var(--blue); border-color: rgba(121,172,255,.4); background: rgba(121,172,255,.08); }
.tag.rose { color: var(--rose); border-color: rgba(255,122,107,.4); background: rgba(255,122,107,.08); }
@media (max-width: 640px) { .news-item { grid-template-columns: 1fr; gap: .4rem; } }

/* Tabs */
.tabs { display: inline-flex; gap: .25rem; padding: .3rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 2rem; }
.tabs button {
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--muted); background: none; border: 0;
  padding: .55rem 1.2rem; border-radius: 999px; cursor: pointer; transition: .2s;
}
.tabs button[aria-selected="true"] { color: #160d05; background: var(--amber); }
.tabs button .count { opacity: .65; font-weight: 500; margin-left: .3rem; }
.tab-panel[hidden] { display: none; }

/* Project cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }

.project {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); transition: transform .3s, border-color .3s, box-shadow .3s;
}
.project:hover { transform: translateY(-6px); border-color: var(--line-2); box-shadow: 0 24px 50px -24px rgba(255,140,90,.35); }
.project .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }
.project .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project:hover .thumb img { transform: scale(1.06); }
.project .body { padding: 1.2rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.project h3 { font-size: 1.15rem; margin: 0; }
.project .more { margin-top: auto; font-size: .88rem; font-weight: 600; color: var(--amber); display: inline-flex; gap: .35rem; align-items: center; }
.project .more .arrow { transition: transform .2s; }
.project:hover .more .arrow { transform: translateX(4px); }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding: 80px 0 40px; }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.page-hero p { max-width: 68ch; color: var(--muted); font-size: 1.12rem; }
.page-hero.banner {
  padding: 110px 0 70px; position: relative; overflow: hidden;
}
.page-hero.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url(../images/hero-reionization.jpg) center / cover;
  opacity: .22; mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

/* ---------- Research page ---------- */
.research-layout { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 100px; font-size: .9rem; }
.toc p { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: .8rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: .45rem 0 .45rem 1rem; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); line-height: 1.4; transition: .2s; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--amber); border-left-color: var(--amber); }
@media (max-width: 960px) { .research-layout { grid-template-columns: 1fr; } .toc { display: none; } }

.topic { padding: 0 0 72px; margin-bottom: 72px; border-bottom: 1px solid var(--line); }
.topic:last-child { border-bottom: 0; margin-bottom: 0; }
.topic-num { font-family: var(--serif); font-size: 1rem; color: var(--amber); font-style: italic; margin-bottom: .4rem; display: block; }
.topic h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.topic .figs { display: grid; gap: 1rem; margin-top: 1.8rem; }
.topic .figs.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .topic .figs.two { grid-template-columns: 1fr; } }
.topic figure img { background: #fff; }
.topic figure.dark img { background: #0a0e1c; }

.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 860px) { .resource-grid { grid-template-columns: 1fr; } }
.resource {
  padding: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; gap: .5rem; transition: .25s;
}
.resource:hover { border-color: var(--amber); transform: translateY(-4px); }
.resource .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,178,89,.1); color: var(--amber); margin-bottom: .4rem; }
.resource .ico svg { width: 22px; height: 22px; }
.resource h3 { margin: 0; font-size: 1.2rem; }
.resource p { margin: 0; color: var(--muted); font-size: .95rem; }

.poster { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding: 2rem; }
@media (max-width: 860px) { .poster { grid-template-columns: 1fr; padding: 1.25rem; } }

/* ---------- Publications ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; max-width: 640px; }
.stat { padding: 1.1rem 1.3rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.stat b { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 500; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; counter-reset: pub; }
.pub {
  display: grid; grid-template-columns: 74px 1fr; gap: 1.3rem;
  padding: 1.3rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, background .2s;
}
.pub:hover { border-color: var(--line-2); background: var(--surface-2); }
.pub-year { font-family: var(--serif); font-size: 1.35rem; color: var(--amber); line-height: 1.3; }
.pub-topic { font-family: var(--serif); font-size: 1.15rem; margin-bottom: .25rem; }
.pub-authors { color: var(--muted); font-size: .95rem; margin-bottom: .25rem; }
.pub-authors b { color: var(--text); font-weight: 600; }
.pub-venue { font-size: .92rem; font-style: italic; color: var(--muted); }
.pub-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.chip {
  font-size: .76rem; font-weight: 600; letter-spacing: .04em; padding: .3rem .75rem; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text); transition: .2s;
}
.chip:hover { border-color: var(--amber); color: var(--amber); }
@media (max-width: 600px) { .pub { grid-template-columns: 1fr; gap: .3rem; } }

.pub-section + .pub-section { margin-top: 64px; }
.pub-section > h2 { display: flex; align-items: baseline; gap: .8rem; }
.pub-section > h2 small { font-family: var(--sans); font-size: .85rem; color: var(--faint); font-weight: 500; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .85fr 1.3fr; gap: 64px; align-items: start; }
.about-photo { position: sticky; top: 100px; }
.about-photo img { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .about-photo { position: static; max-width: 380px; } }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--amber), var(--blue)); opacity: .6; }
.timeline li { position: relative; padding: 0 0 2rem 2.4rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--amber); box-shadow: 0 0 12px rgba(255,178,89,.5);
}
.timeline li.now::before { background: var(--amber); }
.timeline .when { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); font-weight: 600; }
.timeline h3 { margin: .2rem 0 .3rem; font-size: 1.2rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .97rem; }

.hobbies { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.hobby { padding: 1.4rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.hobby .emoji { font-size: 1.6rem; margin-bottom: .4rem; display: block; }
.hobby h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.hobby p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 600px) { .hobbies { grid-template-columns: 1fr; } }

/* ---------- Network ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.person {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem;
  padding: 1.8rem 1.4rem 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  transition: transform .3s, border-color .3s;
}
.person:hover { transform: translateY(-6px); border-color: var(--amber); }
.avatar {
  width: 112px; height: 112px; border-radius: 50%; overflow: hidden; margin-bottom: .6rem;
  border: 2px solid var(--line-2); box-shadow: 0 0 0 6px rgba(255,255,255,.03);
  display: grid; place-items: center; font-family: var(--serif); font-size: 2rem;
  background: linear-gradient(135deg, rgba(255,178,89,.35), rgba(121,172,255,.35));
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.15rem; margin: 0; }
.person p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.person .more { margin-top: auto; padding-top: .6rem; font-size: .85rem; font-weight: 600; color: var(--amber); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact-grid img { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; max-width: 460px; }
.contact-cards { display: grid; gap: 1rem; margin-top: 2rem; }
.contact-card {
  display: flex; align-items: center; gap: 1.1rem; padding: 1.2rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); transition: .25s;
}
.contact-card:hover { border-color: var(--amber); transform: translateX(6px); }
.contact-card .ico { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,178,89,.1); color: var(--amber); }
.contact-card .ico svg { width: 22px; height: 22px; }
.contact-card small { display: block; color: var(--faint); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.contact-card span { font-weight: 500; word-break: break-all; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta {
  text-align: center; padding: 64px 32px; border-radius: 28px; position: relative; overflow: hidden;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(255,178,89,.18), transparent 70%),
    radial-gradient(600px 300px at 80% 100%, rgba(121,172,255,.18), transparent 70%),
    var(--bg-2);
}
.cta h2 { margin-bottom: .4em; }
.cta p { color: var(--muted); max-width: 56ch; margin: 0 auto 1.8rem; }
.cta .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; color: var(--faint); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-inner nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-inner nav a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Journey timeline (home) ---------- */
.journey-section { padding: 72px 0 96px; }
.journey {
  list-style: none; margin: 0; padding: 0; position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem;
}
/* the track runs through the dots */
.journey::before {
  content: ""; position: absolute; left: 0; right: 0; top: 41px; height: 2px;
  background: linear-gradient(90deg, rgba(121,172,255,.15), var(--blue) 25%, var(--rose) 70%, var(--amber));
  border-radius: 2px;
}
.journey li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.j-year {
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  height: 24px; white-space: nowrap;
}
.j-dot {
  width: 18px; height: 18px; border-radius: 50%; margin: 8px 0 18px; position: relative; z-index: 1;
  background: var(--bg); border: 2px solid var(--blue); box-shadow: 0 0 0 5px var(--bg);
}
.journey li:nth-child(3) .j-dot, .journey li:nth-child(4) .j-dot { border-color: var(--rose); }
.journey li.now .j-dot { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 5px var(--bg), 0 0 20px var(--amber); }
.journey li.now .j-dot::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--amber);
  animation: ping 2.2s ease-out infinite;
}
.journey li.now .j-year { color: var(--amber); }
@keyframes ping { from { transform: scale(1); opacity: .8; } to { transform: scale(2.6); opacity: 0; } }
.j-card {
  width: 100%; flex: 1; display: flex; flex-direction: column; gap: .2rem;
  padding: 1.1rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  transition: transform .25s, border-color .25s, background .25s;
}
.j-card:hover { transform: translateY(-4px); border-color: var(--line-2); background: var(--surface-2); }
.journey li.now .j-card { border-color: rgba(255,178,89,.45); background: rgba(255,178,89,.06); }
.j-role { font-family: var(--serif); font-size: 1.12rem; line-height: 1.25; }
.j-place { font-size: .88rem; color: var(--text); opacity: .85; line-height: 1.35; }
.j-loc { font-size: .78rem; color: var(--faint); margin-top: auto; padding-top: .3rem; }

@media (max-width: 860px) {
  .journey { grid-template-columns: 1fr; gap: 0; padding-left: 8px; }
  .journey::before { left: 16px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto;
    background: linear-gradient(180deg, rgba(121,172,255,.15), var(--blue) 25%, var(--rose) 70%, var(--amber)); }
  .journey li { display: grid; grid-template-columns: 18px 1fr; column-gap: 1.2rem; text-align: left; align-items: start; padding-bottom: 1.2rem; }
  .j-dot { grid-column: 1; grid-row: 1 / span 2; margin: 2px 0 0; }
  .j-year { grid-column: 2; grid-row: 1; height: auto; margin-bottom: .4rem; }
  .j-card { grid-column: 2; grid-row: 2; }
}

/* ---------- Citation badges (publications) ---------- */
.stats:has(#cite-total:not([hidden])) { grid-template-columns: repeat(4, 1fr); max-width: 860px; }
@media (max-width: 720px) { .stats:has(#cite-total:not([hidden])) { grid-template-columns: 1fr 1fr; } }
.page-hero .cite-updated { font-size: .82rem; margin: .8rem 0 0; }
.chip.cite {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--amber); border-color: rgba(255,178,89,.45); background: rgba(255,178,89,.08);
}
.chip.cite svg { width: 13px; height: 13px; }
.chip.cite:hover { background: rgba(255,178,89,.16); }
