/* ============================================================
   ZIVA.EXE — style.css
   解构像素风 × 柔和梦幻拼贴美学
   ============================================================ */

/* ---------- 开场动画 ---------- */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #FFF7E8;
  transition: opacity 0.8s, visibility 0.8s;
}

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

.intro-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
}

.intro-text-container {
  display: flex;
  gap: 8px;
  z-index: 2;
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
}

.intro-char {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(24px, 5vw, 48px);
  color: #2A261F;
  opacity: 0;
  transform: translateY(30px) rotate(10deg);
  animation: char-reveal 0.6s ease-out forwards;
}

.intro-char:nth-child(1) { animation-delay: 0.1s; }
.intro-char:nth-child(2) { animation-delay: 0.2s; }
.intro-char:nth-child(3) { animation-delay: 0.3s; }
.intro-char:nth-child(4) { animation-delay: 0.4s; }
.intro-char:nth-child(5) { animation-delay: 0.5s; }
.intro-char:nth-child(6) { animation-delay: 0.6s; }
.intro-char:nth-child(7) { animation-delay: 0.7s; }
.intro-char:nth-child(8) { animation-delay: 0.8s; }

@keyframes char-reveal {
  0% { opacity: 0; transform: translateY(30px) rotate(10deg); }
  60% { transform: translateY(-5px) rotate(-3deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0); }
}

.intro-tree {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 280px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(42, 38, 31, 0.3));
  opacity: 0;
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s;
  cursor: pointer;
  z-index: 3;
}

.intro-tree.visible {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  animation: tree-shake 0.5s ease-in-out infinite alternate;
}

@keyframes tree-shake {
  0% { transform: translateX(-50%) scale(1) rotate(-1deg); }
  100% { transform: translateX(-50%) scale(1) rotate(1deg); }
}

.intro-apples {
  position: absolute;
  bottom: 40%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  z-index: 4;
}

.intro-apple {
  font-size: 32px;
  opacity: 0;
  transform: translateY(-100vh) rotate(0deg);
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s;
}

.intro-apple.visible {
  opacity: 1;
}

.intro-apple:nth-child(1).visible { transform: translateY(0) rotate(15deg); transition-delay: 0s; }
.intro-apple:nth-child(2).visible { transform: translateY(20px) rotate(-10deg); transition-delay: 0.1s; }
.intro-apple:nth-child(3).visible { transform: translateY(-10px) rotate(20deg); transition-delay: 0.2s; }
.intro-apple:nth-child(4).visible { transform: translateY(15px) rotate(-15deg); transition-delay: 0.15s; }
.intro-apple:nth-child(5).visible { transform: translateY(-5px) rotate(10deg); transition-delay: 0.25s; }
.intro-apple:nth-child(6).visible { transform: translateY(25px) rotate(-5deg); transition-delay: 0.05s; }
.intro-apple:nth-child(7).visible { transform: translateY(5px) rotate(25deg); transition-delay: 0.2s; }

.orbit-texts {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 300px;
  z-index: 4;
  pointer-events: none;
}

.orbit-text {
  position: absolute;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #2A261F;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.5s;
}

.orbit-text.visible {
  opacity: 0.85;
}

.orbit-text:nth-child(1) { left: -40px; top: 20%; animation: float-a 3s ease-in-out infinite alternate; }
.orbit-text:nth-child(2) { right: -30px; top: 10%; animation: float-b 3.5s ease-in-out infinite alternate; }
.orbit-text:nth-child(3) { left: -50px; bottom: 30%; animation: float-c 4s ease-in-out infinite alternate; }
.orbit-text:nth-child(4) { right: -45px; bottom: 15%; animation: float-d 3.2s ease-in-out infinite alternate; }
.orbit-text:nth-child(5) { left: 10px; bottom: 5%; animation: float-e 3.8s ease-in-out infinite alternate; }

@keyframes float-a {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-12px) translateX(6px); }
}
@keyframes float-b {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-10px) translateX(-8px); }
}
@keyframes float-c {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(8px) translateX(10px); }
}
@keyframes float-d {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-14px) translateX(-5px); }
}
@keyframes float-e {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(10px) translateX(7px); }
}

