/* ============================================================
   Lee Hyowon Portfolio — Fractal Glass Edition
   ============================================================ */

:root {
  --ink: #161412;
  --ink-soft: #4a4642;
  --gray: #8d8781;
  --cream: #f5f5f4;
  --cream-deep: #ececeb;
  --paper: #fafafa;
  --line: rgba(22, 20, 18, 0.1);
  --dark: #141210;
  --dark-2: #1d1a17;

  --serif: "Instrument Serif", "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --grain-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: #fff;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: keep-all;
}

::selection { background: var(--ink); color: var(--cream); }

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- page sheet ---------- */
.sheet {
  position: relative;
  z-index: 1;
  background: #fff;
  overflow: hidden;
}

/* ---------- progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 200;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--cream);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line);
  padding: 14px 40px;
}
.logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a {
  position: relative;
  padding: 4px 0;
  color: var(--ink-soft);
  transition: color 0.25s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.site-nav a.nav-cta {
  padding: 9px 20px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--cream);
}
.site-nav a.nav-cta::after { display: none; }
.site-nav a.nav-cta:hover { background: #000; color: #fff; }

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  align-items: center;
  z-index: 120;
}
.menu-btn span {
  display: block;
  width: 18px; height: 1.8px;
  background: var(--ink);
  transition: transform 0.35s var(--ease-out);
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ============================================================
   HERO + FRACTAL GLASS
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: left;
  padding: 100px 24px 80px;
  overflow: hidden;
  margin-top: -87px; /* pull behind sticky header */
}

/* Keep decorative layers composited within the hero's opaque rendering group. */
.hero-bg { position: absolute; inset: 0; pointer-events: none; isolation: isolate; }

