/* ═══════════════════════════════════════════════════════════════
   THE DEN — Personal Website Styles
   Theme: Enchanted Forest + Deep Ocean | Lo-fi Calm
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
  /* Forest Greens */
  --forest-darkest: #0a1a0f;
  --forest-dark: #0f2818;
  --forest-deep: #142e1c;
  --forest-mid: #1e3f28;
  --forest-base: #2d5a3d;
  --forest-light: #3a7d4e;
  --forest-bright: #4a9e62;
  --forest-glow: #7ab892;
  --forest-pale: #a8d5b8;
  --forest-mist: #d4eadc;

  /* Ocean Blues */
  --ocean-abyss: #060d1a;
  --ocean-deep: #0a1628;
  --ocean-dark: #0f1f35;
  --ocean-mid: #1a3a4a;
  --ocean-base: #1e4d5e;
  --ocean-teal: #2a7a7a;
  --ocean-light: #4a9e8e;
  --ocean-glow: #6ec4b8;
  --ocean-bright: #8edcd2;
  --ocean-foam: #c4ede6;

  /* Warm Accents */
  --amber: #c4a882;
  --amber-light: #d4be9c;
  --amber-glow: #e8d5b0;
  --bark: #8B6F47;
  --bark-dark: #5a4630;

  /* Bioluminescence */
  --bio-green: #44ff88;
  --bio-blue: #44aaff;
  --bio-purple: #aa77ff;
  --bio-cyan: #22ffdd;

  /* Text */
  --text-primary: #d4eadc;
  --text-secondary: #a8c4b0;
  --text-muted: #6e8a78;
  --text-accent: #7ab892;
  --text-warm: #d4be9c;

  /* Surfaces */
  --surface-card: rgba(15, 40, 24, 0.65);
  --surface-card-hover: rgba(20, 50, 30, 0.8);
  --surface-glass: rgba(20, 46, 28, 0.4);
  --surface-overlay: rgba(10, 26, 15, 0.85);

  /* Layout */
  --max-width: 1200px;
  --section-pad: clamp(4rem, 10vh, 8rem);
  --gap: 1.5rem;

  /* Fonts */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-pixel: 'Silkscreen', monospace;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--forest-base) var(--forest-darkest);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--forest-darkest);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--forest-base);
  color: var(--forest-pale);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--forest-darkest); }
::-webkit-scrollbar-thumb { background: var(--forest-base); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--forest-light); }

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover { color: var(--forest-pale); }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ── Fireflies ──────────────────────────────────────────────── */
.fireflies {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: var(--bio-green);
  box-shadow:
    0 0 6px 2px rgba(68, 255, 136, 0.4),
    0 0 20px 4px rgba(68, 255, 136, 0.15);
  animation: fireflyFloat var(--duration, 12s) var(--delay, 0s) infinite ease-in-out;
  opacity: 0;
}

@keyframes fireflyFloat {
  0%, 100% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5);
  }
  10% { opacity: 0.8; }
  50% {
    opacity: 0.3;
    transform: translate(var(--dx, 50px), var(--dy, -80px)) scale(1);
  }
  90% { opacity: 0.7; }
}

/* ── Caustics Overlay ───────────────────────────────────────── */
.caustics-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 80%, rgba(42, 122, 122, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 800px 500px at 80% 70%, rgba(74, 158, 142, 0.04) 0%, transparent 70%);
  animation: causticShift 20s infinite ease-in-out alternate;
}

