/* ============================================
   CUSTOM PROPERTIES
   ============================================ */
:root {
  --bg-deep: #0a0806;
  --bg-dark: #0f0c09;
  --bg-card: #15110d;
  --bg-card-hover: #1c1712;

  --gold: #c9a84c;
  --gold-light: #dfc06a;
  --gold-dim: #8b7634;
  --amber: #b8860b;
  --bronze: #a0784c;

  --text-primary: #e8e0d4;
  --text-secondary: #9a917f;
  --text-muted: #6b6355;

  --border: rgba(201, 168, 76, 0.08);
  --border-hover: rgba(201, 168, 76, 0.18);
  --glow: rgba(201, 168, 76, 0.06);
  --glow-strong: rgba(201, 168, 76, 0.12);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --nav-height: 72px;
  --container-width: 1120px;
  --section-gap: 140px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  font-weight: 300;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

::selection {
  background: rgba(201, 168, 76, 0.25);
  color: var(--text-primary);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
}

.gold { color: var(--gold); }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth);
}

.nav.scrolled {
  background: rgba(10, 8, 6, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: opacity 0.3s;
}

.nav-logo:hover { opacity: 0.7; }

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

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  transition: color 0.3s var(--ease-smooth);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease-out);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  color: var(--gold) !important;
  border: 1px solid var(--gold-dim);
  padding: 8px 20px;
  border-radius: 100px;
  transition: all 0.3s var(--ease-smooth) !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease-smooth);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 32px 80px;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.45;
  filter: saturate(0.7);
  transform: scale(1.05);
  animation: heroBgDrift 25s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroBgDrift {
  0% { transform: scale(1.05) translate(0, 0); }
  100% { transform: scale(1.1) translate(-1%, -1%); }
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(10, 8, 6, 0.1) 0%, rgba(10, 8, 6, 0.5) 65%, rgba(10, 8, 6, 0.88) 100%),
    linear-gradient(to bottom, transparent 70%, var(--bg-deep) 100%);
  z-index: 0;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: pulseGlow 8s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.hero-content {
  text-align: center;
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 400;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-headline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold-dim), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  transition: all 0.4s var(--ease-out);
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: var(--bg-deep);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(201, 168, 76, 0.25);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text-secondary);
  background: transparent;
  padding: 14px 24px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.label-number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  font-style: italic;
}

.label-line {
  width: 48px;
  height: 1px;
  background: var(--gold-dim);
}

.label-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  max-width: 640px;
}

.about-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.85;
}

.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ============================================
   TIMELINE (Experience)
   ============================================ */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold-dim), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--gold-dim);
  background: var(--bg-deep);
  transition: all 0.3s var(--ease-smooth);
}

.timeline-item:hover .timeline-dot {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.3);
  background: var(--gold);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.4s var(--ease-out);
}

.timeline-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateX(8px);
}

.timeline-date {
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 8px 0 4px;
}

.timeline-company {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.skills-group-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: all 0.35s var(--ease-out);
  cursor: default;
}

.badge:hover {
  border-color: var(--gold-dim);
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.05);
  transform: translateY(-2px);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s var(--ease-out);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--glow);
}

.project-card-inner {
  padding: 36px;
}

.project-number {
  font-family: var(--font-display);
  font-size: 3rem;
  color: rgba(201, 168, 76, 0.08);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 16px;
  transition: color 0.4s var(--ease-smooth);
}

.project-card:hover .project-number {
  color: rgba(201, 168, 76, 0.15);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-tech span {
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(201, 168, 76, 0.06);
  color: var(--gold-dim);
  letter-spacing: 0.03em;
  font-weight: 500;
  border: 1px solid rgba(201, 168, 76, 0.08);
}

.project-link {
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 500;
  transition: all 0.3s var(--ease-smooth);
  letter-spacing: 0.02em;
}

.project-link:hover {
  color: var(--gold-light);
  letter-spacing: 0.06em;
}

/* ============================================
   EDUCATION
   ============================================ */
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  transition: all 0.4s var(--ease-out);
}

