
:root {
  /* Color Palette — Notebook / Journal Aesthetic */
  --color-bg: #eae6df;
  --color-bg-elevated: #f0ece5;
  --color-bg-card: #f5f2eb;
  --color-bg-card-hover: #faf8f3;
  --color-border: #c4bfb5;
  --color-border-bright: #a8a298;
  --color-rule: #b8b3a8;

  --color-text: #2a2824;
  --color-text-dim: #5a564c;
  --color-text-muted: #8a867c;
  --color-text-faint: #a8a498;

  --color-accent: #000;
  --color-accent-dim: #333;
  --color-accent-bright: #000;

  --color-green: #4a7a3a;
  --color-green-bright: #6b9e5c;
  --color-green-dim: #3a6030;

  --color-orange: #000;
  --color-orange-bright: #333;
  --color-orange-dim: #000;

  --color-blue: #4a6a8e;
  --color-blue-bright: #6a8abe;

  --color-red: #a84a3a;
  --color-red-bright: #c86a5a;

  --color-purple: #7a5a8e;
  --color-purple-bright: #9d7ab8;

  /* Sticky note colors */
  --sticky-yellow: #fdf3c7;
  --sticky-mint: #d1fae5;
  --sticky-pink: #fce7f3;
  --sticky-blue: #dbeafe;
  --sticky-orange: #fed7aa;
  --sticky-lavender: #ede9fe;

  /* Typography */
  --font-display: 'Caveat', cursive;
  --font-mono: 'Courier Prime', monospace;
  --font-ui: 'Caveat', cursive;
  --font-body: 'Caveat', cursive;
  --font-handwrite: 'Caveat', cursive;
  --font-typewriter: 'Courier Prime', monospace;

  --font-size-xs: 0.625rem;    /* 10px */
  --font-size-sm: 0.75rem;     /* 12px */
  --font-size-base: 0.875rem;  /* 14px */
  --font-size-md: 1rem;        /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.5rem;      /* 24px */
  --font-size-2xl: 2rem;       /* 32px */
  --font-size-3xl: 3rem;       /* 48px */
  --font-size-4xl: 4rem;       /* 64px */
  --font-size-5xl: 6rem;       /* 96px */

  /* Fluid Typography Scale */
  --text-display: clamp(2.5rem, 8vw, 6rem);
  --text-h1: clamp(2rem, 5vw, 4rem);
  --text-h2: clamp(1.5rem, 3vw, 2.5rem);
  --text-h3: clamp(1.125rem, 2vw, 1.5rem);
  --text-body: clamp(0.875rem, 1.5vw, 1rem);
  --text-small: clamp(0.75rem, 1vw, 0.875rem);
  --text-tiny: clamp(0.625rem, 0.8vw, 0.75rem);

  /* Spacing Scale (4px base) */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */
  --space-5xl: 8rem;     /* 128px */

  /* Container */
  --container-max: 1200px;
  --container-padding: 1.5rem;

  /* Easing Curves — Premium, Analog Feel */
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-sharp: cubic-bezier(0.4, 0, 0.6, 1);

  /* Transitions */
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 300ms var(--ease-out);
  --transition-slow: 500ms var(--ease-out);
  --transition-slower: 800ms var(--ease-out-expo);

  /* Border Radius */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Shadows — Soft, Analog */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 32px rgba(0, 0, 0, 0.15);
  --shadow-glow-green: 0 0 24px rgba(107, 142, 92, 0.2);

  /* Z-Index Scale */
  --z-bg: 0;
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-nav: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-cursor: 9999;
  --z-boot: 10000;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  /* Hand-drawn lined paper: slightly imperfect lines */
  background-image:
    /* Red margin line - slightly wobbly */
    linear-gradient(90deg, transparent 68px, rgba(200, 80, 80, 0.25) 68px, rgba(200, 80, 80, 0.25) 70px, transparent 70px),
    /* Horizontal ruled lines - slightly varied spacing */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 26px,
      rgba(180, 175, 165, 0.35) 26px,
      rgba(180, 175, 165, 0.35) 27px
    );
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

::-moz-selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-bright);
}

::-webkit-scrollbar-corner {
  background: var(--color-bg);
}


.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  opacity: 0.04;
  mix-blend-mode: multiply;
}

.crt-overlay .scanlines {
  display: none;
}

.crt-overlay .vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.15) 100%);
  pointer-events: none;
}

.crt-overlay .chromatic-aberration {
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.crt-overlay .film-grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  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)'/%3E%3C/svg%3E");
  animation: grain-shift 0.2s infinite steps(10);
}

.paper-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-bg);
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.02' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* Animations for textures */
@keyframes scanline-flicker {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.4; }
}