/* Native gradient halftone: crisp at device pixel resolution and SDR-bounded. */
.halftone {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #fff;
  dynamic-range-limit: standard;
  --halftone-cell: 14px;
  --halftone-edge: 0.9px;
  --halftone-mid: 2.1px;
  --halftone-core: 3.6px;
  --halftone-dot: #3348d3;
  --halftone-pointer-edge: transparent;
  --halftone-pointer-mid: transparent;
  --halftone-pointer-core: transparent;
}
.hero .halftone.pointer-active {
  --halftone-pointer-edge: rgba(0, 0, 0, 0.46);
  --halftone-pointer-mid: rgba(0, 0, 0, 0.5);
  --halftone-pointer-core: rgba(0, 0, 0, 0.52);
}
/* Aligned vector dot layers restore the original center-to-edge size taper. */
.ht-dots {
  position: absolute;
  inset: -18%;
  transform: rotate(12deg) scale(1.08);
  transform-origin: center;
  --halftone-edge-mask:
    radial-gradient(30% 43% at 90% 30%, #000 0%, rgba(0, 0, 0, 0.82) 42%, transparent 72%),
    radial-gradient(24% 32% at 78% 70%, rgba(0, 0, 0, 0.76) 0%, transparent 68%),
    radial-gradient(18% 26% at var(--mx, 70%) var(--my, 62%), var(--halftone-pointer-edge) 0%, transparent 68%);
  --halftone-mid-mask:
    radial-gradient(22% 34% at 90% 30%, #000 0%, rgba(0, 0, 0, 0.88) 32%, transparent 66%),
    radial-gradient(17% 24% at 78% 70%, rgba(0, 0, 0, 0.78) 0%, transparent 64%),
    radial-gradient(12% 18% at var(--mx, 70%) var(--my, 62%), var(--halftone-pointer-mid) 0%, transparent 64%);
  --halftone-core-mask:
    radial-gradient(13% 22% at 90% 30%, #000 0%, rgba(0, 0, 0, 0.9) 26%, transparent 62%),
    radial-gradient(10% 15% at 78% 70%, rgba(0, 0, 0, 0.8) 0%, transparent 60%),
    radial-gradient(8% 12% at var(--mx, 70%) var(--my, 62%), var(--halftone-pointer-core) 0%, transparent 60%);
  background: radial-gradient(circle,
    var(--halftone-dot) 0 var(--halftone-edge),
    transparent calc(var(--halftone-edge) + 0.35px)) 0 0 /
    var(--halftone-cell) var(--halftone-cell);
  -webkit-mask-image: var(--halftone-edge-mask);
  mask-image: var(--halftone-edge-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: 0.88;
}
.ht-dots::before,
.ht-dots::after {
  content: "";
  position: absolute;
  inset: 0;
  background-position: 0 0;
  background-repeat: repeat;
  background-size: var(--halftone-cell) var(--halftone-cell);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.ht-dots::before {
  background-image: radial-gradient(circle,
    var(--halftone-dot) 0 var(--halftone-mid),
    transparent calc(var(--halftone-mid) + 0.35px));
  -webkit-mask-image: var(--halftone-mid-mask);
  mask-image: var(--halftone-mid-mask);
}
.ht-dots::after {
  background-image: radial-gradient(circle,
    var(--halftone-dot) 0 var(--halftone-core),
    transparent calc(var(--halftone-core) + 0.35px));
  -webkit-mask-image: var(--halftone-core-mask);
  mask-image: var(--halftone-core-mask);
}

/* Quiet cobalt atmosphere around the dot field. */
.ht-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(42% 52% at 80% 34%, rgba(51, 72, 211, 0.12), transparent 72%),
    radial-gradient(30% 36% at 10% 80%, rgba(51, 72, 211, 0.08), transparent 70%);
  pointer-events: none;
}
/* Dark paper variant for the contact section. */
.halftone.dark {
  background: #0f0e0c;
  --halftone-cell: 14px;
  --halftone-edge: 0.85px;
  --halftone-mid: 2px;
  --halftone-core: 3.4px;
  --halftone-dot: #fff;
}
.halftone.dark .ht-dots {
  transform: rotate(-11deg) scale(1.08);
  --halftone-edge-mask:
    radial-gradient(74% 96% at 50% 112%, #000 0%, rgba(0, 0, 0, 0.82) 54%, transparent 84%),
    radial-gradient(30% 44% at 12% 42%, rgba(0, 0, 0, 0.5) 0%, transparent 80%);
  --halftone-mid-mask:
    radial-gradient(56% 74% at 50% 112%, #000 0%, rgba(0, 0, 0, 0.86) 44%, transparent 76%),
    radial-gradient(22% 34% at 12% 42%, rgba(0, 0, 0, 0.54) 0%, transparent 72%);
  --halftone-core-mask:
    radial-gradient(34% 48% at 50% 112%, #000 0%, rgba(0, 0, 0, 0.9) 34%, transparent 70%),
    radial-gradient(14% 22% at 12% 42%, rgba(0, 0, 0, 0.58) 0%, transparent 68%);
  opacity: 0.68;
}

/* Grain softens the contact background and unifies the paper texture. */
.grain {
  position: absolute;
  inset: 0;
  z-index: 6;
  background-image: var(--grain-img);
  opacity: 0.16;
  mix-blend-mode: multiply;
}

/* fade glass into page bottom */
.hero-bg::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
}

/* ---------- hero content ---------- */
.hero-content {
  position: relative;
  z-index: 5;
  width: min(1160px, 100% - 24px);
}

.hero-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.55rem, 4.3vw, 3.95rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-title .line { display: block; overflow: hidden; padding: 0.05em 0; }
.hero-title .line-inner {
  display: inline-block;
  white-space: nowrap;
  transform: translateY(110%);
  animation: lineUp 1.1s var(--ease-out) forwards;
}
.hero-title .line:nth-child(2) .line-inner { animation-delay: 0.14s; }
.hero-title .line:nth-child(3) .line-inner { animation-delay: 0.28s; }
@keyframes lineUp { to { transform: translateY(0); } }

.hero-title .dim { color: #c9c5bf; }

/* ---------- halftone hand (above the headline) ---------- */
.ht-hand-wrap {
  position: relative;
  width: 168px;
  height: 150px;
  margin-bottom: 20px;
  /* multiply knocks the white paper out against any backdrop,
     leaving only the dithered dots — no box seam */
  mix-blend-mode: multiply;
}
/* recolor the black dithered hand to the indigo accent */
.ht-hand-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #515ada;
  mix-blend-mode: screen;
  pointer-events: none;
}
.ht-hand {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
  dynamic-range-limit: standard;
}
.hand-print {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
  animation: waveHand 2.8s ease-in-out infinite;
  transform-origin: 70% 85%;
}
.hand-tone {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: brightness(0);
}
.hand-emoji {
  font-size: 112px;
  line-height: 1;
}
@keyframes waveHand {
  0%, 55%, 100% { transform: rotate(0); }
  60% { transform: rotate(16deg); }
  70% { transform: rotate(-7deg); }
  80% { transform: rotate(12deg); }
  90% { transform: rotate(0); }
}
.hand-dots {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, #000 0 1.2px, #fff 1.35px) 0 0 / 5.5px 5.5px;
  mix-blend-mode: screen;
}

/* keyframes shared by the project scenes */
@keyframes blink { 50% { opacity: 0; } }
@keyframes eqBar {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1.1); }
}

/* ---------- hero sub + cta ---------- */
.hero-sub {
  margin: 30px 0 0;
  max-width: 640px;
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  color: var(--ink-soft);
}
.hero-sub b { font-weight: 700; color: var(--ink); }

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  margin-top: 36px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 99px;
  font-size: 0.98rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s, background 0.3s, color 0.3s;
  will-change: transform;
}
.btn .arr { transition: transform 0.3s var(--ease-out); display: inline-block; }
.btn:hover .arr { transform: translate(3px, -3px); }
.btn-dark {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 14px 30px rgba(20, 18, 16, 0.3);
}
.btn-dark:hover { box-shadow: 0 18px 40px rgba(20, 18, 16, 0.38); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
  color: var(--ink);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.85); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-outline {
  background: transparent;
  border-color: rgba(244, 242, 238, 0.35);
  color: var(--cream);
}
.btn-outline:hover { border-color: var(--cream); }

/* ---------- scroll hint ---------- */
.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
  color: var(--gray);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.mouse {
  width: 22px; height: 34px;
  border: 1.5px solid var(--gray);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.wheel {
  width: 3px; height: 7px;
  border-radius: 3px;
  background: var(--gray);
  animation: wheelMove 1.8s ease-in-out infinite;
}
@keyframes wheelMove {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(9px); opacity: 0.2; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  position: relative;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  white-space: nowrap;
  color: var(--ink);
}
.marquee-group i {
  font-style: normal;
  font-size: 0.6em;
  color: var(--ink);
}
.marquee-group .hollow {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px var(--gray);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section { padding: 130px 0; }
.container {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 22px;
}
.eyebrow .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 0.72rem;
  letter-spacing: 0;
}
.eyebrow.light { color: rgba(244, 242, 238, 0.6); }
.eyebrow.light .num { border-color: rgba(244, 242, 238, 0.25); }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}
.section-title em { font-style: italic; color: var(--gray); }

.section-desc {
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 60px;
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  margin-top: 30px;
  align-items: start;
}
.about-text p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.about-text b { color: var(--ink); }

.about-side { display: flex; flex-direction: column; gap: 14px; }
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 26px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(20, 18, 16, 0.08);
}
.stat-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
}
.stat-plus {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gray);
  font-size: 1.3rem;
  margin-left: 4px;
}
.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--gray);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s;
  will-change: transform;
}
.project-card:nth-child(even) { grid-template-columns: 1.1fr 1fr; }
.project-card:nth-child(even) .project-visual { order: 2; }
.project-card:hover, .project-card:focus-visible {
  box-shadow: 0 30px 70px rgba(20, 18, 16, 0.13);
  outline: none;
}

