/* yongjoon.xyz - Shipwrecked Naturalist's Sketchbook */

/* ===== ROOT & GLOBAL STYLES ===== */

:root {
  --bg-aged-paper: #f8f2e8;
  --bg-accent: #e0ebe8;
  --text-primary: #3a3430;
  --text-secondary: #7a6e62;
  --pastel-blue: #a8c4d4;
  --pastel-coral: #d4a8a0;
  --pastel-sage: #a0b8a4;
  --pastel-lavender: #b8a8c8;
  --sketch-line: #6a5e52;
  --ink-annotation: #5a4a38;
  --paper-border: #b0a898;
}

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

html, body {
  width: 100%;
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
  background: var(--bg-aged-paper);
  line-height: 1.75;
  letter-spacing: 0.01em;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* ===== BACKGROUND TEXTURES ===== */

.texture-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  pointer-events: none;
}

.stain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -9;
  pointer-events: none;
}

/* Edge vignette */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.03);
  z-index: -8;
  pointer-events: none;
}

/* ===== PAGE BORDER ===== */

.page-border {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -7;
  pointer-events: none;
}

.border-path {
  stroke-dasharray: 7000;
  stroke-dashoffset: 7000;
  animation: drawBorder 2s ease-in-out 0.3s forwards;
  filter: url(#wobbleFilter);
}

@keyframes drawBorder {
  to {
    stroke-dashoffset: 0;
  }
}

/* ===== MAIN CONTAINER ===== */

.page-container {
  max-width: min(720px, 88vw);
  margin: 0 auto;
  padding: 8vw 0;
  position: relative;
  z-index: 1;
}

/* ===== NAVIGATION ===== */

.minimal-nav {
  margin-bottom: 6rem;
  padding: 0 4vw;
}

.nav-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.005em;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.nav-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-title a:hover {
  color: var(--text-secondary);
}

.nav-divider {
  width: 100%;
  max-width: 200px;
  height: 12px;
  margin: 0.75rem 0 1.5rem 0;
  display: block;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */

.header-section {
  padding: 0 4vw 4rem;
  margin-bottom: 3rem;
}

.content-section {
  padding: 4rem 4vw 3rem;
  margin-bottom: 2rem;
}

.content-section:nth-child(3) {
  background: linear-gradient(180deg, rgba(224, 235, 232, 0.3) 0%, transparent 100%);
}

/* ===== TYPOGRAPHY ===== */

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.15;
  letter-spacing: 0.005em;
}

.intro-text {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.body-text {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.pull-quote {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-style: italic;
  color: var(--text-secondary);
  margin: 3rem 0;
  padding: 2rem;
  border-left: 2px solid var(--sketch-line);
  opacity: 0.85;
}

.caveat {
  font-family: 'Caveat', cursive;
  font-weight: 400;
}

/* ===== FISH ILLUSTRATIONS ===== */

.fish-illustration {
  margin: 1rem 2rem 1rem 0;
  display: inline-block;
  position: relative;
  cursor: pointer;
}

.fish-illustration.fish-clownfish,
.fish-illustration.fish-pufferfish,
.fish-illustration.fish-seahorse {
  float: left;
  margin: 1rem 2rem 1rem 0;
}

.fish-illustration.fish-angelfish,
.fish-illustration.fish-moorish {
  float: right;
  margin: 1rem 0 1rem 2rem;
}

.fish-svg {
  width: clamp(120px, 20vw, 280px);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* Shape-outside for text wrapping */
.fish-illustration.fish-angelfish,
.fish-illustration.fish-moorish {
  shape-outside: ellipse(55% 50% at 50% 50%);
}

.fish-illustration.fish-clownfish,
.fish-illustration.fish-pufferfish,
.fish-illustration.fish-seahorse {
  shape-outside: ellipse(50% 55% at 50% 50%);
}

/* ===== FISH LABELS & NOTES ===== */

.fish-label {
  font-family: 'Caveat', cursive;
  font-size: clamp(0.8rem, 1.3vw, 1rem);
  color: var(--ink-annotation);
  font-weight: 400;
  transform: rotate(var(--rotation, -1.5deg));
  text-align: center;
  margin-top: 0.25rem;
  display: block;
}

.fish-note {
  font-family: 'Caveat', cursive;
  font-size: clamp(0.75rem, 1.1vw, 0.9rem);
  color: var(--text-secondary);
  text-align: center;
  display: block;
  margin-top: 0.1rem;
  opacity: 0.8;
}

/* ===== LIFTABLE INTERACTION ===== */

.liftable {
  transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1),
              box-shadow 0.25s ease,
              filter 0.3s ease;
}

.liftable:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.fish-illustration.liftable:hover {
  transform: translateY(-6px) rotate(2deg);
  filter: saturate(1.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ===== FOOTER ===== */

.page-footer {
  padding: 4rem 4vw 6rem;
  margin-top: 4rem;
}

.footer-divider {
  width: 100%;
  max-width: 400px;
  height: 12px;
  margin: 0 auto 3rem;
  display: block;
}

.footer-content {
  text-align: center;
}

.footer-text {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer-note {
  opacity: 0.75;
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
}

.footer-date {
  font-size: clamp(0.8rem, 1.1vw, 0.9rem);
  color: var(--text-secondary);
  opacity: 0.6;
  margin-top: 2rem;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
  .page-container {
    padding: 6vw 0;
  }

  .minimal-nav {
    margin-bottom: 4rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .header-section,
  .content-section {
    padding: 2rem 4vw;
  }

  .fish-illustration {
    max-width: 140px;
  }

  .fish-illustration.fish-angelfish,
  .fish-illustration.fish-moorish {
    float: left;
    margin: 1rem 1.5rem 1rem 0;
  }

  .pull-quote {
    margin: 2rem 0;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .page-container {
    padding: 4vw 0;
  }

  .minimal-nav {
    padding: 0 3vw;
    margin-bottom: 3rem;
  }

  .nav-links {
    gap: 1rem;
    flex-direction: column;
  }

  .nav-divider {
    max-width: 150px;
  }

  .header-section,
  .content-section {
    padding: 1.5rem 3vw;
  }

  .fish-illustration {
    float: none !important;
    margin: 1.5rem auto;
    display: block;
  }

  .fish-svg {
    max-width: 120px;
  }

  .section-title {
    margin-bottom: 1rem;
  }

  .pull-quote {
    margin: 1.5rem 0;
    padding: 1rem;
    border-left: 1px solid var(--sketch-line);
  }

  .page-footer {
    padding: 3rem 3vw 4rem;
  }
}

/* ===== ANIMATIONS ===== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.nav-title,
.nav-divider,
.nav-links {
  animation: fadeIn 0.6s ease 0.4s both;
}

.header-section {
  animation: fadeIn 0.8s ease 0.5s both;
}

.fish-illustration {
  animation: fadeIn 0.8s ease forwards;
}

.fish-illustration.fish-angelfish {
  animation-delay: 0.7s;
}

.fish-illustration.fish-clownfish {
  animation-delay: 1s;
}

.fish-illustration.fish-moorish {
  animation-delay: 1.3s;
}

.fish-illustration.fish-pufferfish {
  animation-delay: 1.5s;
}

.fish-illustration.fish-seahorse {
  animation-delay: 1.7s;
}

/* Print styles */
@media print {
  .page-border,
  .texture-background,
  .stain-overlay {
    display: none;
  }

  body {
    background: white;
  }

  .page-container {
    max-width: 100%;
    padding: 0;
  }

  .liftable:hover {
    transform: none;
    box-shadow: none;
  }
}