@keyframes chromatic-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(0.5px, -0.5px); }
  50% { transform: translate(-0.5px, 0.5px); }
  75% { transform: translate(0.5px, 0.5px); }
  100% { transform: translate(-0.5px, -0.5px); }
}

@keyframes grain-shift {
  0% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-1px, 1px) rotate(1deg); }
  20% { transform: translate(1px, -1px) rotate(-1deg); }
  30% { transform: translate(-1px, -1px) rotate(0.5deg); }
  40% { transform: translate(1px, 1px) rotate(-0.5deg); }
  50% { transform: translate(0, 0) rotate(0deg); }
  60% { transform: translate(-1px, 1px) rotate(1deg); }
  70% { transform: translate(1px, -1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(0.5deg); }
  90% { transform: translate(1px, 1px) rotate(-0.5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Reduced motion disables texture animations */
@media (prefers-reduced-motion: reduce) {
  .crt-overlay .scanlines,
  .crt-overlay .chromatic-aberration,
  .crt-overlay .film-grain {
    animation: none !important;
  }
}






.paper-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-bg);
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.02' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
  /* Transparent so lined paper body shows through */
  background: transparent;
}

.section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
}

.section > * {
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 80px);
  /* Slight random tilt for organic feel */
  transform: rotate(-0.3deg);
}
.section-header:nth-of-type(even) {
  transform: rotate(0.4deg);
}

#showcase .section-header,
.showcase .section-header {
  margin-left: -60px;
}

.section-label {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-small);
  color: #888;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  color: #2b2621;
  margin-bottom: 6px;
  text-shadow:
    0 0 4px rgba(244, 240, 234, 0.9),
    0 0 10px rgba(244, 240, 234, 0.5);
}

.section-desc {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  color: #666;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

.section-divider {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* Torn/rough paper edge */
.section-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.08) 0px,
    rgba(0, 0, 0, 0.08) 6px,
    transparent 6px,
    transparent 10px,
    rgba(0, 0, 0, 0.05) 10px,
    rgba(0, 0, 0, 0.05) 14px,
    transparent 14px,
    transparent 20px
  );
  transform: rotate(-0.3deg);
}

.divider-text {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-small);
  text-transform: lowercase;
  color: #aaa;
  background: var(--color-bg);
  padding: 0 14px;
  position: relative;
  z-index: 1;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--container-padding);
  background: rgba(234, 230, 223, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.nav.scrolled {
  background: rgba(234, 230, 223, 0.95);
  border-bottom-color: var(--color-border-bright);
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
}

.nav-left {
  gap: var(--space-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.logo-mark {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: var(--text-small);
  color: var(--color-text-dim);
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition-fast);
  /* Slight random rotations for handwritten feel */
  display: inline-block;
}
.nav-link:nth-child(1) { transform: rotate(-1.5deg); }
.nav-link:nth-child(2) { transform: rotate(0.8deg); }
.nav-link:nth-child(3) { transform: rotate(-0.5deg); }
.nav-link:nth-child(4) { transform: rotate(1.2deg); }
.nav-link:nth-child(5) { transform: rotate(-0.8deg); }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 0;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width var(--transition-base);
  transform: rotate(-0.5deg);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 110%;
}

.nav-right {
  gap: var(--space-lg);
}

.system-status {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-green);
  animation: pulse-status 2s infinite;
  box-shadow: 0 0 8px var(--color-green);
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: var(--z-nav) + 1;
}

.toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: var(--z-sticky);
  pointer-events: none;
}

.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-green));
  transform-origin: left;
  transition: width 0.1s linear;
}

.hero {
  position: relative;
  min-height: 100vh;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-bg);
  overflow: hidden;
  background: url('../images/crumpled-paper.jpg') center/cover no-repeat;
}

.hero-margin-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 90px;
  width: 2px;
  background: rgba(200, 50, 50, 0.35);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 100% 27px;
  background-position: 0 0;
  opacity: 0.5;
}

/* Hero Stickers */
.hero-stickers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hero-sticker {
  position: absolute;
  object-fit: contain;
  cursor: grab;
  pointer-events: all;
  user-select: none;
  transition: filter 0.2s;
}

.hero-sticker:active {
  cursor: grabbing;
}

.hero-crown {
  width: 120px;
  position: absolute;
  top: -68px;
  right: -40px;
  transform: rotate(12deg);
  pointer-events: none;
}

.sticker-1 {
  width: 130px;
  top: 15%;
  left: 5%;
  transform: rotate(-15deg);
}

.sticker-2 {
  width: 125px;
  top: 20%;
  right: 8%;
  transform: rotate(12deg);
}

.sticker-3 {
  width: 140px;
  bottom: 25%;
  left: 8%;
  transform: rotate(8deg);
}