.intro-overlay.dissolving {
  animation: dissolve-tear 1s ease-in forwards;
}

@keyframes dissolve-tear {
  0% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
  }
  30% {
    clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
  }
  60% {
    clip-path: polygon(2% 0, 98% 0, 100% 95%, 0 95%);
    opacity: 0.5;
  }
  100% {
    clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
    opacity: 0;
  }
}

/* ---------- CSS Variables ---------- */
:root {
  /* Color System */
  --cream-canvas: #FFF7E8;
  --cream-light: #FFFDF5;
  --pixel-ink: #2A261F;
  --linen-beige: #E9D8B6;
  --sage-green: #B8C7A4;
  --dusty-pink: #E7B6A2;
  --muted-violet: #C7B7E8;
  --digital-coral: #D76C4D;

  /* Derived */
  --sage-light: #E8F0E0;
  --pink-light: #FFF0EB;
  --violet-light: #F0E8F5;
  --coral-light: #FDEEE9;

  /* Typography */
  --font-pixel: 'Press Start 2P', monospace;
  --font-cn: 'Noto Sans SC', sans-serif;
  --font-hand: 'Caveat', cursive;

  /* Spacing */
  --section-pad: clamp(60px, 10vw, 120px);
  --container-max: 1200px;

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

  /* Pixel size unit */
  --px: 4px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  font-family: var(--font-cn);
  color: var(--pixel-ink);
  background: var(--cream-canvas);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: default;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--dusty-pink);
  color: var(--pixel-ink);
}

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

a {
  color: var(--digital-coral);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--pixel-ink);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--cream-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--linen-beige);
  border-radius: 0;
  /* Pixel style: no border-radius */
  border: 2px solid var(--cream-canvas);
}

/* ---------- Particle Canvas ---------- */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ---------- Cursor Follower ---------- */
#cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 10000;
  transition: transform 0.08s linear, opacity 0.3s;
  opacity: 0;
  mix-blend-mode: multiply;
}

#cursor-follower.visible {
  opacity: 1;
}

#cursor-follower.hovering svg rect {
  fill: var(--digital-coral);
}

#cursor-follower.blinking .blink-eyes {
  opacity: 0;
}

@media (hover: none) {
  #cursor-follower {
    display: none !important;
  }
}

/* ---------- Scroll Indicator ---------- */
#scroll-indicator {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-yarn {
  width: 4px;
  height: 120px;
  background: var(--linen-beige);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.scroll-yarn-ball {
  width: 12px;
  height: 12px;
  background: var(--digital-coral);
  position: absolute;
  top: 0;
  left: -4px;
  border-radius: 0;
  transition: top 0.15s ease-out;
  /* Pixel square ball */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.scroll-chapter-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--pixel-ink);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 1px;
}

.scroll-chapter-label.show {
  opacity: 0.6;
  transform: translateY(0);
}

@media (max-width: 768px) {
  #scroll-indicator {
    display: none;
  }
}

/* ---------- Header ---------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
  background: rgba(255, 247, 232, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#site-header.scrolled {
  background: rgba(255, 247, 232, 0.7);
  box-shadow: 0 2px 20px rgba(42, 38, 31, 0.06);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--pixel-ink);
  letter-spacing: 2px;
  text-decoration: none;
  position: relative;
}

.logo:hover {
  color: var(--pixel-ink);
}

.logo-text {
  display: inline-block;
  transition: opacity 0.3s;
}

.logo-text.switching {
  animation: logo-flash 0.6s ease-in-out;
}

@keyframes logo-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; transform: scale(0.95); }
}

.logo-dot {
  color: var(--digital-coral);
}

/* Nav links with pixel border style */
.main-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--pixel-ink);
  padding: 8px 12px;
  text-decoration: none;
  position: relative;
  border: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  letter-spacing: 0.5px;
}

.nav-link:hover {
  border-color: var(--linen-beige);
  background: rgba(233, 216, 182, 0.3);
  color: var(--pixel-ink);
}

.nav-link.active {
  border-color: var(--digital-coral);
  color: var(--digital-coral);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 2px;
  right: 2px;
  height: 2px;
  background: var(--digital-coral);
  animation: pixel-blink 1.5s steps(2) infinite;
}

