@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --radius: 0.125rem;
  --background: oklch(10.5% 0.004 250);
  --foreground: oklch(91% 0.005 250);
  --card: oklch(15% 0.005 250);
  --card-foreground: oklch(93% 0.004 250);
  --popover: oklch(15% 0.005 250);
  --popover-foreground: oklch(93% 0.004 250);
  --primary: oklch(70% 0.2 42);
  --primary-foreground: oklch(11% 0.005 250);
  --secondary: oklch(20% 0.006 250);
  --secondary-foreground: oklch(90% 0.004 250);
  --muted: oklch(18% 0.005 250);
  --muted-foreground: oklch(62% 0.008 250);
  --accent: oklch(70% 0.2 42);
  --accent-foreground: oklch(11% 0.005 250);
  --destructive: oklch(58% 0.22 27);
  --destructive-foreground: oklch(98% 0 0);
  --border: oklch(31% 0.007 250);
  --input: oklch(27% 0.006 250);
  --ring: oklch(70% 0.2 42);
  --canvas: oklch(8.5% 0.004 250);
  --panel: oklch(13.5% 0.005 250);
  --grid: oklch(27% 0.006 250 / 0.45);

  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--border);
}

html {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

.cursor-glow {
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle,
    color-mix(in oklab, var(--primary) 22%, transparent) 0%,
    color-mix(in oklab, var(--primary) 8%, transparent) 32%,
    transparent 70%
  );
  filter: blur(8px);
  will-change: transform;
  transform: translate3d(0, 0, 0) translate(-50%, -50%);
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
}

.cursor-glow.is-visible {
  opacity: 0.8;
}

.custom-cursor {
  position: fixed;
  z-index: 2001;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0) translate(-50%, -50%);
  transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.custom-cursor-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px color-mix(in oklab, var(--primary) 80%, transparent);
  transform: translate(-50%, -50%);
}

.custom-cursor-reticle {
  position: absolute;
  inset: 3px;
  border: 1px solid color-mix(in oklab, var(--primary) 75%, transparent);
  clip-path: polygon(0 0, 35% 0, 35% 1px, 1px 1px, 1px 35%, 0 35%, 0 0, 100% 0, 100% 35%, calc(100% - 1px) 35%, calc(100% - 1px) 1px, 65% 1px, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) 65%, 100% 65%, 100% 100%, 0 100%, 0 65%, 1px 65%, 1px calc(100% - 1px), 35% calc(100% - 1px), 35% 100%, 0 100%);
  transform: rotate(45deg);
}

.custom-cursor.is-visible {
  opacity: 1;
}

.custom-cursor.is-hovering {
  width: 40px;
  height: 40px;
}

.custom-cursor.is-clicking .custom-cursor-core {
  animation: cursorPulse 0.18s ease-out;
}

@media (hover: hover) and (pointer: fine) {
  html,
  html * {
    cursor: none !important;
  }
}

@keyframes cursorPulse {
  50% {
    transform: translate(-50%, -50%) scale(2.2);
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-glow,
  .custom-cursor {
    display: none;
  }
}

body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
}

.orientation-guard {
  display: none;
}

@media (max-width: 1024px) and (orientation: landscape) and (pointer: coarse) {
  .orientation-guard:not([hidden]) {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: var(--background);
    color: var(--foreground);
    text-align: center;
  }

}

/* Missing-route fallback */
  .error-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    overflow: hidden;
    background:
      radial-gradient(circle at 50% 42%, color-mix(in oklab, var(--primary) 8%, transparent), transparent 34rem),
      var(--canvas);
  }

  .error-page::before,
  .error-page::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: '';
  }

  .error-page::before {
    background-image:
      linear-gradient(var(--grid) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 4rem 4rem;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    opacity: 0.42;
  }

  .error-page::after {
    background: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 5px,
      color-mix(in oklab, var(--foreground) 2%, transparent) 6px
    );
    mix-blend-mode: screen;
  }

  .error-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(100% - 3rem, 90rem);
    min-height: 100vh;
    margin: 0 auto;
  }

  .error-header,
  .error-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
  }

  .error-footer {
    border-top: 1px solid var(--border);
    border-bottom: 0;
    color: var(--muted-foreground);
  }

  .error-brand,
  .error-status,
  .error-footer {
    font: 500 0.68rem/1.4 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .error-brand {
    color: var(--foreground);
  }

  .error-status {
    color: var(--primary);
  }

  .error-status::before {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.55rem;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0.7rem var(--primary);
    content: '';
  }

  .error-content {
    display: grid;
    align-content: center;
    justify-items: start;
    padding: 5rem 0;
  }

  .error-code {
    color: var(--primary);
    font: 500 clamp(5rem, 18vw, 13rem)/0.8 var(--font-mono);
    letter-spacing: -0.12em;
    text-shadow: 0 0 3rem color-mix(in oklab, var(--primary) 20%, transparent);
  }

  .error-kicker {
    margin-top: 2.5rem;
    color: var(--primary);
    font: 500 0.72rem/1.4 var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .error-title {
    max-width: 13ch;
    margin-top: 0.75rem;
    color: var(--foreground);
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
  }

  .error-copy {
    max-width: 34rem;
    margin-top: 1.25rem;
    color: var(--muted-foreground);
    font-size: 1rem;
  }

  .error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
  }

  .error-action {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    color: var(--foreground);
    font: 500 0.7rem/1 var(--font-mono);
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  }

  .error-action-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
  }

  .error-action:hover,
  .error-action:focus-visible {
    border-color: var(--primary);
    background: color-mix(in oklab, var(--primary) 12%, transparent);
    color: var(--primary);
  }

  .error-action-primary:hover,
  .error-action-primary:focus-visible {
    background: var(--foreground);
    color: var(--background);
  }

  @media (max-width: 600px) {
    .error-shell {
      width: min(100% - 2rem, 90rem);
    }

    .error-header,
    .error-footer {
      padding: 1.1rem 0;
    }

    .error-footer {
      display: block;
    }

    .error-footer span + span {
      display: block;
      margin-top: 0.35rem;
    }

    .error-content {
      padding: 3rem 0;
    }
  }

