/* =========================================================
   Carl Design Portfolio - Main Stylesheet
   Designer: Carl
   Desktop: 1440px | Mobile: 576px
   ========================================================= */

:root {
  /* Light theme — pure white base */
  --bg: #ffffff;
  --bg-soft: #f4f4f5;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-soft: #555555;
  --text-mute: #888888;
  --border: #e6e6ea;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-strong: 0 12px 48px rgba(0, 0, 0, 0.1);

  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", "Times New Roman", serif;
  --font-display: "Playfair Display", "Noto Serif SC", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #141414;
  --bg-soft: #1e1e1e;
  --bg-card: #1e1e1e;
  --text: #f2f2f2;
  --text-soft: #c0c0c0;
  --text-mute: #888888;
  --border: #2c2c2c;
  --accent: #ffd23f;
  --accent-soft: #3a3216;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-strong: 0 12px 48px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* ---------- Layout Container ---------- */
.container {
  width: 1680px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 48px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.nav.scrolled {
  padding: 12px 0;
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Left: only the black circle with gradient 'C' */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 900;
  font-size: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.brand-logo span {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.nav-brand:hover .brand-logo {
  transform: rotate(-12deg) scale(1.05);
}

.brand-tag, .brand-pill { display: none !important; }

/* Right: menu + tools together */
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.25s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Burger button - hidden on desktop */
.burger {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
  transition: all 0.25s ease;
}

.burger:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.burger span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.burger.active span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Mobile menu - hidden by default */
.mobile-menu {
  display: none;
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  flex-direction: column;
  gap: 16px;
  z-index: 99;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  animation: slideDown 0.3s ease;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--accent);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.icon-btn {
  width: auto;
  min-width: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.icon-btn .sun { display: none; }
.icon-btn .moon { display: inline; }
[data-theme="dark"] .icon-btn .sun { display: inline; }
[data-theme="dark"] .icon-btn .moon { display: none; }

.lang-btn {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ---------- Page Header (shared) ---------- */
.page-hero {
  padding: 140px 0 60px;
  text-align: center;
}

.page-label {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 96px;
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 18px;
  letter-spacing: -1px;
}

.page-sub {
  color: var(--text-soft);
  font-size: 15px;
  max-width: 680px;
  margin: 0 auto 28px;
}

.page-socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 14px;
  color: var(--text-mute);
}

.page-socials span {
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
.page-socials span:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* ============ NEW HERO (ref-image style) ============ */
.hero {
  padding: 130px 0 60px;
  position: relative;
  overflow: hidden;
}

/* Very subtle grid-paper background */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 50%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 50%, transparent 85%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
  z-index: 2;
}

/* —— Left: text + CTAs + card stack —— */
.hero-left { position: relative; }

.hero-title {
  font-family: "Playfair Display", "Noto Serif SC", serif;
  font-style: italic;
  font-size: clamp(52px, 6.5vw, 88px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero-title .hi {
  display: block;
  color: #2563eb;
  font-style: italic;
  animation: slideUp 0.9s cubic-bezier(.22,1,.36,1) both;
}

.hero-title .name {
  display: block;
  color: var(--text);
  font-style: italic;
  animation: slideUp 0.9s cubic-bezier(.22,1,.36,1) 0.15s both;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.hero-subtitle p { margin-bottom: 10px; }

.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
  background: #1d4ed8;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

/* Stack of 3 tilted colored cards */
.hero-card-stack {
  position: relative;
  margin-top: 44px;
  height: 110px;
  perspective: 800px;
}

.hcard {
  width: 140px;
  height: 90px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.3s ease;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  color: #fff;
}

.hcard::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 12px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hcard-black  { background: #0f0f14; left: 0;  top: 0;  transform: rotate(-10deg); }
.hcard-red    { background: linear-gradient(135deg, #ef4444, #f97316); left: 110px; top: 10px; transform: rotate(4deg); }
.hcard-pink   { background: linear-gradient(135deg, #f472b6, #fb7185); left: 220px; top: 0; transform: rotate(12deg); }

.hcard:hover {
  transform: translate(0, -14px) rotate(0deg) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  z-index: 10;
}

.hcard span {
  font-size: 13px;
  text-align: center;
  padding-top: 12px;
}

/* —— Right: big browser preview with "selection frame" —— */
.hero-right {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 4 / 3;
  transition: transform 0.6s cubic-bezier(.22,1,.36,1);
}

.preview-wrap:hover { transform: translateY(-6px) rotate(-1deg); }

/* Blue selection "marching" frame */
.select-frame {
  position: absolute;
  inset: -18px;
  border: 2px dashed #60a5fa;
  border-radius: 14px;
  pointer-events: none;
}

.select-frame::before,
.select-frame::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  background: #fff;
  border: 2px solid #2563eb;
  border-radius: 3px;
}

.select-frame::before { top: -7px; left: -7px; }
.select-frame::after  { bottom: -7px; right: -7px; }

.select-frame .sq {
  position: absolute;
  width: 14px; height: 14px;
  background: #fff;
  border: 2px solid #2563eb;
  border-radius: 3px;
}
.select-frame .sq.tr { top: -7px; right: -7px; }
.select-frame .sq.bl { bottom: -7px; left: -7px; }

/* Browser-like preview card */
.preview-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #6d28d9 100%);
  box-shadow: 0 30px 60px -15px rgba(30, 27, 75, 0.35), 0 8px 16px rgba(0,0,0,0.08);
}

.preview-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(129, 140, 248, 0.7) 0%, rgba(236, 72, 153, 0.35) 45%, transparent 75%);
  filter: blur(30px);
  opacity: 0.9;
}

.preview-topbar {
  position: relative;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.preview-dots { display: flex; gap: 6px; }
.preview-dots i {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3);
  display: inline-block;
}

.preview-title {
  margin-left: auto;
  margin-right: auto;
  font-weight: 600;
  letter-spacing: 1px;
  opacity: 0.85;
}

.preview-body {
  position: relative;
  padding: 28px;
  text-align: center;
  color: #fff;
}

.preview-h {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 28px;
  font-weight: 600;
  margin-top: 24px;
  line-height: 1.15;
}

.preview-h em { color: #facc15; font-style: italic; }

.preview-p {
  font-size: 11px;
  opacity: 0.75;
  margin: 12px auto 18px;
  max-width: 420px;
  line-height: 1.5;
}

.preview-yellow-btn {
  display: inline-block;
  background: #facc15;
  color: #1a1a1a;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 8px 20px rgba(250, 204, 21, 0.35);
}

.preview-cards-row {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-mini {
  height: 60px;
  border-radius: 8px;
  opacity: 0.85;
}
.preview-mini.c1 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.preview-mini.c2 { background: linear-gradient(135deg, #fb923c, #ef4444); }
.preview-mini.c3 { background: linear-gradient(135deg, #a78bfa, #64748b); }

/* Small floating labels like "Gradientshub" + "Funnel Display" + "Pen color" */
.float-label {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: transform 0.3s ease;
}

.float-label.fl-top {
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.float-label.fl-left {
  left: -30px;
  top: 48%;
  padding: 8px 12px;
}

.float-label.fl-left i {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1e293b;
  text-align: center;
  line-height: 22px;
  color: #fff;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
}

.float-label.fl-right {
  right: -20px;
  bottom: 20%;
  padding: 8px 10px;
  gap: 6px;
  align-items: center;
}

.color-bar {
  width: 130px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #84cc16, #06b6d4, #6366f1, #a855f7, #ec4899);
  position: relative;
}
.color-bar::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 12px; height: 12px;
  background: #fff;
  border: 2px solid #1e293b;
  border-radius: 50%;
  transform: translateY(-50%);
}

/* hover lifts */
.preview-wrap:hover .float-label.fl-top   { transform: translateX(-50%) translateY(-4px); }
.preview-wrap:hover .float-label.fl-left  { transform: translateX(-4px) translateY(-4px); }
.preview-wrap:hover .float-label.fl-right { transform: translateX(4px)  translateY(-4px); }

/* Cursor follow */
/* Old cursor text disabled - using emoji trail instead */
.hero-cursor-text {
  display: none;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ============= Intro strip below hero ============= */
.hero-intro {
  padding: 40px 0 30px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero-intro-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  align-items: center;
}

.hero-intro h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.hero-intro p {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.hero-intro-text {
  margin-bottom: 8px;
}

.hero-intro-text h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.hero-intro-text p {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.7;
}

/* Old hero class keepers */
.hero-eyebrow, .hero-scroll, .hero-floating, .hero-grid, .blob { /* hidden */ }

/* ---------- Section shared ---------- */
section { padding: 100px 0; position: relative; }

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
  flex-wrap: wrap;
  gap: 20px;
}

.sec-title {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.1;
}

.sec-title small {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--text-mute);
  margin-bottom: 10px;
  font-weight: 400;
}

.sec-desc {
  max-width: 520px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- Work Cards Grid ---------- */
.works-filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.filter-chip:hover:not(.active) {
  border-color: var(--text);
  color: var(--text);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.work-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s ease;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.work-card-media {
  position: relative;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: var(--bg-soft);
}

.work-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}

.work-card:hover .work-card-media::after { opacity: 1; }

.work-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-cover {
  transform: scale(1.06);
}

.work-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: #1a1a1a;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.work-num {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.work-arrow {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-arrow {
  opacity: 1;
  transform: translateY(0);
}

.work-card-info {
  padding: 20px 22px 24px;
}

.work-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.work-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.work-sub {
  font-size: 13px;
  color: var(--text-soft);
}

/* Cover art (CSS-based image placeholders for offline stability) */
.cover {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  padding: 20px;
}

.cover-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.cover-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.cover-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.cover-4 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.cover-5 { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.cover-6 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #333; }
.cover-7 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); color: #333; }
.cover-8 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
.cover-9 { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); color: #333; }
.cover-10 { background: linear-gradient(135deg, #434343 0%, #000000 100%); }
.cover-11 { background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%); }
.cover-12 { background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%); }
.cover-13 { background: linear-gradient(135deg, #ffafbd 0%, #ffc3a0 100%); color: #333; }

.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.15) 0%, transparent 40%);
}

.cover span {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

/* --- Image covers (from /image folder) --- */
.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.cover .cover-title {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 2;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
  text-align: center;
  padding: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 24px);
}

.cover-has-img::before {
  background-image: none;
}

/* --- End Image covers --- */

/* ---------- Project List Layout (project.html) ---------- */
.project-list {
  padding: 40px 0 120px;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  padding: 44px 0;
  border-top: 1px solid var(--border);
  align-items: start;
  transition: background 0.3s;
  position: relative;
}

.project-row:last-child { border-bottom: 1px solid var(--border); }

.project-row:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  padding-left: 20px;
  padding-right: 20px;
  margin: 0 -20px;
  border-radius: 12px;
}

.project-info { max-width: 900px; }

.project-info h3 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-info h3::before {
  content: "✦";
  color: var(--accent);
  font-size: 16px;
}

.project-info .en {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.project-imgs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.project-thumb {
  width: 320px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-soft);
  letter-spacing: 1px;
}

.project-meta {
  font-family: var(--font-display);
  font-size: 38px;
  font-style: italic;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-goto {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text);
}

.project-goto:hover {
  background: var(--accent);
  transform: rotate(-45deg) scale(1.1);
  border-color: var(--accent);
  color: #1a1a1a;
}

/* ---------- Detail Page ---------- */
.detail-hero {
  padding: 130px 0 60px;
  text-align: left;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
  text-decoration: none;
  margin-bottom: 30px;
  transition: color 0.2s, gap 0.2s;
}
.detail-back:hover { color: var(--accent); gap: 14px; }

.detail-title {
  font-family: var(--font-serif);
  font-size: 72px;
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 16px;
}

.detail-en {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-mute);
  letter-spacing: 2px;
  margin-bottom: 30px;
}

.detail-meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 40px;
}

.detail-meta-row h5 {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-mute);
  margin-bottom: 8px;
  font-weight: 500;
}

.detail-meta-row p { font-size: 14px; color: var(--text); }

.detail-big-img {
  margin: 60px 0;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.detail-long-img {
  margin: 40px 0 20px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card);
}

.detail-long-img img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-section {
  padding: 40px 0;
  max-width: 100%;
  width: 100%;
}

.detail-section h3 {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  margin-bottom: 20px;
}

.detail-section p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-soft);
  margin-bottom: 16px;
  width: 100%;
  max-width: 100%;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.detail-gallery > div {
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
}

.detail-next {
  padding: 100px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.detail-next small {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--text-mute);
}

.detail-next a {
  display: block;
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-top: 12px;
  transition: color 0.3s, letter-spacing 0.3s;
}

.detail-next a:hover { color: var(--accent); letter-spacing: 2px; }

/* ---------- About Page ---------- */
.about-intro-section {
  padding: 40px 0 60px;
}

.about-intro-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.about-intro-mouse-area {
  position: relative;
  padding: 40px 0;
  min-height: 280px;
}

/* Global cursor trail — icons follow the mouse in a horizontal row */
.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
}

.cursor-trail .cursor-icon {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 3px 8px rgba(140, 120, 200, 0.25));
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
}

.cursor-trail .cursor-icon svg {
  display: block;
}

.about-text {
  position: relative;
  z-index: 2;
  text-align: center;
}

.about-text p {
  font-size: 17px;
  line-height: 2;
  color: var(--text);
  margin-bottom: 18px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-text .about-p-hero {
  font-size: 17px;
  line-height: 2;
  color: var(--text);
  margin-bottom: 18px;
}

.about-text p .hl {
  color: #ff4d8a;
  font-weight: 500;
}

.about-skills {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.skill-item {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  transition: all 0.3s;
}

.skill-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.skill-emoji { font-size: 32px; margin-bottom: 16px; display: block; }
.skill-item h4 { font-size: 18px; margin-bottom: 8px; }
.skill-item p { font-size: 13px; color: var(--text-soft); line-height: 1.7; }

.about-timeline { padding: 80px 0; }

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 30px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}

.timeline-item:last-child { border-bottom: 1px solid var(--border); }
.timeline-year {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  color: var(--text-mute);
}
.timeline-item h4 { font-size: 19px; margin-bottom: 6px; }
.timeline-item p { font-size: 14px; color: var(--text-soft); }

/* ---------- Contact Page ---------- */
.contact-big {
  padding: 120px 0 60px;
  text-align: center;
}

.contact-email {
  font-family: var(--font-serif);
  font-size: clamp(48px, 8vw, 110px);
  font-weight: 600;
  line-height: 1;
  margin: 20px 0 10px;
  background: linear-gradient(120deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  cursor: pointer;
  transition: letter-spacing 0.4s;
  display: inline-block;
}

.contact-email:hover { letter-spacing: 2px; }

.contact-methods {
  padding: 60px 0 40px;
}

.contact-methods .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.method {
  text-align: center;
  padding: 40px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  transition: all 0.3s;
  cursor: pointer;
}

.method:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.method-icon {
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
}

.method-icon svg {
  display: block;
}

.method-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.method-value {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--text);
  word-break: break-all;
}

.contact-note {
  padding: 20px 0 100px;
  text-align: center;
}

.contact-note p {
  font-size: 15px;
  color: var(--text-soft);
}



/* ---------- Home: About footer ---------- */
.home-about {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.home-about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.home-about-left h2 {
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 24px;
}

.home-about-left .signature {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-size: 64px;
  display: block;
  margin-top: 30px;
}

.home-about-right p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-soft);
  margin-bottom: 18px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.stat .num {
  font-family: var(--font-display);
  font-size: 44px;
  font-style: italic;
  color: var(--text);
  display: block;
}
.stat small { font-size: 12px; color: var(--text-mute); letter-spacing: 2px; }

/* ---------- Footer ---------- */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--text);
}

.footer-menu {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-menu a {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-menu a:hover { color: var(--accent); }

.footer-copy { margin-top: 30px; text-align: center; font-size: 12px; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile (≤576px) ---------- */
@media (max-width: 576px) {
  .container { padding: 0 20px; width: 100%; }

  .nav { padding: 12px 0; }
  .nav-menu { display: none; }
  .brand-tag { display: none; }
  .burger { display: flex; }
  .icon-btn { width: auto; min-width: 32px; height: 32px; font-size: 12px; padding: 0 10px; }
  .lang-btn { padding: 0 10px; font-size: 11px; }

  .hero { padding: 110px 0 40px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-left { text-align: center; }
  .hero-title { font-size: 52px; letter-spacing: -1px; }
  .hero-subtitle { font-size: 14px; }
  .hero-cta { flex-direction: column; align-items: stretch; margin-top: 20px; }
  .btn { padding: 12px 22px; font-size: 13px; justify-content: center; }
  .hero-intro-text h3 { font-size: 16px; }
  .hero-intro-text p { font-size: 13px; }

  .hero-card-stack { height: 96px; margin-top: 30px; }
  .hcard { width: 110px; height: 72px; }
  .hcard-black  { left: 0; }
  .hcard-red    { left: 80px; }
  .hcard-pink   { left: 160px; }

  .preview-wrap { margin-top: 10px; }
  .select-frame { inset: -12px; }
  .float-label.fl-top { top: -10px; padding: 4px 10px; font-size: 11px; }
  .float-label.fl-left { left: 0; top: 40%; padding: 6px 8px; font-size: 11px; }
  .float-label.fl-right { right: 0; bottom: 18%; padding: 6px 8px; font-size: 11px; }
  .color-bar { width: 90px; }

  .hero-intro-inner { grid-template-columns: 1fr; gap: 16px; }

  section { padding: 60px 0; }
  .sec-head { flex-direction: column; align-items: center; text-align: center; margin-bottom: 36px; }
  .sec-title { font-size: 34px; }
  .sec-desc { font-size: 13px; }

  .page-hero { padding: 110px 0 40px; }
  .page-title { font-size: 56px; }
  .page-sub { font-size: 14px; padding: 0 10px; }

  .works-grid { grid-template-columns: 1fr; gap: 20px; }
  .work-title { font-size: 19px; }

  .project-row { grid-template-columns: 1fr; gap: 20px; padding: 30px 0; }
  .project-info h3 { font-size: 22px; }
  .project-thumb { width: 100%; height: 180px; }
  .project-meta {
    font-size: 26px;
    flex-direction: row-reverse;
    justify-content: space-between;
    width: 100%;
  }

  .detail-hero { padding: 100px 0 30px; }
  .detail-title { font-size: 42px; }
  .detail-meta-row { grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px 0; }
  .detail-meta-row p { font-size: 13px; }
  .detail-section h3 { font-size: 26px; }
  .detail-section p { font-size: 15px; }
  .detail-gallery { grid-template-columns: 1fr; gap: 16px; }
  .detail-next { padding: 60px 0; }
  .detail-next a { font-size: 36px; }

  .about-intro-container { padding: 0 20px; }
  .about-intro-mouse-area { padding: 20px 0; min-height: 240px; }
  .about-text p { font-size: 15px; }
  .contact-methods { padding: 40px 0 20px; }
  .contact-methods .container { grid-template-columns: 1fr; gap: 16px; }
  .method { padding: 28px 20px; }
  .method-icon { height: 40px; }
  .method-icon svg { width: 30px; height: 30px; }
  .method-value { font-size: 18px; }
  .contact-note { padding: 10px 0 60px; }
  .contact-note p { font-size: 13px; }
  .skill-grid { grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
  .skill-item { padding: 20px 16px; }
  .skill-emoji { font-size: 24px; }
  .skill-item h4 { font-size: 15px; }

  .timeline-item { grid-template-columns: 80px 1fr; gap: 14px; padding: 20px 0; }
  .timeline-year { font-size: 18px; }
  .timeline-item h4 { font-size: 16px; }

  .contact-big { padding: 100px 0 30px; }
  .contact-form-wrap { grid-template-columns: 1fr; gap: 40px; padding: 40px 0; }
  .contact-info p { font-size: 15px; }
  .contact-info .big-num { font-size: 32px; }

  .home-about { padding: 60px 0; }
  .home-about-inner { grid-template-columns: 1fr; gap: 30px; }
  .home-about-left h2 { font-size: 36px; }
  .home-about-left .signature { font-size: 44px; margin-top: 16px; }
  .stats-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat .num { font-size: 28px; }

  .contact-email { font-size: 32px; }

  .footer { padding: 40px 0 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-menu { justify-content: center; flex-wrap: wrap; gap: 16px; }
}

/* ---------- Tablet medium ---------- */
@media (min-width: 577px) and (max-width: 980px) {
  .container { padding: 0 32px; width: 100%; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .works-grid { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 72px; }
  .home-about-inner { grid-template-columns: 1fr; }
  .contact-form-wrap { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr 1fr; }
  .detail-meta-row { grid-template-columns: 1fr 1fr; }
}