.sticker-4 {
  width: 130px;
  bottom: 20%;
  right: 5%;
  transform: rotate(-10deg);
}

.sticker-5 {
  width: 120px;
  top: 60%;
  left: 15%;
  transform: rotate(5deg);
}

.sticker-6 {
  width: 130px;
  top: 55%;
  right: 12%;
  transform: rotate(-8deg);
}

.hero-content-container {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-base);
}

.hero-content-container .hero-content {
  pointer-events: auto;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 700px;
}

.hero-title {
  font-family: 'Caveat', cursive;
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 1;
  color: #1a1a18;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: #555555;
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Quick Index — scribbled list */
.hero-index {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-lg);
  font-family: 'Caveat', cursive;
  font-size: var(--text-xl);
  color: #965a2a;
}

.index-item {
  transform: rotate(-0.5deg);
}

.index-item:nth-child(2) { transform: rotate(0.3deg); margin-left: 5px; }
.index-item:nth-child(3) { transform: rotate(-0.8deg); margin-left: 2px; }
.index-item:nth-child(4) { transform: rotate(0.5deg); margin-left: 8px; }

/* Sketchy text links */
.hero-cta {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: var(--space-2xl);
}

.link-sketchy {
  font-family: 'Caveat', cursive;
  font-size: var(--text-xl);
  font-weight: 700;
  color: #2b2621;
  text-decoration: none;
  border-bottom: 2px solid #2b2621;
  padding-bottom: 2px;
  transition: all var(--transition-fast);
  transform: rotate(-0.5deg);
}

.link-sketchy:nth-child(2) {
  transform: rotate(0.8deg);
  margin-left: 15px;
}

.link-sketchy:hover {
  color: #965a2a;
  border-color: #965a2a;
  transform: rotate(0deg) translateX(5px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: 'Caveat', cursive;
  font-size: var(--text-lg);
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 700;
  padding: var(--space-sm) var(--space-xl);
  border: 2px solid #2b2621;
  border-radius: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  color: #2b2621;
  background: transparent;
}
  text-shadow:
    0 0 3px rgba(244, 240, 234, 0.8);
}

.btn-primary {
  background: #000;
  border-color: #000;
  color: #faf8f3;
}

.btn-primary:hover {
  background: #333;
  border-color: #333;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: #2b2621;
  border-color: #555555;
}

.btn-secondary:hover {
  border-color: #2b2621;
  color: #2b2621;
  background: rgba(43, 38, 33, 0.05);
}

.btn-sketchy {
  background: transparent;
  border: 2px solid #2b2621;
  color: #2b2621;
  transform: rotate(-0.5deg);
  transition: all var(--transition-fast);
}

.btn-sketchy:nth-child(2) {
  transform: rotate(0.8deg);
}

.btn-sketchy:hover {
  background: #2b2621;
  color: #faf8f3;
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
}

.btn-arrow {
  transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* Magnetic buttons handled by JS */

.archive-card {
  position: relative;
  background: #faf8f3;
  border: none;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow:
    2px 3px 0 rgba(0, 0, 0, 0.08),
    -1px -1px 0 rgba(0, 0, 0, 0.03);
}

.archive-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.archive-card:hover {
  box-shadow:
    4px 5px 0 rgba(0, 0, 0, 0.12),
    -1px -1px 0 rgba(0, 0, 0, 0.04);
  transform: translateY(-3px) rotate(0deg) !important;
}

.archive-card:hover::before {
  opacity: 1;
}

/* Corner Decorations */
.card-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid var(--color-border);
  pointer-events: none;
  transition: border-color var(--transition-base);
}

.card-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: var(--radius-md) 0 0 0; }
.card-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 var(--radius-md) 0 0; }
.card-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 var(--radius-md); }
.card-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 var(--radius-md) 0; }

.archive-card:hover .card-corner {
  border-color: #000;
}

.about {
  /* brownie background inherited from .section */
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.archive-card .card-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.card-number {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  opacity: 0.7;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
}

.card-body {
  margin-bottom: var(--space-lg);
}

.card-text {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-text-dim);
  margin-bottom: var(--space-md);
}

.card-text:last-child {
  margin-bottom: 0;
}

.card-reflection {
  font-style: italic;
  color: var(--color-accent) !important;
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-md);
  margin-top: var(--space-lg) !important;
}

.highlight {
  color: var(--color-accent);
  font-weight: 700;
}