@media (max-width: 1024px) and (orientation: landscape) and (pointer: coarse) {
  .orientation-guard-card {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    max-width: 22rem;
    padding: 2rem;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: 0 0 40px color-mix(in oklab, var(--primary) 12%, transparent);
  }

  .orientation-guard-icon {
    color: var(--primary);
    font: 2.5rem/1 var(--font-mono);
  }

  .orientation-guard-card strong {
    color: var(--primary);
    font: 600 0.8rem/1.3 var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .orientation-guard-card span:last-child {
    color: var(--muted-foreground);
    font-size: 0.9rem;
  }
}

@media (max-width: 1023px) {
  html.home-page,
  html.home-page body {
    overflow: hidden;
  }
}

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

img, svg {
  display: block;
  max-width: 100%;
}

.intro-active {
  overflow: hidden;
}

.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow-y: auto;
  color: #f2efeb;
  background: #030303;
  font-family: var(--font-mono);
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.intro-loader::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 16%, color-mix(in oklab, var(--primary) 7%, transparent), transparent 32%),
    radial-gradient(ellipse at 88% 82%, color-mix(in oklab, var(--primary) 5%, transparent), transparent 28%);
}

.intro-loader-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-console {
  position: relative;
  width: min(100%, 760px);
  border: 1px solid color-mix(in oklab, var(--primary) 22%, var(--border));
  background: #070707;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 4%, transparent), 0 24px 90px rgba(0, 0, 0, 0.72);
}

.intro-console::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), color-mix(in oklab, var(--primary) 72%, white) 65%, transparent);
}

.intro-console-bar {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0 1rem;
  border-bottom: 1px solid color-mix(in oklab, var(--primary) 15%, var(--border));
  color: #938881;
  font-size: 10px;
  letter-spacing: 0.11em;
}

.intro-console-lights {
  display: flex;
  gap: 4px;
}

.intro-console-lights i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.intro-console-lights i:nth-child(2) {
  opacity: 0.55;
}

.intro-console-lights i:nth-child(3) {
  opacity: 0.28;
}

.intro-console-version {
  margin-left: auto;
  color: var(--primary);
}

.intro-console-body {
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.intro-console-label {
  margin-bottom: 1.6rem;
  color: var(--primary);
  font-size: 10px;
  letter-spacing: 0.17em;
}

.intro-console-prompt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 24px;
  margin-bottom: 0.9rem;
  color: #f2efeb;
  font-size: 13px;
}

.intro-console-prompt > span:first-child,
.intro-log-check {
  color: var(--primary);
}

.intro-console-prompt i {
  width: 7px;
  height: 15px;
  background: var(--primary);
  animation: consoleCursor 0.8s steps(1, end) infinite;
}

.intro-console-output {
  min-height: 181px;
  color: #c0b8b2;
  font-size: 12px;
  line-height: 1.9;
}

.intro-log-line {
  animation: consoleLineIn 0.24s ease both;
}

.intro-progress {
  height: 2px;
  margin-top: 1.1rem;
  overflow: hidden;
  background: color-mix(in oklab, var(--primary) 12%, var(--panel));
}

.intro-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), color-mix(in oklab, var(--primary) 72%, white));
  box-shadow: 0 0 12px color-mix(in oklab, var(--primary) 60%, transparent);
  transition: width 0.35s ease;
}

.intro-countdown {
  min-height: 4.3rem;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
}

.countdown-pulse {
  animation: countdownPulse 0.55s ease both;
}

.intro-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding-top: 0.35rem;
  animation: consoleLineIn 0.4s ease both;
}

.intro-actions[hidden] {
  display: none;
}

