/* ==========================================
   XINYI YAO — PORTFOLIO
   Main Stylesheet
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Fragment+Mono:ital@0;1&family=Great+Vibes&display=swap');

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

:root {
  --bg: #E9E9E9;
  --dot: #C8C8C8;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #5A5A5A;
  --blue: #7AACDA;
  --blue-light: #B8D4EE;
  --blue-dark: #5C8FBB;
  --card-shadow: 0 2px 16px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 8px 32px rgba(0,0,0,0.13);
  --radius: 18px;
  --footer-bg: #242424;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- Custom Cursor ---- */
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--blue-dark);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.2s, height 0.2s, opacity 0.2s;
  opacity: 0.6;
}
.cursor-ring.hover { width: 48px; height: 48px; opacity: 1; }

.cursor-label {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  font-family: 'Fragment Mono', monospace;
  font-size: 12px;
  color: var(--bg);
  background: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cursor-label.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ==========================================
   NAVIGATION
   ========================================== */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(233,233,233,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 12px 40px;
  background: rgba(233,233,233,0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-logo {
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  text-decoration: none;
}
.nav-logo:hover { transform: scale(1.1); }
.nav-icon { width: 32px; height: auto; display: block; }

.nav-links {
  display: flex; align-items: center; gap: 8px;
}

.nav-links a {
  font-family: 'Fragment Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}
.nav-links a:hover { background: rgba(122,172,218,0.12); color: var(--blue-dark); }
.nav-links a.active { color: var(--blue-dark); font-weight: 700; }

.nav-cta {
  font-family: 'Fragment Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--white) !important;
  background: var(--blue-dark) !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(92,143,187,0.35);
}
.nav-cta:hover { background: var(--blue) !important; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(92,143,187,0.45) !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-menu {
  display: none;
  position: fixed; top: 70px; left: 0; right: 0;
  background: rgba(233,233,233,0.97);
  backdrop-filter: blur(12px);
  padding: 20px 40px 30px;
  z-index: 99;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-direction: column; gap: 12px;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
}
.mobile-menu.open { display: flex; transform: translateY(0); opacity: 1; }
.mobile-menu a {
  font-family: 'Fragment Mono', monospace;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: var(--text);
}
.mobile-menu .nav-cta {
  background: var(--blue-dark) !important;
  color: white !important;
  text-align: center;
  border-radius: 8px !important;
  padding: 12px !important;
  border-bottom: none !important;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(92,143,187,0.35);
}

/* ==========================================
   PAGE WRAPPER
   ========================================== */
.page-wrapper {
  padding-top: 72px;
  position: relative;
}

/* ==========================================
   HERO SECTION (HOME)
   ========================================== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px 40px;
  overflow: visible;
}

.hero-stickers {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 50;
  overflow: visible;
}

.sticker {
  position: absolute;
  width: 80px;
  height: auto;
  animation: float 4s ease-in-out infinite;
  cursor: default;
  user-select: none;
  pointer-events: auto;
}

.sticker-can { top: 55%; left: 37%; animation-delay: 0s; width: 70px; }
.sticker-bear { top: 8%; right: 25%; animation-delay: 1.2s; width: 90px; }
.sticker-horse { top: 28%; left: 14%; animation-delay: 0.6s; width: 90px; }
.sticker-pink { top: 35%; right: 8%; animation-delay: 1.8s; width: 80px; }
.sticker-blackhorse { top: 18%; left: 16%; animation-delay: 2.4s; width: 85px; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(2deg); }
  66% { transform: translateY(-6px) rotate(-2deg); }
}

.hero-content {
  position: relative; z-index: 1;
}

.hero-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--blue);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 48px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-title .script-letter {
  font-family: 'Great Vibes', cursive;
  font-style: normal;
  font-weight: 400;
  font-size: 1.2em;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding: 20px 0;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-links-left, .hero-links-right {
  display: flex; gap: 0; align-items: center;
}

.hero-links a {
  font-family: 'Fragment Mono', monospace;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.hero-links a:hover { color: var(--blue-dark); }
.hero-links .sep { color: var(--text-secondary); margin: 0 8px; opacity: 0.4; }

.hero-hint {
  font-family: 'Fragment Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.5;
  margin-top: 24px;
  letter-spacing: 0.04em;
}

/* ==========================================
   HIGHLIGHTED WORKS
   ========================================== */
.section {
  padding: 60px 40px;
  max-width: 960px;
  margin: 0 auto;
}

.section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 400;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  display: block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px; left: -8px; right: -8px;
  height: 10px;
  background: var(--blue-light);
  opacity: 0.5;
  border-radius: 4px;
  z-index: -1;
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.work-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
  display: block;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.work-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: #D0D0D0;
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
}

.work-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.work-card:hover .work-card-img img { transform: scale(1.04); }

.work-card-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #D8D8D8 0%, #C0C0C0 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  color: #A0A0A0;
}

.work-card-meta {
  font-family: 'Fragment Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.work-card-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}

.work-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.work-card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.barcode {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 28px;
}
.barcode span {
  display: block;
  background: var(--text);
  border-radius: 1px;
  transition: height 0.3s ease;
}
.work-card:hover .barcode span { background: var(--blue-dark); }

.work-card-tag {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(122,172,218,0.15);
  color: var(--blue-dark);
  font-weight: 500;
}

/* ==========================================
   CTA / FOOTER HERO
   ========================================== */
.cta-section {
  text-align: center;
  padding: 80px 40px 20px;
}

.cta-tagline {
  font-size: clamp(14px, 2vw, 17px);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.cta-big {
  font-family: 'Fragment Mono', monospace;
  font-size: clamp(40px, 10vw, 110px);
  font-weight: 700;
  color: var(--blue-light);
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 20px 0 40px;
  transition: color 0.3s;
  cursor: pointer;
  position: relative;
  display: inline-block;
}
.cta-big:hover { color: var(--blue); }
.cta-big::after {
  content: 'click to chat';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: 'Fragment Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: var(--bg);
  background: var(--text);
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.cta-big:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
  background: var(--footer-bg);
  color: #CCCCCC;
  padding: 48px 56px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-tagline {
  font-family: 'Fragment Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #AAAAAA;
}

.footer-tagline p:last-child { margin-top: 12px; color: #888; }

.footer-contact h4 {
  font-family: 'Fragment Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #888;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-contact-links { display: flex; flex-direction: column; gap: 10px; }

.footer-contact-links a {
  font-family: 'Fragment Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #CCCCCC;
  display: flex; align-items: center; gap: 8px;
  transition: color 0.2s;
  text-transform: uppercase;
}
.footer-contact-links a:hover { color: var(--blue); }
.footer-contact-links a .icon { font-size: 14px; }

.footer-bottom {
  background: var(--footer-bg);
  padding: 16px 56px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.footer-bottom-name {
  font-family: 'Fragment Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: #666;
  text-transform: uppercase;
}

.footer-stamp {
  display: flex; align-items: center; justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.footer-stamp:hover { opacity: 1; }

/* ==========================================
   ABOUT PAGE
   ========================================== */
.about-hero {
  padding: 80px 56px 40px;
  max-width: 960px;
  margin: 0 auto;
}

.about-eyebrow {
  font-size: clamp(14px, 2vw, 17px);
  color: var(--text-secondary);
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.1s forwards;
}

.about-heading {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.2s forwards;
}

.about-pronunciation {
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.3s forwards;
}

.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.4s forwards;
}

.about-bio {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-bio p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.about-photo {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: #C0C0C0;
  font-size: 40px;
}

.about-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.about-photo:hover img {
  transform: scale(1.04);
}

/* Tools section */
.tools-section {
  padding: 40px 56px;
  max-width: 960px;
  margin: 0 auto;
}

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.tool-item {
  background: var(--white);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--card-shadow);
  display: flex; align-items: center; gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0,0,0,0.04);
}
.tool-item:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.tool-item .tool-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-item .tool-icon svg,
.tool-item .tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Life Beyond Work */
.life-section {
  padding: 40px 56px;
  max-width: 960px;
  margin: 0 auto;
}

.life-intro {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-top: 20px;
  margin-bottom: 40px;
}

.life-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.life-pile {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.life-pile-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.life-pile-stack {
  position: relative;
  aspect-ratio: 3/4;
}

.life-pile-stack .life-photo {
  position: absolute;
  width: 88%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transition: transform 0.4s ease, z-index 0s;
  top: 50%;
  left: 50%;
  pointer-events: none;
  object-fit: cover;
}

.pile-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, opacity 0.2s;
  opacity: 0;
}
.life-pile-stack:hover .pile-arrow {
  opacity: 1;
}
.pile-arrow:hover {
  background: #fff;
}
.pile-prev { left: 8px; }
.pile-next { right: 8px; }

@media (max-width: 768px) {
  .life-section { padding: 40px 24px; }
  .life-gallery { grid-template-columns: 1fr; gap: 48px; }
}

/* Widgets */
.widgets-section {
  padding: 40px 56px 60px;
  max-width: 960px;
  margin: 0 auto;
}

.widgets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
  cursor: default;
}
.widget:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  border-color: rgba(0,0,0,0.08);
}

.widget-label {
  font-family: 'Fragment Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.widget-title {
  font-family: 'Fragment Mono', monospace;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
  margin-bottom: 16px;
}

/* Memories widget */
.memories-stack {
  position: relative;
  height: 80px;
  margin-top: 8px;
}
.memory-photo {
  position: absolute;
  border-radius: 10px;
  transition: transform 0.4s ease;
  overflow: hidden;
}
.memory-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #D8D8D8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.memory-photo:nth-child(1) { width: 80px; height: 70px; bottom: 0; left: 0; transform: rotate(-8deg); }
.memory-photo:nth-child(2) { width: 80px; height: 70px; bottom: 0; left: 20px; transform: rotate(-3deg); }
.memory-photo:nth-child(3) { width: 80px; height: 70px; bottom: 0; left: 40px; transform: rotate(4deg); background: #C8C8C8; }

.widget:hover .memory-photo:nth-child(1) { transform: rotate(-12deg) translate(-6px, -4px); }
.widget:hover .memory-photo:nth-child(2) { transform: rotate(2deg) translate(4px, -6px); }
.widget:hover .memory-photo:nth-child(3) { transform: rotate(8deg) translate(8px, -2px); }

/* To-do widget */
.todo-list { display: flex; flex-direction: column; gap: 10px; }
.todo-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; line-height: 1.4;
  color: var(--text-secondary);
}
.todo-check {
  width: 16px; height: 16px;
  border: 1.5px solid #C0C0C0;
  transition: transform 0.3s ease;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: var(--white);
}
.todo-check.done { background: var(--blue); border-color: var(--blue); }
.todo-item.done-item span { text-decoration: line-through; opacity: 0.5; }
.widget:hover .todo-check { transform: scale(1.15); }
.widget:hover .todo-check.done { transform: scale(1.15) rotate(10deg); }

/* Flight widget */
.flight-widget-num {
  font-family: 'Fragment Mono', monospace;
  font-size: 48px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  display: flex; align-items: baseline; gap: 4px;
}
.flight-widget-num .days-label { font-size: 14px; color: var(--text-secondary); font-weight: 400; }
.flight-route {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}
.route-city {
  display: flex; flex-direction: column; gap: 2px;
}
.route-time { font-family: 'Fragment Mono', monospace; font-size: 14px; font-weight: 700; }
.route-code { font-family: 'Fragment Mono', monospace; font-size: 22px; font-weight: 700; color: var(--blue); }
.route-name { font-size: 11px; color: var(--text-secondary); }

/* ==========================================
   WORK PAGE
   ========================================== */
.work-hero {
  padding: 80px 56px 20px;
  max-width: 960px;
  margin: 0 auto;
}

.work-hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.1s forwards;
}

.work-hero-title .blue { color: var(--blue); }

.work-hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.2s forwards;
}

.work-filters {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.3s forwards;
}

.filter-btn {
  font-family: 'Fragment Mono', monospace;
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid rgba(0,0,0,0.12);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: white;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 0 56px 80px;
  max-width: 960px;
  margin: 0 auto;
}

.work-item {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}
.work-item:nth-child(1) { animation-delay: 0.1s; }
.work-item:nth-child(2) { animation-delay: 0.15s; }
.work-item:nth-child(3) { animation-delay: 0.2s; }
.work-item:nth-child(4) { animation-delay: 0.25s; }
.work-item:nth-child(5) { animation-delay: 0.3s; }
.work-item:nth-child(6) { animation-delay: 0.35s; }

.work-item:hover { transform: translateY(-5px); box-shadow: var(--card-shadow-hover); }
.work-item.hidden { display: none; }

.work-item-cover {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #D8D8D8, #C0C0C0);
  overflow: hidden;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.work-item-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.work-item:hover .work-item-cover img { transform: scale(1.05); }

.work-item-body { padding: 20px 22px 22px; }
.work-item-meta {
  font-family: 'Fragment Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.work-item-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.work-item-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; }
.work-item-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ==========================================
   PLAYGROUND PAGE
   ========================================== */
.playground-hero {
  padding: 80px 56px 40px;
  max-width: 960px;
  margin: 0 auto;
}

.playground-grid {
  columns: 3;
  column-gap: 20px;
  padding: 0 56px 80px;
  max-width: 960px;
  margin: 0 auto;
}

.play-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
  break-inside: avoid;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}
.play-card:nth-child(1) { animation-delay: 0.1s; }
.play-card:nth-child(2) { animation-delay: 0.15s; }
.play-card:nth-child(3) { animation-delay: 0.2s; }
.play-card:nth-child(4) { animation-delay: 0.25s; }
.play-card:nth-child(5) { animation-delay: 0.3s; }
.play-card:nth-child(6) { animation-delay: 0.35s; }
.play-card:hover { transform: translateY(-5px); box-shadow: var(--card-shadow-hover); }

.play-card img,
.play-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.play-card:hover img,
.play-card:hover video { transform: scale(1.04); }

/* ==========================================
   CONTACT PAGE
   ========================================== */
.contact-section {
  padding: 80px 56px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-heading {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.1s forwards;
}
.contact-heading .blue { color: var(--blue); }

.contact-sub {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 52px;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.2s forwards;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.3s forwards;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-family: 'Fragment Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.form-group input, .form-group textarea, .form-group select {
  padding: 16px 20px;
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  outline: none;
  resize: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.form-group input:hover, .form-group textarea:hover, .form-group select:hover {
  border-color: rgba(0,0,0,0.18);
  background: #fff;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(122,172,218,0.15);
  background: #fff;
}
.form-group textarea { min-height: 160px; }

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 48px;
  cursor: pointer;
}
.form-group select:invalid,
.form-group select option[value=""][disabled] {
  color: #999;
}
.form-group select option {
  color: var(--text);
  padding: 12px;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 48px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 50px;
  font-family: 'Fragment Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  align-self: flex-start;
}
.submit-btn:hover { background: var(--blue-dark); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(92,143,187,0.4); }
.submit-btn:active { transform: translateY(0); }

.contact-alt {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.4s forwards;
}

.contact-link-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--white);
  border-radius: 50px;
  box-shadow: var(--card-shadow);
  font-family: 'Fragment Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}
.contact-link-btn:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); color: var(--blue-dark); border-color: var(--blue); }
.contact-link-btn .link-icon { font-size: 18px; }

/* Toast */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--footer-bg);
  color: white;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: 'Fragment Mono', monospace;
  font-size: 13px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================
   SECTION DIVIDER
   ========================================== */
.divider {
  width: 48px;
  height: 3px;
  background: var(--blue-light);
  border-radius: 2px;
  margin: 0 auto 48px;
}

/* ==========================================
   SCROLL REVEAL
   ========================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ==========================================
   PAGE TRANSITIONS
   ========================================== */
.page-transition {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--blue);
  z-index: 9990;
  transform: scaleY(0);
  transform-origin: bottom;
}
.page-transition.entering { animation: transIn 0.4s ease forwards; }
.page-transition.leaving { animation: transOut 0.4s ease forwards; }

@keyframes transIn {
  from { transform: scaleY(0); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}
@keyframes transOut {
  from { transform: scaleY(1); transform-origin: top; }
  to { transform: scaleY(0); transform-origin: top; }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  nav { padding: 14px 24px; }
  nav.scrolled { padding: 10px 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 50px 24px 30px; }
  .sticker-can { left: 8%; top: 6%; width: 50px; }
  .sticker-bear { right: 8%; top: 6%; width: 50px; }
  .sticker-horse { left: 2%; top: 36%; width: 60px; }
  .sticker-pink { right: 2%; top: 33%; width: 55px; }
  .sticker-blackhorse { left: 12%; top: 30%; width: 55px; }

  .section { padding: 40px 24px; }
  .works-grid { grid-template-columns: 1fr; }

  .about-hero, .tools-section, .widgets-section { padding: 60px 24px 20px; }
  .about-body { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; }
  .widgets-grid { grid-template-columns: 1fr; }

  .work-hero, .playground-hero, .contact-section { padding: 60px 24px 20px; }
  .work-grid { grid-template-columns: 1fr; padding: 0 24px 60px; }
  .playground-grid { columns: 2; padding: 0 24px 60px; }

  .form-row { grid-template-columns: 1fr; }

  footer { grid-template-columns: 1fr; padding: 36px 24px 24px; gap: 28px; }
  .footer-bottom { padding: 12px 24px 20px; }
  .cta-section { padding: 60px 24px 10px; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 28px; }
  .hero-title { font-size: 28px; }
  .hero-links { flex-direction: column; gap: 10px; align-items: flex-start; }
  .about-heading { font-size: 40px; }
  .work-hero-title { font-size: 36px; }
  .contact-heading { font-size: 32px; }
  .cta-big { font-size: 36px; }
  .playground-grid { columns: 1; }
}

/* ==========================================
   PROJECT DETAIL PAGE
   ========================================== */
.project-page {
  padding: 120px 80px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  z-index: 101;
  transition: background 0.2s, border-color 0.2s;
}
.project-close:hover {
  background: #ddd;
  border-color: #999;
}

.project-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 48px;
}

.project-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.1;
}