.card-onepiece {
  border-left: 2px solid var(--color-orange);
  padding-left: var(--space-md);
  margin-top: var(--space-lg) !important;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.spec {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.spec-label {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.spec-value {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tag {
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-dim);
  transition: all var(--transition-fast);
}

.tag:hover {
  border-color: #000;
  color: #000;
}

/* Anime Grid */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.anime-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.anime-item:hover {
  border-color: #000;
  transform: translateX(4px);
}

.anime-rank {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent);
  min-width: 2.5em;
}

.anime-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.card-image,
.media-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin: 0;
  opacity: 0.8;
  cursor: pointer;
}

.card-image img,
.media-item img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(115%) brightness(90%);
  transition: filter 0.35s ease-out, transform 0.35s ease-out;
}

/* CRT scanline overlay */
.card-image::after,
.media-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.35s ease-out;
}

/* Hover: full color + glitch jitter */
.card-image:hover img,
.media-item:hover img {
  filter: grayscale(0%) contrast(100%) brightness(100%);
  transform: translateY(-2px);
}

.card-image:hover::after,
.media-item:hover::after {
  opacity: 0.3;
}

@keyframes glitch-jitter {
  0% { transform: translateY(0); }
  33% { transform: translateY(-2px); }
  66% { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

.card-image:hover,
.media-item:hover {
  animation: glitch-jitter 0.15s steps(3) 1;
}

/* Metadata overlay */
.image-meta {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  z-index: 3;
  opacity: 0.7;
  text-transform: uppercase;
  background: rgba(26, 26, 24, 0.7);
  padding: 2px 6px;
  border-radius: 2px;
}

/* Reduced motion: skip jitter */
@media (prefers-reduced-motion: reduce) {
  .card-image:hover,
  .media-item:hover {
    animation: none;
  }
  .card-image:hover img,
  .media-item:hover img {
    transform: none;
  }
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.interest-card {
  padding: var(--space-xl) var(--space-lg);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  margin: var(--space-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.interest-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  border-radius: var(--radius-md);
}

.interest-card > * {
  position: relative;
  z-index: 1;
}

.interest-card:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.interest-card:hover::before {
  background: transparent;
}

.interest-card:nth-child(1) { border-left: 1px solid var(--color-border); }

.interest-title {
  font-family: 'Rock Salt', cursive;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 400;
  color: #000;
  margin-bottom: var(--space-md);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.interest-desc {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--color-text-dim);
}

/* Ticker / Marquee */
.interests-ticker {
  margin-top: var(--space-3xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  overflow: hidden;
}

.ticker-text {
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-text-faint);
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-text {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 700px) {
  .interests-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .interests-grid {
    grid-template-columns: 1fr;
  }
  .interest-card {
    border-left: none;
    border-top: 1px solid var(--color-border);
  }
  .interest-card:first-child {
    border-top: none;
  }
}

.media-archive {
  margin-top: var(--space-xl);
}

.media-archive-title {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  text-align: center;
}

.media-grid {
  columns: 3;
  column-gap: 6px;
}

.media-item {
  break-inside: avoid;
  margin-bottom: 6px;
}

.media-item:nth-child(7) {
  display: block;
}


/* Section wrapper — transparent so body lined paper shows */
.notebook-book-section {
  background: transparent;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  position: relative;
}

.notebook-book-section::before {
  display: none !important;
}

/* Book container with 3D perspective */
.notebook-book {
  width: 94%;
  max-width: 1300px;
  perspective: 2000px;
  position: relative;
}

.notebook-book-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
}

/* Each page */
.notebook-page {
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #faf8f3;
  border-radius: 3px;
  box-shadow:
    0 2px 20px rgba(0, 0, 0, 0.25),
    0 0 1px rgba(0, 0, 0, 0.1);
  padding: 28px 50px 56px 64px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  transition: opacity 0.4s ease, transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Hidden pages */
.notebook-page:not(.active) {
  display: none;
}

/* Red margin line */
.notebook-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50px;
  width: 1.5px;
  height: 100%;
  background: rgba(200, 50, 50, 0.35);
  z-index: 2;
}

/* Page states */
.notebook-page.active {
  display: flex;
}

.notebook-page:not(.active) {
  display: none;
}

/* Notebook header — like a real notebook top margin */
.nb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 3px solid rgba(0, 0, 0, 0.18);
  margin-bottom: 18px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.nb-date,
.nb-subject,
.nb-pagenum {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.5);
  font-style: italic;
  letter-spacing: 0.02em;
}

.nb-subject {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.6);
  font-style: italic;
  text-transform: lowercase;
}

/* Title area */
.nb-title-area {
  text-align: center;
  margin-bottom: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  padding: 12px 0;
  /* Lined paper on title area too */
  background-image:
    linear-gradient(rgba(70, 130, 190, 0.15) 1px, transparent 1px);
  background-size: 100% 26px;
  background-position: 0 -2px;
}

.nb-books-sticker {
  position: absolute;
  right: 20px;
  top: -10px;
  width: 120px;
  pointer-events: none;
}

.nb-brain-sticker {
  position: absolute;
  right: 20px;
  top: -10px;
  width: 120px;
  pointer-events: none;
}

.nb-laptop-sticker {
  position: absolute;
  left: 20%;
  top: 20%;
  transform: translate(-50%, -50%) rotate(-15deg);
  width: 130px;
  pointer-events: none;
}

.nb-clapper-sticker {
  position: absolute;
  left: calc(50% - 260px);
  top: 45%;
  transform: translate(-50%, -50%) rotate(-5deg);
  width: 110px;
  pointer-events: none;
}

.nb-cat-sticker {
  position: absolute;
  right: -5px;
  top: -65px;
  width: 100px;
  pointer-events: none;
  z-index: 1;
}

.fixed-white-cat {
  position: fixed;
  bottom: 20px;
  right: 5px;
  left: auto;
  width: 100px;
  pointer-events: none;
  z-index: 9999;
}

.contact-terminal-wrap {
  position: relative;
}

.nb-title {
  font-family: 'Caveat', cursive;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  color: #1a1a18;
  line-height: 1.15;
  margin: 0 0 6px 0;
}

.nb-subtitle {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500;
  color: rgba(0, 0, 0, 0.4);
  margin: 0;
}

/* 3-column layout */
.nb-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 3;
  /* Lined paper background only on columns */
  background-image:
    linear-gradient(rgba(70, 130, 190, 0.15) 1px, transparent 1px);
  background-size: 100% 26px;
  background-position: 0 -2px;
}

/* 2-column layout for interests (3x3 grid) */
.nb-cols-2 {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: 0;
}

.nb-col {
  padding: 8px 18px;
  border-right: 1.5px solid rgba(0, 0, 0, 0.1);
  overflow: visible;
  display: flex;
  flex-direction: column;
  /* Solid dividing line between columns */
  border-bottom: 2px solid rgba(0, 0, 0, 0.12);
}

.nb-col:nth-child(3n) {
  border-right: none;
}

.nb-col:nth-last-child(-n+3) {
  border-bottom: none;
}

/* Notebook Section Layout - Matches overlay image */
.nb-section {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  min-height: 200px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 20px;
}

.nb-section:last-of-type {
  border-bottom: none;
}

.nb-section-left {
  flex-direction: row;
}

.nb-section-right {
  flex-direction: row;
}

.nb-image-box {
  width: 200px;
  min-width: 200px;
  height: 200px;
  border: 2px solid #1a1a18;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nb-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%) contrast(105%);
  transition: filter 0.3s ease;
}

.nb-image-box:hover img {
  filter: grayscale(0%) contrast(100%);
}

.nb-writing-area {
  flex: 1;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
}

.nb-lines {
  flex: 1;
  background-image:
    linear-gradient(rgba(70, 130, 190, 0.15) 1px, transparent 1px);
  background-size: 100% 26px;
  background-position: 0 -2px;
  padding: 5px 0;
}

.nb-heading {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  color: #1a1a18;
  margin-bottom: 10px;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 4px;
  text-decoration-color: rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.nb-text {
  font-family: 'Caveat', cursive;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 500;
  line-height: 26px;
  color: #2a2824;
  margin-bottom: 12px;
}

.nb-text em {
  font-style: italic;
  color: #1a1a18;
  font-weight: 700;
}

/* Photo with tape */
.nb-photo {
  position: relative;
  width: 90%;
  margin: 10px auto 0;
  background: #fff;
  padding: 6px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.nb-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 48px;
  height: 16px;
  background: rgba(210, 195, 160, 0.65);
  border: 1px solid rgba(180, 165, 130, 0.35);
  z-index: 3;
}

.nb-photo img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(35%) contrast(105%);
  transition: filter 0.3s ease;
}

.nb-photo:hover img {
  filter: grayscale(0%) contrast(100%);
}

/* Specs list */
.nb-specs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.nb-specs span {
  font-family: 'Caveat', cursive;
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  font-weight: 500;
  color: #555;
  line-height: 22px;
}

/* Navigation buttons */
.nb-next-btn,
.nb-prev-btn {
  position: absolute;
  bottom: 16px;
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  padding: 8px 22px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nb-next-btn {
  right: 20px;
}

.nb-prev-btn {
  left: 20px;
}

.nb-next-btn:hover,
.nb-prev-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.25);
  color: rgba(0, 0, 0, 0.7);
}