.intro-actions > p {
  color: var(--primary);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.intro-action-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.intro-button {
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid color-mix(in oklab, var(--primary) 22%, var(--border));
  color: #d8d1cb;
  background: color-mix(in oklab, var(--panel) 85%, black);
  font-family: var(--font-mono);
  font-size: 11px;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.intro-button:hover,
.intro-button:focus-visible {
  border-color: var(--primary);
  color: #fff;
  outline: none;
}

.intro-button-primary {
  border-color: var(--primary);
  color: var(--primary-foreground);
  background: linear-gradient(110deg, var(--primary), color-mix(in oklab, var(--primary) 75%, white));
  font-weight: 600;
}

.intro-button-primary:hover,
.intro-button-primary:focus-visible {
  border-color: color-mix(in oklab, var(--primary) 78%, white);
  color: var(--primary-foreground);
  background: linear-gradient(110deg, color-mix(in oklab, var(--primary) 90%, white), var(--primary));
}

.intro-footer {
  position: absolute;
  right: 1.5rem;
  bottom: 1.1rem;
  color: #655b55;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.intro-footer span {
  color: var(--primary);
}

@keyframes consoleCursor {
  50% { opacity: 0; }
}

@keyframes consoleLineIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes countdownPulse {
  0% { opacity: 0; transform: scale(0.82); }
  55% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 520px) {
  .intro-loader {
    padding: 1rem;
  }

  .intro-console-output {
    min-height: 168px;
    font-size: 10px;
  }

  .intro-console-bar {
    gap: 0.55rem;
    font-size: 8px;
  }

  .intro-footer {
    right: 1rem;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow,
  .custom-cursor {
    display: none;
  }

  .appreciation-notice,
  .appreciation-progress span {
    animation: none;
  }

  body.gallery-return > .site-header,
  body.gallery-return > .page-container,
  body.gallery-return > .site-footer {
    animation: none;
  }

  .intro-console-prompt i {
    animation: none;
    transition: none;
  }

  .intro-log-line,
  .countdown-pulse,
  .intro-actions,
  .hero-name-char {
    animation: none;
    transition: none;
  }
}

/* Animations */
@keyframes signalIn {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.signal-in {
  animation: signalIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.rec-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: var(--primary);
  border-radius: 50%;
  margin-right: 6px;
  animation: recBlink 1.4s ease-in-out infinite;
}

/* Typography Utilities */
.font-mono {
  font-family: var(--font-mono);
}

.text-primary {
  color: var(--primary);
}

.text-muted {
  color: var(--muted-foreground);
}

.text-foreground {
  color: var(--foreground);
}

.uppercase {
  text-transform: uppercase;
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--background) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}

@media (min-width: 640px) {
  .header-inner {
    padding: 0 2rem;
  }
}

.brand-logo {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 2px;
  letter-spacing: 0.05em;
  transition: opacity 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.8;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-menu-toggle {
  display: none;
}

@media (max-width: 1023px) {
  body[data-console-profile="gallery"] .header-inner,
  body[data-console-profile="about"] .header-inner {
    position: relative;
    justify-content: flex-end;
  }

  body[data-console-profile="gallery"] .mobile-menu-brand,
  body[data-console-profile="about"] .mobile-menu-brand {
    display: none;
  }

  body[data-console-profile="gallery"] .mobile-menu-toggle,
  body[data-console-profile="about"] .mobile-menu-toggle {
    position: absolute;
    left: 1.25rem;
    display: flex;
    width: 42px;
    height: 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--border);
    color: var(--foreground);
    background: transparent;
    cursor: pointer;
  }

  body[data-console-profile="gallery"] .mobile-menu-toggle span,
  body[data-console-profile="about"] .mobile-menu-toggle span {
    display: block;
    width: 17px;
    height: 1px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  body[data-console-profile="gallery"] .mobile-menu-toggle[aria-expanded="true"] span:first-child,
  body[data-console-profile="about"] .mobile-menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  body[data-console-profile="gallery"] .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2),
  body[data-console-profile="about"] .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  body[data-console-profile="gallery"] .mobile-menu-toggle[aria-expanded="true"] span:last-child,
  body[data-console-profile="about"] .mobile-menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  body[data-console-profile="gallery"] #gallery-site-nav,
  body[data-console-profile="about"] #about-site-nav {
    position: absolute;
    top: 100%;
    left: 1.25rem;
    z-index: 60;
    display: none;
    min-width: 170px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 0;
    border: 1px solid var(--border);
    background: var(--background);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  }

  body[data-console-profile="gallery"] #gallery-site-nav.is-open,
  body[data-console-profile="about"] #about-site-nav.is-open {
    display: flex;
  }

  body[data-console-profile="gallery"] #gallery-site-nav .nav-link,
  body[data-console-profile="about"] #about-site-nav .nav-link {
    padding: 0.85rem 1rem;
  }
}

@media (min-width: 640px) {
  .site-nav {
    gap: 2rem;
  }
}

.nav-link {
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--foreground);
}

.nav-link.active {
  color: var(--primary);
}

/* Audio Player Widget */
.audio-widget {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.audio-widget:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.audio-widget.playing {
  border-color: var(--primary);
  color: var(--primary);
}

.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.sound-bar {
  width: 2px;
  height: 3px;
  background-color: currentColor;
  transition: height 0.2s ease;
}

.audio-widget.playing .sound-bar:nth-child(1) {
  animation: equalize 0.8s infinite ease-in-out alternate;
}
.audio-widget.playing .sound-bar:nth-child(2) {
  animation: equalize 1.1s infinite ease-in-out alternate 0.2s;
}
.audio-widget.playing .sound-bar:nth-child(3) {
  animation: equalize 0.7s infinite ease-in-out alternate 0.4s;
}

@keyframes equalize {
  0% { height: 2px; }
  100% { height: 10px; }
}

/* Hero Page Layout */
.hero-main {
  position: relative;
  display: flex;
  height: 100dvh;
  min-height: 560px;
  width: 100%;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--canvas);
}