@keyframes pixel-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--pixel-ink);
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile nav overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 247, 232, 0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.mobile-nav-link {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--pixel-ink);
  padding: 12px 24px;
  border: 2px solid transparent;
  text-decoration: none;
  transition: border-color 0.2s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  border-color: var(--digital-coral);
  color: var(--digital-coral);
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

/* ---------- Section Common ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad) 24px;
  max-width: var(--container-max);
  margin: 0 auto;
  background-image: url('images/background/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.section h2, .section h3, .section h4, .section p, .section li, .section span, .section a, .section button {
  text-shadow: 0 0 8px rgba(255, 247, 232, 0.9), 0 0 16px rgba(255, 247, 232, 0.7);
  font-weight: 700;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.title-zh {
  font-family: var(--font-cn);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: var(--pixel-ink);
  display: inline-block;
  position: relative;
}

.title-zh::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--digital-coral);
  margin: 12px auto 0;
  /* Pixel style: stepped */
  background-image:
    linear-gradient(var(--digital-coral) 50%, transparent 50%);
  background-size: 8px 4px;
}

.title-en {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--linen-beige);
  margin-top: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* ---------- Scroll Animations ---------- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  transition-delay: var(--delay, 0s);
}

.anim-fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.anim-title .title-zh {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.anim-title .title-en {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.6s var(--ease-out-expo) 0.15s, transform 0.6s var(--ease-out-expo) 0.15s;
}

.anim-title.in-view .title-zh,
.anim-title.in-view .title-en {
  opacity: 1;
  transform: translateX(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-fade-up,
  .anim-title .title-zh,
  .anim-title .title-en {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   MODULE 1: HOME
   ============================================================ */
.section-home {
  padding-top: 120px;
  min-height: 100vh;
  /* 背景已统一设置在 .section */
}

.home-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 900px) {
  .home-container {
    grid-template-columns: 1fr;
    gap: 60px;
  }
}

/* -- Intro -- */
.intro-name-block {
  margin-bottom: 24px;
  position: relative;
}

/* Speaking Character */
.speaking-character {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.character-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #E7B6A2;
  animation: avatar-bounce 2s ease-in-out infinite;
  cursor: pointer;
}

.character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes avatar-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.speech-bubble {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  background: white;
  border: 2px solid #2A261F;
  padding: 8px 16px;
  border-radius: 12px;
  font-family: 'Caveat', cursive;
  font-size: 14px;
  white-space: nowrap;
  animation: bubble-pop 0.3s ease-out;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: white;
}

@keyframes bubble-pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}



.name-en {
  font-family: var(--font-pixel);
  font-size: clamp(36px, 6vw, 64px);
  color: var(--pixel-ink);
  line-height: 1.2;
  letter-spacing: 4px;
}

.name-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.name-zh {
  font-family: var(--font-cn);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  color: var(--pixel-ink);
}

.name-divider {
  font-family: var(--font-hand);
  font-size: 24px;
  color: var(--linen-beige);
}

.name-alt {
  font-family: var(--font-hand);
  font-size: clamp(20px, 3vw, 28px);
  color: var(--dusty-pink);
  cursor: pointer;
  transition: color 0.3s;
  position: relative;
}

.name-alt:hover {
  color: var(--digital-coral);
}

/* MBTI Chip */
.mbti-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 2px solid var(--muted-violet);
  margin-bottom: 20px;
  position: relative;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.mbti-chip:hover,
.mbti-chip:focus {
  border-color: var(--digital-coral);
  background: var(--violet-light);
}

.mbti-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--muted-violet);
  letter-spacing: 1px;
}

.mbti-type {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--pixel-ink);
  font-weight: 700;
}

.mbti-detail {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  padding: 16px;
  background: var(--cream-light);
  border: 2px solid var(--muted-violet);
  font-family: var(--font-cn);
  font-size: 13px;
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10;
  box-shadow: 4px 4px 0 var(--linen-beige);
}