.nb-arrow {
  font-size: 0.9rem;
  display: inline-block;
}

.nb-prev-btn .nb-arrow {
  transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 900px) {
  .notebook-book {
    width: 95%;
  }

  .notebook-page {
    padding: 16px 24px 16px 40px;
  }

  .notebook-page::before {
    left: 32px;
  }

  .nb-cols,
  .nb-cols-2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nb-col {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0 0 6px 0;
  }

  .nb-col:last-child {
    border-bottom: none;
  }

  .nb-photo {
    width: 60%;
  }
}

@media (max-width: 600px) {
  .notebook-book-section {
    padding: 12px 0;
  }

  .notebook-page {
    padding: 12px 16px 12px 32px;
  }

  .notebook-page::before {
    left: 24px;
  }

  .nb-title {
    font-size: 1.6rem;
  }

  .nb-header {
    flex-wrap: wrap;
    gap: 4px;
  }
}

.showcase-grid {
  max-width: 1100px;
  margin: 0 auto;
}

.showcase-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.showcase-card::before,
.showcase-card::after { display: none !important; }

/* Cloud box — SVG outline + videos inside */
.cloud-box {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.cloud-svg {
  display: block;
  width: 100%;
  height: auto;
}

.cloud-svg path {
  fill: white;
  stroke: #1a1a18;
}

.cloud-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 100px;
}

