/* =========================================================
   noahain. — vanilla landing
   Dark hand-drawn / chalk-on-blackboard aesthetic.
   Flex layout, fills viewport, no scroll on desktop.
   ========================================================= */

:root {
  color-scheme: dark;

  --paper: #0a0a0a;
  --ink: #ededed;
  --ink-muted: #9a9a9a;
  --ink-dim: #6b6b6b;
  --ink-soft: #f7e333;
  --rule: #1a1a1a;

  --font-handwrite: 'Caveat', 'Brush Script MT', 'Comic Sans MS', cursive;
  --font-body: 'Patrick Hand', 'Patrick Hand SC', 'Comic Sans MS', cursive;

--sidebar-width: 200px;
  --content-pad-x: 80px;
  --content-pad-y: 80px;
  --title-size: 32px;
  --desc-size: 16px;
  --item-max: 360px;
  --grid-row-gap: 48px;
  --grid-col-gap: 48px;
  --grid-max-width: 1100px;
  --grid-cols: 2;
}

/* ----- 2. Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
html, body { min-height: 100%; }
html { background: var(--paper); transition: background-color 280ms ease, color 280ms ease; }
body {
  margin: 0 auto;
  max-width: 1500px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  transition: background-color 280ms ease, color 280ms ease;
}
img, svg { display: block; max-width: 100%; }

/* ----- 3. Focus ring ----- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----- 4. Reduced motion + bounce keyframes ----- */
@keyframes title-bounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-10px); }
  55%  { transform: translateY(3px); }
  75%  { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .work-card .title,
  .nav-link { transition: color 200ms ease; }
  .work-card:hover .title {
    color: var(--ink-soft);
    animation: title-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

/* ----- 5. Sidebar ----- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  gap: 56px;
  z-index: 10;
}
.sidebar h1 {
  font-family: var(--font-handwrite);
  font-size: 48px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1;
}
.sidebar h1 a {
  color: inherit;
  text-decoration: none;
}
.sidebar h1 a:hover { color: var(--ink-soft); }
.nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nav-link {
  font-family: var(--font-handwrite);
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
  align-self: flex-start;
  position: relative;
}
.nav-link:hover { color: var(--ink-soft); }
.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 12px;
  background-color: var(--ink-soft);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 12'><path d='M0 6 Q 2.5 1 5 6 T 10 6 T 15 6 T 20 6 T 25 6 T 30 6 T 35 6 T 40 6 T 45 6 T 50 6 T 55 6 T 60 6 T 65 6 T 70 6 T 75 6 T 80 6' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>") repeat-x;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 12'><path d='M0 6 Q 2.5 1 5 6 T 10 6 T 15 6 T 20 6 T 25 6 T 30 6 T 35 6 T 40 6 T 45 6 T 50 6 T 55 6 T 60 6 T 65 6 T 70 6 T 75 6 T 80 6' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>") repeat-x;
  -webkit-mask-size: 80px 100%;
  mask-size: 80px 100%;
  transition: background-color 280ms ease;
  animation: wavy-flow 8s linear infinite;
}
@keyframes wavy-flow {
  from { -webkit-mask-position: 0 0; mask-position: 0 0; }
  to { -webkit-mask-position: -80px 0; mask-position: -80px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-link[aria-current="page"]::after { animation: none; }
}

/* ----- 6. Main: flex column, fills viewport ----- */
main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 100vh;
  padding: var(--content-pad-y) var(--content-pad-x) 160px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ----- 7. Projects: flex row, wraps, items grow + stretch ----- */
.projects-grid {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--grid-row-gap) var(--grid-col-gap);
  list-style: none;
  padding: 0;
  margin: 0 auto;
  width: 100%;
  max-width: var(--grid-max-width);
  align-content: flex-start;
}
.projects-grid > li {
  flex: 1 1 calc((100% - var(--grid-col-gap) * (var(--grid-cols) - 1)) / var(--grid-cols));
  max-width: var(--item-max);
  min-width: 200px;
  display: flex;
  flex-direction: column;
}
.work-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 0;
}
.work-card .title {
  font-family: var(--font-handwrite);
  font-size: var(--title-size);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--ink);
}
.work-card--hero .title {
  font-size: calc(var(--title-size) * 1.6);
  margin: 0 0 12px;
}
.pin-icon {
  position: absolute;
  top: 9px;
  right: 148px;
  color: var(--ink-soft);
  opacity: 0.85;
  pointer-events: none;
}
.pinned-grid {
  margin-bottom: var(--grid-row-gap);
  padding-bottom: 0;
  border-bottom: none;
}
.pinned-grid > li {
  position: relative;
  flex: 1 1 100%;
  max-width: 100%;
  min-width: 0;
}
.work-card:hover .title { color: var(--ink-soft); }