.hero-bg-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center center;
  filter: none;
  transition: opacity 0.5s ease;
  -webkit-user-drag: none;
  user-select: none;
}

/* Fill the complete hero viewport with the mobile/tablet composition */
@media (max-width: 1023px) {
  .hero-img {
    object-fit: cover;
    object-position: center center;
    filter: none;
  }
}

/* Desktop preview & Mobile Landscape preview: Ankur-sarkar-hero-desktop.jpg */
@media (min-width: 1024px), (orientation: landscape) {
  .hero-img {
    object-fit: cover;
    object-position: 55% 36%;
  }
}

.hero-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 55% 42%,
    transparent 44%,
    rgba(0, 0, 0, 0.42) 72%,
    #000 100%
  );
  z-index: 2;
}

.hero-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, rgba(0, 0, 0, 0.035) 1px 2px, transparent 2px 4px);
  background-size: 180px 180px, 100% 4px;
  mix-blend-mode: overlay;
  z-index: 4;
  animation: heroVhsNoise 0.4s steps(1, end) infinite;
}

@keyframes heroVhsNoise {
  0% { background-position: 0 0; }
  25% { background-position: -40px 25px; }
  50% { background-position: 35px -45px; }
  75% { background-position: -25px -30px; }
  100% { background-position: 45px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-main::before {
    animation: none;
  }
}

.hero-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .hero-header {
    padding: 2rem;
  }
}

.hero-header h1 {
  margin-top: 0.25rem;
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--foreground);
  letter-spacing: 0.03em;
}

.hero-header h1.hero-name {
  color: var(--foreground);
}

.hero-name-char {
  color: var(--foreground);
  transition: color 0.24s ease;
}

.hero-name-char.is-scrambling {
  color: var(--primary);
}

.hero-name:focus-visible,
.hero-title:focus-visible {
  outline: 1px solid var(--primary);
  outline-offset: 5px;
}

.hero-name,
.hero-title,
.slate-info,
.hero-name *,
.hero-title *,
.slate-info * {
  cursor: none;
}

.text-hover-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  padding: 0.35rem 0.5rem;
  border: 1px solid color-mix(in oklab, var(--primary) 80%, transparent);
  color: var(--foreground);
  background: rgba(5, 5, 5, 0.92);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(12px, 14px) scale(0.96);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.text-hover-cursor.is-visible {
  opacity: 1;
  transform: translate(12px, 14px) scale(1);
}

@media (hover: none), (pointer: coarse) {
  .hero-name,
  .hero-title,
  .slate-info,
  .hero-name *,
  .hero-title *,
  .slate-info * {
    cursor: auto;
  }
}

.slate-info {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1rem;
  color: oklch(68% 0.005 250);
}

@media (min-width: 640px) {
  .slate-info {
    font-size: 10px;
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  margin-top: auto;
  padding: 0 1.25rem 1.75rem;
}

@media (min-width: 640px) {
  .hero-content {
    padding: 0 2rem 2.5rem;
  }
}

.hero-badge-subtitle {
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: oklch(68% 0.005 250);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-title-box {
  border-left: 2px solid var(--primary);
  padding-left: 1rem;
}

.hero-title {
  max-width: 48rem;
  font-size: clamp(2.2rem, 8vw, 5.5rem);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 0.87;
  color: var(--foreground);
  letter-spacing: -0.02em;
  text-align: left;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.hero-title-char {
  display: inline-block;
  white-space: pre;
  transition: color 0.24s ease;
}

.hero-title-char.is-scrambling {
  color: var(--primary);
}

/* Split Bottom Navigation Cards */
.split-nav {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--canvas) 65%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.split-card {
  padding: 1rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  display: block;
}

@media (min-width: 640px) {
  .split-card {
    padding: 1.5rem;
  }
}

.split-card.border-r {
  border-right: 1px solid var(--border);
}

.split-card:hover {
  background-color: var(--secondary);
}

.split-section-tag {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
}

.tag-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
}

.tag-dot.primary {
  background-color: var(--primary);
}

.tag-dot.muted {
  background-color: var(--muted-foreground);
}

.split-action-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--foreground);
}

.split-action-char {
  display: inline-block;
  white-space: pre;
  transition: color 0.24s ease;
}

.split-action-char.is-scrambling {
  color: var(--primary);
}

@media (min-width: 640px) {
  .split-action-title {
    font-size: 0.875rem;
  }
}

.arrow-icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.split-card:hover .arrow-icon {
  transform: translate(4px, 4px);
}

/* Page Containers */
.page-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 6rem;
}

@media (min-width: 640px) {
  .page-container {
    padding: 4rem 2rem 6rem;
  }
}

/* Section Page Header */
.page-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.75rem;
}

.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.page-title {
  margin-top: 0.75rem;
  font-size: 2.25rem;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1;
  color: var(--foreground);
}

@media (min-width: 640px) {
  .page-title {
    font-size: 4.5rem;
  }
}

.page-lead-desc {
  display: none;
  max-width: 20rem;
  text-align: right;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .page-lead-desc {
    display: block;
  }
}

