/* 2026 portfolio theme — self-contained, loaded only on the landing page. */
:root {
  --bg: #f7f8fa;
  --bg-soft: #eef1f6;
  --surface: #ffffff;
  --text: #1b2233;
  --muted: #5d6b82;
  --line: #dfe4ec;
  --accent: #4f46e5;
  --accent-2: #06b6d4;
  --accent-soft: rgba(79, 70, 229, .09);
  --shadow: 0 18px 50px -20px rgba(27, 34, 51, .25);
  --radius: 18px;
  --maxw: 1120px;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-body);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-soft: #121a30;
    --surface: #141c33;
    --text: #eef2ff;
    --muted: #9aa8c2;
    --line: #26314c;
    --accent: #8b83ff;
    --accent-2: #38d6e8;
    --accent-soft: rgba(139, 131, 255, .14);
    --shadow: 0 20px 60px -24px rgba(0, 0, 0, .7);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body.pf {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(var(--maxw), calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; transition: background .3s, box-shadow .3s, border-color .3s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.04em; }
.brand-dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 13px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); background: var(--accent-soft); }
.nav-links .nav-blog { color: var(--accent); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; width: 42px; height: 42px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .25s; }

/* Shared */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-label { font-family: var(--font-display); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 20px; font-weight: 600; }
.section-title { font-family: var(--font-display); font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.04em; margin: 0 0 18px; font-weight: 700; }
.section-intro { color: var(--muted); max-width: 620px; margin: 0 0 48px; font-size: 17px; }
.accent { color: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 14px; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px var(--accent); }
.btn-primary:hover { box-shadow: 0 16px 30px -12px var(--accent); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 130px 0 70px; overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 700px; height: 700px; top: -280px; right: -200px; background: radial-gradient(circle, var(--accent-soft), transparent 65%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 60px; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 24px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.16); }
.hero h1 { font-family: var(--font-display); font-size: clamp(44px, 6.5vw, 82px); line-height: 1.03; letter-spacing: -.055em; margin: 0 0 26px; font-weight: 700; }
.hero-lede { font-size: 18px; color: var(--muted); max-width: 540px; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.social-row { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.social-row a { font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.social-row a:hover { color: var(--accent); border-color: var(--accent); }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; }
.hero-avatar { width: clamp(240px, 28vw, 340px); aspect-ratio: 1; object-fit: cover; border-radius: 30% 70% 60% 40% / 45% 40% 60% 55%; box-shadow: var(--shadow); position: relative; z-index: 2; border: 6px solid var(--surface); animation: morph 14s ease-in-out infinite alternate; }
@keyframes morph { to { border-radius: 60% 40% 35% 65% / 55% 60% 40% 45%; } }
.hero-orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbit-a { width: 390px; height: 390px; animation: spin 30s linear infinite; }
.orbit-b { width: 300px; height: 300px; border-style: dashed; animation: spin 22s linear infinite reverse; }
.orbit-a::after, .orbit-b::after { content: ''; position: absolute; width: 12px; height: 12px; background: var(--accent-2); border-radius: 50%; top: -6px; left: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-chip { position: absolute; z-index: 3; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 9px 15px; border-radius: 99px; font-size: 12px; font-weight: 600; font-family: var(--font-display); white-space: nowrap; }
.chip-1 { top: 16%; left: -2%; transform: rotate(-6deg); }
.chip-2 { bottom: 14%; right: -4%; transform: rotate(5deg); }
.scroll-cue { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 50px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.scroll-line { width: 60px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.scroll-line::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform: translateX(-100%); animation: slide 2.4s ease-in-out infinite; }
@keyframes slide { 50% { transform: translateX(0); } 100% { transform: translateX(100%); } }

/* About */
.section-about { background: var(--bg-soft); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about-body p { color: var(--muted); margin: 0 0 18px; }
.about-body p:first-child { color: var(--text); font-size: 18px; }
.about-note { font-style: italic; border-left: 2px solid var(--accent); padding-left: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 60px 0 0; padding-top: 40px; border-top: 1px solid var(--line); }
.stat dt { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stat dd { font-family: var(--font-display); font-size: 44px; font-weight: 700; margin: 6px 0 0; line-height: 1; }
.stat dd span { color: var(--accent); }
.stat dd.stat-text { font-size: 20px; line-height: 1.3; }
.credentials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.cred-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.credentials p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

/* Projects bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 12px; transition: transform .25s, box-shadow .25s, border-color .25s; min-width: 0; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card-featured { grid-column: span 2; min-height: 280px; }
.card-accent { background: linear-gradient(145deg, var(--accent-soft), var(--surface) 70%); }
.card-small { grid-column: span 1; padding: 20px; min-height: 170px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-index { font-family: var(--font-display); font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.pill { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 5px 11px; }
.pill-live { color: #059669; background: rgba(5,150,105,.12); }
.card h3 { font-family: var(--font-display); font-size: 20px; line-height: 1.25; letter-spacing: -.02em; margin: 4px 0 0; }
.card-small h3 { font-size: 16px; }
.card h3 a:hover { color: var(--accent); }
.card p { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 500; flex-wrap: wrap; }
.stars { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }
.lang { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #888; }
.lang-python { background: #3776ab; } .lang-js { background: #f7df1e; } .lang-ts { background: #3178c6; }
.lang-html { background: #e34f26; } .lang-jupyter { background: #f37626; } .lang-scss { background: #cd6799; } .lang-other { background: var(--accent-2); }
.card-demo { font-size: 13px; font-weight: 600; color: var(--accent); }
.card-demo:hover { text-decoration: underline; }
.work-more { margin: 40px 0 0; text-align: center; }

/* Talks */
.section-talks { background: var(--bg-soft); }
.talk-list { display: grid; gap: 12px; margin-top: 40px; }
.subhead { font-family: var(--font-display); font-size: 24px; letter-spacing: -.02em; margin: 56px 0 0; }
.talk { display: grid; grid-template-columns: 100px 1fr 30px; align-items: center; gap: 24px; padding: 22px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: transform .2s, border-color .2s; }
.talk:hover { transform: translateX(6px); border-color: var(--accent); }
.talk-year { font-family: var(--font-display); font-size: 13px; color: var(--accent); font-weight: 600; }
.talk-body { display: flex; flex-direction: column; }
.talk-body strong { font-family: var(--font-display); font-size: 17px; }
.talk-body span { font-size: 13px; color: var(--muted); }
.talk-arrow { color: var(--muted); font-size: 18px; }

/* Career timeline */
.timeline { list-style: none; margin: 50px 0 0; padding: 0 0 0 32px; border-left: 2px solid var(--line); }
.timeline-item { position: relative; padding: 0 0 44px 16px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -43px; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 4px solid var(--accent); }
.timeline-dot.current { background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.timeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.timeline-head h3 { font-family: var(--font-display); font-size: 19px; margin: 0; }
.timeline-date { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.timeline-role { font-size: 14px; font-weight: 600; color: var(--text); margin: 8px 0 2px; }
.timeline-date-inline { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.timeline-item p:last-child { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

/* Skills */
.skill-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-group { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.skill-group h3 { font-family: var(--font-display); font-size: 16px; margin: 0 0 12px; color: var(--accent); }
.skill-group p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }

/* Footer CTAs */
.section-cta { background: var(--bg-soft); padding-top: 0; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cta-panel { display: flex; flex-direction: column; gap: 8px; padding: 34px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: transform .2s, border-color .2s; }
.cta-panel:hover { transform: translateY(-4px); border-color: var(--accent); }
.cta-blog { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.cta-kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; opacity: .75; }
.cta-panel strong { font-family: var(--font-display); font-size: 24px; }
.cta-panel > span:last-child { font-size: 14px; color: var(--muted); }
.cta-blog > span:last-child { color: rgba(255,255,255,.85); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-grid p { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.footer-grid nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-grid nav a { font-size: 13px; font-weight: 600; color: var(--muted); }
.footer-grid nav a:hover { color: var(--accent); }
.footer-copy { margin: 0; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { min-height: 320px; order: -1; }
  .hero-avatar { width: 230px; }
  .orbit-a { width: 290px; height: 290px; } .orbit-b { width: 230px; height: 230px; }
  .chip-1 { left: 8%; } .chip-2 { right: 6%; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .skill-groups { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 24px 20px; flex-direction: column; align-items: stretch; gap: 2px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav-toggle { display: block; }
}
@media (max-width: 620px) {
  .container { width: min(var(--maxw), calc(100% - 36px)); }
  .hero { padding-top: 110px; }
  .hero h1 { font-size: clamp(40px, 12vw, 60px); }
  .bento { grid-template-columns: 1fr; }
  .card-featured { grid-column: span 1; min-height: 0; }
  .card-small { grid-column: span 1; }
  .stat-grid, .skill-groups, .cta-grid, .credentials { grid-template-columns: 1fr; }
  .talk { grid-template-columns: 1fr 24px; }
  .talk-year { grid-column: 1 / -1; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
