:root { --ink: #17221d; --paper: #f3f0e8; --accent: #d75235; --line: rgba(23,34,29,.16); --muted: #5f6863; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: linear-gradient(rgba(23,34,29,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(23,34,29,.035) 1px, transparent 1px), var(--paper); background-size: 48px 48px; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.project-nav { display: flex; align-items: center; min-height: 84px; border-bottom: 1px solid var(--line); }
.back { color: var(--muted); font-size: .92rem; text-decoration: none; }
.back:hover, .back:focus-visible { color: var(--ink); }
.github { padding: 12px 19px; border: 1px solid var(--ink); border-radius: 999px; color: var(--paper); background: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none; transition: background 160ms ease, border-color 160ms ease; }
.github:hover, .github:focus-visible { color: var(--paper); background: #303a35; border-color: #303a35; }
.back:focus-visible, .github:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.project-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 6vw, 80px); align-items: start; padding: clamp(72px, 10vw, 132px) 0 60px; }
.project-copy { min-width: 0; }
.project-hero .github { margin-top: 1px; white-space: nowrap; }
.kicker { margin: 0 0 20px; color: var(--accent); font: 700 .75rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .13em; text-transform: uppercase; }
h1 { max-width: 900px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(4.5rem, 11vw, 9rem); font-weight: 400; letter-spacing: -.075em; line-height: .86; }
.lede { max-width: 760px; margin: 38px 0 0; color: var(--muted); font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.5; }
.hero-image { overflow: hidden; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 18px; background: #101218; box-shadow: 0 24px 70px rgba(23,34,29,.16); }
.hero-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.content { display: grid; grid-template-columns: minmax(200px, .38fr) minmax(0, 1fr); gap: clamp(44px, 9vw, 130px); padding: 110px 0; }
.content h2 { position: sticky; top: 28px; align-self: start; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; letter-spacing: -.045em; }
.prose { max-width: 720px; }
.prose p { margin: 0 0 1.25em; color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.gallery { padding: 0 0 110px; }
.gallery-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.gallery-heading h2, .gallery-heading p { margin: 0; }
.gallery-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; letter-spacing: -.045em; }
.gallery-heading p { color: var(--muted); font-size: .9rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.shot { overflow: hidden; margin: 0; aspect-ratio: 16 / 9; border-radius: 12px; background: #101218; box-shadow: 0 12px 35px rgba(23,34,29,.12); }
.shot.wide { grid-column: 1 / -1; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.project-footer a { color: var(--ink); }
@media (max-width: 720px) {
  .shell { width: min(100% - 32px, 620px); }
  .project-hero { grid-template-columns: 1fr; gap: 32px; }
  .project-hero .github { justify-self: start; }
  .content { grid-template-columns: 1fr; gap: 28px; padding: 80px 0; }
  .content h2 { position: static; }
  .gallery-grid { grid-template-columns: 1fr; gap: 20px; }
  .shot.wide { grid-column: auto; }
  .gallery-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion: no-preference) {
  .project-copy > *, .project-hero > .github { animation: reveal 650ms cubic-bezier(.2,.8,.2,1) both; }
  .project-hero .lede { animation-delay: 100ms; }
  @keyframes reveal { from { opacity: 0; transform: translateY(14px); } }
}