/* Gallery Filter Tabs */
.filter-tabs-wrapper {
  margin-top: 2rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.filter-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  border-radius: 2px;
  border: 1px solid var(--border);
  background-color: transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 0.5rem 0.75rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
}

.filter-btn:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}

.filter-btn.active {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
}

/* Gallery Grid */
.gallery-grid {
  margin-top: 2rem;
  columns: 1;
  column-gap: 1.25rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    columns: 3;
  }
}

.gallery-item {
  break-inside: avoid;
  margin: 0 0 2.5rem;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border: 0;
  background-color: var(--panel);
  cursor: pointer;
}

.gallery-img-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.gallery-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-protected-media] {
  -webkit-user-drag: none;
  user-select: none;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.035);
}

.frame-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: var(--background);
  padding: 0.25rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}

.gallery-info-bar {
  margin-top: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.gallery-category-label {
  max-width: 42%;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.4;
  text-align: right;
  text-transform: uppercase;
}

.gallery-item[hidden] {
  display: none;
}

.project-feedback {
  grid-column: 1 / -1;
  padding: 2rem 0;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.artwork-title {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--foreground);
  letter-spacing: 0.03em;
}

.project-card-title-link:hover {
  color: var(--primary);
}

.artwork-meta {
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
}

/* About Page Layout */
.about-grid {
  display: grid;
  gap: 3rem;
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 5rem;
  }
}

.portrait-sticky-wrapper {
  position: relative;
}

@media (min-width: 1024px) {
  .portrait-sticky-wrapper {
    position: sticky;
    top: 5rem;
    align-self: flex-start;
  }
}

.portrait-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--panel);
}

.portrait-img {
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.portrait-badge {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background-color: var(--background);
  padding: 0.25rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
}

/* Social links box in about */
.social-links-box {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--canvas) 60%, transparent);
  padding: 1rem;
}

.social-title {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  transition: all 0.2s ease;
}

.social-btn:hover {
  border-color: var(--primary);
  background-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 0 16px color-mix(in oklab, var(--primary) 24%, transparent);
}

.social-btn img, .social-btn svg {
  width: 18px;
  height: 18px;
  filter: grayscale(1) brightness(1.2);
  transition: filter 0.2s ease;
}

.social-btn:hover img, .social-btn:hover svg {
  filter: none;
}

/* About Narrative */
.about-narrative {
  padding-top: 0;
}

@media (min-width: 1024px) {
  .about-narrative {
    padding-top: 3rem;
  }
}

.about-headline {
  max-width: 48rem;
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--foreground);
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .about-headline {
    font-size: 3rem;
  }
}

.about-bio-text {
  margin-top: 2rem;
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .about-bio-text {
    font-size: 1.125rem;
    line-height: 2;
  }
}

.about-resume-section {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.resume-section-title {
  margin-bottom: 1.25rem;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resume-skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.resume-skill {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel) 75%, transparent);
}

.resume-skill h4,
.resume-entry-heading h4 {
  color: var(--foreground);
  font-size: 0.85rem;
  font-weight: 500;
}

.resume-skill p,
.resume-entry > p {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.85rem;
  line-height: 1.7;
}

.resume-entry-list {
  display: grid;
  gap: 1.25rem;
}

.resume-entry {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}

.resume-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.resume-entry-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.resume-entry-heading > span {
  flex: 0 0 auto;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: right;
}

.resume-entry-heading > a {
  flex: 0 0 auto;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
}

.resume-contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.resume-contact-list a:hover {
  color: var(--primary);
}

.resume-contact-reveal {
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 3px;
}

.resume-contact-reveal:hover,
.resume-contact-reveal:focus-visible {
  color: var(--primary);
}

.resume-interests {
  color: var(--muted-foreground);
}

.resume-interests span {
  margin: 0 0.4rem;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
}

@media (max-width: 520px) {
  .resume-skill-grid {
    grid-template-columns: 1fr;
  }

  .resume-entry-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .resume-entry-heading > span {
    text-align: left;
  }
}

.cta-archive-link {
  margin-top: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--foreground);
  letter-spacing: 0.05em;
  transition: color 0.2s ease, gap 0.2s ease;
}

.cv-request-trigger {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.cta-archive-link:hover {
  color: var(--primary);
  gap: 1rem;
}

.cv-request-dialog {
  width: min(100% - 2rem, 620px);
  max-width: 620px;
  max-height: min(90vh, 900px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border);
  color: var(--foreground);
  background: var(--panel);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.75);
}

.cv-request-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.cv-request-panel {
  padding: clamp(1rem, 4vw, 2rem);
}

.cv-request-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cv-request-header .font-mono {
  font-size: 9px;
}

.cv-request-header h2 {
  margin-top: 0.45rem;
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-weight: 500;
  text-transform: uppercase;
}

.cv-request-copy,
.cv-request-privacy {
  color: var(--muted-foreground);
  font-size: 0.85rem;
  line-height: 1.65;
}

.cv-request-copy {
  margin: 1rem 0 1.25rem;
}

.cv-request-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cv-request-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.cv-request-form input,
.cv-request-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--foreground);
  background: var(--background);
  font: 13px var(--font-sans);
  text-transform: none;
}

