@font-face {
  font-family: "Space Grotesk";
  src: url("./assets/fonts/space-grotesk.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #e7e8e1;
  --ink: #1a1b18;
  --muted: #66685e;
  --line: #cfd1c7;
  --gutter: clamp(24px, 4.45vw, 80px);
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--display); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--ink); }
::selection { color: var(--paper); background: var(--ink); }
.page-shell { display: flex; flex-direction: column; min-height: 100svh; max-width: 1920px; margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 16px; padding: 14px 20px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 104px; margin-inline: var(--gutter); border-bottom: 1px solid var(--line); }
.brand { display: grid; place-items: center; width: 44px; height: 48px; }
.brand img { display: block; width: 44px; height: 44px; }
.copyright { color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; letter-spacing: .03em; }
.header-end { display: flex; align-items: center; gap: clamp(24px, 4vw, 64px); }
.projects-link { display: flex; align-items: center; gap: 18px; min-height: 44px; font-size: 14px; }
.projects-link > span { font-size: 20px; }
.site-nav { display: flex; gap: clamp(25px, 4vw, 58px); align-items: center; font-size: 13px; }
.site-nav a { display: flex; align-items: center; gap: 9px; min-height: 44px; color: var(--muted); }
.site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current]::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.site-nav a > span { font-size: 10px; color: var(--muted); align-self: center; }
.projects-link:hover, .site-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.hero { position: relative; display: flex; align-items: center; flex: 1; min-height: min(660px, 67vw); margin-inline: var(--gutter); padding-block: 55px; }
h1 { position: relative; z-index: 1; margin: -20px 0 0 -7px; font-size: clamp(100px, 11.4vw, 205px); font-weight: 500; line-height: .88; letter-spacing: -.09em; pointer-events: none; }
h1 > span { display: block; width: fit-content; }
.title-second { margin-top: 14px; font-size: .77em; letter-spacing: -.075em; }
.skull-stage { position: absolute; right: -1.5%; top: 50%; width: 48%; aspect-ratio: 1; transform: translateY(-50%); }
.stage-ring { position: absolute; inset: 7%; border: 1px solid var(--line); border-radius: 50%; opacity: .7; }
.skull-image { position: absolute; width: 89.5%; height: 89.5%; left: 5.25%; top: 5.25%; object-fit: contain; user-select: none; pointer-events: none; }
.skull-canvas { position: absolute; top: -10%; left: 0; width: 100%; height: 120%; display: block; pointer-events: none; }
.site-footer { display: flex; align-items: center; min-height: 92px; margin-inline: var(--gutter); border-top: 1px solid var(--line); }
.footer-mark { font-size: 20px; letter-spacing: -.1em; }

@media (min-width: 1600px) {
  .hero { min-height: 780px; }
}
@media (max-width: 1050px) {
  .site-header { min-height: 88px; }
  .hero { min-height: 540px; }
  h1 { font-size: 11.5vw; }
}
@media (max-width: 700px) {
  :root { --gutter: 24px; }
  .site-header { min-height: 76px; }
  .brand img { width: 38px; height: 38px; }
  .hero { flex-direction: column; align-items: stretch; justify-content: center; gap: 18px; min-height: 0; padding-block: 45px 14px; }
  h1 { margin: 0; font-size: clamp(53px, 16.5vw, 115px); text-align: center; }
  h1 > span { margin-inline: auto; }
  .title-second { margin-top: 9px; font-size: .81em; }
  .skull-stage { position: relative; top: auto; right: auto; width: min(100%, 420px); margin-inline: auto; transform: none; }
  .site-footer { min-height: 78px; }
  .footer-mark { font-size: 18px; }
}
@media (max-width: 359px) {
  :root { --gutter: 20px; }
  .hero { padding-top: 32px; }
}

.home-page {
  --home-header: clamp(60px, 10svh, 104px);
  --home-footer: clamp(46px, 8svh, 92px);
}
.home-page .page-shell { height: 100svh; min-height: 0; }
.home-page .site-header { min-height: var(--home-header); flex: 0 0 var(--home-header); }
.home-page .site-footer { min-height: var(--home-footer); flex: 0 0 var(--home-footer); }
.home-page .hero { min-height: 0; padding-block: clamp(10px, 3svh, 45px); }
.home-page .hero h1 { font-size: min(clamp(100px, 11.4vw, 205px), 30svh); }
.home-page .skull-stage { width: min(48%, calc((100svh - var(--home-header) - var(--home-footer) - 32px) * .8)); }

@media (max-width: 700px) {
  .home-page {
    --home-title: min(clamp(53px, 16.5vw, 115px), 14svh);
    --home-gap: clamp(6px, 2svh, 18px);
  }
  .home-page .hero { gap: var(--home-gap); padding-block: 12px; }
  .home-page .hero h1 { font-size: var(--home-title); flex-shrink: 0; }
  .home-page .skull-stage { width: min(100%, 420px, calc((100svh - var(--home-header) - var(--home-footer) - var(--home-title) * 1.6 - 9px - var(--home-gap) - 24px) * .8)); flex-shrink: 0; }
}