.mbti-chip:hover .mbti-detail,
.mbti-chip:focus .mbti-detail {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Hobby Cards */
.hobby-cards {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* 翻开式书本效果 */
.flip-book {
  position: relative;
  width: 120px;
  cursor: pointer;
}

.book-cover {
  background: linear-gradient(135deg, #FFF7E8, #E9D8B6);
  border: 2px solid #2A261F;
  padding: 20px 15px;
  text-align: center;
  box-shadow: 4px 4px 0 #2A261F;
  transition: transform 0.3s, box-shadow 0.3s;
}

.book-cover:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 #2A261F;
}

.book-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #2A261F;
  display: block;
  margin-bottom: 8px;
}

.book-hint {
  font-family: 'Caveat', cursive;
  font-size: 12px;
  color: #E7B6A2;
}

.book-pages {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 80vw;
  max-width: 600px;
  background: #FFF7E8;
  border: 3px solid #2A261F;
  padding: 30px;
  z-index: 1000;
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.flip-book.open .book-pages {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.book-page {
  aspect-ratio: 3/4;
  overflow: hidden;
  border: 1px solid #E9D8B6;
  transform: rotate(calc((var(--page) - 3) * 3deg));
  animation: page-flutter 0.5s ease-out backwards;
}

.book-page:nth-child(1) { --page: 1; animation-delay: 0s; }
.book-page:nth-child(2) { --page: 2; animation-delay: 0.1s; }
.book-page:nth-child(3) { --page: 3; animation-delay: 0.2s; }
.book-page:nth-child(4) { --page: 4; animation-delay: 0.3s; }
.book-page:nth-child(5) { --page: 5; animation-delay: 0.4s; }

@keyframes page-flutter {
  0% { transform: rotate(calc((var(--page) - 3) * 20deg)) translateY(-50px); opacity: 0; }
  100% { transform: rotate(calc((var(--page) - 3) * 3deg)) translateY(0); opacity: 1; }
}

.book-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #D76C4D;
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.flip-book.open .book-close {
  opacity: 1;
  pointer-events: auto;
}

.book-detail-link {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: #D76C4D;
  text-align: center;
}

/* Typing effect */
.self-evaluation {
  min-height: 48px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
}

.typing-text {
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--pixel-ink);
  opacity: 0.8;
}

.typing-cursor {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--digital-coral);
  animation: cursor-blink 0.8s steps(1) infinite;
  margin-left: 2px;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Tagline */
.tagline-block {
  position: relative;
}

.tagline {
  font-family: var(--font-pixel);
  font-size: clamp(10px, 1.8vw, 16px);
  color: var(--linen-beige);
  letter-spacing: 3px;
  line-height: 1.8;
}

.tagline-offset {
  margin-left: 40px;
  color: var(--dusty-pink);
}

/* -- Photo Wall (Scattered Layout) -- */
.home-map {
  position: relative;
  width: 100%;
  min-height: 600px;
  background-image: url('images/background/map-bg.jpg');
  background-size: cover;
  background-position: center;
  padding: 40px;
}

/* Scattered Polaroids */
.map-polaroid {
  position: absolute;
  transform: rotate(var(--rot));
  cursor: pointer;
  transition: transform 0.4s var(--ease-bounce), z-index 0s;
  z-index: 1;
  width: 120px;
  opacity: 0;
  animation: map-polaroid-enter 0.6s var(--ease-bounce) forwards;
  animation-play-state: paused;
}

.map-polaroid::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #D76C4D;
  border-radius: 50%;
  border: 2px solid #2A261F;
  z-index: 2;
}

.map-polaroid.in-view {
  animation-play-state: running;
}

@keyframes map-polaroid-enter {
  0% { opacity: 0; transform: scale(0.5) rotate(var(--rot)); }
  100% { opacity: 1; transform: scale(1) rotate(var(--rot)); }
}

.map-polaroid:hover {
  z-index: 10;
  transform: scale(1.15) rotate(var(--rot));
  animation: polaroid-wobble 0.6s var(--ease-bounce);
}

@keyframes polaroid-wobble {
  0% { transform: scale(1.15) rotate(var(--rot)); }
  20% { transform: scale(1.15) rotate(calc(var(--rot) - 4deg)); }
  40% { transform: scale(1.15) rotate(calc(var(--rot) + 3deg)); }
  60% { transform: scale(1.15) rotate(calc(var(--rot) - 2deg)); }
  80% { transform: scale(1.15) rotate(calc(var(--rot) + 1deg)); }
  100% { transform: scale(1.15) rotate(var(--rot)); }
}

.map-polaroid .polaroid-inner {
  background: white;
  padding: 6px 6px 22px;
  box-shadow: 2px 2px 0 var(--linen-beige);
  border: 1px solid rgba(0,0,0,0.05);
}

.map-polaroid .polaroid-inner img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  background: var(--linen-beige);
}

