/* ============================================================
   CSS VARIABLES & RESET
============================================================ */
:root {
  /* shared (non-color) variables */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Syne', sans-serif;
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
}

/* DARK theme (default) — original black & gold */
:root,
[data-theme="dark"] {
  --bg:        #0b0b0b;
  --bg2:       #111111;
  --bg3:       #181818;
  --gold:      #c8a96e;
  --gold-dim:  #8a6e40;
  --cream:     #f0e8d8;
  --cream-dim: #a89880;
  --white:     #ffffff;
  --border:    rgba(200,169,110,0.18);
  --hero-grad: linear-gradient(160deg, #0b0b0b 0%, #141210 50%, #0b0b0b 100%);
  --hero-glow: rgba(200,169,110,0.07);
  --hero-glow2: rgba(200,169,110,0.04);
  --grid-line: rgba(200,169,110,0.04);
  --modal-bg:  rgba(11,11,11,0.96);
  --nav-bg: rgba(11,11,11,0.88);
}

/* LIGHT theme — blue & white */
[data-theme="light"] {
  --bg:        #ffffff;
  --bg2:       #f4f7fb;
  --bg3:       #e8eef7;
  --gold:      #1e54ff;
  --gold-dim:  #4a78ff;
  --cream:     #0a1228;
  --cream-dim: #5a6478;
  --white:     #ffffff;
  --border:    rgba(30,84,255,0.18);
  --hero-grad: linear-gradient(160deg, #ffffff 0%, #f4f7fb 50%, #ffffff 100%);
  --hero-glow: rgba(30,84,255,0.08);
  --hero-glow2: rgba(30,84,255,0.05);
  --grid-line: rgba(30,84,255,0.06);
  --modal-bg:  rgba(255,255,255,0.96);
  --nav-bg: rgba(255,255,255,0.88);
}

/* Smooth theme transition */
body, nav, section, footer, .project-card, .card-image,
.skill-tag, .filter-btn, .modal-overlay, .contact-btn {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

/* Visible focus outline for keyboard users (accessibility) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ============================================================
   CUSTOM CURSOR
============================================================ */
.cursor-dot,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--gold);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid var(--gold);
  transition: transform 0.12s var(--ease-out-expo),
              width 0.25s var(--ease-out-expo),
              height 0.25s var(--ease-out-expo),
              border-color 0.25s;
}
.cursor-ring.hovered {
  width: 56px; height: 56px;
  border-color: var(--cream);
}

/* ============================================================
   NAVIGATION
============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 5vw;
  transition: background 0.5s, padding 0.4s;
}
nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  padding: 1rem 5vw;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-logo img {
  height: 32px;       /* adjust to fit your logo */
  width: auto;
  display: block;
}
.footer-logo img {
  height: 44px;
  width: auto;
  display: block;
}
/* Logo theme switching — show white logo in dark mode, black logo in light mode */
.nav-logo .logo-light,
.footer-logo .logo-light { display: none; }
.nav-logo .logo-dark,
.footer-logo .logo-dark { display: block; }
[data-theme="light"] .nav-logo .logo-dark,
[data-theme="light"] .footer-logo .logo-dark { display: none; }
[data-theme="light"] .nav-logo .logo-light,
[data-theme="light"] .footer-logo .logo-light { display: block; }
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--cream-dim);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}
/* Show only the right icon for the current theme */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.25s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease-out-expo);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger (mobile) */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-burger span {
  display: block; width: 24px; height: 1.5px;
  background: var(--cream);
  transition: transform 0.35s, opacity 0.35s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   HERO — PARALLAX
============================================================ */
#hero {
  position: relative;
  height: 100vh;
  min-height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Layered parallax backgrounds */
.parallax-layer {
  position: absolute;
  inset: -20%;
  will-change: transform;
}
.layer-bg {
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, var(--hero-glow) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 20% 70%, var(--hero-glow2) 0%, transparent 60%),
    var(--hero-grad);
}
.layer-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.layer-noise {
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Floating geometric shapes */
.shape {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: 50%;
  will-change: transform;
}
.shape-1 { width: 420px; height: 420px; top: -80px; right: 5%; opacity: 0.5; }
.shape-2 { width: 220px; height: 220px; bottom: 10%; left: 8%; opacity: 0.3; }
.shape-3 { width: 100px; height: 100px; top: 30%; left: 20%; opacity: 0.2; border-radius: 0; transform: rotate(30deg); }

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 5vw;
}
.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.6rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.3s var(--ease-out-expo) forwards;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s 0.5s var(--ease-out-expo) forwards;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}
.hero-subtitle {
  font-family: var(--font-ui);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--cream-dim);
  max-width: 480px;
  margin: 0 auto 3rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s 0.75s var(--ease-out-expo) forwards;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  padding: 1rem 2.4rem;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s var(--ease-out-expo);
  opacity: 0;
  animation: fadeUp 0.9s 1s var(--ease-out-expo) forwards;
}
.hero-cta:hover {
  background: var(--cream);
  transform: translateY(-3px);
}
.hero-cta svg { transition: transform 0.3s var(--ease-out-expo); }
.hero-cta:hover svg { transform: translateX(5px); }

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fadeUp 1s 1.4s var(--ease-out-expo) forwards;
}
.hero-scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s 2s ease-in-out infinite;
}

