@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --ink: #1c2722;
  --ink-muted: #4a5a50;
  --accent: #c48b43;
  --accent-deep: #7b4c18;
  --accent-cool: #4f7d73;
  --accent-cool-soft: rgba(79, 125, 115, 0.18);
  --paper: #f8f2e8;
  --paper-2: #f2ece2;
  --surface: #ffffff;
  --surface-alt: #f3efe6;
  --surface-strong: #e7dfd2;
  --border: #d9d3c6;
  --shadow: 0 24px 56px rgba(20, 28, 24, 0.14);
  --shadow-soft: 0 14px 28px rgba(20, 28, 24, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #f9f2e8 0%, #efe9de 45%, #e7dfd1 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.9s ease;
}

body.light-on {
  background: radial-gradient(circle at top, #fbf6ee 0%, #f1eadf 50%, #e7dfd1 100%);
}

body.light-off {
  background: radial-gradient(circle at top, #1c2226 0%, #14191d 50%, #0e1114 100%);
  color: #f3efe6;
  color-scheme: dark;
  --ink: #f2ebe0;
  --ink-muted: #c8bdb0;
  --accent: #e0b36d;
  --accent-deep: #c18643;
  --accent-cool: #6a9fc2;
  --accent-cool-soft: rgba(106, 159, 194, 0.22);
  --paper: #14171a;
  --paper-2: #1c2126;
  --surface: #1b2024;
  --surface-alt: #23292f;
  --surface-strong: #2a3036;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 14px 28px rgba(0, 0, 0, 0.35);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page {
  min-height: 100vh;
  position: relative;
  overflow: visible;
}

.scroll-spine {
  position: fixed;
  left: 140px;
  top: 88px;
  bottom: 48px;
  width: 2px;
  background: rgba(123, 76, 24, 0.12);
  z-index: 2;
  pointer-events: none;
}

.scroll-needle {
  position: absolute;
  left: -1px;
  width: 4px;
  height: 36px;
  border-radius: 999px;
  background: rgba(196, 139, 67, 0.6);
  box-shadow: 0 0 14px rgba(196, 139, 67, 0.35);
  transform: translateY(0);
}

.scroll-label {
  position: absolute;
  right: 10px;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(28, 39, 34, 0.55);
  opacity: 0.6;
  text-align: right;
  transform: translateY(0);
  white-space: nowrap;
  pointer-events: none;
}

.scroll-label-main {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.scroll-label-sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(28, 39, 34, 0.38);
  text-transform: uppercase;
  padding-right: 8px;
}

.scroll-label:not(.has-sub) .scroll-label-sub {
  display: none;
}

.page::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 55%;
  background:
    radial-gradient(circle at 12% 18%, rgba(196, 139, 67, 0.22), transparent 60%),
    radial-gradient(circle at 70% 28%, rgba(90, 120, 96, 0.18), transparent 55%);
  z-index: 0;
  pointer-events: none;
}

.page::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      90deg,
      rgba(28, 39, 34, 0.03) 0,
      rgba(28, 39, 34, 0.03) 1px,
      transparent 1px,
      transparent 10px
    ),
    linear-gradient(
      180deg,
      rgba(28, 39, 34, 0.02) 0,
      rgba(28, 39, 34, 0.02) 1px,
      transparent 1px,
      transparent 10px
    );
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

body.light-off .page::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 214, 130, 0.12), transparent 60%),
    radial-gradient(circle at 78% 24%, rgba(100, 130, 190, 0.18), transparent 55%),
    radial-gradient(circle at 40% 12%, rgba(40, 60, 90, 0.25), transparent 70%);
}

body.light-off .page::after {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 12px
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 12px
    );
  background-size: 160px 160px, 220px 220px, 14px 14px, 14px 14px;
  opacity: 0.35;
}

body.light-off .page::after {
  animation: nightShimmer 18s ease-in-out infinite;
}

@keyframes nightShimmer {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 0.45;
    transform: translateY(-6px);
  }
}

.nav,
.hero,
main,
.footer {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 clamp(20px, 6vw, 88px);
}