@keyframes causticShift {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

/* ── Header / Navigation ────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: all 0.5s var(--ease-out);
}

.site-header.scrolled {
  background: var(--surface-overlay);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(122, 184, 146, 0.08);
  padding: 0.6rem 0;
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: transform 0.3s var(--ease-spring);
}
.nav-logo:hover {
  color: var(--text-primary);
  transform: scale(1.05);
}

.logo-icon {
  image-rendering: pixelated;
}

.nav-links {
  display: flex;
  gap: 0.3rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--forest-glow);
  box-shadow: 0 0 8px var(--bio-green);
  transition: all 0.3s var(--ease-out);
  transform: translateX(-50%);
}
.nav-link:hover {
  color: var(--text-primary);
  background: rgba(122, 184, 146, 0.06);
}
.nav-link:hover::after { width: 60%; }

.nav-icon {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.nav-link:hover .nav-icon { opacity: 1; }

/* Mobile Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero Section ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Layered scenic background */
.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Forest background gradient */
.scene-forest {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background:
    linear-gradient(180deg,
      var(--forest-darkest) 0%,
      var(--forest-dark) 30%,
      var(--forest-deep) 60%,
      var(--forest-mid) 100%
    );
}

/* Trees as CSS shapes */
.tree {
  position: absolute;
  bottom: 0;
}

.tree::before,
.tree::after {
  content: '';
  position: absolute;
}

/* Tree trunk */
.tree::before {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--trunk-w, 12px);
  height: var(--trunk-h, 60px);
  background: var(--bark-dark);
  border-radius: 2px;
}

/* Tree canopy */
.tree::after {
  bottom: var(--canopy-bottom, 40px);
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: var(--canopy-w, 40px) solid transparent;
  border-right: var(--canopy-w, 40px) solid transparent;
  border-bottom: var(--canopy-h, 100px) solid var(--canopy-color, #1a3a22);
  filter: drop-shadow(0 0 20px rgba(42, 90, 50, 0.3));
}

.tree-1 {
  left: 5%;
  --trunk-w: 16px; --trunk-h: 80px;
  --canopy-w: 55px; --canopy-h: 140px; --canopy-bottom: 50px;
  --canopy-color: #152e1a;
  opacity: 0.4;
}
.tree-2 {
  left: 15%;
  --trunk-w: 20px; --trunk-h: 100px;
  --canopy-w: 70px; --canopy-h: 180px; --canopy-bottom: 60px;
  --canopy-color: #1a3820;
  opacity: 0.6;
}
.tree-3 {
  left: 50%;
  transform: translateX(-50%);
  --trunk-w: 24px; --trunk-h: 120px;
  --canopy-w: 85px; --canopy-h: 200px; --canopy-bottom: 70px;
  --canopy-color: #1f4228;
  opacity: 0.3;
}
.tree-4 {
  right: 20%;
  --trunk-w: 18px; --trunk-h: 90px;
  --canopy-w: 60px; --canopy-h: 160px; --canopy-bottom: 55px;
  --canopy-color: #183520;
  opacity: 0.5;
}
.tree-5 {
  right: 3%;
  --trunk-w: 22px; --trunk-h: 110px;
  --canopy-w: 75px; --canopy-h: 190px; --canopy-bottom: 65px;
  --canopy-color: #163018;
  opacity: 0.35;
}

.moss-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(0deg, var(--forest-mid), transparent);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* Waterline transition */
.scene-waterline {
  position: absolute;
  top: 55%;
  left: 0;
  right: 0;
  height: 10%;
  background: linear-gradient(180deg,
    var(--forest-mid) 0%,
    #12312a 20%,
    #0f2a30 50%,
    var(--ocean-dark) 100%
  );
  z-index: 1;
}

.scene-waterline::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(110, 196, 184, 0.3) 20%,
    rgba(110, 196, 184, 0.5) 50%,
    rgba(110, 196, 184, 0.3) 80%,
    transparent 100%
  );
  animation: waterShimmer 4s ease-in-out infinite;
}

@keyframes waterShimmer {
  0%, 100% { opacity: 0.3; transform: scaleX(0.95); }
  50% { opacity: 0.8; transform: scaleX(1.02); }
}

/* Ocean background */
.scene-ocean {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background:
    linear-gradient(180deg,
      var(--ocean-dark) 0%,
      var(--ocean-deep) 40%,
      var(--ocean-abyss) 100%
    );
}

/* Coral */
.coral {
  position: absolute;
  bottom: 0;
}