:root:has(.work-card[data-project="monoloth"]:hover, .work-card[data-project="monoloth"]:focus-visible)   { --paper: #0b0b0d; --ink: #ededed; --ink-muted: #9a9a9a; --ink-dim: #6b6b6b; --ink-soft: #f7e333; }
:root:has(.work-card[data-project="tunelog"]:hover,  .work-card[data-project="tunelog"]:focus-visible)    { --paper: #3a2754; --ink: #ededed; --ink-muted: #9a9a9a; --ink-dim: #6b6b6b; --ink-soft: #f7e333; }
:root:has(.work-card[data-project="quill"]:hover,     .work-card[data-project="quill"]:focus-visible)      { --paper: #40474a; --ink: #ededed; --ink-muted: #9a9a9a; --ink-dim: #6b6b6b; --ink-soft: #f7e333; }
:root:has(.work-card[data-project="clipt"]:hover,     .work-card[data-project="clipt"]:focus-visible)      { --paper: #e2e2e3; --ink: #0a0a0a; --ink-muted: #3a3a3a; --ink-dim: #5e5e5e; --ink-soft: #c9b91e; }
:root:has(.work-card[data-project="mosaik"]:hover,    .work-card[data-project="mosaik"]:focus-visible)    { --paper: #dde2e4; --ink: #0a0a0a; --ink-muted: #3a3a3a; --ink-dim: #5e5e5e; --ink-soft: #c9b91e; }
.work-card .desc {
  font-family: var(--font-body);
  font-size: var(--desc-size);
  color: var(--ink-muted);
  line-height: 1.4;
  margin: 0;
  max-width: 28ch;
}
.projects-heading {
  font-family: var(--font-handwrite);
  font-size: 56px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin: 0 0 8px;
}

/* ----- 8. Landing page (minimal — centered GIF + caption + CTA) ----- */
.landing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-bottom: 0;
}
.landing-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.landing-gif {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
}
.landing-caption {
  font-family: var(--font-handwrite);
  font-size: 40px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin: 4px 0 0;
}
.landing-cta {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink-muted);
  text-decoration: none;
  margin-top: 12px;
  transition: color 200ms ease;
}
.landing-cta:hover { color: var(--ink-soft); }

/* ----- 8b. About page ----- */
main.about {
  padding-top: 80px;
}
.about-section {
  margin-bottom: 48px;
}
.about-section h2 {
  font-family: var(--font-handwrite);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 14px;
}
.about-section p {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0 0 12px;
}
.about-section--intro {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.about-gif {
  width: 160px;
  height: auto;
  flex-shrink: 0;
  margin-top: 6px;
}
.tools-list {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.8;
  margin: 0;
}

/* ----- 8c. Contact page ----- */
main.contact {
  padding-top: 80px;
}
.contact-title {
  font-family: var(--font-handwrite);
  font-size: 40px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin: 0 0 24px;
}
.contact-title--sm {
  font-size: 32px;
  margin-top: 40px;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.contact-list li {
  border-top: 1px solid var(--rule);
}
.contact-list li:last-child { border-bottom: 1px solid var(--rule); }
.contact-link {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 2fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 18px 4px;
  text-decoration: none;
  color: var(--ink);
  transition: color 200ms ease;
}
.contact-link:hover { color: var(--ink-soft); }
.contact-link .name {
  font-family: var(--font-handwrite);
  font-size: 28px;
  line-height: 1.1;
}
.contact-link .desc {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.3;
}
.contact-link .handle {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-dim);
  white-space: nowrap;
}

/* ----- 8d. Project detail pages (/projects/<slug>) ----- */
main.project {
  padding-top: 80px;
}
.project-header { margin-bottom: 48px; }
.project-title-row { display: flex; align-items: center; gap: 24px; margin-bottom: 16px; }
.project-icon { width: 80px; height: 80px; flex-shrink: 0; border-radius: 16px; display: block; }
.project-title {
  font-family: var(--font-handwrite);
  font-size: 56px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin: 0;
}
.project-tagline {
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--ink-muted);
  line-height: 1.4;
  margin: 0;
}
.project-header .project-link { margin-top: 12px; display: block; }
.project-section {
  margin-bottom: 48px;
  position: relative;
}
.project-section h2 {
  font-family: var(--font-handwrite);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
  line-height: 1.1;
}
.project-section p {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0 0 12px;
}
.project-section a, .about-section a { color: var(--ink-soft); text-decoration: none; }
.project-section a:hover, .about-section a:hover { text-decoration: underline; }
.project-section p img { display: inline; vertical-align: middle; }
.project-section table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 15px;
}
.project-section th,
.project-section td {
  border: 1px solid var(--rule);
  padding: 10px 14px;
  text-align: left;
  color: var(--ink-muted);
}
.project-section th {
  font-weight: 600;
  color: var(--ink);
  background: rgba(255,255,255,0.03);
}
.project-section pre {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}
.project-section code {
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.9em;
}
.project-section pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}
.project-section ul,
.project-section ol {
  padding-left: 24px;
  margin: 12px 0;
}
.project-section li {
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 6px;
}
.project-section blockquote {
  border-left: 3px solid var(--ink-soft);
  margin: 16px 0;
  padding: 4px 16px;
  color: var(--ink-muted);
}
.project-section hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}
.project-section strong {
  font-weight: 600;
  color: var(--ink);
}
.doc-picker-heading {
  position: relative;
  user-select: none;
}
.doc-picker-heading::after {
  content: ' ▾';
  font-size: 0.6em;
  vertical-align: middle;
  color: var(--ink-dim);
  transition: color 200ms ease;
}
.doc-picker-heading:hover::after { color: var(--ink-soft); }
.doc-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  background: #141414;
  border: 1px solid #222;
  border-radius: 2px;
  padding: 2px 0;
  margin-top: 4px;
  min-width: 180px;
  max-width: 280px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}
