:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #172033;
  --muted: #64748b;
  --tag-text: #526075;
  --line: #e2e8f0;
  --accent: #0f8ebd;
  --accent-strong: #08749d;
  --accent-soft: #e5f6fc;
  --page-gutter: #f4f4f5;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-nav: 0 3px 14px rgba(15, 23, 42, .08);
  --radius: 14px;
  --display: "Raleway", Arial, sans-serif;
  --body: "Roboto", Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #18181b;
  --surface: #18181b;
  --surface-soft: #27272a;
  --text: #f4f4f5;
  --muted: #9f9fa9;
  --tag-text: #d4d4d8;
  --line: #3f3f4666;
  --accent: #00d3bd;
  --accent-strong: #46ecd5;
  --accent-soft: #00d3bd1a;
  --page-gutter: #000;
  --shadow: 0 14px 32px rgba(0, 0, 0, .25);
  --shadow-nav: 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { overflow-y: scroll; scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; overflow-x: hidden; background: var(--page-gutter); color: var(--text); font-family: var(--body); line-height: 1.7; -webkit-font-smoothing: antialiased; }
.site-header, body > main, .site-footer { width: min(100%, 1216px); margin-inline: auto; background: var(--bg); }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-strong); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img { max-width: 100%; }
button { font: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-family: var(--display); line-height: 1.18; }
p { margin: 0; }
.shell { width: min(100% - 40px, 1080px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 8px 12px; transform: translateY(-160%); background: var(--text); color: var(--bg); border-radius: 8px; }
.skip-link:focus { transform: none; }
.site-header { position: relative; z-index: 20; width: min(100%, 1216px); min-height: 108px; }
.nav-wrap { position: absolute; top: 18px; left: 50%; width: 350px; transform: translateX(-50%); }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; padding: 5px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-nav); backdrop-filter: blur(12px); }
.site-nav a { flex: 1; padding: 8px 6px; border-radius: 999px; color: var(--muted); font-size: .875rem; font-weight: 500; text-align: center; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-soft); }
.nav-home { position: absolute; left: max(20px, calc((100% - 1080px) / 2)); top: 23px; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; box-shadow: var(--shadow-nav); }
.nav-home img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.theme-toggle, .menu-toggle { position: absolute; top: 25px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; box-shadow: var(--shadow-nav); }
.theme-toggle { right: max(20px, calc((100% - 1080px) / 2)); }
.menu-toggle { display: none; right: 72px; }
.theme-toggle:hover, .menu-toggle:hover { color: var(--accent); }
.theme-toggle svg, .menu-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
[data-theme="dark"] .icon-sun, :root:not([data-theme="dark"]) .icon-moon { display: none; }
.hero { padding: 70px 0 20px; }
.hero h1 { max-width: 820px; font-size: clamp(2.5rem, 6vw, 4.35rem); letter-spacing: -.045em; }
.hero-lead { max-width: 670px; margin-top: 26px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.16rem); }
.social-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.social-row a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .9rem; font-weight: 500; }
.social-row a:hover { color: var(--accent-strong); }
.social-row svg { width: 18px; height: 18px; fill: currentColor; }
.photo-strip-wrap { overflow: visible; padding: 6px 0 56px; }
.photo-strip { position: relative; left: 50%; display: flex; justify-content: center; gap: clamp(14px, 1.7vw, 24px); width: max-content; min-width: 100%; padding: 8px 24px 16px; transform: translateX(-50%); }
.photo { width: clamp(240px, 24vw, 300px); height: clamp(270px, 28vw, 330px); flex: none; margin: var(--offset, 0) 0 0; overflow: hidden; background: var(--surface-soft); border-radius: var(--radius); box-shadow: var(--shadow); transform: rotate(var(--tilt)); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.poster img { object-position: top center; }
.photo.dashboard img { object-position: left top; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(275px, .75fr); gap: clamp(46px, 8vw, 90px); padding-bottom: 96px; }
.feed { display: grid; gap: 46px; }
.home-section-title { font-size: 1.05rem; letter-spacing: .02em; }
.feed-item { position: relative; padding-left: 24px; border-left: 1px solid var(--line); }
.feed-meta, .eyebrow, .card-label, .item-meta { color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.feed-item h2 { margin-top: 8px; font-size: 1.3rem; letter-spacing: -.02em; }
.feed-item p { margin-top: 12px; color: var(--muted); font-size: .94rem; }
.read-link { display: inline-flex; gap: 7px; align-items: center; margin-top: 14px; color: var(--accent-strong); font-size: .9rem; font-weight: 700; }
.feed-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.read-link span { transition: transform .18s ease; }
.read-link:hover span { transform: translateX(3px); }
.sidebar { display: grid; align-content: start; gap: 28px; }
.side-card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.side-card-header { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
.side-card-header svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.side-card h2 { font-size: 1rem; }
.bench-list { display: grid; gap: 18px; }
.bench-item { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; }
.bench-icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--accent-strong); background: var(--accent-soft); border-radius: 10px; font-family: var(--display); font-size: .72rem; font-weight: 800; }
.bench-item strong { display: block; font-family: var(--display); font-size: .88rem; line-height: 1.25; }
.bench-item small { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }
.side-card p { color: var(--muted); font-size: .9rem; }
.side-card .read-link { margin-top: 18px; }
.section-intro { padding: 76px 0 54px; }
.section-intro .eyebrow { margin-bottom: 18px; color: var(--accent-strong); }
.section-intro h1 { max-width: 800px; font-size: clamp(2.35rem, 5.5vw, 4rem); letter-spacing: -.045em; }
.section-intro > p:not(.eyebrow) { max-width: 660px; margin-top: 24px; color: var(--muted); font-size: 1.05rem; }
.content-section { padding-bottom: 96px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.project-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.project-card-media { display: block; height: 245px; overflow: hidden; background: var(--surface-soft); }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.project-card:hover .project-card-media img { transform: scale(1.015); }
.project-wordmark { display: grid; place-items: center; background: linear-gradient(135deg, #0f172a, #164e63); color: #e6f7ff; font: 700 clamp(2rem, 5vw, 3.5rem)/1 "Raleway", sans-serif; letter-spacing: -.04em; }
.project-wordmark span { transform: translateY(-.05em); }
.project-card-media.dashboard img { object-position: left top; }
.project-card-media.poster img { object-position: top center; }
.project-card-body { padding: 25px; }
.project-card h2 { margin-top: 8px; font-size: 1.35rem; }
.project-card p { margin-top: 12px; color: var(--muted); font-size: .93rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { padding: 4px 9px; color: var(--tag-text); background: var(--surface-soft); border-radius: 999px; font-size: .72rem; }
.list-stack { border-top: 1px solid var(--line); }
.list-row { display: grid; grid-template-columns: 105px minmax(0, 1fr) 24px; gap: 24px; align-items: start; padding: 28px 4px; border-bottom: 1px solid var(--line); }
.list-row:hover h2 { color: var(--accent-strong); }
.list-row .item-meta { padding-top: 4px; }
.list-row h2 { font-size: 1.25rem; transition: color .18s ease; }
.list-row p { margin-top: 8px; color: var(--muted); font-size: .9rem; }
.list-row .arrow { color: var(--accent-strong); font-size: 1.25rem; }
.list-row-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.list-row-links a { color: var(--accent-strong); font-size: .85rem; font-weight: 700; }
.empty-note { margin-top: 42px; padding: 24px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.article-header { padding: 70px 0 46px; }
.article-header .eyebrow { color: var(--accent-strong); }
.article-header h1 { max-width: 900px; margin-top: 17px; font-size: clamp(2.35rem, 5.6vw, 4.35rem); letter-spacing: -.05em; }
.article-deck { max-width: 710px; margin-top: 22px; color: var(--muted); font-size: 1.1rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 25px; color: var(--muted); font-size: .83rem; }
.article-figure { margin: 8px auto 56px; }
.article-figure img { display: block; width: 100%; max-height: 620px; object-fit: cover; object-position: top; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-figure figcaption { margin-top: 10px; color: var(--muted); font-size: .8rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: clamp(45px, 8vw, 90px); padding-bottom: 100px; }
.prose { min-width: 0; }
.prose h2 { margin: 48px 0 14px; font-size: 1.7rem; letter-spacing: -.025em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 30px 0 10px; font-size: 1.15rem; }
.prose p + p { margin-top: 18px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 34px 0; padding-left: 22px; color: var(--muted); border-left: 3px solid var(--accent); font-size: 1.1rem; }
.research-figure { margin: 38px 0; }
.research-figure img { display: block; width: 100%; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.research-figure figcaption { margin-top: 10px; color: var(--muted); font-size: .8rem; }
.article-aside { align-self: start; position: sticky; top: 24px; padding-top: 15px; border-top: 1px solid var(--line); }
.article-aside h2 { font-size: .9rem; }
.article-aside ul { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.article-aside a { color: var(--muted); font-size: .83rem; }
.article-aside a:hover { color: var(--accent-strong); }
.article-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-size: .85rem; font-weight: 700; }
.button:hover { color: var(--accent-strong); border-color: var(--accent); }
.button.primary { color: white; background: var(--accent-strong); border-color: var(--accent-strong); }
.button.primary:hover { color: white; filter: brightness(.94); }
.contact-intro { padding-bottom: 42px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr); gap: clamp(32px, 7vw, 80px); align-items: start; padding-bottom: 100px; }
.contact-form { display: grid; gap: 20px; padding: clamp(24px, 4vw, 38px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-field { display: grid; gap: 7px; }
.form-field label { color: var(--text); font-family: var(--display); font-size: .85rem; font-weight: 700; }
.form-field input, .form-field textarea { width: 100%; padding: 12px 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; font: inherit; line-height: 1.5; transition: border-color .18s ease, box-shadow .18s ease; }
.form-field textarea { min-height: 190px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.form-submit { justify-self: start; gap: 8px; min-width: 160px; cursor: pointer; }
.contact-aside { padding: 24px 0 0; border-top: 1px solid var(--line); }
.contact-aside h2 { margin-top: 10px; font-size: 1.35rem; }
.contact-aside > p:not(.card-label) { margin-top: 14px; color: var(--muted); font-size: .92rem; }
.message-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.message-card { width: min(100%, 580px); padding: clamp(30px, 6vw, 56px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.message-card h1 { margin-top: 14px; font-size: clamp(2rem, 6vw, 3.1rem); letter-spacing: -.04em; }
.message-card > p:not(.eyebrow) { margin-top: 18px; color: var(--muted); }
.message-card .button { margin-top: 28px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) 320px; gap: clamp(50px, 9vw, 100px); padding-bottom: 80px; }
.about-copy h2 { margin: 44px 0 14px; font-size: 1.65rem; }
.about-copy h2:first-child { margin-top: 0; }
.about-copy p + p { margin-top: 17px; }
.about-copy p { color: var(--muted); }
.about-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-photo .social-row { margin-top: 22px; }
.timeline { margin-top: 54px; border-top: 1px solid var(--line); }
.timeline h2 { margin: 44px 0 15px; font-size: 1.55rem; }
.timeline-row { display: grid; grid-template-columns: 145px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.timeline-row time { color: var(--muted); font-size: .8rem; }
.timeline-row h3 { font-size: 1rem; }
.timeline-row p { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.site-footer { padding: 42px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a, .copyright { color: var(--muted); font-size: .82rem; }
.footer-links a:hover { color: var(--accent-strong); }
.not-found { min-height: calc(100vh - 220px); display: grid; place-items: center; text-align: center; }
.not-found strong { display: block; color: var(--accent); font-family: var(--display); font-size: 6rem; line-height: 1; }
.not-found h1 { margin-top: 18px; font-size: 2.2rem; }
.not-found p { margin: 14px auto 24px; color: var(--muted); }
@media (max-width: 800px) {
  .site-header { min-height: 88px; }
  .nav-wrap { position: static; width: auto; padding: 16px 74px 0; transform: none; }
  .site-nav { display: none; position: fixed; inset: 76px 16px auto; flex-direction: column; align-items: stretch; width: auto; padding: 10px; border-radius: var(--radius); }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 11px 14px; border-radius: 8px; }
  .nav-home { top: 18px; left: 16px; }
  .theme-toggle { top: 20px; right: 16px; }
  .menu-toggle { display: grid; top: 20px; right: 68px; }
  .hero { padding-top: 44px; }
  .home-grid, .article-layout, .about-grid, .contact-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-aside { position: static; order: -1; }
  .project-grid { grid-template-columns: 1fr; }
  .photo { width: 210px; height: 245px; }
  .list-row { grid-template-columns: 80px minmax(0, 1fr) 18px; gap: 14px; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 30px, 1080px); }
  .hero h1 { font-size: 2.55rem; }
  .photo-strip { left: 0; justify-content: flex-start; padding-inline: 38px; transform: none; }
  .photo { width: 190px; height: 225px; }
  .home-grid { gap: 54px; }
  .sidebar { grid-template-columns: 1fr; }
  .project-card-media { height: 210px; }
  .list-row { grid-template-columns: 1fr 18px; }
  .list-row .item-meta { grid-column: 1 / -1; }
  .timeline-row { grid-template-columns: 1fr; gap: 7px; }
  .form-row { grid-template-columns: 1fr; }
  .form-submit { width: 100%; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