.coral-1 {
  left: 10%;
  width: 80px;
  height: 60px;
  background: radial-gradient(ellipse at bottom, #4a2840 0%, transparent 70%);
  border-radius: 50% 50% 0 0;
}
.coral-1::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 30px;
  height: 50px;
  background: radial-gradient(ellipse at bottom, #6a3060 0%, transparent 80%);
  border-radius: 50% 50% 10% 10%;
}

.coral-2 {
  right: 15%;
  width: 100px;
  height: 70px;
  background: radial-gradient(ellipse at bottom, #2a4a50 0%, transparent 70%);
  border-radius: 40% 60% 0 0;
}

.coral-3 {
  left: 60%;
  width: 60px;
  height: 45px;
  background: radial-gradient(ellipse at bottom, #3a3060 0%, transparent 70%);
  border-radius: 50% 50% 0 0;
}

/* Seaweed */
.seaweed {
  position: absolute;
  bottom: 0;
  width: 8px;
  background: linear-gradient(0deg, #1a4a3a, #2a6a50 60%, transparent);
  border-radius: 4px 4px 0 0;
  transform-origin: bottom center;
}

.seaweed-1 {
  left: 25%;
  height: 120px;
  animation: seaweedSway 6s ease-in-out infinite;
}
.seaweed-2 {
  left: 70%;
  height: 90px;
  animation: seaweedSway 7s ease-in-out 1s infinite;
  width: 6px;
}
.seaweed-3 {
  right: 30%;
  height: 100px;
  animation: seaweedSway 5s ease-in-out 0.5s infinite;
}

@keyframes seaweedSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* Bubbles */
.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(110, 196, 184, 0.3), rgba(110, 196, 184, 0.05));
  border: 1px solid rgba(110, 196, 184, 0.15);
  animation: bubbleRise var(--speed, 8s) var(--delay, 0s) infinite ease-in;
}

.bubble-1 { --speed: 10s; --delay: 0s; left: 20%; bottom: 5%; width: 12px; height: 12px; }
.bubble-2 { --speed: 12s; --delay: 2s; left: 45%; bottom: 8%; width: 8px; height: 8px; }
.bubble-3 { --speed: 9s; --delay: 4s; left: 65%; bottom: 3%; width: 14px; height: 14px; }
.bubble-4 { --speed: 14s; --delay: 1s; left: 80%; bottom: 10%; width: 6px; height: 6px; }
.bubble-5 { --speed: 11s; --delay: 3s; left: 35%; bottom: 6%; width: 10px; height: 10px; }

@keyframes bubbleRise {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-100px) scale(1.1); opacity: 0.4; }
  100% { transform: translateY(-250px) scale(0.8); opacity: 0; }
}

/* ── Animals ────────────────────────────────────────────────── */
.animal {
  position: absolute;
  z-index: 2;
  image-rendering: auto;
}

/* Fox — perched on left side, in the forest */
.fox {
  left: 8%;
  top: 22%;
  width: 60px;
  height: 50px;
  animation: animalBreathe 4s ease-in-out infinite;
}

/* Fox built from gradients */
.fox::before {
  content: '';
  position: absolute;
  /* Body */
  width: 40px;
  height: 25px;
  background: #c4622a;
  border-radius: 50% 60% 40% 50%;
  top: 18px;
  left: 5px;
  box-shadow:
    inset -5px -3px 8px rgba(0,0,0,0.2),
    0 0 15px rgba(196, 98, 42, 0.2);
}
.fox::after {
  content: '';
  position: absolute;
  /* Head */
  width: 22px;
  height: 20px;
  background: #d47a3a;
  border-radius: 50% 50% 40% 40%;
  top: 6px;
  left: 30px;
  box-shadow:
    /* Ears */
    -4px -8px 0 0 #c4622a,
    6px -8px 0 0 #c4622a,
    /* Eyes */
    2px 6px 0 0 #1a1a1a,
    8px 6px 0 0 #1a1a1a,
    /* Nose */
    5px 10px 0 -1px #2a1a10,
    /* Glow */
    0 0 20px rgba(212, 122, 58, 0.15);
}