.showcase-videos-container::before,
.showcase-videos-container::after { display: none !important; }

.showcase-videos-row {
  display: flex;
  gap: clamp(24px, 5vw, 60px);
  justify-content: center;
  align-items: flex-start;
}

.showcase-video-wrap {
  position: relative;
  flex: 1;
  max-width: 260px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.showcase-video-wrap:nth-child(1) { transform: rotate(-1.5deg); }
.showcase-video-wrap:nth-child(2) { transform: rotate(1deg); }
.showcase-video-wrap:hover {
  transform: scale(1.06) rotate(0deg) !important;
  z-index: 10;
}

/* Tape strip */
.showcase-video-wrap::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 64px;
  height: 20px;
  background: rgba(210, 195, 160, 0.65);
  border: 1px solid rgba(180, 165, 130, 0.35);
  z-index: 5;
}

.showcase-label-top {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-small);
  color: #999;
  display: block;
  margin-bottom: 2px;
}

.showcase-title-top {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #2b2621;
  margin-bottom: 4px;
}

.showcase-desc-top {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: #777;
  margin-bottom: var(--space-lg);
}

.showcase-video {
  aspect-ratio: 9 / 16;
  background: transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.4s ease;
}

.showcase-video-wrap:hover .showcase-video {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.showcase-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.showcase-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
  transition: background 0.4s ease, opacity 0.4s ease;
  z-index: 2;
  border-radius: 12px;
}

.showcase-play-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

.showcase-play-btn svg {
  width: 48px;
  height: 48px;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  transition: transform 0.3s ease;
}

.showcase-play-btn:hover svg {
  transform: scale(1.1);
}

.showcase-play-btn .icon-pause {
  display: none;
}

/* When playing: button invisible but still clickable */
.showcase-video-wrap.playing .showcase-play-btn {
  background: transparent;
  opacity: 0;
}

.showcase-video-wrap.playing .showcase-play-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.2);
}

.showcase-video-wrap.playing .showcase-play-btn .icon-play {
  display: none;
}

.showcase-video-wrap.playing .showcase-play-btn .icon-pause {
  display: block;
}

.showcase-labels {
  display: none;
}

.showcase-label {
  flex: 1;
  max-width: 300px;
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-small);
  color: #999;
  text-align: center;
  /* Archival stamp look */
  border: 1.5px dashed #bbb;
  padding: 3px 10px;
  border-radius: 2px;
  display: inline-block;
}