/* ============================================================
   ABOUT SECTION
============================================================ */
#about {
  padding: 10rem 5vw;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 6rem;
  align-items: center;
}
.about-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.about-heading {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 2rem;
}
.about-heading em { font-style: italic; color: var(--gold); }
.about-text {
  font-size: 0.96rem;
  line-height: 1.85;
  color: var(--cream-dim);
  margin-bottom: 1.2rem;
}
.about-divider {
  width: 60px; height: 1px;
  background: var(--gold);
  margin: 2.5rem 0;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.skill-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  text-align: center;
  transition: border-color 0.3s, color 0.3s;
}
.skill-tag:hover { border-color: var(--gold); color: var(--gold); }

.about-visual {
  position: relative;
}
.about-img-frame {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--bg3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-img-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,169,110,0.08), transparent);
}
/* .about-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0.35;
}
.about-img-placeholder svg { width: 60px; opacity: 0.5; }
.about-img-placeholder p { font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; } */
.about-img-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.about-frame-border {
  position: absolute;
  top: 20px; right: -20px;
  bottom: -20px; left: 20px;
  border: 1px solid var(--border);
  pointer-events: none;
  z-index: -1;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 0.4rem;
}

/* ============================================================
   WORKS / GALLERY SECTION
============================================================ */
#works {
  padding: 8rem 5vw;
  background: var(--bg2);
}
.section-header {
  max-width: 1200px;
  margin: 0 auto 4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2rem;
}
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--cream);
}
.section-title em { font-style: italic; color: var(--gold); }

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-btn {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: all 0.28s;
}
.filter-btn:hover, .filter-btn.active {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
}

/* Gallery grid */
.gallery-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Each project card — image on top, solid caption bar below (Option 2).
   The image is never covered, so the real project colours show through. */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.5s var(--ease-in-out), transform 0.5s var(--ease-in-out), border-color 0.4s;
}
.project-card:hover,
.project-card:focus-visible { border-color: var(--gold-dim); }
/* Hidden by the category filter */
.project-card.is-hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}
/* Span variants — aspect ratio now lives on the image, not the whole card. */
.project-card.wide { grid-column: span 2; }
.project-card.tall { grid-row: span 2; }
.project-card.wide .card-image { aspect-ratio: 16/7; }
.project-card.tall .card-image { aspect-ratio: 3/4; }

/* Placeholder image fill */
.card-image {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-out-expo);
}
/* SVG placeholder visible when no img src */
.card-image .placeholder-fill {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.8rem;
  opacity: 0.35;
  color: var(--gold);
}
.card-image .placeholder-fill svg { width: 44px; }
.card-image .placeholder-fill span {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.project-card:hover .card-image img { transform: scale(1.06); }

/* Caption bar — sits below the image, always visible, solid background. */
.card-overlay {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.05rem 1.3rem 1.15rem;
  background: var(--bg2);
}
.card-category {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--cream);
}
.card-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--cream-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Arrow chip — floats over the image, fades in on hover/focus. */
.card-arrow {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.8) rotate(-45deg);
  transition: opacity 0.3s, transform 0.35s var(--ease-out-expo);
}
.project-card:hover .card-arrow,
.project-card:focus-visible .card-arrow { opacity: 1; transform: none; }

/* Gallery empty state */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 0;
  color: var(--cream-dim);
  font-size: 0.9rem;
  display: none;
}