/* Owl — sitting on a branch near the fox */
.owl {
  left: 22%;
  top: 18%;
  width: 35px;
  height: 40px;
  animation: animalBreathe 5s ease-in-out 1s infinite;
}

.owl::before {
  content: '';
  position: absolute;
  /* Body */
  width: 28px;
  height: 32px;
  background: radial-gradient(ellipse at center, #8a7560, #6a5848);
  border-radius: 50% 50% 45% 45%;
  top: 8px;
  left: 3px;
  box-shadow: 0 0 15px rgba(138, 117, 96, 0.2);
}
.owl::after {
  content: '';
  position: absolute;
  /* Head + eyes */
  width: 24px;
  height: 18px;
  background: #9a8570;
  border-radius: 50%;
  top: 2px;
  left: 5px;
  box-shadow:
    /* Ear tufts */
    -6px -5px 0 -2px #7a6550,
    10px -5px 0 -2px #7a6550,
    /* Eyes - large owl eyes */
    3px 4px 0 2px #f0d040,
    9px 4px 0 2px #f0d040,
    3px 4px 0 0.5px #1a1a1a,
    9px 4px 0 0.5px #1a1a1a,
    /* Beak */
    6px 10px 0 -1px #c4a060;
}

/* Whale — gracefully swimming in the ocean */
.whale {
  right: 15%;
  top: 50%;
  width: 100px;
  height: 50px;
  animation: whaleSwim 20s ease-in-out infinite;
}

.whale::before {
  content: '';
  position: absolute;
  /* Body */
  width: 80px;
  height: 35px;
  background: linear-gradient(180deg, #3a6a8a, #4a7a9a 50%, #5a8aaa);
  border-radius: 60% 40% 50% 50%;
  top: 8px;
  left: 0;
  box-shadow:
    /* Belly */
    inset 0 8px 15px rgba(100, 160, 200, 0.3),
    0 0 30px rgba(74, 122, 154, 0.2);
}
.whale::after {
  content: '';
  position: absolute;
  /* Tail */
  width: 30px;
  height: 20px;
  background: #3a6a8a;
  top: 12px;
  right: 2px;
  clip-path: polygon(0% 50%, 100% 0%, 80% 50%, 100% 100%);
}

/* Jellyfish */
.jellyfish {
  width: 30px;
  height: 45px;
  animation: jellyfishFloat 8s ease-in-out infinite;
}

.jellyfish::before {
  content: '';
  position: absolute;
  /* Bell */
  width: 28px;
  height: 20px;
  background: radial-gradient(ellipse at center top, rgba(170, 119, 255, 0.6), rgba(170, 119, 255, 0.2));
  border-radius: 50% 50% 30% 30%;
  top: 0;
  left: 1px;
  box-shadow: 0 0 20px rgba(170, 119, 255, 0.3);
}
.jellyfish::after {
  content: '';
  position: absolute;
  /* Tentacles */
  width: 20px;
  height: 25px;
  top: 16px;
  left: 5px;
  background:
    linear-gradient(180deg, rgba(170, 119, 255, 0.3), transparent);
  border-radius: 0 0 50% 50%;
}

.jellyfish-1 {
  right: 35%;
  bottom: 12%;
  --float-x: 20px;
  --float-y: -30px;
}
.jellyfish-2 {
  left: 40%;
  bottom: 8%;
  --float-x: -15px;
  --float-y: -20px;
  transform: scale(0.7);
  animation-delay: 3s;
  animation-duration: 10s;
}

@keyframes jellyfishFloat {
  0%, 100% {
    transform: translate(0, 0) scale(var(--jf-scale, 1));
  }
  25% {
    transform: translate(var(--float-x, 15px), var(--float-y, -25px)) scale(var(--jf-scale, 1));
  }
  50% {
    transform: translate(calc(var(--float-x, 15px) * 0.5), calc(var(--float-y, -25px) * 1.3)) scale(var(--jf-scale, 1));
  }
  75% {
    transform: translate(calc(var(--float-x, 15px) * -0.3), calc(var(--float-y, -25px) * 0.7)) scale(var(--jf-scale, 1));
  }
}

/* Deer — subtle, in the forest background */
.deer {
  right: 30%;
  top: 35%;
  width: 45px;
  height: 55px;
  opacity: 0.35;
  animation: animalBreathe 6s ease-in-out 2s infinite;
}

.deer::before {
  content: '';
  position: absolute;
  /* Body */
  width: 35px;
  height: 20px;
  background: #7a6050;
  border-radius: 50% 40% 45% 50%;
  top: 25px;
  left: 5px;
}
.deer::after {
  content: '';
  position: absolute;
  /* Head + neck + antlers hint */
  width: 14px;
  height: 18px;
  background: #8a7060;
  border-radius: 40% 50% 50% 40%;
  top: 12px;
  left: 28px;
  box-shadow:
    /* Antlers */
    4px -10px 0 -1px #6a5040,
    8px -14px 0 -2px #6a5040,
    0px -8px 0 -1px #6a5040,
    /* Legs */
    -24px 24px 0 -4px #6a5040,
    -14px 24px 0 -4px #6a5040,
    -4px 22px 0 -4px #6a5040,
    4px 22px 0 -4px #6a5040;
}

@keyframes animalBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes whaleSwim {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-30px, -10px) rotate(-2deg); }
  50% { transform: translate(10px, 5px) rotate(1deg); }
  75% { transform: translate(-15px, -5px) rotate(-1deg); }
}

