@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #0b1110; --panel: #111b18; --ink: #edf6ef; --muted: #a8baad;
  --line: #2d4235; --accent: #b9f675; --accent-2: #83dec9;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
  --sans: 'Space Grotesk', Arial, sans-serif;
  font-family: var(--sans); scroll-behavior: smooth;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(185,246,117,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(185,246,117,.028) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent 850px); }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip-link { position: absolute; top: -5rem; left: 1rem; z-index: 10; padding: .7rem 1rem; background: var(--accent); color: var(--bg); }
.skip-link:focus { top: 1rem; }
.page-shell { max-width: 1480px; margin: auto; padding: 0 clamp(22px, 4.6vw, 74px); }

.site-header { min-height: 86px; display: flex; align-items: center; gap: clamp(20px, 3vw, 50px); border-bottom: 1px solid var(--line); }
.wordmark { flex: none; font: 700 1.43rem var(--mono); letter-spacing: -.08em; }
.wordmark > span:first-child, .wordmark > span:last-child { color: var(--accent); }
.wordmark-dot { color: var(--accent-2); }
.site-header nav { display: flex; gap: clamp(18px, 2.3vw, 38px); margin-left: auto; }
.site-header nav a, .header-contact { font: 600 .72rem var(--mono); white-space: nowrap; transition: color .18s; }
.site-header nav a:hover, .header-contact:hover { color: var(--accent); }
.header-links { display: flex; align-items: center; gap: 18px; }
.social-links { display: flex; align-items: center; gap: 7px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 37px; padding: 0 5px; color: #cbd9cd; font: 500 .68rem var(--mono); white-space: nowrap; transition: color .18s, opacity .18s; }
.social-links a:hover { color: var(--accent); opacity: .78; }
.social-links svg { width: 18px; height: 18px; flex: none; }
.header-contact { color: var(--accent); border-bottom: 1px solid var(--accent); padding-bottom: 4px; }
.header-contact span { padding-left: 5px; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(230px,300px); align-items: end; gap: clamp(32px,5vw,82px); min-height: 610px; padding: 88px 0 90px; }
.hero::before { content: '01'; position: absolute; top: 70px; right: 0; color: rgba(185,246,117,.08); font: 700 clamp(5rem,10vw,9rem) var(--mono); line-height: 1; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; max-width: 850px; }
.eyebrow, .section-kicker, .aside-marker { color: var(--accent); font: 600 .7rem var(--mono); letter-spacing: .12em; }
.eyebrow { display: flex; align-items: center; gap: 13px; margin: 0 0 30px; }
.eyebrow-line { width: 26px; height: 2px; background: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--sans); }
h1 { font-size: clamp(3.4rem,6.4vw,6.7rem); font-weight: 700; letter-spacing: -.075em; line-height: 1.04; margin-bottom: 29px; }
h1 span { color: var(--accent); }
.hero-intro { max-width: 660px; margin-bottom: 30px; color: #c7d5ca; font-size: clamp(.99rem,1.3vw,1.16rem); line-height: 1.8; }
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 49px; padding: 0 18px; border: 1px solid var(--accent); font: 600 .73rem var(--mono); transition: background .18s, color .18s, transform .18s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: var(--bg); }
.button-primary:hover { background: #d1ffa1; }
.button-secondary { color: var(--accent); background: rgba(185,246,117,.04); }
.button-secondary:hover { background: rgba(185,246,117,.12); }
.hero-aside { align-self: end; position: relative; z-index: 1; padding: 23px; border: 1px solid var(--line); background: rgba(17,27,24,.92); box-shadow: inset 3px 0 0 var(--accent); }
.aside-marker { display: block; }
.aside-rule { height: 1px; margin: 19px 0 23px; background: var(--line); }
.hero-aside dl { margin: 0; }
.hero-aside dl div { margin-bottom: 19px; }
.hero-aside dl div:last-child { margin-bottom: 0; }
.hero-aside dt { margin-bottom: 5px; color: var(--accent-2); font: 500 .68rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.hero-aside dd { margin: 0; font-size: .87rem; line-height: 1.55; }

.section { border-top: 1px solid var(--line); padding: 82px 0 96px; }
.section-heading { display: grid; grid-template-columns: 168px minmax(0,1fr); column-gap: 30px; align-items: start; margin-bottom: 40px; }
.section-kicker { margin: 10px 0 0; }
.section-heading h2 { margin-bottom: 13px; font-size: clamp(2.4rem,4vw,4.1rem); letter-spacing: -.065em; line-height: 1.1; }
.section-heading > p:last-child { grid-column: 2; margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.7; }
.section-content, .project-grid, .skills-grid, .education-content { margin-left: 198px; }
.experience-item { display: grid; grid-template-columns: 180px 1fr; gap: 27px; padding: 27px 0; border-top: 1px solid var(--line); }
.experience-item:last-child { border-bottom: 1px solid var(--line); }
.item-meta { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font: 500 .72rem/1.5 var(--mono); }
.item-meta span:first-child { color: var(--accent-2); }
.item-body h3 { margin-bottom: 5px; font-size: 1.24rem; letter-spacing: -.035em; }
.item-org { margin-bottom: 12px; color: var(--accent); font: 500 .79rem var(--mono); }
.item-org a:hover { text-decoration: underline; text-underline-offset: 3px; }
.item-body > p:last-child { max-width: 660px; margin: 0; color: var(--muted); font-size: .89rem; line-height: 1.8; }
.section-community .item-body > .item-org:last-child { margin: 0; color: var(--accent); font: 500 .79rem var(--mono); }

.section-projects { margin: 0 calc(-1 * clamp(22px,4.6vw,74px)); padding-right: clamp(22px,4.6vw,74px); padding-left: clamp(22px,4.6vw,74px); border-top: 1px solid var(--line); background: #101a16; }
.project-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
.project-card { display: flex; flex-direction: column; min-height: 265px; padding: 24px; border: 1px solid #344b3c; background: var(--panel); transition: border-color .18s, background .18s, transform .18s; }
.project-card:hover { transform: translateY(-3px); border-color: var(--accent); background: #17251f; }
.project-index { display: flex; justify-content: space-between; margin-bottom: 34px; color: var(--accent-2); font: 600 .71rem var(--mono); }
.project-index span { font-size: 1.08rem; }
.project-card h3 { margin-bottom: 10px; font-size: 1.22rem; letter-spacing: -.03em; }
.project-card p { margin-bottom: 25px; color: var(--muted); font-size: .85rem; line-height: 1.65; }
.project-tag { margin-top: auto; color: var(--accent); font: 500 .66rem var(--mono); letter-spacing: .03em; text-transform: uppercase; }
.skills-grid { display: grid; grid-template-columns: repeat(2,1fr); column-gap: 36px; }
.skills-grid > div { border-top: 1px solid var(--line); padding: 23px 0 21px; }
.skills-grid h3 { margin-bottom: 8px; font-size: 1.05rem; }
.skills-grid p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.education-content { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; border-top: 1px solid var(--line); padding-top: 25px; }
.education-date { color: var(--accent-2); font: 600 .73rem var(--mono); }
.education-content h3 { margin: 9px 0; font-size: 1.12rem; line-height: 1.45; }
.education-content p, .teaching li, .credentials li { color: var(--muted); font-size: .85rem; line-height: 1.7; }
.education-content p { margin-bottom: 10px; }
.credentials { margin-bottom: 27px; }
.credentials ul, .teaching ul { margin: 0; padding-left: 18px; }
.credentials li, .teaching li { padding-left: 3px; margin-bottom: 9px; }
.credentials a, .teaching a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.credentials a:hover, .teaching a:hover { color: #d1ffa1; }

.contact-section { margin: 0 calc(-1 * clamp(22px,4.6vw,74px)); padding: 75px clamp(22px,4.6vw,74px) 85px; border-top: 1px solid #4e694c; background: radial-gradient(circle at 85% 12%, rgba(185,246,117,.1), transparent 38%), #15231b; }
.contact-section .section-kicker { margin: 0 0 22px; }
.contact-section h2 { margin-bottom: 25px; font-size: clamp(2.5rem,5vw,5rem); letter-spacing: -.06em; line-height: 1.16; }
.contact-section > a { display: inline-flex; gap: 15px; align-items: center; border-bottom: 1px solid var(--accent); padding-bottom: 8px; color: var(--accent); font-size: clamp(.95rem,1.8vw,1.4rem); font-weight: 600; overflow-wrap: anywhere; }
.contact-section > a:hover { color: #d1ffa1; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 90px; color: var(--muted); font: 500 .7rem var(--mono); }
footer div { display: flex; gap: 22px; flex-wrap: wrap; }
footer a:hover { color: var(--accent); }

@media screen and (min-width: 701px) {
  .site-header nav a, .header-contact { font-size: .9rem; }
  .social-links a { font-size: .82rem; }
  .eyebrow, .section-kicker, .aside-marker { font-size: .84rem; }
  .hero-intro { font-size: clamp(1.12rem, 1.45vw, 1.25rem); }
  .button { font-size: .88rem; }
  .hero-aside dt { font-size: .82rem; }
  .hero-aside dd { font-size: 1.05rem; }
  .section-heading > p:last-child { font-size: 1.1rem; }
  .item-meta { font-size: .86rem; }
  .item-body h3, .project-card h3 { font-size: 1.42rem; }
  .item-org { font-size: .96rem; }
  .section-community .item-body > .item-org:last-child { font-size: .96rem; }
  .item-body > p:last-child, .project-card p, .skills-grid p,
  .education-content p, .teaching li, .credentials li { font-size: 1.08rem; }
  .project-index, .project-tag, .education-date { font-size: .83rem; }
  .skills-grid h3 { font-size: 1.24rem; }
  .education-content h3 { font-size: 1.3rem; }
  footer { font-size: .84rem; }
}

@media (max-width: 1220px) {
  .social-label { display: none; }
  .social-links a { width: 32px; padding: 0; }
}
@media (max-width: 960px) {
  .site-header nav { display: none; }
  .header-links { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 48px; }
  .hero-aside { max-width: 680px; }
  .hero-aside dl { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
  .section-heading { grid-template-columns: 135px 1fr; }
  .section-content, .project-grid, .skills-grid, .education-content { margin-left: 165px; }
  .experience-item { grid-template-columns: 140px 1fr; gap: 20px; }
  .project-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 700px) {
  .site-header { min-height: 72px; gap: 10px; }
  .wordmark { font-size: 1.2rem; }
  .header-links { gap: 10px; }
  .social-links { gap: 5px; }
  .social-links a { width: 32px; min-height: 34px; }
  .header-contact { display: none; }
  .hero { padding: 72px 0 70px; gap: 44px; }
  .hero::before { top: 42px; }
  .hero-aside dl { grid-template-columns: 1fr 1fr; }
  .section { padding: 65px 0 72px; }
  .section-heading { display: block; margin-bottom: 27px; }
  .section-kicker { margin: 0 0 15px; }
  .section-heading > p:last-child { margin-top: 6px; }
  .section-content, .project-grid, .skills-grid, .education-content { margin-left: 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .experience-item { grid-template-columns: 1fr; gap: 12px; }
  .item-meta { flex-direction: row; flex-wrap: wrap; gap: 11px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 215px; }
  .project-index { margin-bottom: 25px; }
  .education-content { grid-template-columns: 1fr; gap: 25px; }
  .contact-section { padding-top: 65px; padding-bottom: 70px; }
  footer { flex-direction: column; align-items: flex-start; padding: 25px 0; }
}
@media (max-width: 420px) {
  h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .hero-aside dl { grid-template-columns: 1fr; }
  .contact-section h2 { font-size: 2.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  @page { size: A4; margin: 15mm; }
  :root { color-scheme: light; --ink: #000; --muted: #444; --line: #bbb; --accent: #000; --accent-2: #000; }
  body { background: #fff; color: #000; font-size: 10pt; }
  body::before, .site-header, .hero-actions, .hero-aside, .contact-section, footer, .skip-link, .hero::before { display: none; }
  .page-shell { max-width: none; padding: 0; }
  .hero { display: block; min-height: 0; padding: 0 0 13mm; }
  .eyebrow { margin-bottom: 5mm; }
  h1 { font-size: 27pt; margin-bottom: 5mm; }
  .hero-intro { color: #333; font-size: 10pt; line-height: 1.5; margin: 0; }
  .section, .section-projects { background: #fff !important; border-top: 1px solid #bbb; margin: 0; padding: 8mm 0; }
  .section-heading { display: block; margin-bottom: 4mm; }
  .section-heading h2 { font-size: 18pt; margin: 0; }
  .section-heading > p:last-child { display: none; }
  .section-kicker { margin: 0 0 2mm; }
  .section-content, .project-grid, .skills-grid, .education-content { margin-left: 0; }
  .experience-item { grid-template-columns: 35mm 1fr; padding: 3mm 0; break-inside: avoid; }
  .project-grid { grid-template-columns: repeat(3,1fr); gap: 3mm; }
  .project-card { min-height: 0; padding: 4mm; break-inside: avoid; background: #fff; border-color: #bbb; }
  .project-index { margin-bottom: 3mm; }
  .project-card p { margin-bottom: 3mm; }
  .skills-grid { gap: 0 7mm; }
  .skills-grid > div { padding: 3mm 0; }
  .education-content { gap: 7mm; padding-top: 3mm; }
  a { color: inherit !important; text-decoration: none !important; }
}