.doc-picker-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 150ms ease;
}
.doc-picker-item:hover {
  color: var(--ink);
}
.doc-picker-item.active {
  color: var(--ink-soft);
}
.project-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 200ms ease;
}

/* ----- 8e. Now page ----- */
main.now {
  padding-top: 80px;
}
.now-header { margin-bottom: 48px; }
.now-header h1 {
  font-family: var(--font-handwrite);
  font-size: 56px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin: 0;
}
.now-section { margin-bottom: 48px; }
.now-section h2 {
  font-family: var(--font-handwrite);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
  line-height: 1.1;
}
.now-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.now-list li {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0 0 14px;
  padding-left: 18px;
  position: relative;
}
.now-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--ink-soft);
  font-weight: 700;
}

/* ----- 8f. Euphoria page ----- */
main.euphoria {
  padding-top: 80px;
}
.euphoria-banner {
  margin: 0 0 48px;
  width: 100%;
}
.euphoria-banner img { width: 100%; height: auto; display: block; }
.euphoria-header { margin-bottom: 48px; }
.euphoria-header h1 {
  font-family: var(--font-handwrite);
  font-size: 56px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin: 0 0 16px;
}
.euphoria-tagline {
  font-family: var(--font-body);
  font-size: 22px;
  color: var(--ink-muted);
  line-height: 1.4;
  margin: 0;
}
.euphoria-video {
  margin-bottom: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.euphoria-watch {
  display: inline-block;
  font-family: var(--font-handwrite);
  font-size: 28px;
  color: var(--ink-soft);
  text-decoration: none;
}
.euphoria-watch:hover { text-decoration: underline; }
.euphoria-section { margin-bottom: 48px; }
.euphoria-section h2 {
  font-family: var(--font-handwrite);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px;
  line-height: 1.1;
}
.euphoria-section p {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0 0 14px;
}
.euphoria-characters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 16px;
}
.euphoria-character {
  overflow: hidden;
  background: transparent;
}
.euphoria-character img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.euphoria-character-text {
  padding: 20px;
}
.euphoria-character-text h3 {
  font-family: var(--font-handwrite);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1;
}
.euphoria-character-text .role {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.euphoria-character-text .desc {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
}

/* ----- 8g. GIF squeeze on click ----- */
.gif-squeeze {
  animation: gif-squeeze 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes gif-squeeze {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.86); }
  70%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.gif-squeeze { transform-origin: center; }

/* ----- 8i. 404 page ----- */
main.notfound {
  padding-top: 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 48px;
  align-items: start;
}
.notfound-text { max-width: 480px; }
.notfound .notfound-eyebrow {
  font-family: var(--font-handwrite);
  font-size: 120px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1;
  margin: 0;
}
.notfound h1 {
  font-family: var(--font-handwrite);
  font-size: 56px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin: 16px 0 24px;
}
.notfound p {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}
.notfound-cta {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-handwrite);
  font-size: 28px;
  color: var(--ink-soft);
  text-decoration: none;
}
.notfound-cta:hover { text-decoration: underline; }
.notfound-figure {
  margin: 0;
  align-self: start;
}
.notfound-figure img {
  width: 220px;
  height: auto;
  opacity: 0.85;
  image-rendering: -webkit-optimize-contrast;
}