.hero {
  padding-top: clamp(36px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 70px);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
  margin-bottom: 48px;
  position: sticky;
  top: 18px;
  z-index: 10;
  overflow: visible;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

body.light-off .nav {
  background: rgba(18, 22, 26, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

body.light-off .nav--scrolled {
  background: rgba(12, 15, 19, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
}

body.light-off .scroll-spine {
  background: rgba(255, 255, 255, 0.08);
}

body.light-off .scroll-needle {
  background: rgba(255, 214, 150, 0.7);
  box-shadow: 0 0 16px rgba(255, 214, 150, 0.5);
}

body.light-off .scroll-label {
  color: rgba(255, 255, 255, 0.55);
}

body.light-off .scroll-label-sub {
  color: rgba(190, 206, 224, 0.7);
}

.light-switch {
  position: relative;
  width: 70px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(42, 34, 22, 0.25);
  background: linear-gradient(135deg, #efe6d7 0%, #d6c1a3 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 10px 20px rgba(24, 18, 12, 0.18);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.light-switch::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 1px solid transparent;
  opacity: 0;
  transition: opacity 0.35s ease, border-color 0.35s ease;
}

.light-switch-label {
  position: absolute;
  left: 10px;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(44, 34, 22, 0.55);
  pointer-events: none;
}

.light-switch-track {
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(210, 190, 160, 0.8));
  opacity: 0.6;
}

.light-switch-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff7e6 0%, #e8d1b4 55%, #b99364 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.6),
    inset 0 -4px 6px rgba(0, 0, 0, 0.2),
    0 6px 12px rgba(24, 18, 12, 0.35);
  transition: transform 0.4s cubic-bezier(0.4, 0.15, 0.2, 1.2);
}

.light-switch-spark {
  position: absolute;
  right: 12px;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 150, 0.8), rgba(255, 224, 150, 0));
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

body.light-off .light-switch {
  background: linear-gradient(135deg, #2b2b32 0%, #151619 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 12px 22px rgba(10, 12, 16, 0.4);
}

body.light-off .light-switch::after {
  opacity: 1;
  border-color: rgba(120, 170, 255, 0.25);
  box-shadow:
    0 0 18px rgba(120, 170, 255, 0.45),
    0 0 32px rgba(120, 170, 255, 0.35),
    0 0 48px rgba(120, 170, 255, 0.2);
}

body.light-off .light-switch-label {
  color: rgba(235, 228, 215, 0.55);
}

body.light-off .light-switch-track {
  background: linear-gradient(180deg, rgba(50, 55, 60, 0.9), rgba(20, 24, 28, 0.9));
}

body.light-off .light-switch-knob {
  transform: translateX(36px);
  background: radial-gradient(circle at 35% 35%, #9fb3ff 0%, #6577b5 50%, #2b3355 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    inset 0 -4px 6px rgba(0, 0, 0, 0.45),
    0 8px 16px rgba(12, 12, 20, 0.4),
    0 0 16px rgba(120, 170, 255, 0.35);
}

body.light-on .light-switch-spark {
  opacity: 0.9;
  transform: scale(1);
}

body.light-off .light-switch-spark {
  opacity: 0.6;
  background: radial-gradient(circle, rgba(130, 180, 255, 0.7), rgba(130, 180, 255, 0));
}

.light-switch.is-pulse .light-switch-knob {
  animation: switchPulse 0.45s ease;
}

.light-switch.is-pulse .light-switch-spark {
  animation: sparkPulse 0.45s ease;
}

@keyframes switchPulse {
  0% {
    transform: translateX(0) scale(1);
  }
  40% {
    transform: translateX(0) scale(1.08);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

body.light-off .light-switch.is-pulse .light-switch-knob {
  animation: switchPulseOff 0.45s ease;
}

@keyframes switchPulseOff {
  0% {
    transform: translateX(36px) scale(1);
  }
  40% {
    transform: translateX(36px) scale(1.08);
  }
  100% {
    transform: translateX(36px) scale(1);
  }
}

@keyframes sparkPulse {
  0% {
    opacity: 0.2;
    transform: scale(0.6);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(216, 168, 94, 0.35);
  box-shadow: 0 18px 40px rgba(20, 28, 24, 0.18);
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #f7f2e7;
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-size: 18px;
  letter-spacing: 1px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

body.light-off .logo {
  background: #11151a;
  color: #f7efe2;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 8px 18px rgba(0, 0, 0, 0.45);
}

.logo-button {
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  position: relative;
  overflow: visible;
  z-index: 2;
  perspective: 900px;
  transition: transform 0.2s ease;
}

.particle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.logo-button:hover:not(.logo--spin) {
  transform: translateY(-1px) rotate(-1deg);
}

.logo-button::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.logo-particle {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 50%);
  width: var(--s, 4px);
  height: var(--s, 4px);
  border-radius: 50%;
  background: radial-gradient(circle, #fff7db 0%, #f5c36a 55%, rgba(245, 195, 106, 0) 100%);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(245, 195, 106, 0.7);
  z-index: 2;
  animation: particleBurst var(--d, 0.9s) ease-out forwards;
}

.logo-particle.is-fall {
  animation: particleFall var(--d, 1.2s) ease-out forwards;
}

.logo-particle.is-streak {
  width: calc(var(--s, 4px) * 0.7);
  height: calc(var(--s, 4px) * 2.8);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 251, 232, 0.9),
    rgba(245, 195, 106, 0.7),
    rgba(245, 195, 106, 0)
  );
  box-shadow: 0 0 12px rgba(245, 195, 106, 0.6);
  animation: streakBurst var(--d, 1s) ease-out forwards;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
}

.logo-particle.is-streak.is-fall {
  animation: streakFall var(--d, 1.4s) ease-out forwards;
}

.logo-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.logo--spin {
  animation: coinSpin 0.9s ease-in-out;
  transform-style: preserve-3d;
  background:
    radial-gradient(circle at 28% 30%, rgba(235, 235, 235, 0.7), rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 70% 70%, rgba(140, 140, 140, 0.9), rgba(90, 90, 90, 0.1) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(20, 20, 20, 0.25)),
    conic-gradient(from 120deg, #e5e5e5, #c6c6c6 25%, #8a8a8a 55%, #d5d5d5 75%, #a8a8a8 90%, #e5e5e5);
  color: #222;
  box-shadow:
    inset 0 0 0 1px rgba(210, 210, 210, 0.7),
    inset 0 0 18px rgba(240, 240, 240, 0.35),
    inset -6px -6px 12px rgba(40, 40, 40, 0.25),
    inset 6px 6px 12px rgba(255, 255, 255, 0.2),
    0 10px 22px rgba(28, 39, 34, 0.28);
}

.logo--spin::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(210, 210, 210, 0.4);
  box-shadow:
    inset 0 0 6px rgba(230, 230, 230, 0.4),
    inset 0 0 16px rgba(0, 0, 0, 0.12);
  opacity: 0.7;
  pointer-events: none;
}

.logo--spin::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 2% 12%, rgba(120, 86, 48, 0.8), transparent 20%),
    radial-gradient(circle at 98% 14%, rgba(110, 78, 44, 0.75), transparent 22%),
    radial-gradient(circle at 92% 94%, rgba(90, 64, 40, 0.8), transparent 24%),
    radial-gradient(circle at 8% 94%, rgba(118, 82, 46, 0.75), transparent 22%),
    radial-gradient(circle at 50% 4%, rgba(80, 56, 36, 0.65), transparent 18%),
    radial-gradient(circle at 50% 98%, rgba(95, 68, 40, 0.7), transparent 20%),
    radial-gradient(circle at 16% 8%, rgba(60, 44, 30, 0.55), transparent 16%),
    radial-gradient(circle at 84% 8%, rgba(70, 50, 34, 0.55), transparent 16%),
    radial-gradient(circle at 14% 84%, rgba(65, 46, 32, 0.55), transparent 16%),
    radial-gradient(circle at 86% 84%, rgba(75, 54, 36, 0.55), transparent 16%),
    radial-gradient(circle at 6% 22%, rgba(120, 86, 48, 0.55), transparent 24%),
    radial-gradient(circle at 92% 26%, rgba(130, 92, 52, 0.5), transparent 26%),
    radial-gradient(circle at 82% 88%, rgba(105, 74, 44, 0.55), transparent 28%),
    radial-gradient(circle at 18% 86%, rgba(118, 82, 46, 0.5), transparent 26%),
    radial-gradient(circle at 58% 10%, rgba(90, 64, 40, 0.45), transparent 22%),
    radial-gradient(circle at 42% 92%, rgba(110, 78, 44, 0.5), transparent 24%),
    radial-gradient(circle at 12% 28%, rgba(255, 255, 255, 0.35), transparent 42%),
    radial-gradient(circle at 86% 18%, rgba(0, 0, 0, 0.35), transparent 38%),
    radial-gradient(circle at 78% 78%, rgba(255, 255, 255, 0.22), transparent 45%),
    radial-gradient(circle at 22% 82%, rgba(0, 0, 0, 0.28), transparent 40%),
    radial-gradient(
      circle at 30% 30%,
      rgba(230, 230, 230, 0.6),
      rgba(220, 220, 220, 0.05) 35%,
      rgba(45, 45, 45, 0.6) 72%,
      rgba(25, 25, 25, 0.75) 100%
    ),
    repeating-conic-gradient(
      from 12deg,
      rgba(255, 255, 255, 0.14) 0deg 4deg,
      rgba(90, 90, 90, 0.3) 4deg 12deg,
      rgba(200, 200, 200, 0.08) 12deg 17deg,
      rgba(60, 45, 30, 0.28) 17deg 22deg,
      rgba(130, 92, 52, 0.22) 22deg 26deg
    );
  mask: radial-gradient(circle, transparent 66%, #000 69%, #000 92%, transparent 94%);
  opacity: 0.95;
  filter: blur(0.6px);
  pointer-events: none;
}

.logo--spin::after {
  animation: coinSpark 0.9s ease-out;
}

@keyframes coinSpin {
  0% {
    transform: rotateY(0deg) rotateX(8deg) scale(1);
  }
  40% {
    transform: rotateY(160deg) rotateX(8deg) scale(1.05);
  }
  70% {
    transform: rotateY(300deg) rotateX(8deg) scale(1.06);
  }
  100% {
    transform: rotateY(360deg) rotateX(8deg) scale(1);
  }
}

@keyframes coinSpark {
  0% {
    opacity: 0.6;
    transform: scale(0.6);
  }
  60% {
    opacity: 0.2;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes particleBurst {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0.2);
  }
}

@keyframes particleFall {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1);
  }
  25% {
    opacity: 0.95;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0.9);
  }
  60% {
    opacity: 0.7;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + calc(var(--fy) * 0.55)))
      scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + var(--fy)))
      scale(0.25);
  }
}