.edu-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.edu-date {
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.edu-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 8px 0 4px;
}

.edu-school {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.edu-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ============================================
   CONTACT
   ============================================ */
.section-contact {
  padding-bottom: 80px;
}

.contact-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 48px;
  line-height: 1.8;
}

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

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  transition: all 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.contact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  border: 1px solid rgba(201, 168, 76, 0.1);
  transition: all 0.3s var(--ease-smooth);
}

.contact-card:hover .contact-icon {
  background: rgba(201, 168, 76, 0.14);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.15);
}

.contact-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.contact-value {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.contact-card:hover .contact-value {
  color: var(--gold-light);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  :root {
    --section-gap: 100px;
  }

  .skills-grid,
  .projects-grid,
  .education-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .about-stats {
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(10, 8, 6, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 32px;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-out);
    border-left: 1px solid var(--border);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a::after { display: none; }

  .nav-links a {
    font-size: 1rem;
  }

  .nav-cta {
    text-align: center;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .hero {
    padding: 100px 24px 60px;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }

  .btn {
    width: 100%;
    max-width: 260px;
  }

  .container {
    padding: 0 20px;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 36px;
  }

  .about-stats {
    flex-direction: column;
    gap: 24px;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline-card {
    padding: 24px;
  }

  .project-card-inner {
    padding: 28px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2.4rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }
}

/* ============================================
   SECTION BACKGROUND IMAGES
   ============================================ */
.section-with-bg {
  overflow: hidden;
}

.section-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.3;
  filter: saturate(0.6);
  transform: scale(1.05);
  transition: opacity 1s var(--ease-smooth);
  pointer-events: none;
}

.section-bg-creation {
  opacity: 0.35;
  filter: blur(0.5px) saturate(0.8);
}

.section-bg-angels {
  opacity: 0.25;
  object-position: center 30%;
  filter: blur(1px) saturate(0.5);
}

.section-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(10, 8, 6, 0.25) 0%, rgba(10, 8, 6, 0.7) 75%),
    linear-gradient(to bottom, var(--bg-deep) 0%, transparent 12%, transparent 88%, var(--bg-deep) 100%);
  z-index: 0;
}

.section-with-bg .container {
  position: relative;
  z-index: 1;
}

/* ============================================
   SUBTLE AMBIENT EFFECTS
   ============================================ */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(201, 168, 76, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(160, 120, 76, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.section:first-of-type::before {
  display: none;
}

/* ============================================
   NAV PUZZLE LINK
   ============================================ */
.nav-puzzle {
  color: var(--gold) !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em;
}

.nav-puzzle::after {
  background: var(--gold) !important;
}

.active-page {
  color: var(--text-primary) !important;
}

.active-page::after {
  width: 100% !important;
}

/* ============================================
   PUZZLE PAGE
   ============================================ */
.puzzle-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.puzzle-main {
  flex: 1;
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 80px;
}

.puzzle-header {
  margin-bottom: 40px;
}

.puzzle-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.8;
}

/* ── Countdown ────────────────────────────── */
.puzzle-countdown {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 24px;
  margin-bottom: 40px;
}

.countdown-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.countdown-timer {
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* ── Puzzle Card ──────────────────────────── */
.puzzle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 48px;
  transition: border-color 0.4s var(--ease-smooth);
}

.puzzle-card:hover {
  border-color: var(--border-hover);
}

.puzzle-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.puzzle-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.puzzle-difficulty {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.puzzle-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.puzzle-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

/* ── Code block ───────────────────────────── */
.puzzle-code-wrapper {
  background: #0c0a08;
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 32px;
}

.puzzle-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(201, 168, 76, 0.03);
  border-bottom: 1px solid rgba(201, 168, 76, 0.06);
}

.code-lang {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.15);
}

.puzzle-code {
  padding: 24px;
  margin: 0;
  overflow-x: auto;
}

.puzzle-code code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre;
  tab-size: 2;
}

/* ── Answer section ───────────────────────── */
.puzzle-answer-section {
  margin-bottom: 24px;
}

.puzzle-answer-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.puzzle-input-row {
  display: flex;
  gap: 12px;
}