.map-polaroid .polaroid-caption {
  font-family: var(--font-hand);
  font-size: 10px;
  color: var(--pixel-ink);
  text-align: center;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .home-map {
    aspect-ratio: 2/1;
    min-height: auto;
  }
  .map-polaroid {
    width: 80px;
  }
  .map-polaroid .polaroid-inner img {
    height: 56px;
  }
  .map-polaroid .polaroid-caption {
    font-size: 8px;
  }
}

/* ============================================================
   MODULE 2: EDUCATION
   ============================================================ */
.edu-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

@media (max-width: 900px) {
  .edu-cards {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Flip Card */
.edu-card {
  perspective: 1000px;
  aspect-ratio: 4/3;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
}

.edu-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  height: 100px;
}

.edu-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--linen-beige);
  transition: transform 0.3s;
}

.edu-photos img:hover {
  transform: scale(1.05);
}

.card-flipper {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.7s var(--ease-out-expo);
  transform-style: preserve-3d;
  cursor: pointer;
}

.edu-card.flipped .card-flipper {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 28px;
  background: var(--cream-light);
  border: 2px solid var(--linen-beige);
  box-shadow: 4px 4px 0 var(--linen-beige);
  display: flex;
  flex-direction: column;
}

.card-back {
  transform: rotateY(180deg);
  justify-content: center;
}

.card-school-tag {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: white;
  background: var(--sage-green);
  display: inline-block;
  padding: 4px 10px;
  width: fit-content;
  margin-bottom: 16px;
}

.card-school-tag.cambridge {
  background: var(--muted-violet);
}

.card-school {
  font-family: var(--font-cn);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-major {
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--digital-coral);
  margin-bottom: 8px;
}

.card-time {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--linen-beige);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.card-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--pixel-ink);
  opacity: 0.8;
  flex: 1;
}

.flip-hint {
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--linen-beige);
  margin-top: auto;
  text-align: center;
}

/* Skill tags on card back */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.skill-tag {
  font-family: var(--font-cn);
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid;
}

.skill-tag.sage {
  border-color: var(--sage-green);
  color: var(--sage-green);
  background: var(--sage-light);
}

.skill-tag.pink {
  border-color: var(--dusty-pink);
  color: #C4897A;
  background: var(--pink-light);
}

.skill-tag.violet {
  border-color: var(--muted-violet);
  color: #9B8AC7;
  background: var(--violet-light);
}

.skill-tag.coral {
  border-color: var(--digital-coral);
  color: var(--digital-coral);
  background: var(--coral-light);
}

/* Why Pivot */
.why-pivot {
  align-self: center;
  width: 100%;
  max-width: 400px;
}

.pivot-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 2px dashed var(--dusty-pink);
  background: var(--pink-light);
  transition: background 0.2s;
}

.pivot-toggle:hover {
  background: #FFE5DB;
}

.pivot-q {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--digital-coral);
  letter-spacing: 2px;
}

.pivot-arrow {
  font-size: 12px;
  color: var(--digital-coral);
  transition: transform 0.3s;
}

.why-pivot.open .pivot-arrow {
  transform: rotate(180deg);
}

.pivot-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out-expo), padding 0.3s;
  padding: 0 20px;
  background: var(--pink-light);
  border-left: 2px dashed var(--dusty-pink);
  border-right: 2px dashed var(--dusty-pink);
  border-bottom: 2px dashed var(--dusty-pink);
}

.why-pivot.open .pivot-answer {
  max-height: 300px;
  padding: 16px 20px;
}

.pivot-answer p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--pixel-ink);
  opacity: 0.85;
}

.pivot-pointer {
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 16px;
  color: var(--digital-coral);
  margin-top: 12px;
  animation: pointer-bounce 1.5s ease-in-out infinite;
}