.cv-request-form textarea {
  resize: vertical;
  line-height: 1.6;
}

.cv-request-form input:focus,
.cv-request-form textarea:focus {
  border-color: var(--primary);
  outline: 1px solid var(--primary);
}

.cv-request-wide {
  grid-column: 1 / -1;
}

.cv-request-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cv-request-privacy {
  font-size: 0.75rem;
}

.cv-request-submit {
  justify-self: start;
  margin-top: 0;
  padding: 0 0 0.5rem;
  font-size: 0.7rem;
}

.cv-request-submit:disabled {
  cursor: wait;
  opacity: 0.55;
}

.cv-request-status {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
}

.cv-request-status.is-error {
  color: var(--destructive);
}

.cv-request-download[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .cv-request-form {
    grid-template-columns: 1fr;
  }

  .cv-request-wide {
    grid-column: auto;
  }
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  transition: color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--primary);
}

.legal-separator {
  margin: 0 0.35rem;
  color: var(--primary);
}

.cookie-consent {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 1900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2.5rem, 720px);
  margin-left: auto;
  padding: 0.9rem 1rem;
  border: 1px solid color-mix(in oklab, var(--primary) 42%, var(--border));
  background: color-mix(in oklab, var(--canvas) 94%, transparent);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: cookieConsentIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cookie-consent.is-dismissed {
  animation: cookieConsentOut 0.4s ease both;
  pointer-events: none;
}

.cookie-consent-kicker {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.cookie-consent-copy {
  margin-top: 0.35rem;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.45;
}

.cookie-consent-button {
  flex: 0 0 auto;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.cookie-consent-button:hover,
.cookie-consent-button:focus-visible {
  color: var(--primary-foreground);
  background: var(--primary);
}

@keyframes cookieConsentIn {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cookieConsentOut {
  to { opacity: 0; transform: translateY(1rem); }
}

.legal-page {
  width: min(100% - 2.5rem, 900px);
  margin: 0 auto;
  padding: 4rem 0 6rem;
}

.cookie-policy-page {
  width: min(100% - 2.5rem, 1040px);
}

.cookie-policy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
  align-items: end;
  gap: 3rem;
  padding-bottom: 2.5rem;
}

.cookie-policy-intro {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--muted-foreground);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.65;
}

.cookie-policy-status {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel) 78%, transparent);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cookie-policy-status-dot {
  width: 7px;
  height: 7px;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 15%, transparent);
}

.cookie-policy-status strong {
  color: var(--foreground);
  font-size: 0.85rem;
  font-weight: 500;
}

.cookie-policy-status small {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  font-size: 8px;
}