/* ── Hero Content ───────────────────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 1rem;
}

.hero-title-line {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--text-primary);
  text-shadow: 0 0 40px rgba(122, 184, 146, 0.15);
  opacity: 0;
  animation: titleReveal 1.2s var(--ease-out) forwards;
}

.hero-title-line.accent {
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 600;
  background: linear-gradient(135deg, var(--forest-glow), var(--ocean-glow), var(--forest-pale));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(122, 184, 146, 0.2));
  animation-delay: 0.3s;
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-subtitle {
  font-family: var(--font-pixel);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s 0.8s var(--ease-out) forwards;
}

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

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1s 1.1s var(--ease-out) forwards;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--forest-base), var(--ocean-teal));
  color: var(--text-primary);
  box-shadow:
    0 4px 15px rgba(45, 90, 61, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px rgba(45, 90, 61, 0.4),
    0 0 20px rgba(122, 184, 146, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(122, 184, 146, 0.2);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(122, 184, 146, 0.4);
  background: rgba(122, 184, 146, 0.05);
  transform: translateY(-2px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
  opacity: 0;
  animation: fadeUp 1s 1.5s var(--ease-out) forwards;
}

.scroll-text {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ── Section Base Styles ────────────────────────────────────── */
.section {
  position: relative;
  padding: var(--section-pad) 0;
  z-index: 2;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  text-shadow: 0 0 30px rgba(122, 184, 146, 0.1);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ── About Section ──────────────────────────────────────────── */
.about {
  background:
    radial-gradient(ellipse 800px 600px at 20% 50%, rgba(45, 90, 61, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, var(--forest-darkest), #0b1e12 50%, var(--forest-darkest));
}

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.portrait-frame {
  position: relative;
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(122, 184, 146, 0.15), rgba(74, 158, 142, 0.1));
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(122, 184, 146, 0.1);
}

.portrait-placeholder {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--forest-dark);
}
.portrait-placeholder svg {
  width: 100%;
  height: 100%;
}

.portrait-leaves {
  position: absolute;
  inset: -15px;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, rgba(122, 184, 146, 0.2), transparent 40%, transparent 60%, rgba(74, 158, 142, 0.2)) 1;
  pointer-events: none;
}

.about-text {
  padding-top: 0.5rem;
}