.project-visual {
  position: relative;
  min-height: 340px;
  overflow: hidden;
}
.project-info {
  padding: 44px 46px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.project-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.project-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.project-title .en {
  font-style: italic;
  color: var(--gray);
  font-size: 0.7em;
}
.badge-ing {
  display: inline-block;
  vertical-align: middle;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cream);
  background: var(--ink);
  padding: 5px 11px;
  border-radius: 99px;
  margin-left: 8px;
  animation: pulseSoft 2.4s ease-in-out infinite;
}
@keyframes pulseSoft { 50% { opacity: 0.55; } }

.project-tagline {
  margin-top: 6px;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.project-desc {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.chips li {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  transition: background 0.25s, color 0.25s;
}
.project-card:hover .chips li { background: var(--cream-deep); }

.more-link {
  margin-top: 24px;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}
.more-link i {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  font-size: 0.85rem;
  transition: transform 0.4s var(--ease-spring), background 0.3s, color 0.3s;
}
.project-card:hover .more-link i, .mini-card:hover .more-link i {
  transform: rotate(90deg);
  background: var(--ink);
  color: var(--cream);
}

/* ---------- project scenes (CSS art, forced monochrome) ---------- */
.scene {
  position: absolute;
  inset: 0;
  filter: grayscale(1);
}

/* Sonju */
.scene-sonju {
  background: linear-gradient(150deg, #131313, #262626 55%, #3a3a3a);
}
.mic-wrap {
  position: absolute;
  top: 46px; left: 50%;
  transform: translateX(-50%);
  width: 78px; height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mic {
  font-size: 34px;
  z-index: 2;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}
.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  animation: ripple 2.6s ease-out infinite;
}
.ring.r2 { animation-delay: 1.3s; }
@keyframes ripple {
  from { transform: scale(0.65); opacity: 1; }
  to   { transform: scale(1.9);  opacity: 0; }
}
.s-bubble {
  position: absolute;
  max-width: 62%;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 16px;
  line-height: 1.45;
}
.s-bubble.user {
  right: 26px; top: 140px;
  background: #fff;
  color: var(--ink);
  border-bottom-right-radius: 4px;
  animation: bubbleIn 0.6s var(--ease-spring) both;
  animation-delay: 0.3s;
}
.s-bubble.ai {
  left: 26px; top: 196px;
  background: rgba(255, 255, 255, 0.14);
  color: #f0eee9;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom-left-radius: 4px;
  animation: bubbleIn 0.6s var(--ease-spring) both;
  animation-delay: 0.8s;
}
.project-card:not(.in) .s-bubble { animation-play-state: paused; }
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(14px) scale(0.9); }
  to   { opacity: 1; transform: none; }
}
.s-wave {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 30px;
}
.s-wave i {
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(to top, #8c8c8c, #fff);
  animation: eqBar 1.1s ease-in-out infinite;
}
.s-wave i:nth-child(1) { height: 40%; }
.s-wave i:nth-child(2) { height: 75%; animation-delay: 0.1s; }
.s-wave i:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.s-wave i:nth-child(4) { height: 55%; animation-delay: 0.3s; }
.s-wave i:nth-child(5) { height: 90%; animation-delay: 0.4s; }
.s-wave i:nth-child(6) { height: 60%; animation-delay: 0.5s; }
.s-wave i:nth-child(7) { height: 35%; animation-delay: 0.6s; }

/* KLAP terminal */
.scene-klap {
  background:
    radial-gradient(circle, rgba(22, 20, 18, 0.14) 1px, transparent 1.45px) 0 0 / 9px 9px,
    linear-gradient(145deg, #f0eeea, #dbd8d2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.term {
  width: min(82%, 380px);
  background: #191714;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 26px 50px rgba(20, 18, 16, 0.35);
  transform: rotate(-2deg);
  transition: transform 0.5s var(--ease-out);
}
.project-card:hover .term { transform: rotate(0deg) scale(1.03); }
.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #23201c;
}
.term-bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span {
  margin-left: 8px;
  font-size: 0.68rem;
  color: #8d8781;
  font-family: ui-monospace, monospace;
}
.term-body {
  padding: 16px 18px 20px;
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: #d8d3ca;
  text-align: left;
}
.t-line { margin-bottom: 7px; white-space: nowrap; overflow: hidden; }
.t-line .prompt { color: #fff; margin-right: 8px; }
.t-line.out { color: #a8a29a; padding-left: 18px; }
.t-line.out b { color: #fff; }
.t-caret {
  display: inline-block;
  width: 7px; height: 13px;
  background: #fff;
  vertical-align: -2px;
  margin-left: 6px;
  animation: blink 1s steps(1) infinite;
}

/* INSITE */
.scene-insite {
  background: linear-gradient(150deg, #171717, #232323 60%, #343434);
}
.editor {
  position: absolute;
  left: 30px; top: 42px; bottom: 42px;
  width: 52%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.code-line {
  height: 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.55);
}
.code-line.c2 { background: rgba(255, 255, 255, 0.34); }
.code-line.c3 { background: rgba(255, 255, 255, 0.7); }
.code-line.err {
  position: relative;
  background: rgba(255, 255, 255, 0.88);
}
.code-line.err::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #fff 0 4px, transparent 4px 8px);
}
.w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; }
.hint-chip {
  position: absolute;
  right: 26px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 10px 15px;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  animation: floatY 4s ease-in-out infinite;
}
.hint-chip.h1 { top: 52px; }
.hint-chip.h2 { top: 128px; animation-delay: 0.7s; right: 40px; }
.hint-chip.h3 { top: 204px; animation-delay: 1.4s; right: 22px; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* Reminiscence */
.scene-rem {
  background:
    radial-gradient(circle, rgba(22, 20, 18, 0.14) 1px, transparent 1.45px) 0 0 / 9px 9px,
    linear-gradient(145deg, #eeece8, #d7d4ce);
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame {
  width: 55%;
  background: #211e1b;
  border-radius: 10px;
  padding: 12px 12px 10px;
  box-shadow: 0 24px 50px rgba(20, 18, 16, 0.35);
  transform: rotate(2deg);
  transition: transform 0.5s var(--ease-out);
}
.project-card:hover .frame { transform: rotate(0) scale(1.03); }
.photo {
  position: relative;
  height: 150px;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(to bottom, #f4f4f4 0%, #c6c6c6 55%, #7d7d7d 100%);
}
.sun {
  position: absolute;
  top: 26px; left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.8);
  animation: floatY 5s ease-in-out infinite;
}
.hill {
  position: absolute;
  bottom: -22px;
  width: 130px; height: 60px;
  border-radius: 50% 50% 0 0;
  background: #6d6d6d;
}
.hill.h1 { left: -20px; }
.hill.h2 { right: -30px; background: #515151; height: 74px; }
.frame-caption {
  text-align: center;
  color: #b8b3ac;
  font-size: 0.72rem;
  padding-top: 9px;
  font-weight: 600;
}
.rem-bubble {
  position: absolute;
  right: 22px; bottom: 34px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  padding: 11px 15px;
  border-radius: 14px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 14px 30px rgba(20, 18, 16, 0.22);
  animation: floatY 4.4s ease-in-out infinite;
}
.rem-heart {
  position: absolute;
  left: 34px; top: 34px;
  color: var(--ink);
  font-size: 1.3rem;
  animation: heartBeat 1.6s ease-in-out infinite;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.35); }
  24% { transform: scale(1); }
  36% { transform: scale(1.2); }
}

/* UNI PANG */
.scene-unipang {
  background:
    radial-gradient(circle, rgba(22, 20, 18, 0.14) 1px, transparent 1.45px) 0 0 / 9px 9px,
    linear-gradient(145deg, #f1efeb, #dcd9d3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quest-card {
  width: min(78%, 330px);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 50px rgba(20, 18, 16, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: rotate(-1.5deg);
  transition: transform 0.5s var(--ease-out);
}
.project-card:hover .quest-card { transform: rotate(0) scale(1.02); }
.quest {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 11px 13px;
  background: #faf7f9;
  border-radius: 12px;
}
.quest b { margin-left: auto; color: var(--ink); font-size: 0.78rem; }
.quest .check {
  width: 20px; height: 20px;
  border-radius: 7px;
  border: 2px solid #d8d4ce;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #fff;
  flex-shrink: 0;
}
.quest.done .check { background: var(--ink); border-color: var(--ink); }
.quest.done { text-decoration: line-through; color: var(--gray); }
.point-badge {
  position: absolute;
  top: 30px; right: 30px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 800;
  font-size: 0.88rem;
  padding: 10px 16px;
  border-radius: 99px;
  box-shadow: 0 14px 30px rgba(20, 18, 16, 0.3);
  animation: floatY 3.6s ease-in-out infinite;
}

/* ---------- mini cards ---------- */
.sub-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.7rem;
  margin: 90px 0 28px;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.mini-grid > .mini-card:last-child:nth-child(3n+1) {
  grid-column: 2;
}
.mini-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 22px 26px;
  cursor: pointer;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s;
}
.mini-card:hover, .mini-card:focus-visible {
  box-shadow: 0 22px 50px rgba(20, 18, 16, 0.1);
  outline: none;
}
.mini-card h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  margin: 18px 0 8px;
}
.mini-card p {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.mini-visual {
  position: relative;
  height: 130px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(1);
}
.mini-freq {
  background:
    radial-gradient(circle, rgba(22, 20, 18, 0.12) 1px, transparent 1.45px) 0 0 / 9px 9px,
    linear-gradient(145deg, #f0eeea, #dedad4);
  flex-direction: column;
  gap: 10px;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 58px;
}
.bars i {
  width: 13px;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, #161412, #7a756e);
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.7s var(--ease-spring);
}
.mini-card.in .bars i { transform: scaleY(1); }
.bars i:nth-child(2) { transition-delay: 0.08s; }
.bars i:nth-child(3) { transition-delay: 0.16s; }
.bars i:nth-child(4) { transition-delay: 0.24s; }
.bars i:nth-child(5) { transition-delay: 0.32s; }
.bars i:nth-child(6) { transition-delay: 0.4s; }
.mini-glyphs {
  font-family: var(--serif);
  color: #6f6a64;
  font-size: 0.9rem;
}
.mini-lib { background: #191714; }
.mini-lib pre {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: #e8e5df;
  line-height: 1.7;
}
.mini-auto {
  background:
    radial-gradient(circle, rgba(22, 20, 18, 0.12) 1px, transparent 1.45px) 0 0 / 9px 9px,
    linear-gradient(145deg, #f0eeea, #dedad4);
  gap: 18px;
}
.auto-emoji {
  font-size: 1.9rem;
  animation: floatY 3s ease-in-out infinite;
}
.auto-emoji:nth-child(2) { animation-delay: 0.5s; }
.auto-emoji:nth-child(3) { animation-delay: 1s; }
.mini-llmcode {
  background:
    radial-gradient(circle, rgba(22, 20, 18, 0.12) 1px, transparent 1.45px) 0 0 / 9px 9px,
    linear-gradient(145deg, #f0eeea, #dedad4);
}
.cluster-plot { position: relative; width: 100%; height: 100%; }
.cluster-plot .pt {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 11px; height: 11px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.55s var(--ease-spring);
}
.cluster-plot .pt.human { background: #161412; }
.cluster-plot .pt.llm { background: transparent; border: 1.5px solid #161412; }
.mini-card.in .cluster-plot .pt { transform: translate(-50%, -50%) scale(1); }
.cluster-plot .pt:nth-child(2) { transition-delay: 0.04s; }
.cluster-plot .pt:nth-child(3) { transition-delay: 0.08s; }
.cluster-plot .pt:nth-child(4) { transition-delay: 0.12s; }
.cluster-plot .pt:nth-child(5) { transition-delay: 0.16s; }
.cluster-plot .pt:nth-child(6) { transition-delay: 0.2s; }
.cluster-plot .pt:nth-child(7) { transition-delay: 0.24s; }
.cluster-plot .pt:nth-child(8) { transition-delay: 0.28s; }
.cluster-plot .pt:nth-child(9) { transition-delay: 0.32s; }
.cluster-plot .pt:nth-child(10) { transition-delay: 0.36s; }
.cluster-plot .pt:nth-child(11) { transition-delay: 0.4s; }
.cluster-plot .pt:nth-child(12) { transition-delay: 0.44s; }

/* ============================================================
   ACTIVITIES — timeline
   ============================================================ */
.timeline {
  position: relative;
  margin-top: 50px;
  padding-left: 34px;
  max-width: 720px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 1.5px;
  background: linear-gradient(to bottom, var(--line), var(--gray), var(--line));
}
.timeline-item {
  position: relative;
  padding-bottom: 52px;
}
.timeline-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -33px; top: 7px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--cream);
  border: 2.5px solid var(--ink);
}
.tl-dot.now::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  opacity: 0.35;
  animation: ripple 2.2s ease-out infinite;
}
.tl-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 13px;
  margin-bottom: 12px;
  background: var(--paper);
}
.tl-tag.current {
  color: var(--cream);
  border-color: var(--ink);
  background: var(--ink);
}
.tl-content h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
  margin-bottom: 10px;
}
.tl-content p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 600px;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 50px;
}
.skill-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 32px;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s;
}
.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(20, 18, 16, 0.09);
}
.skill-card.wide { grid-column: 1 / -1; }
.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  font-size: 1.5rem;
  border-radius: 16px;
  background: var(--cream-deep);
  margin-bottom: 18px;
}
.skill-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  margin-bottom: 8px;
}
.skill-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ============================================================
   CONTACT — dark fractal glass
   ============================================================ */
.contact {
  position: relative;
  overflow: hidden;
  background: var(--dark-2);
  color: var(--cream);
  padding: 150px 0;
}
.contact-bg { position: absolute; inset: 0; pointer-events: none; }
.contact .grain { opacity: 0.25; mix-blend-mode: overlay; }

.contact-inner {
  position: relative;
  z-index: 5;
  text-align: center;
}
.contact .eyebrow { justify-content: center; }
.contact-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 1.15;
}
.contact-title em { font-style: italic; color: #b0a89e; }
.contact-sub {
  margin: 24px auto 40px;
  color: rgba(244, 242, 238, 0.72);
}
.contact-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px 40px;
  background: var(--dark-2);
  color: rgba(244, 242, 238, 0.55);
  font-size: 0.82rem;
  border-top: 1px solid rgba(244, 242, 238, 0.08);
}
.to-top { color: var(--cream); font-weight: 600; }
.to-top:hover { text-decoration: underline; }

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
}
.modal.open { visibility: visible; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.55);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s;
}
.modal.open .modal-backdrop { opacity: 1; }
.modal-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(82vh, 860px);
  overflow-y: auto;
  background: var(--paper);
  border-radius: 26px;
  padding: 48px 50px;
  transform: translateY(40px) scale(0.96);
  opacity: 0;
  transition: transform 0.45s var(--ease-out), opacity 0.35s;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
}
.modal.open .modal-panel { transform: none; opacity: 1; }
.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -20px -22px 0 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink);
  transition: transform 0.3s var(--ease-spring), background 0.25s, color 0.25s;
  z-index: 2;
}
.modal-close:hover { transform: rotate(90deg); background: var(--ink); color: var(--cream); }