@media (max-width: 767px) {
  main.notfound {
    padding-top: 32px;
    grid-template-columns: 1fr;
    gap: 24px 0;
  }
  .notfound-text { max-width: none; }
  .notfound-eyebrow { font-size: 80px; }
  .notfound h1 { font-size: 36px; }
  .notfound-cta { font-size: 22px; }
  .notfound-figure { justify-self: center; }
  .notfound-figure img { width: 160px; }
  .pin-icon { top: 8px; right: 8px; }
}

/* ----- 8h. Back button (inline at top of main content) ----- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 0;
  margin: 0;
  font-family: var(--font-handwrite);
  font-size: 26px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 200ms ease, transform 100ms ease;
}
.back-btn svg { display: block; transition: transform 200ms ease; }
.back-btn span { line-height: 1; }
.back-btn:hover { color: var(--ink-soft); }
.back-btn:hover svg { transform: translateX(-4px); }
.back-btn:active { transform: translateX(-2px); }

/* ----- 10. Wide screens: bigger type, more space ----- */
@media (min-width: 1280px) {
  :root {
    --content-pad-x: 120px;
    --title-size: 38px;
    --desc-size: 17px;
    --item-max: 380px;
    --grid-row-gap: 64px;
    --grid-col-gap: 80px;
    --grid-max-width: 1320px;
    --grid-cols: 2;
  }
}

@media (min-width: 1600px) {
  :root {
    --content-pad-x: 160px;
    --title-size: 44px;
    --desc-size: 19px;
    --item-max: 440px;
    --grid-row-gap: 80px;
    --grid-col-gap: 120px;
    --grid-max-width: 1500px;
    --grid-cols: 3;
  }
}

@media (min-width: 1920px) {
  :root {
    --content-pad-x: 200px;
    --title-size: 52px;
    --desc-size: 21px;
    --item-max: 480px;
    --grid-row-gap: 96px;
    --grid-col-gap: 160px;
    --grid-max-width: 1800px;
    --grid-cols: 3;
  }
}

/* ----- 11. Mobile: stack vertically, allow scroll ----- */
@media (max-width: 767px) {
  html, body { height: auto; }
  body { display: block; }

  :root {
    --content-pad-x: 24px;
    --content-pad-y: 24px;
    --title-size: 28px;
    --desc-size: 15px;
    --grid-row-gap: 28px;
    --grid-col-gap: 28px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 24px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    background: var(--paper);
    z-index: 10;
  }
  .sidebar h1 { font-size: 28px; }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    margin-left: auto;
  }
  .nav-link {
    font-size: 18px;
    padding: 12px 8px;
  }

  main {
    padding: 24px;
    min-height: auto;
    gap: 28px;
  }

  .projects-grid {
    flex-direction: column;
    gap: 28px;
  }
  .projects-grid > li { max-width: 100%; min-width: 0; }

  .landing-gif { max-width: 240px; }
  .landing-caption { font-size: 32px; }
  .landing-cta { font-size: 16px; }

  main.about, main.contact, main.now, main.project, main.euphoria { padding-top: 16px; }
  .about-section { margin-bottom: 36px; }
  .about-section h2 { font-size: 26px; }
  .about-section p { font-size: 16px; }
  .about-section--intro { flex-direction: column; gap: 16px; }
  .about-gif { width: 130px; margin-top: 0; }
  .contact-title { font-size: 32px; }
  .contact-title--sm { font-size: 26px; margin-top: 32px; }
  .contact-link {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
  }
  .contact-link .name { font-size: 22px; }
  .contact-link .desc { font-size: 14px; }
  .contact-link .handle { font-size: 12px; }
  .project-title, .now-header h1 { font-size: 42px; }
  .euphoria-header h1 { font-size: 42px; }
  .euphoria-tagline { font-size: 18px; }
  .now-section h2 { font-size: 26px; }
  .euphoria-section h2 { font-size: 26px; }
  .project-section h2 { font-size: 26px; }
  .euphoria-characters { grid-template-columns: 1fr; }
  .now-list li { font-size: 16px; }
  .back-btn { font-size: 22px; margin-bottom: 0; }
}

/* ----- 12. View transitions (cross-page navigation fade) ----- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: vt-fade-out 180ms ease forwards;
}
::view-transition-new(root) {
  animation: vt-fade-in 220ms ease forwards;
}

@keyframes vt-fade-out {
  to { opacity: 0; transform: translateY(-4px); }
}
@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}