/* ============================================================
   CONTACT SECTION
============================================================ */
#contact {
  padding: 10rem 5vw;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1;
  color: var(--cream);
  margin-bottom: 1.6rem;
}
.contact-heading em { font-style: italic; color: var(--gold); }
.contact-text {
  font-size: 0.96rem;
  color: var(--cream-dim);
  max-width: 500px;
  margin: 0 auto 3.5rem;
  line-height: 1.85;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.2rem;
  transition: all 0.3s var(--ease-out-expo);
}
.contact-btn.primary {
  color: var(--bg);
  background: var(--gold);
}
.contact-btn.primary:hover {
  background: var(--cream);
  transform: translateY(-3px);
}
.contact-btn.outline {
  color: var(--cream);
  border: 1px solid var(--border);
}
.contact-btn.outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}

/* ============================================================
   FOOTER
============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}
.footer-copy {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--cream-dim);
}
.footer-socials {
  display: flex;
  gap: 1.4rem;
}
.footer-socials a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.25s;
}
.footer-socials a:hover { color: var(--gold); }

/* ============================================================
   MODAL / LIGHTBOX
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  padding: 5vw;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-inner {
  max-width: 1400px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  transform: translateY(30px);
  transition: transform 0.5s var(--ease-out-expo);
}
.modal-overlay.open .modal-inner { transform: none; }

/* Large modal variant — opt in per project with modalSize: "large".
   Wider overall, with a bigger image column. */
.modal-overlay.size-large .modal-inner {
  max-width: 1700px;
  grid-template-columns: 1.6fr 1fr;
  gap: 3.5rem;
}
.modal-overlay.size-large .modal-img-wrap {
  aspect-ratio: 16/10;
}
.modal-overlay.size-large .modal-title {
  font-size: 2.9rem;
}
.modal-img-wrap {
  aspect-ratio: 4/3;
  background: var(--bg3);
  overflow: hidden;
  position: relative;
}
.modal-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}
.modal-info { padding: 1rem 0; }
.modal-cat {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 300;
  color: var(--cream); line-height: 1.1;
  margin-bottom: 1.2rem;
}
.modal-desc {
  font-size: 0.9rem; line-height: 1.8;
  color: var(--cream-dim); margin-bottom: 2rem;
}
.modal-tags {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.modal-tag {
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--cream-dim);
  padding: 0.35rem 0.75rem;
}
.modal-link {
  display: none;               /* shown by JS only when a project has a link */
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--gold);
  padding: 0.9rem 1.8rem;
  transition: background 0.3s, transform 0.3s var(--ease-out-expo);
}
.modal-link:hover {
  background: var(--cream);
  transform: translateY(-3px);
}
.modal-link svg { transition: transform 0.3s var(--ease-out-expo); }
.modal-link:hover svg { transform: translate(3px, -3px); }
.modal-close {
  position: absolute;
  top: 2rem; right: 2rem;
  background: none; border: 1px solid var(--border);
  color: var(--cream-dim); cursor: pointer;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: border-color 0.25s, color 0.25s;
}
.modal-close:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.5s; }

/* ============================================================
   KEYFRAMES
============================================================ */
@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
  #about { grid-template-columns: 1fr; gap: 3.5rem; }
  .about-frame-border { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card.wide { grid-column: span 2; }
  .modal-inner,
  .modal-overlay.size-large .modal-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; gap: 1.5rem; }
  .nav-links.open { display: flex; position: fixed; top: 70px; left: 0; right: 0; background: var(--nav-bg); backdrop-filter: blur(16px); padding: 2rem 5vw; border-top: 1px solid var(--border); }
  .nav-burger { display: flex; }
  .gallery-grid { grid-template-columns: 1fr; }
  .project-card.wide { grid-column: span 1; }
  .project-card.tall { grid-row: span 1; }
  .project-card.wide .card-image,
  .project-card.tall .card-image { aspect-ratio: 4/3; }
  .modal-inner { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-heading { font-size: 2.8rem; }
}

/* ============================================================
   TOUCH DEVICES — restore the native cursor (custom cursor hidden via JS)
============================================================ */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .project-card { cursor: pointer; }
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ============================================================
   REDUCED MOTION — respect users who prefer less animation (accessibility)
============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* Make sure content that fades/animates in is shown immediately */
  .hero-eyebrow, .hero-title, .hero-subtitle, .hero-cta,
  .hero-scroll-indicator, .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