@keyframes pointer-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================================
   MODULE 3: INTERNSHIP
   ============================================================ */
.timeline-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
  scrollbar-width: thin;
}

.timeline-track {
  display: flex;
  gap: 32px;
  min-width: max-content;
  padding: 40px 20px;
  position: relative;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 3px;
  background: var(--linen-beige);
  transform: translateY(-50%);
  z-index: 0;
  /* Pixel dashed */
  background-image: repeating-linear-gradient(
    90deg,
    var(--linen-beige) 0,
    var(--linen-beige) 12px,
    transparent 12px,
    transparent 18px
  );
}

.timeline-item {
  position: relative;
  z-index: 1;
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background: var(--linen-beige);
  border: 3px solid var(--cream-canvas);
  margin-bottom: 20px;
  transition: background 0.3s, transform 0.3s;
}

.timeline-dot.active {
  background: var(--digital-coral);
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(215, 108, 77, 0.4); }
  50% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(215, 108, 77, 0); }
}

.timeline-card {
  background: var(--cream-light);
  border: 2px solid var(--linen-beige);
  padding: 24px;
  box-shadow: 4px 4px 0 var(--linen-beige);
  width: 100%;
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s;
}

.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: 4px 8px 0 var(--linen-beige);
}

.active-card {
  border-color: var(--digital-coral);
  box-shadow: 4px 4px 0 var(--digital-coral);
}

.active-badge {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: white;
  background: var(--digital-coral);
  display: inline-block;
  padding: 3px 10px;
  margin-bottom: 12px;
  animation: pixel-blink 1.5s steps(2) infinite;
}

.timeline-company {
  font-family: var(--font-cn);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-company-en {
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--linen-beige);
  font-weight: 400;
}

.timeline-period {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--sage-green);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.timeline-role {
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--digital-coral);
  margin-bottom: 12px;
}

.timeline-content {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.timeline-content ul {
  list-style: none;
  padding: 0;
}

.timeline-content li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
}

.timeline-content li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: var(--sage-green);
  font-size: 10px;
}

.timeline-insight {
  padding-top: 12px;
  border-top: 1px dashed var(--linen-beige);
}

.insight-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--muted-violet);
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.timeline-insight p:last-child {
  font-size: 13px;
  color: var(--pixel-ink);
  opacity: 0.75;
  font-style: italic;
}

@media (max-width: 768px) {
  .timeline-item {
    flex: 0 0 280px;
  }
}

/* Future Loop */
.future-loop {
  max-width: 700px;
  margin: 40px auto 0;
  padding: 20px 28px;
  background: linear-gradient(135deg, rgba(183, 199, 164, 0.15), rgba(199, 183, 232, 0.15));
  border: 2px dashed var(--sage-green);
  border-radius: 4px;
  position: relative;
}

.future-loop::before {
  content: 'FUTURE LOOP';
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--sage-green);
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--cream-canvas);
  padding: 0 8px;
}

.future-loop-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--pixel-ink);
  opacity: 0.85;
  font-style: italic;
}

/* ============================================================
   MODULE 4: PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

.project-card {
  perspective: 800px;
  cursor: pointer;
}

.project-card-inner {
  background: var(--cream-light);
  border: 2px solid var(--linen-beige);
  box-shadow: 4px 4px 0 var(--linen-beige);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.3s;
}

.project-card:hover .project-card-inner {
  transform: scale(1.02);
  box-shadow: 6px 6px 0 var(--linen-beige);
}

.project-photo-wrap {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--linen-beige);
}

.project-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

.project-card:hover .project-photo-wrap img {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 38, 31, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-view-hint {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: white;
  letter-spacing: 2px;
  padding: 8px 16px;
  border: 2px solid white;
}

.project-info {
  padding: 20px;
}

.project-category {
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.project-category.finance {
  color: var(--muted-violet);
  border: 1px solid var(--muted-violet);
  background: var(--violet-light);
}

.project-category.operation {
  color: var(--sage-green);
  border: 1px solid var(--sage-green);
  background: var(--sage-light);
}

.project-category.planning {
  color: var(--dusty-pink);
  border: 1px solid var(--dusty-pink);
  background: var(--pink-light);
}

.project-category.design {
  color: var(--digital-coral);
  border: 1px solid var(--digital-coral);
  background: var(--coral-light);
}

.project-title {
  font-family: var(--font-cn);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--pixel-ink);
  opacity: 0.75;
}

.project-link {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--digital-coral);
  border: 1px solid var(--digital-coral);
  padding: 4px 10px;
  letter-spacing: 1px;
  transition: background 0.2s, color 0.2s;
}

.project-link:hover {
  background: var(--digital-coral);
  color: white;
}

/* ============================================================
   MODULE 5: ACHIEVEMENTS
   ============================================================ */