.puzzle-input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Fira Code', monospace;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.3s var(--ease-smooth);
}

.puzzle-input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08);
}

.puzzle-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.puzzle-submit {
  padding: 14px 28px;
  white-space: nowrap;
  border-radius: 12px;
}

.puzzle-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.puzzle-feedback {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 1.4em;
  transition: color 0.3s;
}

.puzzle-feedback.success {
  color: #6bcb77;
}

.puzzle-feedback.error {
  color: #e8635a;
}

/* ── Shake animation ─────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.shake {
  animation: shake 0.4s ease;
}

/* ── Hints ────────────────────────────────── */
.puzzle-hints-section {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.puzzle-hint-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 24px;
}

.puzzle-hint-btn svg {
  flex-shrink: 0;
}

.puzzle-hints-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.puzzle-hint {
  padding: 16px 20px;
  background: rgba(201, 168, 76, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.08);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hint-number {
  color: var(--gold);
  font-weight: 600;
  margin-right: 4px;
}

.puzzle-solution-btn {
  margin-top: 16px;
  color: var(--gold) !important;
  font-weight: 500;
}

.puzzle-solution-btn:hover {
  color: var(--gold-light) !important;
}

/* ── Solution reveal ─────────────────────── */
.puzzle-solution {
  margin-top: 20px;
  padding: 20px 24px;
  background: rgba(107, 203, 119, 0.06);
  border: 1px solid rgba(107, 203, 119, 0.15);
  border-radius: 14px;
}

.solution-header {
  font-size: 0.78rem;
  color: #6bcb77;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

.solution-answer {
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Artwork ──────────────────────────────── */
.artwork-wrapper {
  margin-top: 20px;
}

.artwork-unlock {
  text-align: center;
  margin-bottom: 40px;
}

.artwork-unlock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(107, 203, 119, 0.08);
  border: 1px solid rgba(107, 203, 119, 0.15);
  color: #6bcb77;
  margin-bottom: 16px;
}

.artwork-unlock-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--gold);
}

.artwork-unlock-sub {
  font-size: 1rem;
  color: var(--text-secondary);
}

.artwork-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s var(--ease-out);
}

.artwork-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--glow);
}

.artwork-image-wrapper {
  position: relative;
  width: 100%;
  min-height: 200px;
  max-height: 500px;
  overflow: hidden;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.artwork-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.artwork-info {
  padding: 36px;
}

.artwork-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.artwork-artist {
  font-size: 0.92rem;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 400;
}

.artwork-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.artwork-funfact {
  padding: 20px 24px;
  background: rgba(201, 168, 76, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.08);
  border-radius: 14px;
}

.funfact-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

.funfact-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}

.artwork-met-link {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-smooth);
}

.artwork-met-link:hover {
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

/* ── Hidden utility ──────────────────────── */
.hidden {
  display: none !important;
}

/* ── Artwork image placeholder ───────────── */
.artwork-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.artwork-placeholder-icon {
  font-size: 3rem;
  opacity: 0.6;
}

/* ── Puzzle page responsive ──────────────── */
@media (max-width: 768px) {
  .puzzle-main {
    padding-top: calc(var(--nav-height) + 40px);
  }

  .puzzle-card {
    padding: 24px;
    border-radius: 16px;
  }

  .puzzle-title {
    font-size: 1.3rem;
  }

  .puzzle-code code {
    font-size: 0.82rem;
  }

  .puzzle-input-row {
    flex-direction: column;
  }

  .puzzle-submit {
    width: 100%;
  }

  .artwork-info {
    padding: 24px;
  }

  .artwork-title {
    font-size: 1.3rem;
  }

  .artwork-image-wrapper {
    max-height: 350px;
  }

  .artwork-image {
    max-height: 350px;
  }
}

@media (max-width: 480px) {
  .puzzle-card {
    padding: 20px;
  }

  .puzzle-code {
    padding: 16px;
  }

  .puzzle-code code {
    font-size: 0.78rem;
  }

  .artwork-unlock-title {
    font-size: 1.6rem;
  }
}
