/* ──────────────────────────────────────────────────────────────
   Palette: ArrowWatch slate + target-face accents
   ────────────────────────────────────────────────────────────── */
:root {
  --bg:          #0F172A;
  --surface:     #1E293B;
  --surface-2:   #273449;
  --line:        #334155;
  --text:        #F1F5F9;
  --text-2:      #CBD5E1;
  --muted:       #94A3B8;

  --gold:        #E0B252;   /* bullseye */
  --gold-soft:   rgba(224, 178, 82, 0.14);
  --cyan:        #22D3EE;   /* ArrowWatch accent */
  --cyan-dim:    #0891B2;
  --red:         #C2413A;   /* target red */
  --blue:        #2F6FB0;   /* target blue */

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --radius: 14px;
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cyan); }
h1, h2, h3 { color: var(--text); font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
h4 { margin: 0; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(24px, calc((100vw - var(--maxw)) / 2 + 24px));
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand:hover { color: var(--text); }
.brand svg { width: 26px; height: 26px; }
.brand .r1 { fill: none; stroke: var(--line); stroke-width: 2; }
.brand .r2 { fill: none; stroke: var(--cyan-dim); stroke-width: 2; }
.brand .r3 { fill: var(--gold); }
.nav nav { display: flex; gap: 28px; align-items: center; }
.nav nav a { color: var(--muted); font-size: .92rem; font-weight: 500; }
.nav nav a:hover { color: var(--text); }
.nav .nav-cta { color: var(--gold); border: 1px solid rgba(224,178,82,.4); padding: 6px 14px; border-radius: 999px; }
.nav .nav-cta:hover { background: var(--gold-soft); color: var(--gold); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  padding-top: 88px; padding-bottom: 40px;
}
.eyebrow, .kicker, .pub-venue, .years, .stat-label, .skill-group h4, .contact-links span {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow { color: var(--cyan); margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.2rem); font-weight: 500; letter-spacing: -.01em; margin-bottom: 24px; }
.hero h1 em { color: var(--gold); font-style: italic; }
.lede { font-size: 1.12rem; color: var(--text-2); max-width: 36em; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: .95rem; transition: all .2s; }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: #EBC46E; color: var(--bg); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.hero-head { display: flex; align-items: center; gap: 36px; margin-bottom: 24px; }
.hero-head h1 { margin-bottom: 0; max-width: 15em; }
.portrait {
  flex: 0 0 auto; width: 150px; height: 150px; object-fit: cover; object-position: 50% 30%;
  border-radius: 50%;
  border: 3px solid var(--gold);
  outline: 1px solid rgba(224,178,82,.35); outline-offset: 6px;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}



/* ── Stat tiles (ArrowWatch analytics feel) ─────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-bottom: 32px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 8px;
  border-top: 3px solid var(--gold);
}
.stat:nth-child(2) { border-top-color: var(--cyan-dim); }
.stat:nth-child(3) { border-top-color: var(--red); }
.stat:nth-child(4) { border-top-color: var(--blue); }
.stat-num { font-family: var(--serif); font-size: 2.4rem; font-weight: 600; color: var(--text); line-height: 1; }
.stat-label { color: var(--muted); letter-spacing: .06em; line-height: 1.5; text-transform: none; font-size: .78rem; }

/* ── Sections ───────────────────────────────────────────────── */
.section { padding-top: 96px; }
.section-head { margin-bottom: 40px; }
.kicker { color: var(--gold); display: block; margin-bottom: 12px; }
.section h2, .footer h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 500; }
.section-sub { color: var(--muted); margin: 12px 0 0; }

/* thin "arrow" rule under section headings */
.section-head::after {
  content: ""; display: block; width: 120px; height: 10px; margin-top: 18px;
  background:
    linear-gradient(var(--gold), var(--gold)) left center / 100% 1.5px no-repeat;
  -webkit-mask: linear-gradient(90deg, #000 88%, transparent 88%);
  position: relative;
}
.section-head { position: relative; }
.section-head::before {
  content: ""; position: absolute; bottom: 1px; left: 108px;
  border-left: 8px solid var(--gold); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { font-size: 1.45rem; margin-bottom: 10px; }

/* ── About ─────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.prose strong { color: var(--text); font-weight: 600; }
.strengths h3 { margin-bottom: 18px; }
ul.arrows { list-style: none; padding: 0; margin: 0; }
ul.arrows li { position: relative; padding: 9px 0 9px 30px; border-bottom: 1px solid var(--line); font-size: .96rem; }
ul.arrows li:last-child { border-bottom: 0; }
ul.arrows li::before {
  content: ""; position: absolute; left: 0; top: 19px; width: 18px; height: 1.5px; background: var(--gold);
}
ul.arrows li::after {
  content: ""; position: absolute; left: 14px; top: 16px;
  border-left: 7px solid var(--gold); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}

/* ── Timeline ──────────────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 180px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.role { display: grid; grid-template-columns: 180px 1fr; gap: 0; padding-bottom: 36px; position: relative; }
.role::before {
  content: ""; position: absolute; left: 174px; top: 7px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--gold);
}
.role:first-child::before { background: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.role-meta { padding-right: 28px; text-align: right; }
.years { color: var(--muted); }
.role-body { padding-left: 36px; }
.role-body h3 { font-size: 1.5rem; margin-bottom: 8px; }
.role-body p { margin-bottom: 12px; max-width: 46em; }
.at { display: inline-block; color: var(--gold); font-family: var(--sans); font-size: .95rem; font-weight: 500; margin-left: 8px; }
.at::before { content: "@ "; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags span {
  font-size: .76rem; font-weight: 500; color: var(--cyan); background: rgba(8,145,178,.12);
  border: 1px solid rgba(34,211,238,.22); padding: 3px 11px; border-radius: 999px;
}

.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.edu-school { display: block; font-family: var(--serif); font-size: 1.3rem; color: var(--text); font-weight: 600; }
.edu-deg { font-size: .92rem; color: var(--muted); }

/* ── Research & projects ───────────────────────────────────── */
.pubs, .projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.projects { grid-template-columns: repeat(2, 1fr); }
.pub, .project { display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.pub:hover, .project:hover { border-color: rgba(224,178,82,.5); transform: translateY(-2px); }
.pub-venue { color: var(--cyan); margin-bottom: 10px; }
.pub h3 a, .project h3 a { color: var(--text); }
.pub h3 a:hover, .project h3 a:hover { color: var(--gold); }
.pub-authors { font-size: .88rem; color: var(--muted); }
.pub-authors strong { color: var(--text-2); }
.pub p:last-child, .project p:last-child { font-size: .95rem; }

.project.feature {
  grid-column: 1 / -1; flex-direction: row; gap: 36px; align-items: flex-start;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}

/* ── Video preview card ───────────────────────────────────── */
.video-card {
  display: flex; align-items: center; gap: 18px; margin-top: 16px; max-width: 520px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px;
  color: var(--text); transition: border-color .2s, transform .2s;
}
.video-card:hover { border-color: rgba(224,178,82,.5); color: var(--text); transform: translateY(-2px); }
.video-thumb { position: relative; flex: 0 0 180px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; background: rgba(15,23,42,.8); border: 1.5px solid var(--gold);
}
.play::after {
  content: ""; position: absolute; top: 50%; left: 55%; transform: translate(-50%, -50%);
  border-left: 12px solid var(--gold); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.video-text { display: flex; flex-direction: column; gap: 4px; }
.video-text .pub-venue { margin: 0; }
.video-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.25; }

/* ── Fold-down details ───────────────────────────────────── */
.project-main { flex: 1; min-width: 0; }
.folds { margin-top: 20px; border-top: 1px solid var(--line); }
.folds details { border-bottom: 1px solid var(--line); }
.folds summary {
  cursor: pointer; list-style: none; padding: 13px 0; color: var(--text); font-weight: 500; font-size: .96rem;
  display: flex; align-items: center; gap: 12px;
}
.folds summary::-webkit-details-marker { display: none; }
.folds summary::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin-left: 2px;
  border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg); transition: transform .2s;
}
.folds details[open] summary::before { transform: rotate(45deg); }
.folds summary:hover { color: var(--gold); }
.folds details p { margin: 0 0 16px 21px; font-size: .95rem; }

/* ── Screenshot gallery ──────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 18px 21px; }
.gallery-single { grid-template-columns: minmax(0, 300px); }
.shot { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.shot a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #F8FAFC; transition: border-color .2s; }
.shot a:hover { border-color: var(--gold); }
.shot img { width: 100%; height: auto; }
.shot figcaption { font-size: .8rem; line-height: 1.45; color: var(--muted); }

/* ── Skills ───────────────────────────────────────────────── */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.skill-group { padding: 22px 24px 22px 0; border-bottom: 1px solid var(--line); }
.skill-group h4 { color: var(--gold); margin-bottom: 8px; font-weight: 500; }
.skill-group p { margin: 0; font-size: .95rem; }

/* ── Footer / contact ─────────────────────────────────────── */
.footer { margin-top: 110px; background: #0B1222; border-top: 1px solid var(--line); padding: 80px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.footer h2 { margin-bottom: 14px; }
.contact-links { list-style: none; margin: 0; padding: 0; }
.contact-links li { border-bottom: 1px solid var(--line); }
.contact-links a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; color: var(--text); font-weight: 500; }
.contact-links a:hover { color: var(--gold); }
.contact-links span { color: var(--muted); }
.copyright { margin-top: 64px; font-size: .82rem; color: var(--muted); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .footer-inner, .edu { grid-template-columns: 1fr; }
  .pubs, .projects { grid-template-columns: 1fr; }
  .project.feature { flex-direction: column; align-items: flex-start; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery-single { grid-template-columns: minmax(0, 300px); }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { padding: 12px 16px; }
  .nav nav a:not(.nav-cta) { display: none; }
  .section { padding-top: 72px; }
  .hero-head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .portrait { width: 104px; height: 104px; }
  .timeline::before { left: 5px; }
  .role { grid-template-columns: 1fr; }
  .role::before { left: -1px; }
  .role-meta { text-align: left; padding: 0 0 4px 28px; }
  .role-body { padding-left: 28px; }
  .at { display: block; margin: 4px 0 0; }
  .card { padding: 22px; }
  .video-card { flex-direction: column; align-items: stretch; }
  .video-thumb { flex: none; }
  .gallery { grid-template-columns: 1fr; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ── LeafArt card ─────────────────────────────────────────── */
.project.feature.leaf-card { flex-direction: column; align-items: stretch; gap: 24px; }
.leaf-preview {
  position: relative; width: 100%; aspect-ratio: 21 / 8; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #1b1320, #07060a 75%); border: 1px solid var(--line);
}
.leaf-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.leaf-open {
  position: absolute; right: 12px; bottom: 12px; font-size: .78rem; font-weight: 500;
  color: var(--text); background: rgba(15,23,42,.75); border: 1px solid rgba(224,178,82,.4);
  padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(6px);
}
.leaf-open:hover { color: var(--gold); }
@media (max-width: 700px) { .leaf-preview { aspect-ratio: 4 / 3; } }
.folds ul.fold-list { margin: -4px 0 16px 21px; }
.folds ul.fold-list li { font-size: .93rem; padding-top: 7px; padding-bottom: 7px; }
.folds ul.fold-list li::before { top: 17px; }
.folds ul.fold-list li::after { top: 14px; }
.folds ul.fold-list strong { color: var(--text); font-weight: 600; }
.gallery-watch { grid-template-columns: repeat(3, minmax(0, 170px)); }
.shot.watch a { border-radius: 50%; background: #000; border-color: var(--line); }
.shot.watch figcaption { text-align: center; }
@media (max-width: 700px) { .gallery-watch { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