.badge-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--cream-light);
  border: 2px solid var(--linen-beige);
  box-shadow: 3px 3px 0 var(--linen-beige);
  width: calc(50% - 10px);
  min-width: 260px;
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s;
}

.badge-item:hover {
  transform: translateY(-3px) rotate(-0.5deg);
  box-shadow: 5px 5px 0 var(--linen-beige);
}

@media (max-width: 600px) {
  .badge-item {
    width: 100%;
  }
}

.badge-icon {
  font-size: 36px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-canvas);
  border: 2px solid var(--linen-beige);
  flex-shrink: 0;
}

.badge-info h4 {
  font-family: var(--font-cn);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.badge-info p {
  font-size: 13px;
  color: var(--pixel-ink);
  opacity: 0.7;
}

.badge-download {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--digital-coral);
  border: 1px solid var(--digital-coral);
  padding: 3px 10px;
  letter-spacing: 1px;
  transition: background 0.2s, color 0.2s;
}

.badge-download:hover {
  background: var(--digital-coral);
  color: white;
}

.badge-paper-title {
  font-size: 13px;
  line-height: 1.6;
  color: var(--pixel-ink);
  font-style: italic;
  margin-bottom: 4px;
}

.badge-paper-pub {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--muted-violet);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.badge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(183, 199, 164, 0.2);
  border: 1px solid var(--sage-green);
  color: var(--pixel-ink);
  border-radius: 2px;
  font-family: var(--font-cn);
}

.badge-hint {
  font-size: 12px;
  color: var(--muted-violet);
  margin-top: 4px;
}

.badge-photos {
  margin-top: 10px;
}

.badge-photos img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border: 2px solid var(--linen-beige);
  box-shadow: 2px 2px 0 var(--linen-beige);
}

.badge-photos-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-photos-grid img {
  width: calc(33.33% - 6px);
  min-width: 80px;
  height: 60px;
  object-fit: cover;
}

/* ============================================================
   MODULE 6: SKILLS
   ============================================================ */
.skills-container {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

#skills-radar {
  max-width: 400px;
  max-height: 400px;
  width: 100%;
}

.skills-bars {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-bar-item {
  display: grid;
  grid-template-columns: 48px 1fr 32px;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
  transition-delay: var(--delay, 0s);
}

.skill-bar-item.in-view {
  opacity: 1;
  transform: translateX(0);
}

.skill-bar-label {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--pixel-ink);
  text-align: right;
  letter-spacing: 1px;
}

.skill-bar-track {
  height: 14px;
  background: var(--linen-beige);
  position: relative;
  overflow: hidden;
  /* Pixel track */
  image-rendering: pixelated;
}

.skill-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sage-green), var(--dusty-pink), var(--muted-violet));
  transition: width 1.2s var(--ease-out-expo);
  position: relative;
}

.skill-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--digital-coral);
}

.skill-bar-item.in-view .skill-bar-fill {
  width: var(--target-width);
}

.skill-bar-value {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--digital-coral);
}

/* ============================================================
   MODULE 7: CONTACT
   ============================================================ */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--cream-light);
  border: 2px solid var(--linen-beige);
  box-shadow: 3px 3px 0 var(--linen-beige);
  transition: transform 0.3s var(--ease-bounce);
}

.contact-card:hover {
  transform: translateX(4px);
}

.contact-icon {
  font-size: 28px;
}

