/* ============================================================
   KATSUBA — Portfolio
   Tokens from KD Templates.fig
   ============================================================ */
:root {
  --accent: #E13C54;
  --accent-deep: color-mix(in oklab, var(--accent), black 28%);
  --ink: #0D0D0D;
  --ink-2: #1A1A1A;
  --dark: #1B171C;
  --pink: #FFF5F6;
  --tag-pink: #FFF5F6;
  --pressed-red: #B80937;
  --navy: #0D151B;
  --project-yellow: #FBCF81;
  --paper: #FFFFFF;
  --text-light: #F2F2F2;

  --font-head: "IBM Plex Sans JP", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Noto Sans", -apple-system, "Segoe UI", sans-serif;

  --glow-opacity: 1;
  --glow-blur: 120px;
  --circle-duration: 6s;
  --marker-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20400%2064%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M15%2013%20C7%2012%204%207%2016%205.5%20C70%201.5%20130%207%20200%204%20C260%201.5%20320%206.5%20384%203.5%20C394%203%20399%206%20396%2013%20C393%2025%20397%2038%20395%2049%20C394.5%2057%20387%2059.5%20379%2058.5%20C310%2054.5%20240%2061%20165%2058%20C105%2055.5%2055%2061%2022%2058.5%20C10%2057.5%206%2053%209%2046%20C12%2035%208%2024%2011%2016%20C12%2014%2013%2013.2%2015%2013%20Z%22%20fill%3D%22%23E13C54%22%20fill-opacity%3D%220.4%22%2F%3E%3C%2Fsvg%3E");

  --wrap: 1200px;
  --pad: 40px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0;
}

a { color: inherit; }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: fixed;
  top: 24px;
  left: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  padding: 8px 32px;
  border-radius: 1200px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(13, 13, 13, 0.06);
}

.logo {
  display: block;
  width: 124px;
  height: 24px;
  flex: none;
  color: var(--ink-2);
  transition: color 0.2s ease;
}