.about-lead {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-accent);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface-card);
  border-radius: 12px;
  border: 1px solid rgba(122, 184, 146, 0.08);
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.detail-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

/* Section flora decorations */
.section-flora {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  pointer-events: none;
  overflow: hidden;
}

.fern {
  position: absolute;
  bottom: 0;
  width: 80px;
  height: 60px;
}

.fern-left {
  left: 5%;
  background: radial-gradient(ellipse at bottom left, rgba(42, 120, 60, 0.3), transparent 70%);
}
.fern-right {
  right: 5%;
  background: radial-gradient(ellipse at bottom right, rgba(42, 120, 60, 0.3), transparent 70%);
}

.mushroom {
  position: absolute;
  bottom: 0;
}

.mushroom::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 12px;
  background: #e8dcc8;
  border-radius: 2px;
}

.mushroom::after {
  content: '';
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 10px;
  background: radial-gradient(ellipse at top, #c4624a, #8a3a30);
  border-radius: 50% 50% 20% 20%;
  box-shadow: 0 0 8px rgba(196, 98, 74, 0.2);
}

.mushroom-1 { left: 12%; }
.mushroom-2 {
  right: 10%;
  transform: scale(0.7);
}

/* ── Writings Section ───────────────────────────────────────── */
.writings {
  background:
    radial-gradient(ellipse 600px 500px at 80% 30%, rgba(26, 58, 74, 0.1) 0%, transparent 70%),
    linear-gradient(180deg, var(--forest-darkest), #091218 50%, var(--forest-darkest));
}

.writings-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.writing-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.5rem;
  padding: 1.8rem;
  background: var(--surface-card);
  border-radius: 16px;
  border: 1px solid rgba(122, 184, 146, 0.06);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.writing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122, 184, 146, 0.03), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.writing-card:hover {
  border-color: rgba(122, 184, 146, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.writing-card:hover::before { opacity: 1; }

.card-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  background: rgba(122, 184, 146, 0.06);
  border-radius: 10px;
  align-self: start;
}

.date-month {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.date-day {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-accent);
  line-height: 1;
}

.date-year {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--text-muted);
}

.card-content {
  position: relative;
  z-index: 1;
}

.card-tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--ocean-light);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.2rem 0.6rem;
  background: rgba(74, 158, 142, 0.1);
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.card-title a {
  color: var(--text-primary);
  transition: color 0.3s ease;
}
.card-title a:hover { color: var(--forest-glow); }

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.card-read-time {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.card-leaf {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(122, 184, 146, 0.05), transparent);
  border-radius: 0 50% 50% 50%;
  transform: rotate(45deg);
  transition: all 0.4s ease;
}
.writing-card:hover .card-leaf {
  background: radial-gradient(circle, rgba(122, 184, 146, 0.1), transparent);
  transform: rotate(45deg) scale(1.5);
}

.section-cta {
  text-align: center;
  margin-top: 3rem;
}

/* ── Projects Section ───────────────────────────────────────── */
.projects {
  background:
    radial-gradient(ellipse 600px 500px at 30% 60%, rgba(42, 122, 122, 0.06) 0%, transparent 70%),
    linear-gradient(180deg, var(--forest-darkest), #0a141a 50%, var(--forest-darkest));
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--surface-card);
  border-radius: 16px;
  border: 1px solid rgba(74, 158, 142, 0.08);
  transition: all 0.4s var(--ease-out);
  color: var(--text-secondary);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--forest-base), var(--ocean-teal), var(--ocean-light));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  color: var(--text-primary);
  border-color: rgba(74, 158, 142, 0.2);
  transform: translateY(-4px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25),
    0 0 30px rgba(74, 158, 142, 0.05);
}
.project-card:hover::before { opacity: 1; }