@media (max-width: 700px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.project-category {
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  background: rgba(0, 0, 0, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.project-number {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-border);
  opacity: 0.5;
}

.project-media {
  margin: 0 calc(-1px * var(--space-lg)) var(--space-lg);
  padding: 0 var(--space-lg);
}

.project-preview {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.preview-terminal {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.preview-header {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.preview-dot.red { background: #c84a3a; }
.preview-dot.yellow { background: #c4a35a; }
.preview-dot.green { background: #6b8e5c; }

.preview-content {
  padding: var(--space-md);
  color: var(--color-text-dim);
}

.preview-prompt {
  color: var(--color-green-bright);
}

.preview-command {
  color: var(--color-accent);
}

.preview-output {
  display: block;
  margin-top: var(--space-xs);
  opacity: 0.7;
}

.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-lg) var(--space-lg);
}

.project-meta {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.project-year {
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.project-status {
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.status-active {
  background: rgba(107, 142, 92, 0.15);
  color: var(--color-green-bright);
  border: 1px solid var(--color-green);
}

.status-complete {
  background: rgba(0, 0, 0, 0.1);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.project-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.project-desc {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-dim);
  margin-bottom: var(--space-lg);
  flex: 1;
}

.project-features {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.project-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-dim);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.feature-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-top: 0.5em;
  flex-shrink: 0;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.tech {
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-dim);
  transition: all var(--transition-fast);
}

.tech:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.project-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-dim);
  background: transparent;
  transition: all var(--transition-fast);
}

.project-link:hover:not(.disabled) {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(0, 0, 0, 0.03);
}

.project-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.project-link svg {
  width: 16px;
  height: 16px;
}


.neu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.neu-card {
  display: flex;
  flex-direction: column;
}

.neu-card.archive-card {
  background: transparent;
  border: none;
  border-radius: 0;
}

.neu-card.archive-card::before {
  display: none;
}

.neu-card.archive-card:hover {
  transform: none;
  box-shadow: none;
}

.neu-box {
  position: relative;
  background: #faf8f3;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  padding: 28px 24px;
  box-shadow:
    3px 4px 0 rgba(0, 0, 0, 0.1),
    -1px -1px 0 rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  /* Chaotic rotations - each card different */
}
.neu-grid .neu-card:nth-child(1) .neu-box { transform: rotate(-1.5deg); }
.neu-grid .neu-card:nth-child(2) .neu-box { transform: rotate(0.8deg) translateY(4px); }
.neu-grid .neu-card:nth-child(3) .neu-box { transform: rotate(-0.3deg) translateY(-3px); }
.neu-box:hover {
  transform: rotate(0deg) translateY(-4px) !important;
  box-shadow:
    5px 6px 0 rgba(0, 0, 0, 0.14),
    -1px -1px 0 rgba(0, 0, 0, 0.04);
}

/* Washi tape accent - varied positions per card */
.neu-box::before {
  content: '';
  position: absolute;
  top: -7px;
  height: 15px;
  background: rgba(210, 195, 160, 0.5);
  border: 1px solid rgba(180, 165, 130, 0.3);
  z-index: 2;
}
.neu-grid .neu-card:nth-child(1) .neu-box::before {
  left: 16px;
  right: 40%;
  transform: rotate(-2deg);
}
.neu-grid .neu-card:nth-child(2) .neu-box::before {
  left: 30%;
  right: 16px;
  transform: rotate(1.5deg);
}
.neu-grid .neu-card:nth-child(3) .neu-box::before {
  left: 20%;
  right: 20%;
  transform: rotate(-0.5deg);
}

.neu-box > * {
  position: relative;
  z-index: 1;
}

.neu-index {
  font-family: 'Courier Prime', monospace;
  font-size: 42px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.05);
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

.neu-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #2b2621;
  margin-bottom: 10px;
  line-height: 1.1;
}

.neu-desc {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.55;
  color: #555;
  margin-bottom: 14px;
}

.neu-features {
  font-family: var(--font-body);
  font-size: var(--text-small);
  line-height: 1.6;
  color: #888;
  margin-bottom: 14px;
}

.neu-tech {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-small);
  color: #888;
  margin-bottom: 18px;
  padding-top: 10px;
  border-top: 1.5px solid rgba(0, 0, 0, 0.08);
}

.neu-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.neu-link {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #965a2a;
  text-decoration: none;
  transition: all 0.2s;
  /* Rubber stamp border */
  border: 1.5px solid #000;
  padding: 4px 12px;
  border-radius: 2px;
  display: inline-block;
}

.neu-link:hover {
  color: #2b2621;
  border-color: #2b2621;
  background: rgba(0, 0, 0, 0.03);
}

.neu-sep {
  color: #ccc;
  font-family: var(--font-body);
  font-size: 14px;
}

.neu-link--disabled {
  opacity: 0.3;
  cursor: not-allowed;
  color: #999;
}

.contact {
  /* notebook background inherited */
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: 22px 28px;
  text-align: left;
  background: #faf8f3;
  border: none;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow:
    2px 3px 0 rgba(0, 0, 0, 0.08),
    -1px -1px 0 rgba(0, 0, 0, 0.03);
  transition: all var(--transition-base);
}
.contact-links .contact-card:nth-child(1) { transform: rotate(-0.8deg); }
.contact-links .contact-card:nth-child(2) { transform: rotate(0.5deg); }
.contact-links .contact-card:nth-child(3) { transform: rotate(-0.3deg); }
.contact-links .contact-card:nth-child(4) { transform: rotate(0.6deg); }
.contact-card:hover {
  transform: rotate(0deg) translateY(-3px) !important;
  box-shadow:
    4px 5px 0 rgba(0, 0, 0, 0.12),
    -1px -1px 0 rgba(0, 0, 0, 0.04);
}

.contact-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #bbb;
  border-radius: 2px;
  color: #777;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.contact-card:hover .contact-icon {
  border-color: #000;
  color: #000;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.contact-label {
  font-family: 'Courier Prime', monospace;
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
}

.contact-value {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: #2b2621;
}

.contact-arrow {
  margin-left: auto;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 2px;
  color: #bbb;
  transition: all var(--transition-fast);
}

.contact-card:hover .contact-arrow {
  border-color: #000;
  color: #000;
  transform: translateX(3px);
}

.contact-arrow svg {
  width: 14px;
  height: 14px;
}

/* Contact Terminal — CRT on Graph Paper */
.contact-terminal {
  height: 100%;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  position: relative;
  /* Graph paper background */
  background: #f5f2eb;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
  overflow: visible;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-text);
  border-bottom: 2px dashed var(--color-border);
  position: relative;
  overflow: visible;
}

.terminal-dots {
  display: flex;
  gap: var(--space-xs);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-r { background: #c84a3a; }
.dot-y { background: #c4a35a; }
.dot-g { background: #6b8e5c; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.terminal-output {
  flex: 1;
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  line-height: 1.7;
  color: var(--color-text-dim);
  overflow-y: auto;
}

.terminal-output .line {
  margin-bottom: var(--space-xs);
}

.terminal-output .prompt {
  color: var(--color-green);
}

.terminal-output .command {
  color: var(--color-accent);
}

.terminal-output .output {
  color: var(--color-text);
}

.terminal-output .error {
  color: var(--color-red);
}

.terminal-output .success {
  color: var(--color-green);
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.prompt {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--color-green);
  white-space: nowrap;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text);
  caret-color: var(--color-green-bright);
}

.terminal-input::placeholder {
  color: var(--color-text-faint);
}

.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--color-border);
  background: url('../images/brownie.jpg') center/cover no-repeat fixed;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.88);
}

.footer > * {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-dim);
  max-width: 300px;
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-nav-label {
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.footer-link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-dim);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}

