@font-face {
  font-family: Manrope;
  src: url("assets/manrope-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Manrope;
  src: url("assets/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #101312;
  --surface: #181c19;
  --art: #151c18;
  --ink: #f0f3e8;
  --muted: #aab4a8;
  --line: #343c34;
  --accent: #d3f884;
  --accent-ink: #19220f;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font: 400 100%/1.6 Manrope, system-ui, sans-serif;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
img, canvas { display: block; max-width: 100%; }
::selection { color: var(--accent-ink); background: var(--accent); }
.shell { width: min(100% - 104px, 1240px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3; left: 1rem; top: 1rem; transform: translateY(-160%); background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; }
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.header-inner a { text-decoration: none; }
.wordmark { justify-self: start; color: var(--accent); display: inline-flex; align-items: center; font-weight: 800; font-size: 1.36rem; letter-spacing: -.08em; }
.wordmark span:first-child { border: 1px solid #6e804b; line-height: 1; padding: 5px 7px 6px 6px; }
.wordmark span:last-child { padding-left: 3px; }
.header-inner nav { display: flex; gap: clamp(20px, 4vw, 52px); }
.header-inner nav a,
.header-github { color: var(--muted); font-weight: 700; font-size: .94rem; }
.header-inner a:hover { color: var(--accent); }
.header-github { justify-self: end; }

.hero { min-height: 565px; display: grid; grid-template-columns: 1fr .91fr; align-items: center; gap: clamp(20px, 3.2vw, 52px); padding-block: 74px 72px; }
.eyebrow { font: 500 .875rem/1.4 var(--mono); color: var(--accent); }
.hero-label { display: flex; gap: 12px; align-items: center; margin-bottom: 25px; }
.hero-label span { width: 7px; height: 7px; background: var(--accent); box-shadow: 0 0 14px #d3f88466; }
.hero h1 { font-size: clamp(3.2rem, 6.05vw, 6.15rem); font-weight: 800; letter-spacing: -.082em; line-height: .98; }
.hero-period { color: var(--accent); padding-left: .025em; }
.hero-description { margin-top: 30px; max-width: 455px; color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.26rem); line-height: 1.52; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .66rem 1.12rem; border: 1px solid transparent; border-radius: 3px; text-decoration: none; font-weight: 800; font-size: .92rem; transition: background-color .18s, border-color .18s; }
.button-primary { margin-top: 29px; background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: #e4ffa9; }
.hero-art { position: relative; min-width: 0; border: 1px solid var(--line); background: var(--art); margin-top: 8px; }
.hero-visual { position: relative; aspect-ratio: 1.26; background: radial-gradient(ellipse at 60% 48%, #253d29, #16241b 51%, #131b16 76%); isolation: isolate; overflow: hidden; }
.hero-visual canvas,
.mesh-preview canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.corner { position: absolute; width: 12px; height: 12px; border: 1px solid #9ab67b; opacity: .8; pointer-events: none; }
.corner-tl { top: 15px; left: 15px; border-right: 0; border-bottom: 0; }
.corner-tr { top: 15px; right: 15px; border-left: 0; border-bottom: 0; }
.corner-bl { bottom: 15px; left: 15px; border-right: 0; border-top: 0; }
.corner-br { bottom: 15px; right: 15px; border-left: 0; border-top: 0; }
.hero-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; border-top: 1px solid var(--line); padding-inline: 16px; color: var(--muted); font: .81rem/1.35 var(--mono); }
.hero-caption span:first-child { color: var(--ink); }

.work-section, .story-section { scroll-margin-top: 1rem; }
.section-heading { border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 25px 22px; }
.section-heading h2, .story-section h2 { font-size: clamp(2.2rem, 4vw, 3.7rem); font-weight: 800; line-height: 1.06; letter-spacing: -.07em; }
.section-heading p { color: var(--muted); font-size: .96rem; }

.feature { display: grid; grid-template-columns: .87fr 1.13fr; background: #e9eee2; color: #141d13; border-radius: 4px; overflow: hidden; }
.feature-body { padding: clamp(27px, 4vw, 61px); }
.feature .eyebrow { color: #446039; margin-bottom: 16px; }
.feature h3 { font-size: clamp(1.65rem, 3vw, 3rem); font-weight: 800; letter-spacing: -.06em; line-height: 1.08; }
.feature-body > p:not(.eyebrow) { margin-top: 18px; color: #435144; max-width: 445px; }
.tech-list { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 21px 0 0; padding: 0; }
.tech-list li { padding: 4px 8px; border: 1px solid #b9c9b3; color: #374c33; font: .83rem/1.35 var(--mono); }
.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 20px; margin-top: 22px; }
.text-link { text-decoration: underline; text-underline-offset: .27em; text-decoration-color: #748a60; font-weight: 800; font-size: .91rem; }
.text-link:hover { text-decoration-color: currentColor; }
.button-light { background: #233620; color: #edf4e9; }
.button-light:hover { background: #374e31; }
.feature a:focus-visible { outline-color: #365b2d; }
.feature-figure { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 24px clamp(20px, 3vw, 46px); background: #d8e2d3; border-left: 1px solid #c6d3c2; }
.feature-image { background: #f7f8f2; border: 1px solid #bac9b5; border-radius: 3px; padding: 10px; }
.feature-image img { width: 100%; height: auto; }
.feature-figure figcaption { margin-top: 8px; color: #436041; font-size: .81rem; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.project { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.project-image,
.mesh-preview { height: clamp(165px, 20vw, 240px); border-bottom: 1px solid var(--line); }
.project-image { background: #eee; padding: 12px; display: flex; align-items: center; justify-content: center; }
.project-image img { width: 100%; height: 100%; object-fit: contain; }
.mesh-preview { position: relative; overflow: hidden; background: radial-gradient(ellipse, #23392b, #151e16 71%); }
.project-body { display: flex; flex-direction: column; padding: clamp(18px, 2.4vw, 28px); }
.project-body h3 { font-weight: 800; font-size: clamp(1.12rem, 1.8vw, 1.51rem); letter-spacing: -.04em; line-height: 1.24; }
.project-body p { margin-block: 10px 20px; color: var(--muted); }
.project-body .project-links { margin-top: auto; color: var(--accent); }

.story-section { display: grid; grid-template-columns: .83fr 1fr; gap: clamp(28px, 7vw, 100px); margin-block: 100px 87px; border-top: 1px solid var(--line); padding-top: 40px; }
.story-intro .eyebrow { margin-bottom: 13px; }
.story-intro > p:last-child { max-width: 440px; margin-top: 18px; color: var(--muted); font-size: 1.08rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--line); padding-block: 18px; }
.timeline li:first-child { padding-top: 3px; }
.timeline-date { color: var(--accent); font: 500 .91rem/1.4 var(--mono); padding-top: .22rem; }
.timeline h3 { font-size: 1.14rem; letter-spacing: -.025em; line-height: 1.4; }
.timeline p { color: var(--muted); margin-top: 6px; }
.timeline-source { display: inline-block; margin-top: 6px; color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 82px; font-size: .94rem; }
.footer-inner a { color: var(--ink); }

@media (max-width: 1050px) {
  .shell { width: calc(100% - 68px); }
  .hero { min-height: 0; padding-block: 60px; }
}

@media (max-width: 800px) {
  .shell { width: calc(100% - 44px); }
  .header-inner { min-height: 65px; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 54px 53px; }
  .hero h1 { font-size: clamp(3.1rem, 10.1vw, 5.2rem); }
  .hero-art { margin-top: 0; }
  .hero-visual { aspect-ratio: 1.78; }
  .hero-description { margin-top: 22px; }
  .hero-label { margin-bottom: 19px; }
  .feature { grid-template-columns: 1fr; }
  .feature-figure { border-left: 0; border-top: 1px solid #c6d3c2; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-section { grid-template-columns: 1fr; margin-block: 69px 55px; }
}

@media (max-width: 540px) {
  .shell { width: calc(100% - 34px); }
  .header-inner nav { gap: 13px; }
  .header-inner nav a, .header-github { min-height: 44px; display: inline-flex; align-items: center; font-size: .86rem; }
  .hero-visual { aspect-ratio: 1.35; }
  .hero-caption { min-height: 43px; padding-inline: 10px; gap: 6px; font-size: .75rem; }
  .section-heading { align-items: start; flex-direction: column; gap: 7px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-image, .mesh-preview { height: clamp(167px, 55vw, 247px); }
}

@media (max-width: 360px) {
  .hero h1 { font-size: clamp(2.66rem, 12.5vw, 3.1rem); }
  .feature h3 br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