.modal-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gray);
}
.modal-content h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.1rem;
  margin: 6px 0 4px;
}
.modal-tagline {
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 26px;
}
.modal-section { margin-bottom: 24px; }
.modal-section h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 8px;
}
.modal-section h4::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.modal-section p {
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.modal-content .chips { margin-top: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-side { flex-direction: row; flex-wrap: wrap; }
  .stat-card { flex: 1 1 180px; }
}

@media (max-width: 860px) {
  .site-header { padding: 16px 20px; }
  .site-header.scrolled { padding: 12px 20px; }
  .menu-btn { display: flex; }
  .site-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    font-size: 1.5rem;
    font-family: var(--serif);
    background: rgba(255, 255, 255, 0.93);
    -webkit-backdrop-filter: blur(24px);
            backdrop-filter: blur(24px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
    z-index: 110;
  }
  .site-nav.open { opacity: 1; pointer-events: auto; }
  .site-nav a.nav-cta { font-family: var(--sans); font-size: 1rem; }

  .hero { margin-top: -79px; padding-top: 120px; }
  .section { padding: 90px 0; }

  .project-card,
  .project-card:nth-child(even) { grid-template-columns: 1fr; }
  .project-card:nth-child(even) .project-visual { order: 0; }
  .project-visual { min-height: 280px; }
  .project-info { padding: 30px 26px 36px; }

  .mini-grid { grid-template-columns: 1fr; }
  .mini-grid > .mini-card:last-child:nth-child(3n+1) { grid-column: 1; }
  .skills-grid { grid-template-columns: 1fr; }
  .modal-panel { padding: 36px 26px; }
  .site-footer { justify-content: center; text-align: center; }

  .halftone,
  .halftone.dark {
    --halftone-cell: 8px;
    --halftone-edge: 0.55px;
    --halftone-mid: 1.25px;
    --halftone-core: 2.05px;
  }
  .hero .ht-dots,
  .halftone.dark .ht-dots {
    inset: 0;
    transform: none;
  }
  .hero .ht-dots {
    --halftone-edge-mask:
      radial-gradient(27% 28% at 102% 8%, rgba(0, 0, 0, 0.66) 0%, transparent 70%),
      radial-gradient(22% 24% at 102% 88%, rgba(0, 0, 0, 0.34) 0%, transparent 68%);
    --halftone-mid-mask:
      radial-gradient(19% 20% at 102% 8%, rgba(0, 0, 0, 0.72) 0%, transparent 64%),
      radial-gradient(15% 16% at 102% 88%, rgba(0, 0, 0, 0.38) 0%, transparent 62%);
    --halftone-core-mask:
      radial-gradient(12% 13% at 102% 8%, rgba(0, 0, 0, 0.78) 0%, transparent 58%),
      radial-gradient(8% 10% at 102% 88%, rgba(0, 0, 0, 0.42) 0%, transparent 56%);
    opacity: 0.82;
  }

  .ht-hand-wrap { width: 122px; height: 108px; margin-bottom: 14px; }
  .hand-emoji { font-size: 78px; }
  .br-desktop { display: none; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line-inner { transform: none; }
}