.project-description {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-top: 12px;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  margin-bottom: 48px;
}

.project-meta-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-meta-label {
  font-family: 'Fragment Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px 8px;
  display: inline-block;
  width: fit-content;
}

.project-meta-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
}

.project-meta-value a {
  color: var(--text);
  text-decoration: underline;
  transition: color 0.2s;
}
.project-meta-value a:hover {
  color: var(--blue-dark);
}

.project-gallery {
  margin-bottom: 48px;
}

.project-gallery > img,
.project-gallery > video {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 24px;
  display: block;
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: center;
}

.project-gallery-grid img,
.project-gallery-grid video {
  width: 100%;
  border-radius: 12px;
  display: block;
  height: auto;
  object-fit: contain;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid #ddd;
}

.project-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
  transition: color 0.2s;
}
.project-nav a:hover {
  color: var(--blue-dark);
}

.project-nav-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.project-nav-title {
  font-size: 15px;
  font-weight: 500;
}

.project-nav-arrow {
  font-size: 24px;
}

.project-nav-prev {
  text-align: left;
}

.project-nav-next {
  text-align: right;
}

@media (max-width: 768px) {
  .project-page { padding: 100px 24px 40px; }
  .project-header { grid-template-columns: 1fr; gap: 24px; }
  .project-meta { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .project-meta { grid-template-columns: 1fr; }
}