.project-icon {
  margin-bottom: 1.5rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.project-card:hover .project-icon { opacity: 1; }

.project-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.project-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  flex: 1;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.ptag {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  padding: 0.25rem 0.6rem;
  background: rgba(74, 158, 142, 0.1);
  color: var(--ocean-light);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.project-link-text {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--text-accent);
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}
.project-card:hover .project-link-text {
  color: var(--forest-pale);
  letter-spacing: 0.15em;
}

/* Ocean decorations for projects */
.projects-flora {
  height: 60px;
}

.sea-plant {
  position: absolute;
  bottom: 0;
  width: 6px;
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
}

.sp-1 {
  left: 8%;
  height: 40px;
  background: linear-gradient(0deg, #1a4a5a, #2a6a7a 60%, transparent);
  animation: seaweedSway 7s ease-in-out infinite;
}
.sp-2 {
  right: 12%;
  height: 35px;
  background: linear-gradient(0deg, #1a3a5a, #2a5a7a 60%, transparent);
  animation: seaweedSway 6s ease-in-out 1s infinite;
}

.small-fish {
  position: absolute;
  width: 12px;
  height: 6px;
  background: rgba(110, 196, 184, 0.4);
  border-radius: 50% 30% 30% 50%;
}
.small-fish::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 1px;
  width: 0;
  height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 6px solid rgba(110, 196, 184, 0.4);
}

.fish-1 {
  bottom: 30px;
  left: 30%;
  animation: fishSwim 12s ease-in-out infinite;
}
.fish-2 {
  bottom: 20px;
  right: 35%;
  animation: fishSwim 15s ease-in-out 3s infinite reverse;
  transform: scaleX(-1);
}

@keyframes fishSwim {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(100px); }
}

/* ── Contact Section ────────────────────────────────────────── */
.contact {
  background:
    radial-gradient(ellipse 500px 400px at 50% 50%, rgba(45, 90, 61, 0.06) 0%, transparent 70%),
    linear-gradient(180deg, var(--forest-darkest), #0d1a12);
}

.socials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 2rem 1.5rem;
  background: var(--surface-card);
  border-radius: 16px;
  border: 1px solid rgba(122, 184, 146, 0.06);
  transition: all 0.4s var(--ease-out);
  text-align: center;
  color: var(--text-secondary);
}

.social-card:hover {
  border-color: rgba(122, 184, 146, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  background: var(--surface-card-hover);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(122, 184, 146, 0.06);
  transition: all 0.3s ease;
  color: var(--text-accent);
}
.social-card:hover .social-icon {
  background: rgba(122, 184, 146, 0.12);
  box-shadow: 0 0 20px rgba(122, 184, 146, 0.1);
  transform: scale(1.1);
}

.social-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.social-handle {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.contact-message {
  text-align: center;
  margin-top: 3rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 3rem 0 2rem;
  background: var(--forest-darkest);
  border-top: 1px solid rgba(122, 184, 146, 0.05);
}

.footer-terrain {
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(0deg, var(--forest-darkest), transparent);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--text-accent);
  letter-spacing: 0.05em;
}

.footer-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Reveal Animations (activated by JS) ────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-portrait {
    max-width: 250px;
    margin: 0 auto;
  }
  .writing-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card-date {
    flex-direction: row;
    gap: 0.5rem;
    align-self: auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: var(--surface-overlay);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 5rem 2rem 2rem;
    gap: 0.5rem;
    transition: right 0.4s var(--ease-out);
    z-index: 99;
  }
  .nav-links.open { right: 0; }
  .nav-toggle { display: flex; z-index: 101; }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.8rem 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .socials-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Hide some animals on mobile for cleanliness */
  .deer,
  .jellyfish-2 {
    display: none;
  }

  .hero-title-line { font-size: clamp(2.5rem, 12vw, 4rem); }
  .hero-title-line.accent { font-size: clamp(3rem, 14vw, 5rem); }
}

@media (max-width: 480px) {
  .socials-grid { grid-template-columns: 1fr; }

  .hero {
    min-height: 100svh;
  }
}

/* ── Accessibility ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--forest-glow);
  outline-offset: 3px;
}

/* Skip to content (screen reader) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
