/* sararu.net, next: a white page drawn with the same pen as the hero. */

:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #141414;
  --muted: #5c5c5c;
  --accent: #ff5a36;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.02em; }
/* Headings: Recursive in its casual, brush-lettered style. */
h1, h2, h3, .brand, .app-name {
  font-family: 'Recursive', 'Bricolage Grotesque', system-ui, sans-serif;
  font-variation-settings: 'CASL' 1;
}
.at { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-variation-settings: normal; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: 16px; top: -60px; padding: 10px 14px; background: var(--paper); z-index: 10; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px dashed var(--ink); outline-offset: 5px; }

/* Anything with data-sketch gets a drawn overlay; without JS it falls back to a plain line. */
[data-sketch] { position: relative; }
html:not(.sketched) [data-sketch="box"] { border: 2px solid var(--ink); border-radius: 16px; }
html:not(.sketched) [data-sketch="underline"] { text-decoration: underline 3px; text-underline-offset: 6px; }
html:not(.sketched) [data-sketch="ground"] { border-bottom: 2px solid var(--ink); }
html:not(.sketched) [data-sketch="circle"] { border: 2px solid var(--ink); border-radius: 50%; }
.sketch { z-index: 0; }

/* Header */
.site-header { padding: 22px 0; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-weight: 800; font-size: 24px; letter-spacing: -.03em; text-decoration: none; }
.brand span, .dot-accent { color: var(--accent); }
.site-header nav { display: flex; gap: clamp(14px, 2.4vw, 30px); font-size: 15px; font-weight: 500; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.menu-toggle { display: none; padding: 9px 18px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.header-row { position: relative; }

/* Hero */
.hero { padding: clamp(28px, 6vw, 72px) 0 20px; overflow: hidden; }
.hero-copy { text-align: center; }
h1 { font-size: clamp(36px, 5.6vw, 76px); font-weight: 850; letter-spacing: -.03em; max-width: 19ch; text-wrap: balance; margin: 0 auto; line-height: 1; }
.lede { max-width: 40ch; margin: 22px auto 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); }
.mark { display: inline-block; }

.stage { position: relative; height: clamp(250px, 27vw, 400px); margin-top: 24px; }
.hit { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.hit:focus-visible { outline-offset: -6px; }
.hit:disabled { cursor: default; }
.scene { display: block; width: 100%; height: 100%; }
#pen { transition: opacity .35s ease; }

.controls { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 10px; padding: 0 20px; font-size: 14px; }
.controls[hidden] { display: none; }
.hint { color: var(--muted); }
.controls button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.controls button:hover { text-decoration: underline; text-underline-offset: 4px; }
.controls svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#pause .play-icon, #pause[aria-pressed="true"] .pause-icon { display: none; }
#pause[aria-pressed="true"] .play-icon { display: block; }

/* Section rhythm */
.rule { height: 26px; margin: clamp(40px, 7vw, 88px) 0; }
section { scroll-margin-top: 12px; }
.section-title { font-size: clamp(30px, 4vw, 48px); font-weight: 800; }
.section-intro { margin: 14px 0 0; max-width: 52ch; font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); }
.sub-title { font-size: 22px; font-weight: 800; margin: 56px 0 22px; }

.card { padding: 28px; }
.card > *:not(.sketch) { position: relative; z-index: 1; }

/* Crew */
.crew-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 44px; }
.member { display: flex; flex-direction: column; }
.figure { width: 104px; height: 104px; margin: -6px 0 10px -8px; overflow: visible; }
.member h3 { font-size: 28px; font-weight: 800; align-self: flex-start; }
.member-line { margin: 14px 0 18px; font-size: 17px; }
.abilities { list-style: none; margin: 0; padding: 0; font-size: 15px; color: #2d2d2d; }
.abilities li { position: relative; padding: 6px 0 6px 24px; }
.abilities li::before {
  content: ''; position: absolute; left: 0; top: 15px; width: 14px; height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 6'%3E%3Cpath d='M1 3.6 Q4 1.4 7 3.2 T13 2.6' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Work */
.section-head { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 36px; align-items: end; }
.boat-art { width: 100%; height: auto; overflow: visible; }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; margin-top: 48px; }
.project { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; }
.project.studio { grid-template-columns: 1fr; }
.project h3 { font-size: 24px; font-weight: 800; }
.project h3 a { text-decoration: none; }
.project h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.project p { margin: 8px 0 0; }
.meta { font-size: 14px; color: var(--muted); }
.stack { font-size: 14px; font-weight: 500; }
.highlights { margin: 12px 0 0; padding-left: 18px; font-size: 15px; }
.highlights li { margin-top: 6px; }
.icon { display: inline-block; flex: none; line-height: 0; }
.icon img { border-radius: 12px; position: relative; z-index: 1; }

.app-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 20px; }
.app { display: grid; justify-items: start; gap: 4px; text-decoration: none; }
.app .icon { margin-bottom: 10px; }
.app .icon img { width: 64px; height: 64px; border-radius: 14px; }
.app-name { font-weight: 800; font-size: 18px; }
.app-kind { font-size: 14px; color: var(--muted); }
.app:hover .app-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Path */
.timeline { list-style: none; margin: 48px 0 0; padding: 0 0 0 64px; }
.stop { position: relative; padding-bottom: 40px; max-width: 70ch; }
.stop:last-child { padding-bottom: 0; }
.dot { position: absolute; left: -64px; top: -6px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--paper); }
.dot svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.when { margin: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.stop h3 { font-size: 22px; font-weight: 800; margin-top: 2px; }
.at { display: block; font-size: 17px; font-weight: 500; letter-spacing: 0; margin-top: 4px; }
.stop ul { margin: 12px 0 0; padding-left: 18px; }
.stop li { margin-top: 5px; }
.stop > p:not(.when) { margin: 10px 0 0; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.portrait { margin: 0; padding: 12px; }
.portrait img { border-radius: 16px; position: relative; z-index: 1; }
.about-body p { margin: 18px 0 0; max-width: 58ch; }
.about-body .section-title { margin-bottom: 6px; }

.btn { display: inline-block; margin-top: 28px; padding: 13px 26px; font-weight: 700; text-decoration: none; }
.btn:hover { color: var(--accent); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 28px; margin-top: 40px; align-items: end; }
.contact-grid p { margin: 6px 0 0; font-size: 19px; font-weight: 500; }
.contact-grid .label { font-size: 14px; color: var(--muted); font-weight: 500; }
.contact-grid a { text-decoration: none; }
.contact-grid a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.contact-cta .btn { margin-top: 0; }

.site-footer { padding: 72px 0 40px; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-row p { margin: 0; }
.footer-row a { text-decoration: none; }

@media (max-width: 900px) {
  .crew-grid { grid-template-columns: 1fr; max-width: 560px; }
  .projects { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { grid-template-columns: 1fr; }
  .boat-art { max-width: 240px; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 320px; }
  .contact-grid { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .menu-toggle { display: inline-block; }
  .site-header nav { display: none; position: absolute; right: var(--gutter); top: calc(100% + 10px); z-index: 20; flex-direction: column; gap: 4px; min-width: 180px; padding: 12px 20px; background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; font-size: 18px; }
  .site-header nav.open { display: flex; }
  .site-header nav a { padding: 8px 0; }
  .stage { height: 230px; }
  .hint { display: none; }
  .card { padding: 22px; }
  .timeline { padding-left: 56px; }
  .dot { left: -56px; width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