.copyright {
  font-family: var(--font-ui);
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.footer-note {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-text-faint);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slower), transform var(--transition-slower);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade-up"] {
  transform: translateY(40px);
}

[data-reveal="typewriter"] {
  transform: none;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--color-accent);
  animation: typewriter 2s steps(40) forwards, blink-caret 1s infinite;
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  0%, 50% { border-color: var(--color-accent); }
  51%, 100% { border-color: transparent; }
}

[data-reveal="stagger"] > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slower), transform var(--transition-slower);
}

[data-reveal="stagger"].visible > * {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="stagger"].visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal="stagger"].visible > *:nth-child(2) { transition-delay: 100ms; }
[data-reveal="stagger"].visible > *:nth-child(3) { transition-delay: 200ms; }
[data-reveal="stagger"].visible > *:nth-child(4) { transition-delay: 300ms; }
[data-reveal="stagger"].visible > *:nth-child(5) { transition-delay: 400ms; }
[data-reveal="stagger"].visible > *:nth-child(6) { transition-delay: 500ms; }
[data-reveal="stagger"].visible > *:nth-child(7) { transition-delay: 600ms; }
[data-reveal="stagger"].visible > *:nth-child(8) { transition-delay: 700ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  [data-reveal] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

[ data-tilt ] {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.3s var(--ease-out);
}

.reduced-motion-notice {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: notice-enter 0.5s var(--ease-out);
}

.reduced-motion-notice svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.reduced-motion-notice span {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-text);
}

@keyframes notice-enter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .neu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-center {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    padding: var(--space-3xl) var(--space-xl) var(--space-xl);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: var(--z-nav);
    display: flex;
    flex-direction: column;
  }

  .nav-center.open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: var(--space-sm) 0;
    font-size: var(--text-base);
  }

  .nav-toggle {
    display: flex;
  }

  .system-status {
    display: none;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-md);
  }

  .stat-divider {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .neu-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-links {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-tagline {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .hero-terminal {
    font-size: var(--text-tiny);
  }

  .project-header {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }

  .neu-box {
    padding: 24px 20px;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  }

  .neu-index {
    font-size: 36px;
  }

  .neu-title {
    font-size: 18px;
    letter-spacing: 0.1em;
  }

  .neu-desc {
    font-size: 12px;
  }

  .neu-features {
    font-size: 9px;
  }

  .neu-tech {
    font-size: 8px;
  }
}

@media print {
  .crt-overlay,
  .paper-texture,
  .nav,
  .scroll-progress,
  .boot-sequence,
  .hero-scroll,
  .contact-terminal,
  .footer {
    display: none !important;
  }

  .section {
    padding: var(--space-xl) 0;
    page-break-inside: avoid;
  }

  body {
    background: white;
    color: black;
  }

  .archive-card {
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }

  a {
    text-decoration: underline;
  }
}