a:hover > .logo { color: var(--accent); }
a:active > .logo { color: #93001D; }

.logo.light { color: var(--text-light); }

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 512px;
  transition: background-color 0.2s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.nav a:active {
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 1px var(--pressed-red);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(13, 13, 13, 0.07);
  border: none;
  border-radius: 512px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lang-icon {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.8;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.lang-toggle:active {
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 1px var(--pressed-red);
}

/* Burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px 13px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1200px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease, width 0.25s ease;
}

/* spec: burger-icon-20 — alternating line lengths */
.burger span:nth-child(1) { width: 18px; }
.burger span:nth-child(2) { width: 16px; }
.burger span:nth-child(3) { width: 20px; }

body.menu-open .burger span:nth-child(1) { width: 20px; transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  background: var(--pink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.menu-open .mobile-menu { opacity: 1; visibility: visible; }

.mobile-menu a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(36px, 9vw, 56px);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 8px 0;
}

.mobile-menu a:hover { color: var(--accent); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px var(--pad);
}

.hero-circle {
  position: absolute;
  left: 50%;
  top: 0;
  width: max(2517px, 160vw);
  aspect-ratio: 1;
  opacity: var(--glow-opacity);
  transform: translate(-50%, calc(-100% + min(300px, 32svh)));
  pointer-events: none;
}

/* Blur is applied to a quarter-size circle that the GPU scales 4x —
   visually identical to blurring the full-size circle, but far cheaper. */
.hero-circle-core {
  position: absolute;
  inset: 37.5%;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(calc(var(--glow-blur) / 4));
  transform: scale(4);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-circle.animate {
    animation: circle-in var(--circle-duration) cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes circle-in {
  from {
    transform: translate(-50%, -100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, calc(-100% + min(300px, 32svh)));
    opacity: var(--glow-opacity);
  }
}

.kana-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(1200px, 100%);
  margin-top: 10svh;
}

.kana {
  display: grid;
  height: clamp(96px, 16vw, 200px);
  text-align: center;
}

.kana-jp,
.kana-en {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: var(--font-head);
  color: var(--ink-2);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.65s ease;
}

.kana-jp {
  font-weight: 700;
  font-size: clamp(56px, 9.4vw, 116px);
  color: rgba(25, 25, 25, 0.95);
}

/* optical centering: uppercase romaji sit slightly above the flex center
   (cap height vs. line box), so the kana glyphs get the same lift */
.kana-jp svg {
  transform: translateY(-0.06em);
}

.kana-en {
  transform: translateY(8%);
  opacity: 0;
  font-weight: 700;
  font-size: clamp(60px, 10.2vw, 126px);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 1;
}

/* Spec (KD Components): on hover the katakana stays as a 20% ghost
   behind a larger romaji — it never fully disappears. */
.kana:hover .kana-jp {
  opacity: 0.15;
}

.kana:hover .kana-en {
  transform: translateY(0);
  opacity: 1;
}

.hero-arrow {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.14);
  transform: translateX(-50%) translateY(3px);
}

.hero-arrow .arrow-glyph {
  width: 24px;
  height: 24px;
  display: block;
  color: var(--ink);
  shape-rendering: geometricPrecision;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-arrow .arrow-glyph {
    animation: arrow-bob 1.8s ease-in-out infinite;
  }
}

@keyframes arrow-bob {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(5px); }
}

/* ============================================================
   Sections (shared)
   ============================================================ */
.section { padding-block: clamp(72px, 9vw, 128px); }

.section h2 {
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1.15;
  text-transform: uppercase;
  margin-bottom: clamp(32px, 4vw, 56px);
}

/* Offer band */
.offer {
  background: var(--pink);
  padding-block: calc(clamp(72px, 9vw, 128px) + 40px);
}

.offer h1 {
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.08;
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 16ch;
  margin-inline: auto;
  text-align: center;
}

/* marker highlight — an SVG marker stroke painted as the element's own
   background (always behind the glyphs); wipes in once on scroll.
   --marker-image is generated in JS so it follows the accent tweak. */
.marker {
  background-image: var(--marker-image);
  background-repeat: no-repeat;
  background-position: left calc(50% - 0.08em);
  background-size: 100% 1.5em;
  padding-inline: 0.42em 0.14em;
  margin-inline: -0.42em -0.14em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

@media (prefers-reduced-motion: no-preference) {
  .marker {
    background-size: 0% 1.5em;
  }

  .marker.in {
    animation: marker-wipe 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
  }
}

@keyframes marker-wipe {
  from { background-size: 0% 1.5em; }
  to { background-size: 100% 1.5em; }
}

/* ============================================================
   Projects
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(56px, 7vw, 104px) clamp(20px, 2.6vw, 36px);
  align-items: start;
}

/* editorial sizing: big — small — small — wide — medium — medium */
.projects-grid > .project-card:nth-child(1) { grid-column: 1 / span 7; }
.projects-grid > .project-card:nth-child(2) { grid-column: 9 / span 4; }
.projects-grid > .project-card:nth-child(3) { grid-column: 1 / span 5; }
.projects-grid > .project-card:nth-child(4) { grid-column: 7 / span 6; }
.projects-grid > .project-card:nth-child(5) { grid-column: 1 / span 6; }
.projects-grid > .project-card:nth-child(6) { grid-column: 8 / span 5; }

/* The artwork IS the card; the caption sits outside on the page background. */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* editorial stagger: individual offsets */
.projects-grid > .project-card:nth-child(2) {
  margin-top: clamp(72px, 10vw, 160px);
}

.projects-grid > .project-card:nth-child(4) {
  margin-top: clamp(48px, 7vw, 110px);
}

/* white mat + soft shadow around the cover */
.project-mat {
  display: block;
  padding: 10px;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(13, 13, 13, 0.1), 0 18px 44px rgba(27, 23, 28, 0.12);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

/* hover: accent border + gentle tilt — half the about-photo tilt (4° → 2°) */
.project-card:hover .project-mat {
  transform: translateY(-6px) rotate(2deg);
  box-shadow: 0 0 0 2px var(--accent), 0 28px 64px rgba(27, 23, 28, 0.16);
}

.projects-grid > .project-card:nth-child(even):hover .project-mat {
  transform: translateY(-6px) rotate(-2deg);
}

/* pressed: same border color as the header nav buttons */
.project-card:active .project-mat {
  transform: translateY(-3px) rotate(2deg);
  box-shadow: 0 0 0 2px var(--pressed-red), 0 18px 44px rgba(27, 23, 28, 0.12);
}

.projects-grid > .project-card:nth-child(even):active .project-mat {
  transform: translateY(-3px) rotate(-2deg);
}

.cover-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #F3F1F3;
}

.cover-frame .cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* format variety, like an editorial pinboard */
.projects-grid > .project-card:nth-child(2) .cover-frame { aspect-ratio: 1; }
.projects-grid > .project-card:nth-child(4) .cover-frame { aspect-ratio: 16 / 10; }
.projects-grid > .project-card:nth-child(5) .cover-frame { aspect-ratio: 3 / 2; }
.projects-grid > .project-card:nth-child(6) .cover-frame { aspect-ratio: 3 / 2; }

/* Linovy tile: white wordmark needs the brand blue behind it */
.projects-grid > .project-card:nth-child(1) .cover-frame {
  background: #0267D3;
}

/* thrpy tile: raster logo gets breathing room */
.projects-grid > .project-card:nth-child(3) .cover-frame .cover-img {
  padding: 12%;
  box-sizing: border-box;
}

/* caption outside the card */
.project-caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-inline: 6px;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  line-height: 1.2;
}

.project-arrow {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--ink);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

.project-card:hover .project-arrow {
  transform: translateX(5px);
  color: var(--accent);
}

.project-card:active .project-arrow {
  color: var(--pressed-red);
}

.project-meta {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(13, 13, 13, 0.55);
}

@media (max-width: 760px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .projects-grid > .project-card:nth-child(n) {
    grid-column: auto;
    margin-top: 0;
  }

  .projects-grid > .project-card:nth-child(n) .cover-frame {
    aspect-ratio: 4 / 3;
  }
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
  color: var(--ink);
  background: var(--tag-pink);
  border-radius: 8px;
  padding: 6px 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   Skills (pink section, dark cards)
   ============================================================ */
.skills {
  background: var(--pink);
  color: var(--ink);
}

.skills .section-intro {
  max-width: 860px;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 clamp(40px, 5vw, 64px);
}

.skills h2 { margin-bottom: 24px; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.2vw, 28px);
  align-items: stretch;
}

/* dark portrait card — same mat language as the project covers */
.skill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 24px 24px 26px;
  border-radius: 18px;
  background: var(--dark);
  color: var(--text-light);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(13, 13, 13, 0.1), 0 18px 44px rgba(27, 23, 28, 0.12);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

/* hover: identical recipe to the project mats — lift, ±2° tilt, accent ring */
.skill-card:hover {
  transform: translateY(-6px) rotate(2deg);
  box-shadow: 0 0 0 2px var(--accent), 0 28px 64px rgba(27, 23, 28, 0.16);
}

.skills-grid > .skill-card:nth-child(even):hover {
  transform: translateY(-6px) rotate(-2deg);
}

.skill-num {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.skill-body {
  position: relative;
  flex: 1;
}

/* oversized ghost icon — shrinks toward the top on hover, list takes over */
.skill-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  transition: color 0.35s ease;
}

.skill-glyph svg {
  width: clamp(140px, 12vw, 180px);
  height: auto;
  display: block;
  shape-rendering: geometricPrecision;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-card:hover .skill-glyph { color: var(--accent); }
.skill-card:hover .skill-glyph svg { transform: translateY(-54px) scale(0.42); }

.skill-list {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-list li {
  font-size: 15.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-card:hover .skill-list li { opacity: 1; transform: none; }
.skill-card:hover .skill-list li:nth-child(1) { transition-delay: 0.05s; }
.skill-card:hover .skill-list li:nth-child(2) { transition-delay: 0.1s; }
.skill-card:hover .skill-list li:nth-child(3) { transition-delay: 0.15s; }
.skill-card:hover .skill-list li:nth-child(4) { transition-delay: 0.2s; }
.skill-card:hover .skill-list li:nth-child(5) { transition-delay: 0.25s; }

.skill-name {
  margin-top: 18px;
  font-size: 24px;
  line-height: 1.25;
  color: var(--text-light);
}

/* touch devices: no hover — keep the list visible, park the icon up top */
@media (hover: none) {
  .skill-glyph { color: var(--accent); }
  .skill-glyph svg { transform: translateY(-54px) scale(0.42); }
  .skill-list li { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: 380px; }
}

/* ============================================================
   About
   ============================================================ */
.about-row {
  display: flex;
  gap: 72px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.photo-frame {
  position: relative;
  flex: none;
  width: min(374px, 100%);
  aspect-ratio: 1;
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 16px;
  background: var(--accent);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-frame .about-photo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Spec (KD Components): photo tilts ~4° on hover, backboard grows slightly */
.photo-frame:hover::before {
  transform: rotate(4deg) scale(1.03);
}

.photo-frame:hover .about-photo {
  transform: rotate(4deg);
}

/* oni masks peeking from behind the photo */
.oni-peek {
  position: absolute;
  width: 74px;
  height: auto;
  opacity: 0;
  pointer-events: none;
}

.oni-slot-1 {
  top: -56px;
  left: 20%;
  transform: translateY(70px) rotate(-3deg);
}

.oni-slot-2 {
  top: 24%;
  right: -52px;
  width: 66px;
  transform: translateX(-66px) rotate(92deg);
}

.oni-slot-3 {
  bottom: 16%;
  left: -48px;
  width: 60px;
  transform: translateX(62px) rotate(-88deg);
}

.photo-frame:hover .oni-slot-1 { transform: translateY(0) rotate(-8deg); opacity: 1; }
.photo-frame:hover .oni-slot-2 { transform: translateX(0) rotate(86deg); opacity: 1; }
.photo-frame:hover .oni-slot-3 { transform: translateX(0) rotate(-95deg); opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .oni-peek {
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  }

  .photo-frame:hover .oni-slot-1 { transition-delay: 0s; }
  .photo-frame:hover .oni-slot-2 { transition-delay: 0.09s; }
  .photo-frame:hover .oni-slot-3 { transition-delay: 0.18s; }
}

.about-text {
  flex: 1;
  min-width: 320px;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.45;
}

.about-text p { margin: 0 0 1.2em; }
.about-text p:last-child { margin-bottom: 0; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  position: relative;
  background: var(--dark);
  color: var(--text-light);
  overflow: hidden;
}

/* Ensō-Echo: der Glow-Kreis steigt — wie im Hero — von unten auf */
.footer-cta {
  position: relative;
  z-index: 1;
  display: block;
  width: fit-content;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 64px);
  line-height: 1.15;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-light);
  margin-bottom: clamp(40px, 6vw, 80px);
}

.footer-cta-mail {
  display: block;
  width: fit-content;
  margin-top: 14px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.3s ease;
}

.footer-cta:hover .footer-cta-mail { color: rgba(255, 255, 255, 0.9); }

.footer-circle {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 0;
  width: max(1600px, 130vw);
  aspect-ratio: 1;
  opacity: 0;
  transform: translate(-50%, 100%);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  pointer-events: none;
}

/* Gleicher GPU-Trick wie im Hero: Blur auf Viertelgröße, 4x skaliert */
.footer-circle-core {
  position: absolute;
  inset: 37.5%;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(calc(var(--glow-blur) / 4));
  transform: scale(4);
}

.footer-cta:hover + .footer-circle,
.footer-cta:focus-visible + .footer-circle {
  opacity: var(--glow-opacity);
  transform: translate(-50%, calc(100% - min(220px, 24svh)));
}

.footer-cta-arrow {
  display: inline-block;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-cta:hover .footer-cta-arrow { transform: translateX(0.28em); }

.footer-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

.footer-links a:hover { color: var(--text-light); }

/* ============================================================
   Reveal on scroll
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Back to top
   ============================================================ */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(13, 13, 13, 0.06);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  display: block;
}

.back-to-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top.visible:hover {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible:active {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px var(--pressed-red);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  :root { --pad: 24px; }

  .site-header { top: 16px; left: 16px; right: 16px; padding: 8px 20px; }
  .nav { display: none; }
  .burger { display: flex; }

  .about-row { gap: 40px; }
  .hero-arrow { bottom: 40px; }
  .back-to-top { right: 20px; bottom: 20px; width: 48px; height: 48px; }
}