@keyframes streakBurst {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y)))
      rotate(var(--r, 0deg))
      scale(0.1);
  }
}

@keyframes streakFall {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1);
  }
  25% {
    opacity: 0.9;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y)))
      rotate(var(--r, 0deg))
      scale(0.9);
  }
  60% {
    opacity: 0.65;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + calc(var(--fy) * 0.55)))
      rotate(var(--r, 0deg))
      scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + var(--fy)))
      rotate(var(--r, 0deg))
      scale(0.2);
  }
}

.nav-links {
  display: flex;
  gap: 24px;
  font-weight: 500;
  color: var(--ink-muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-submenu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.nav-submenu a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 6px 10px;
  border-radius: 10px;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-submenu a:hover,
.nav-submenu a:focus-visible {
  background: var(--surface-alt);
  color: var(--accent-deep);
}

.nav-item.has-sub:hover .nav-submenu,
.nav-item.has-sub:focus-within .nav-submenu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body.light-off .nav-submenu {
  background: rgba(18, 22, 26, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

body.light-off .nav-submenu a {
  color: rgba(223, 233, 244, 0.78);
}

body.light-off .nav-submenu a:hover,
body.light-off .nav-submenu a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.light-switch + .lang-switch {
  margin-left: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  position: relative;
  z-index: 6;
}

body.light-off .lang-switch {
  background: rgba(16, 20, 24, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

body.light-off .lang-btn {
  color: rgba(233, 226, 214, 0.75);
}

.lang-flag {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  display: block;
}

.lang-btn.is-active,
.lang-btn:hover {
  background: var(--ink);
  color: #f7f2e7;
}

body.light-off .lang-btn.is-active,
body.light-off .lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #f7efe2;
}

.nav-links > a,
.nav-item > a {
  position: relative;
}

.nav-links > a::after,
.nav-item > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links > a:hover::after,
.nav-item > a:hover::after {
  transform: scaleX(1);
}

.nav-links > a.is-active::after,
.nav-item > a.is-active::after {
  transform: scaleX(1);
}

.nav-links > a.is-active,
.nav-item > a.is-active {
  color: var(--accent-deep);
}

body.light-off .nav-links {
  color: rgba(236, 229, 218, 0.7);
}

body.light-off .nav-links a.is-active {
  color: var(--accent);
}

body.light-off .section-title {
  color: rgba(238, 228, 210, 0.9);
  text-shadow: 0 0 12px rgba(224, 179, 109, 0.25);
}

body.light-off .section-title::after {
  background: linear-gradient(90deg, transparent, rgba(224, 179, 109, 0.8), transparent);
  box-shadow: 0 0 12px rgba(224, 179, 109, 0.45);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 42px;
  align-items: start;
}

.hero-copy {
  max-width: 560px;
  position: relative;
}

.hero-copy::after {
  content: "RA";
  position: absolute;
  top: -18px;
  right: -8px;
  font-family: "Fraunces", serif;
  font-size: 20px;
  letter-spacing: 0.18em;
  color: rgba(28, 39, 34, 0.18);
  transform: rotate(-6deg);
  opacity: 0.6;
  pointer-events: none;
}

.hero-photo-card {
  width: 100%;
  min-height: 360px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: linear-gradient(160deg, #ffffff 0%, #f3eadf 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 28px);
  position: relative;
}

body.light-off .hero-photo-card {
  background: linear-gradient(160deg, #1e2428 0%, #14191d 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.hero-photo-card::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: calc(var(--radius) + 10px);
  background:
    radial-gradient(circle at 35% 35%, rgba(120, 92, 56, 0.3), transparent 70%),
    radial-gradient(circle at 65% 55%, rgba(60, 52, 40, 0.22), transparent 75%);
  opacity: 0.75;
  z-index: 0;
  pointer-events: none;
}

body.light-off .hero-photo-card::after {
  opacity: 0.55;
  background:
    radial-gradient(circle at 35% 35%, rgba(120, 120, 140, 0.25), transparent 70%),
    radial-gradient(circle at 65% 55%, rgba(40, 60, 90, 0.35), transparent 75%);
}


.hero-photo-frame {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(28, 39, 34, 0.08);
  position: relative;
  z-index: 1;
}

body.light-off .hero-photo-frame {
  background: #0f1215;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.light-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 0%, rgba(255, 228, 170, 0.12), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(24, 30, 26, 0.12), transparent 60%);
  opacity: 0.08;
  transition: opacity 0.8s ease, background 0.8s ease;
  z-index: 0;
  pointer-events: none;
}

body.light-on .light-atmosphere {
  opacity: 0.38;
  background:
    radial-gradient(circle at 72% 0%, rgba(255, 230, 170, 0.55), transparent 48%),
    radial-gradient(circle at 60% 35%, rgba(255, 210, 140, 0.25), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(24, 30, 26, 0.08), transparent 60%);
}

body.light-off .light-atmosphere {
  opacity: 0.55;
  background:
    radial-gradient(circle at 20% 15%, rgba(90, 130, 185, 0.18), transparent 45%),
    radial-gradient(circle at 78% 20%, rgba(120, 170, 210, 0.12), transparent 50%),
    radial-gradient(circle at 70% 10%, rgba(18, 22, 28, 0.75), transparent 48%),
    radial-gradient(circle at 50% 100%, rgba(8, 10, 14, 0.85), transparent 65%);
}


.lamp-scene {
  position: absolute;
  right: -200px;
  top: -120px;
  width: 220px;
  height: 460px;
  pointer-events: auto;
  z-index: 3;
  --pull-switch: 0px;
  --swing: 0deg;
  --swing-hover: 0deg;
  --lamp-x: 0px;
  --lamp-y: 0px;
  filter: drop-shadow(0 12px 20px rgba(20, 16, 10, 0.28));
}

.lamp-scene::before {
  content: "";
  position: absolute;
  top: 120px;
  left: 50%;
  width: 180px;
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(15, 12, 8, 0.35), transparent 70%);
  opacity: 0.25;
  filter: blur(10px);
  pointer-events: none;
}

.lamp-rig {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: 50% 0;
  transform: translate(var(--lamp-x), var(--lamp-y)) rotate(calc(var(--swing) + var(--swing-hover)));
  transition: transform 0.35s ease;
  will-change: transform;
}

.lamp-scene.is-dragging .lamp-rig,
.lamp-scene.is-pulling .lamp-rig {
  transition: none;
}

.lamp-cord {
  position: absolute;
  left: 50%;
  top: 0;
  height: 190px;
  width: 12px;
  transform: translateX(-50%);
  pointer-events: none;
}

.lamp-cord-switch {
  left: calc(50% - 30px);
  height: 150px;
  width: 10px;
  pointer-events: auto;
}

.lamp-hang {
  position: absolute;
  top: 12px;
  left: 50%;
  height: 190px;
  width: 12px;
  transform: translateX(-50%);
  transform-origin: top center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.lamp-cord-switch .lamp-hang {
  height: calc(140px + var(--pull-switch));
  width: 10px;
  pointer-events: auto;
}

.lamp-ceiling {
  position: absolute;
  top: -6px;
  width: 34px;
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(180deg, #c8b08a 0%, #7b5a33 100%);
  border: 2px solid #4a311b;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}

.lamp-ceiling-fixed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 24px;
  pointer-events: none;
  z-index: 2;
}

.lamp-ceiling-fixed .lamp-ceiling {
  left: 50%;
  transform: translateX(-50%);
}

.lamp-ceiling-fixed .lamp-ceiling-switch {
  left: calc(50% - 30px);
  transform: translateX(-50%);
}

.lamp-ceiling-switch {
  width: 22px;
  height: 10px;
  border-radius: 5px;
}

.lamp-ceiling-switch::after {
  width: 8px;
  height: 8px;
}

.lamp-ceiling::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: #5a3b1f;
  transform: translateX(-50%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.lamp-rope {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.lamp-rope-path {
  fill: none;
  stroke: #c89a5a;
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter:
    drop-shadow(0 1px 1px rgba(30, 20, 10, 0.35))
    drop-shadow(0 3px 6px rgba(24, 16, 8, 0.25));
}

.lamp-switch-line {
  width: 6px;
  height: 100%;
  border-radius: 6px;
  background: repeating-linear-gradient(
    180deg,
    #e2caa1 0px,
    #e2caa1 5px,
    #9b6c36 5px,
    #9b6c36 10px,
    #6f4a24 10px,
    #6f4a24 12px
  );
  background-size: 100% 18px;
  animation: chainShimmer 6s linear infinite;
  box-shadow:
    inset 0 0 0 1px rgba(40, 28, 16, 0.5),
    0 0 6px rgba(42, 30, 18, 0.2);
}

.lamp-pull {
  pointer-events: auto;
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f3e2c6 0%, #c28a49 60%, #6b4526 100%);
  border: 2px solid #4a2f18;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 6px 14px rgba(28, 20, 12, 0.3);
  cursor: grab;
}

.lamp-pull:active {
  cursor: grabbing;
  transform: translateY(2px);
}

.lamp-body {
  position: absolute;
  left: 50%;
  top: 202px;
  transform: translateX(-50%);
  transform-origin: top center;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

.lamp-scene.is-dragging .lamp-body {
  cursor: grabbing;
}

.lamp-scene.is-pulling .lamp-body {
  transition: none;
}

.lamp-shade {
  width: 92px;
  height: 44px;
  background: linear-gradient(
    180deg,
    #83613a 0%,
    #83613a 25%,
    #6d4c2b 25%,
    #6d4c2b 55%,
    #53351e 55%,
    #3a2416 100%
  );
  border: 2px solid #2b1c0f;
  border-bottom-width: 4px;
  clip-path: polygon(6% 0%, 94% 0%, 100% 100%, 0% 100%);
  box-shadow:
    inset 0 -6px 0 rgba(0, 0, 0, 0.25),
    inset 0 6px 0 rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(28, 22, 14, 0.3);
  position: relative;
}

.lamp-shade::before {
  content: "";
  position: absolute;
  inset: 3px 4px;
  background: repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.08) 0 3px,
      rgba(255, 255, 255, 0) 3px 6px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.08) 0 4px,
      rgba(0, 0, 0, 0) 4px 8px
    );
  opacity: 0.5;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.lamp-shade::after {
  content: "";
  position: absolute;
  inset: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lamp-bulb {
  position: relative;
  width: 18px;
  height: 22px;
  margin: -6px auto 0;
  border-radius: 50%;
  background: #f7d58a;
  box-shadow: 0 0 18px rgba(255, 214, 150, 0.75);
  border: 1px solid rgba(120, 90, 48, 0.4);
  transition: opacity 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.lamp-bulb::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 14px;
  height: 6px;
  border-radius: 4px;
  background: #5b3b1f;
  border: 1px solid #2b1c0f;
  transform: translateX(-50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lamp-bulb::after {
  content: "";
  position: absolute;
  inset: 4px 6px auto;
  width: 6px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
}

body.lamp-off .lamp-bulb {
  background: #8a8a8a;
  box-shadow: none;
  opacity: 0.6;
}

.lamp-cone {
  position: absolute;
  left: 50%;
  top: 247px;
  width: 240px;
  height: 280px;
  transform: translateX(-50%);
  transform-origin: top center;
  clip-path: polygon(50% 0%, 6% 100%, 94% 100%);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 236, 190, 0.65) 0%,
      rgba(255, 210, 140, 0.35) 45%,
      rgba(255, 210, 140, 0) 80%
    ),
    repeating-linear-gradient(
      45deg,
      rgba(255, 230, 170, 0.08) 0 4px,
      rgba(255, 230, 170, 0) 4px 8px
    );
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.4s ease;
  filter: blur(0.4px);
  pointer-events: none;
}

body.lamp-on .lamp-cone {
  opacity: 1;
}

body.lamp-off .lamp-cone {
  opacity: 0;
}

.lamp-fireflies {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.lamp-off .lamp-fireflies {
  opacity: 1;
}

.firefly {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 190, 0.9), rgba(255, 199, 100, 0.1));
  box-shadow: 0 0 10px rgba(255, 220, 140, 0.6);
  animation: fireflyFloat var(--d, 6s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.firefly:nth-child(1) {
  top: 80px;
  left: 140px;
  --d: 6.5s;
  --delay: 0s;
  --amp: 12px;
}

.firefly:nth-child(2) {
  top: 140px;
  left: 80px;
  --d: 7.2s;
  --delay: 0.6s;
  --amp: 14px;
}

.firefly:nth-child(3) {
  top: 210px;
  left: 160px;
  --d: 8.4s;
  --delay: 1.2s;
  --amp: 16px;
}

.firefly:nth-child(4) {
  top: 260px;
  left: 110px;
  --d: 7.8s;
  --delay: 0.3s;
  --amp: 10px;
}

.firefly:nth-child(5) {
  top: 120px;
  left: 190px;
  --d: 6.8s;
  --delay: 0.9s;
  --amp: 12px;
}

.firefly:nth-child(6) {
  top: 300px;
  left: 150px;
  --d: 8.2s;
  --delay: 0.4s;
  --amp: 18px;
}

.firefly:nth-child(7) {
  top: 60px;
  left: 100px;
  --d: 7.4s;
  --delay: 1.4s;
  --amp: 14px;
}

.firefly:nth-child(8) {
  top: 240px;
  left: 60px;
  --d: 6.9s;
  --delay: 1s;
  --amp: 11px;
}

@keyframes fireflyFloat {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.6;
  }
  50% {
    transform: translate(calc(var(--amp, 12px) * 0.5), calc(var(--amp, 12px) * -0.6));
    opacity: 1;
  }
}

.lamp-scene.lamp-flicker .lamp-bulb {
  animation: bulbFlicker 0.45s steps(2, end);
}

.lamp-scene.lamp-flicker .lamp-cone {
  animation: coneFlicker 0.45s steps(2, end);
}

@keyframes bulbFlicker {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 18px rgba(255, 214, 150, 0.75);
  }
  50% {
    opacity: 0.45;
    box-shadow: 0 0 8px rgba(255, 214, 150, 0.4);
  }
}

@keyframes coneFlicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes chainShimmer {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 24px;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 11px;
  color: var(--accent-deep);
  margin-bottom: 18px;
  font-weight: 700;
}

h1,
h2 {
  font-family: "Fraunces", serif;
}

h1 {
  font-size: clamp(36px, 5.4vw, 58px);
  line-height: 1.05;
  margin-bottom: 18px;
}

h1 span {
  display: block;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 600;
  color: var(--ink-muted);
  margin-top: 12px;
}

.lead {
  font-size: 18px;
  max-width: 560px;
  margin-bottom: 28px;
  line-height: 1.7;
  color: var(--ink-muted);
  white-space: pre-line;
}

.lead span {
  display: block;
  opacity: 0.85;
}


.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.button {
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
}

.button.primary {
  background: var(--ink);
  color: #f8f2e8;
  box-shadow: 0 18px 32px rgba(29, 42, 36, 0.2);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 36px rgba(29, 42, 36, 0.26);
}

.button.ghost {
  border-color: var(--border);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.button.ghost:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

body.light-off .button.ghost {
  background: rgba(20, 24, 28, 0.88);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

body.light-off .button.ghost:hover {
  border-color: var(--accent);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
}

body.light-off .button.primary {
  background: #e6d1a5;
  color: #1a1a1a;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.4);
}

body.light-off .button.primary:hover {
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.5);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
}

.meta-row .meta-item {
  display: inline-flex;
  align-items: center;
  padding-right: 10px;
  position: relative;
}

.meta-row .meta-item + .meta-item::before {
  content: "";
  position: absolute;
  left: -6px;
  width: 1px;
  height: 12px;
  background: var(--border);
}

.meta-row .is-location::after {
  content: "🇨🇭";
  margin-left: 6px;
  font-size: 1.2em;
  line-height: 1;
}


.project-link {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.5);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.project-link strong {
  font-size: 16px;
}

.project-link span {
  color: var(--ink-muted);
  font-size: 14px;
}

.project-link:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}


.section {
  padding: clamp(50px, 7vw, 90px) 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 120px;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section:first-of-type {
  padding-top: clamp(32px, 5vw, 60px);
}

.has-target .section:target {
  border-top-color: var(--accent);
}

.has-target .section:target .section-title::after {
  width: 64px;
}

.section-header {
  margin-bottom: 32px;
}

.section-title {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 11px;
  color: var(--accent-deep);
  margin-bottom: 12px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  background: var(--accent);
  margin-top: 10px;
}

.skills-chapter {
  position: relative;
  padding-top: 6px;
  padding-bottom: 20px;
}

.skills-anchor {
  padding-top: 0;
  padding-bottom: 0;
}

.skills-chapter .section {
  padding: clamp(24px, 3.2vw, 48px) 0;
  border-top: none;
  position: relative;
}

.skills-chapter .section:first-of-type {
  padding-top: clamp(20px, 3vw, 40px);
}

.skills-chapter .section-header {
  margin-bottom: 18px;
}

.skills-chapter .section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 95%;
  height: 1px;
  background: var(--border);
}

.skills-chapter .section.is-first-skill::before {
  display: none;
}


.skills-chapter::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 22px;
  bottom: 52px;
  width: 1px;
  background: rgba(123, 76, 24, 0.18);
}

body.light-off .skills-chapter::before {
  background: rgba(255, 255, 255, 0.12);
}

.chapter-divider {
  height: 1px;
  background: var(--border);
  margin-top: 18px;
}

@media (max-width: 720px) {
  .skills-chapter::before {
    left: -8px;
    top: 18px;
  }
}

.project-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.project-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(140deg, #ffffff 0%, #f6f0e6 100%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

body.light-off .project-card {
  background: linear-gradient(140deg, #1b2126 0%, #12161a 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
}

body.light-off .project-card:hover {
  border-color: rgba(224, 179, 109, 0.6);
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(224, 179, 109, 0.28),
    0 0 48px rgba(120, 170, 255, 0.2);
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

body.light-off .project-card::before {
  opacity: 0.4;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-deep);
}

.project-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(196, 139, 67, 0.15);
}

.project-tag.is-data {
  background: rgba(196, 139, 67, 0.2);
}

.project-tag.is-ops {
  background: rgba(123, 76, 24, 0.14);
}

.project-tag.is-live {
  background: var(--accent-cool-soft);
}

.project-index {
  font-weight: 600;
}

.project-card h3 {
  font-family: "Fraunces", serif;
  font-size: 20px;
}

.project-card p {
  color: var(--ink-muted);
  font-size: 14px;
}

.project-card.is-live {
  border-color: rgba(79, 125, 115, 0.45);
}

.project-card.is-live::before {
  background: linear-gradient(90deg, transparent, var(--accent-cool), transparent);
  opacity: 0.8;
}

.about-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  color: var(--ink-muted);
  font-size: 17px;
}


.experience-grid,
.education-grid,
.cert-grid,
.language-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card.small {
  background: var(--surface-alt);
}

.card-role {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-company {
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.card-time {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-deep);
  margin-bottom: 14px;
}

.card-body {
  color: var(--ink-muted);
  font-size: 15px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip-grid span {
  background: var(--surface-strong);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
}


.contact {
  padding-bottom: clamp(70px, 9vw, 120px);
}

.contact-card {
  background: linear-gradient(130deg, #1d2a24 0%, #2a3b31 100%);
  color: #f7f2e7;
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: 0 28px 50px rgba(24, 32, 28, 0.35);
}

body.light-off .contact-card {
  background: linear-gradient(130deg, #10161b 0%, #1a2027 100%);
  color: #f2ebe0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 56px rgba(0, 0, 0, 0.5);
}

.contact-card p {
  font-size: 18px;
  margin-bottom: 20px;
}

.contact-card .button.primary {
  background: var(--accent);
  color: #1c1407;
}

.contact-card .button.ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #f7f2e7;
  background: transparent;
}

.footer {
  padding: 30px 0 50px;
  color: var(--ink-muted);
  font-size: 14px;
}

body.light-off .footer {
  color: rgba(219, 210, 198, 0.65);
}

.footer-links {
  margin-top: 10px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent);
  border-color: rgba(196, 139, 67, 0.5);
}

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

@media (max-width: 720px) {
  .nav {
    transition: transform 0.1s linear, opacity 0.1s linear;
    will-change: transform;
    transform: translateY(calc(-1 * var(--nav-hide, 0px)));
    opacity: var(--nav-hide-opacity, 1);
  }

  .scroll-spine {
    display: none;
  }

  .nav {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 10px;
    border-radius: 16px;
    gap: 6px 10px;
  }

  .nav-left {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    min-width: 0;
    flex: 1 1 100%;
  }

  .nav-links {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.05em;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links > a,
  .nav-item > a {
    white-space: nowrap;
    min-height: 32px;
    padding: 6px 4px;
    display: inline-flex;
    align-items: center;
  }

  .lang-switch,
  .light-switch {
    align-self: center;
  }

  .lang-switch {
    margin-right: auto;
    flex: 0 0 auto;
  }

  .light-switch {
    margin-left: auto;
    flex: 0 0 auto;
  }

  .nav-item {
    width: auto;
  }

  .nav-submenu {
    display: none;
  }

  .lamp-scene {
    display: none;
  }

  .meta-row {
    flex-direction: column;
  }

  .contact-card {
    padding: 28px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .section-title {
    letter-spacing: 0.2em;
  }

  .lead {
    font-size: 16px;
  }

  .hero-copy::after {
    display: none;
  }

  .hero-photo-card {
    min-height: 280px;
  }

  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