.contact-detail h4 {
  font-family: var(--font-cn);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.contact-detail a {
  font-family: var(--font-hand);
  font-size: 18px;
}

/* Message Board */
.message-board {
  background: var(--cream-light);
  border: 2px solid var(--linen-beige);
  padding: 24px;
  box-shadow: 4px 4px 0 var(--linen-beige);
}

.board-title {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--pixel-ink);
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.board-subtitle {
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--linen-beige);
  margin-left: 8px;
  letter-spacing: 0;
}

.sticky-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  min-height: 80px;
}

.sticky-note {
  background: var(--note-color, #FFF7E8);
  padding: 14px 18px;
  width: fit-content;
  max-width: 200px;
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--pixel-ink);
  transform: rotate(var(--rot, 0deg));
  box-shadow: 2px 2px 6px rgba(42, 38, 31, 0.1);
  border-top: 3px solid rgba(42, 38, 31, 0.08);
  animation: note-appear 0.4s var(--ease-bounce);
  position: relative;
}

.sticky-note::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 8px;
  background: rgba(233, 216, 182, 0.6);
  border-radius: 0;
}

@keyframes note-appear {
  from { opacity: 0; transform: rotate(var(--rot, 0deg)) scale(0.8) translateY(10px); }
  to { opacity: 1; transform: rotate(var(--rot, 0deg)) scale(1) translateY(0); }
}

.note-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.note-input {
  flex: 1;
  font-family: var(--font-hand);
  font-size: 16px;
  padding: 12px 16px;
  border: 2px solid var(--linen-beige);
  background: var(--cream-canvas);
  color: var(--pixel-ink);
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}

.note-input:focus {
  border-color: var(--digital-coral);
}

.note-submit {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: white;
  background: var(--digital-coral);
  padding: 12px 18px;
  border: 2px solid var(--pixel-ink);
  letter-spacing: 1px;
  transition: transform 0.2s, background 0.2s;
  white-space: nowrap;
}

.note-submit:hover {
  background: var(--pixel-ink);
  transform: translateY(-2px);
}

.note-submit:active {
  transform: translateY(0);
}

/* ============================================================
   FOOTER
   ============================================================ */
.bg-credit {
  text-align: center;
  padding: 20px;
  font-family: 'Caveat', cursive;
  font-size: 12px;
  color: rgba(42, 38, 31, 0.4);
  position: relative;
  z-index: 1;
  background-image: url('images/background/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px;
  border-top: 2px dashed var(--linen-beige);
  background-image: url('images/background/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.footer-text {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--pixel-ink);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.footer-name {
  color: var(--digital-coral);
}

.footer-pixel {
  color: var(--linen-beige);
}

.footer-sub {
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--linen-beige);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 38, 31, 0.6);
  backdrop-filter: blur(8px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 24px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--cream-light);
  border: 2px solid var(--linen-beige);
  box-shadow: 8px 8px 0 var(--linen-beige);
  max-width: 500px;
  width: 100%;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s var(--ease-bounce);
}

.modal-overlay.open .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 24px;
  color: var(--pixel-ink);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--linen-beige);
  background: var(--cream-canvas);
  z-index: 10;
  transition: border-color 0.2s;
}

.modal-close:hover {
  border-color: var(--digital-coral);
}

.modal-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: var(--linen-beige);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  padding: 24px;
}

.modal-info h3 {
  font-family: var(--font-cn);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-info p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--pixel-ink);
  opacity: 0.8;
}

/* ============================================================
   UTILITY: Paper texture overlay
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ============================================================
   ADDITIONAL DECORATIVE ELEMENTS
   ============================================================ */

/* Organic decorative borders for sections */
.section-education::before,
.section-achievements::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 20'%3E%3Cpath d='M0 10 Q15 0 30 10 Q45 20 60 10' fill='none' stroke='%23B8C7A4' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* Floating decorative dots */
.section-home::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 5%;
  width: 8px;
  height: 8px;
  background: var(--dusty-pink);
  opacity: 0.3;
  animation: float-dot 4s ease-in-out infinite;
}

@keyframes float-dot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Pixel corner decorations for cards */
.edu-card .card-front::before,
.timeline-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 8px;
  height: 8px;
  border-top: 3px solid var(--digital-coral);
  border-left: 3px solid var(--digital-coral);
}