.cookie-policy-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-updated {
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.legal-section {
  position: relative;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.legal-section::before {
  content: attr(data-section);
  position: absolute;
  top: 1.6rem;
  right: 0;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.legal-section h2 {
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 500;
  text-transform: uppercase;
}

.legal-section p {
  max-width: 760px;
  margin-top: 0.85rem;
  color: var(--muted-foreground);
  line-height: 1.8;
}

@media (max-width: 640px) {
  .cookie-consent {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    width: auto;
    align-items: flex-end;
  }

  .cookie-consent-copy {
    font-size: 0.72rem;
  }

  .legal-page {
    width: min(100% - 2rem, 900px);
    padding-top: 2.5rem;
  }

  .cookie-policy-page {
    width: min(100% - 2rem, 1040px);
  }

  .cookie-policy-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cookie-policy-status {
    max-width: 250px;
  }

  .cookie-policy-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }
}

.home-cv-prompt {
  position: absolute;
  right: 1.25rem;
  bottom: 7rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem 0.65rem 0.85rem;
  border: 1px solid color-mix(in oklab, var(--primary) 42%, var(--border));
  background: color-mix(in oklab, var(--canvas) 86%, transparent);
  backdrop-filter: blur(12px);
  animation: homeCvIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (max-width: 1023px) {
  .hero-content {
    padding-right: 2.25rem;
  }

  .home-cv-prompt {
    bottom: 7rem;
  }
}

.home-cv-prompt.is-dismissed {
  animation: homeCvOut 0.45s ease both;
  pointer-events: none;
}

.home-cv-prompt p {
  font-size: 9px;
  letter-spacing: 0.08em;
}

.home-cv-trigger {
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.home-cv-trigger:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

.home-cv-dismiss {
  order: 3;
  color: var(--muted-foreground);
  font-size: 1.2rem;
  line-height: 1;
}

.home-cv-dismiss:hover {
  color: var(--primary);
}

@keyframes homeCvIn {
  from { opacity: 0; transform: translateX(120%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes homeCvOut {
  to { opacity: 0; transform: translateX(120%); }
}

@media (max-width: 640px) {
  .home-cv-prompt {
    right: 1rem;
    bottom: 6.5rem;
    left: auto;
    width: fit-content;
    max-width: calc(100% - 2rem);
    padding: 0.55rem 0.6rem 0.55rem 0.7rem;
    gap: 0.55rem;
  }

  .home-cv-prompt > p {
    display: none;
  }

  .home-cv-prompt p {
    font-size: 8px;
  }

  .home-cv-trigger {
    padding: 0.3rem 0.45rem;
    font-size: 8px;
  }
}

body.gallery-return > .site-header,
body.gallery-return > .page-container,
body.gallery-return > .site-footer {
  animation: galleryReturnSlide 0.95s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes galleryReturnSlide {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.project-footer-back-link {
  position: relative;
  color: var(--muted-foreground);
  transition: color 0.25s ease, transform 0.25s ease;
}

.project-footer-back-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.project-footer-back-link:hover,
.project-footer-back-link:focus-visible {
  color: var(--primary);
  transform: translateX(-0.2rem);
}

.project-footer-back-link:hover::after,
.project-footer-back-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.project-action-dock {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  pointer-events: none;
}

.project-action-button {
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  min-height: 2.5rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 18% 20%, color-mix(in oklab, var(--primary) 10%, transparent) 0 1px, transparent 1.5px),
    repeating-linear-gradient(0deg, transparent 0 3px, color-mix(in oklab, var(--foreground) 4%, transparent) 3px 4px),
    color-mix(in oklab, var(--canvas) 92%, transparent);
  background-size: 9px 9px, 100% 4px, auto;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.project-action-button::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, color-mix(in oklab, var(--primary) 14%, transparent) 50%, transparent 80%);
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 0.25s ease, transform 0.55s ease;
}

.project-action-button:hover,
.project-action-button:focus-visible,
.project-action-button[aria-pressed="true"] {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-0.15rem);
}

.project-action-button:hover::before,
.project-action-button:focus-visible::before,
.project-action-button[aria-pressed="true"]::before {
  opacity: 1;
  transform: translateX(100%);
}

.project-action-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.appreciation-notice {
  position: fixed;
  right: 1.25rem;
  bottom: 5.75rem;
  z-index: 60;
  width: min(26rem, calc(100% - 2.5rem));
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in oklab, var(--primary) 55%, var(--border));
  background: color-mix(in oklab, var(--canvas) 94%, transparent);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: appreciationNoticeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.appreciation-notice-label {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.appreciation-notice-message {
  margin-top: 0.45rem;
  color: var(--foreground);
  font-size: 0.9rem;
}

.appreciation-progress {
  height: 2px;
  margin-top: 0.9rem;
  overflow: hidden;
  background: color-mix(in oklab, var(--primary) 14%, var(--border));
}

.appreciation-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  animation: appreciationProgress 2.8s linear both;
}

@keyframes appreciationNoticeIn {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes appreciationProgress {
  to {
    transform: scaleX(1);
  }
}

.gallery-likes {
  display: block;
  margin-top: 0.65rem;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Project detail page */
.project-detail-container {
  width: min(100% - 2.5rem, 1120px);
  margin: 0 auto;
  padding: 3rem 0 7rem;
}

.project-detail {
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
}

.project-back-link {
  width: fit-content;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.project-back-link:hover {
  color: var(--primary);
}

.project-detail-header {
  max-width: 1100px;
}

.project-overline {
  font-size: 10px;
  letter-spacing: 0.12em;
}

.project-detail-title {
  margin-top: 0.85rem;
  color: var(--foreground);
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  font-weight: 500;
  line-height: 0.98;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.project-detail-lead {
  max-width: 680px;
  margin-top: 1.25rem;
  color: var(--muted-foreground);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.6;
}

.project-author {
  margin-top: 1.5rem;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.project-cover {
  width: 100%;
  max-height: 76vh;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--panel);
}

.project-section {
  display: grid;
  grid-template-columns: minmax(190px, 0.6fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.project-section > h2 {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-overview > p {
  max-width: 720px;
  color: var(--foreground);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
  white-space: pre-line;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  -webkit-line-clamp: 3;
}

.project-overview > p.is-expanded {
  display: block;
  overflow: visible;
  line-clamp: unset;
  -webkit-line-clamp: unset;
}

.project-overview-toggle {
  grid-column: 2;
  justify-self: start;
  margin-top: -0.75rem;
  padding: 0.35rem 0;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-overview-toggle:hover {
  color: var(--foreground);
}

.project-process-list {
  display: grid;
  gap: 1.25rem;
  list-style: none;
}

.project-process-list:not(.is-expanded) li:nth-child(n + 4) {
  display: none;
}

.project-process-toggle {
  grid-column: 2;
  justify-self: start;
  margin-top: -0.25rem;
  padding: 0.35rem 0;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-process-toggle:hover {
  color: var(--foreground);
}

.project-process-list li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 65%, transparent);
}

.project-process-number {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
}

.project-process-list p {
  max-width: 680px;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.project-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-media-content {
  min-width: 0;
}

.project-media-group + .project-media-group {
  margin-top: 2rem;
}

.project-media-group-title {
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-media-item {
  min-width: 0;
  background: #050505;
}

.project-media-item img,
.project-media-item video {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: #050505;
}

.project-media-item figcaption {
  padding: 0.65rem 0.75rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.project-media-video {
  grid-column: 1 / -1;
}

.project-sketchfab-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  background: #050505;
}

.project-external-links,
.project-keywords,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.project-external-links a,
.project-keywords span,
.project-tags span {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.project-external-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.project-token-group {
  display: grid;
  gap: 0.7rem;
}

.project-token-group + .project-token-group {
  margin-top: 1.5rem;
}

.project-token-group h3 {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.project-metadata-list {
  display: grid;
  grid-template-columns: minmax(100px, 0.35fr) minmax(0, 1fr);
  gap: 0.65rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
}

.project-metadata-list dt {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.project-metadata-list dd {
  color: var(--foreground);
}

.project-tags span {
  color: var(--primary);
}

/* Supabase project studio */
.project-admin-container {
  width: min(100% - 2.5rem, 1000px);
  margin: 0 auto;
  padding: 3rem 0 6rem;
}

.project-admin-heading {
  margin-bottom: 2rem;
}

.project-admin-heading > p:last-child {
  margin-top: 1rem;
  color: var(--muted-foreground);
}

.project-admin-heading .page-title {
  margin-top: 0.5rem;
}

.admin-panel {
  margin-top: 1.5rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--border);
  background: var(--panel);
}

.admin-panel[hidden] {
  display: none;
}

.admin-panel h2 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
}

.admin-help,
.admin-form-grid small {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.6;
}

.admin-help {
  margin-bottom: 1.25rem;
}

.admin-help code {
  color: var(--primary);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-form-grid label,
.admin-project-select {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-form-grid input,
.admin-form-grid textarea,
.admin-form-grid select,
.admin-project-select select {
  width: 100%;
  min-height: 42px;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--foreground);
  background: var(--background);
  font: 12px var(--font-sans);
  text-transform: none;
}

.admin-form-grid input[type="file"] {
  padding: 0.5rem;
  font-size: 10px;
}

.admin-form-grid textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.admin-form-grid input:focus,
.admin-form-grid textarea:focus,
.admin-form-grid select:focus,
.admin-project-select select:focus {
  border-color: var(--primary);
  outline: 1px solid var(--primary);
}

.admin-form-grid option,
.admin-project-select option {
  color: var(--foreground);
  background: var(--background);
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-form-actions,
.admin-inline-field,
.admin-studio-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-studio-topline {
  justify-content: space-between;
}

.admin-studio-topline h2 {
  margin: 0;
}

.admin-project-select {
  max-width: 520px;
  margin: 1.5rem 0;
}

.admin-inline-field select {
  flex: 1;
}

.admin-media-current > p {
  margin-bottom: 0.5rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.admin-media-list {
  display: grid;
  gap: 0.5rem;
}

.admin-media-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.admin-notice {
  margin-top: 1rem;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
}

.admin-notice:empty {
  display: none;
}

.admin-notice.is-error {
  color: var(--destructive);
}

.admin-delete-project {
  border-color: color-mix(in oklab, var(--destructive) 60%, var(--border));
  color: var(--destructive);
}

.admin-delete-project:hover:not(:disabled) {
  border-color: var(--destructive);
}

.admin-form-grid button:disabled {
  cursor: wait;
  opacity: 0.55;
}

@media (max-width: 640px) {
  .project-detail-container,
  .project-admin-container {
    width: min(100% - 2rem, 1120px);
    padding-top: 2rem;
  }

  .project-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-overview-toggle {
    grid-column: 1;
  }

  .project-process-toggle {
    grid-column: 1;
  }

  .project-media-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-field-wide {
    grid-column: auto;
  }

  .project-action-dock {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
  }

  .project-action-button {
    flex: 1;
    padding-inline: 0.5rem;
    font-size: 9px;
  }

  .appreciation-notice {
    right: 1rem;
    bottom: 5.25rem;
    left: 1rem;
    width: auto;
  }
}

body[data-console-profile="gallery"] .gallery-footer-name {
  color: var(--primary);
}

body[data-console-profile="about"] .about-footer-name {
  color: var(--primary);
}

body.project-detail-page .gallery-footer-name {
  color: var(--primary);
}

@media (max-width: 1023px) {
  body[data-console-profile="gallery"] .site-footer,
  body[data-console-profile="about"] .site-footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (min-width: 640px) {
  .site-footer {
    padding: 1.5rem 2rem;
  }
}

/* Modal Lightbox for Gallery Items */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: color-mix(in oklab, var(--background) 95%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 1100px;
  width: 100%;
  border: 1px solid var(--border);
  background-color: var(--panel);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--canvas);
}

.lightbox-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lightbox-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
  color: var(--foreground);
  border-color: var(--primary);
  background-color: var(--secondary);
}

.lightbox-img-wrapper {
  max-height: 75vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
}

.lightbox-img {
  max-height: 75vh;
  width: auto;
  object-fit: contain;
}

/* Hero Image HUD Switcher (Optional aesthetic control) */
.hero-hud-control {
  position: absolute;
  top: 5rem;
  right: 1.25rem;
  z-index: 20;
  display: flex;
  gap: 4px;
  background-color: color-mix(in oklab, var(--background) 80%, transparent);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: var(--radius);
}

@media (min-width: 640px) {
  .hero-hud-control {
    right: 2rem;
  }
}

.hud-pill {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  padding: 2px 6px;
  color: var(--muted-foreground);
  border-radius: 1px;
  transition: all 0.2s ease;
}

.hud-pill:hover {
  color: var(--foreground);
}

.hud-pill.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}
