/* =========================================================
   BOAGO OBUSENG — PORTFOLIO STYLESHEET
   ========================================================= */

:root {
  --bg:        #0a0a0c;
  --bg-alt:    #111114;
  --bg-raised: #16161a;
  --text:      #f3f1ec;
  --text-dim:  #93939c;
  --text-faint:#5c5c64;
  --accent:    #d3a34e;
  --accent-2:  #7c8a72;
  --line:      rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);
  --cursor-fill: rgba(243,241,236,0.12);
  --success:   #a9c19a;
  --error:     #e08a75;
  --nav-scrolled: rgba(10,10,12,0.72);

  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  --container: 1280px;
  --gutter: clamp(24px, 5vw, 64px);

  --ease: cubic-bezier(.16,.84,.44,1);
  --ease-soft: cubic-bezier(.25,.46,.45,.94);
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  --bg:        #faf9f6;
  --bg-alt:    #f0eee7;
  --bg-raised: #ffffff;
  --text:      #17171a;
  --text-dim:  #55555e;
  --text-faint:#8c8c93;
  --accent:    #8a611c;
  --line:      rgba(10,10,12,0.10);
  --line-strong: rgba(10,10,12,0.20);
  --cursor-fill: rgba(10,10,12,0.08);
  --success:   #3f6b2f;
  --error:     #b23b26;
  --nav-scrolled: rgba(250,249,246,0.78);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.no-scroll { overflow: hidden; height: 100%; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }
::selection { background: var(--accent); color: #0a0a0c; }

svg { display: block; }

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

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Section label / eyebrow shared patterns ---------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.section-label span:first-child {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
}

section { position: relative; padding: clamp(80px, 12vw, 160px) 0; }

/* =========================================================
   PRELOADER
   ========================================================= */
.preloader {
  /* Always renders dark, regardless of the chosen site theme — the
     preloader canvas draws light-colored particles that need a dark
     backdrop to stay visible. */
  --bg: #0a0a0c;
  --bg-alt: #111114;
  --text: #f3f1ec;
  --text-dim: #93939c;
  --text-faint: #5c5c64;
  --accent: #d3a34e;
  --accent-2: #7c8a72;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);

  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s var(--ease), visibility 0.9s var(--ease);
}
.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.preloader-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}
.preloader-count {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(48px, 9vw, 96px);
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.preloader-count::after {
  content: '%';
  font-size: 0.35em;
  color: var(--accent);
}
.preloader-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.preloader-bar-track {
  width: min(260px, 60vw);
  height: 1px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.preloader-bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--accent);
  transform-origin: left;
}
.preloader-corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.preloader-corner--tl { top: 32px; left: 32px; }
.preloader-corner--br { bottom: 32px; right: 32px; text-align: right; }

/* =========================================================
   CUSTOM CURSOR
   ========================================================= */
.cursor, .cursor-follower {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9000;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor {
  width: 6px; height: 6px;
  background: var(--accent);
}
.cursor-follower {
  width: 38px; height: 38px;
  border: 1px solid var(--line-strong);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cursor-follower::after {
  content: attr(data-text);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  white-space: nowrap;
}
.cursor-follower.is-active {
  width: 84px; height: 84px;
  background: var(--cursor-fill);
  border-color: transparent;
}
.cursor-follower.is-active[data-text] {
  background: var(--accent);
}
.cursor-follower.is-active::after { opacity: 1; }

[data-magnetic] {
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1);
  display: inline-flex;
}

.about-portrait:hover .portrait-badge { animation-play-state: paused; }
.about-portrait:hover .portrait-glow { animation-duration: 1.6s; }

@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-follower { display: none; }
  .social-link::after { display: none; }
}

/* =========================================================
   NOISE OVERLAY
   ========================================================= */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--gutter);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
  background: var(--nav-scrolled);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  display: flex;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(.2,.9,.3,1);
}
.nav-logo:hover { opacity: 0.8; transform: scale(1.05); }
.nav-logo-b { color: var(--text); }
.nav-logo-o { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 40px;
}
.nav-links a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-hire {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.nav-hire::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 35%; height: 100%;
  background: rgba(255,255,255,0.35);
  transform: skewX(-20deg);
  transition: left 0.65s cubic-bezier(.2,.9,.3,1);
  pointer-events: none;
}
.nav-hire:hover::before { left: 130%; }
.nav-hire:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.theme-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  margin-left: 14px;
  flex-shrink: 0;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.2s cubic-bezier(.2,.9,.3,1);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.2,.9,.3,1);
}
.theme-toggle .icon-sun { opacity: 0; transform: scale(0.4) rotate(-90deg); }
.theme-toggle .icon-moon { opacity: 1; transform: scale(1) rotate(0deg); }
[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; transform: scale(1) rotate(0deg); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: scale(0.4) rotate(90deg); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  z-index: 600;
}
.nav-burger span {
  height: 1px;
  width: 100%;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.nav-burger.is-active span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.nav-burger.is-active span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu a {
  font-size: clamp(28px, 8vw, 40px);
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px var(--gutter) 60px;
  overflow: hidden;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}
.hero-content { position: relative; z-index: 2; max-width: 1100px; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.eyebrow-line { width: 36px; height: 1px; background: var(--accent); }

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 11vw, 148px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}
.hero-name-word { display: flex; overflow: hidden; }
.hero-name-word span {
  display: inline-block;
  --reveal: 110%;
  transform: translateY(var(--reveal));
  transition: transform 0.9s cubic-bezier(.16,.84,.44,1), color 0.35s ease;
}
.hero-name.is-in .hero-name-word span { --reveal: 0%; }
.hero-name-word span:hover {
  transform: translateY(calc(var(--reveal) - 12px)) scale(1.08);
  color: var(--accent);
}
.hero-name-word--indent { margin-left: clamp(0px, 8vw, 110px); color: var(--accent); }

.hero-roles {
  height: 34px;
  overflow: hidden;
  margin: 30px 0 22px;
}
.hero-roles-inner {
  display: flex;
  flex-direction: column;
}
.hero-roles-inner span {
  height: 34px;
  display: flex;
  align-items: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--accent);
}

.hero-bio {
  max-width: 480px;
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 44px;
}

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

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 100px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--bg);
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 35%; height: 100%;
  background: rgba(255,255,255,0.35);
  transform: skewX(-20deg);
  transition: left 0.65s cubic-bezier(.2,.9,.3,1);
  pointer-events: none;
}
.btn-primary:hover::before { left: 130%; }
.btn-primary svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:hover svg { transform: rotate(45deg); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  position: absolute;
  right: var(--gutter);
  bottom: 130px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 2;
  text-align: right;
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-num sup { color: var(--accent); font-size: 14px; }
.stat-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }

.hero-scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scroll-line {
  width: 1px;
  height: 46px;
  background: var(--accent);
  animation: scrollLine 2.2s var(--ease-soft) infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.about-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}
.about-portrait { position: relative; display: inline-flex; }
.portrait-frame {
  width: min(320px, 100%);
  aspect-ratio: 4/5;
  border: 1px solid var(--line);
  padding: 14px;
}
.portrait-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.portrait-initials {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(64px, 9vw, 96px);
  color: var(--accent);
  opacity: 0.85;
  z-index: 2;
}
.portrait-glow {
  position: absolute;
  width: 220px; height: 220px;
  background: rgba(211,163,78,0.35);
  border-radius: 50%;
  filter: blur(10px);
  animation: glowPulse 5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
}
.portrait-badge {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 100px; height: 100px;
  animation: spin 16s linear infinite;
  z-index: 5;
}
@keyframes spin { to { transform: rotate(360deg); } }
.badge-ring { width: 100%; height: 100%; }
.badge-ring path { }
.badge-ring text {
  fill: var(--text);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-arrow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--accent);
  transform: rotate(45deg);
  animation: none;
}

.about-lead { font-size: 20px; font-weight: 500; margin-bottom: 20px; }
.about-lead strong { color: var(--accent); font-weight: 600; }
.about-body { color: var(--text-dim); margin-bottom: 16px; max-width: 60ch; }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 40px 0 36px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.skill-category h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.skill-tags span:hover { border-color: var(--accent); color: var(--accent); }

.download-cv {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), gap 0.3s var(--ease);
}
.download-cv svg { width: 16px; height: 16px; }
.download-cv:hover { border-color: var(--accent); color: var(--accent); gap: 16px; }

/* =========================================================
   SERVICES
   ========================================================= */
.services-header { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter) 60px; }
.services-headline { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.02em; }
.services-list { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.service-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 24px;
  border-top: 1px solid var(--line);
  overflow: hidden;
  transition: padding-left 0.4s var(--ease);
}
.services-list .service-item:last-child { border-bottom: 1px solid var(--line); }

.service-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  width: 60px;
  flex-shrink: 0;
}
.service-content { flex: 1; min-width: 0; }
.service-content h3 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  margin-bottom: 10px;
  transition: color 0.35s var(--ease);
}
.service-content p {
  color: var(--text-dim);
  max-width: 60ch;
  margin-bottom: 16px;
}
.service-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.service-tags span {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 13px;
}
.service-arrow {
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(45deg);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.service-arrow svg { width: 20px; height: 20px; transition: color 0.4s var(--ease); }
.service-bg-shape {
  position: absolute;
  top: var(--my, 50%);
  left: var(--mx, 15%);
  width: 240px;
  height: 240px;
  margin-left: -120px;
  margin-top: -120px;
  border-radius: 50%;
  background: rgba(211,163,78,0.16);
  filter: blur(45px);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.service-item:hover { padding-left: 34px; }
.service-item:hover .service-content h3 { color: var(--accent); }
.service-item:hover .service-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: rotate(0deg);
}
.service-item:hover .service-bg-shape { opacity: 1; }

/* =========================================================
   PORTFOLIO / CREATIVE ARCHIVE
   ========================================================= */
.portfolio-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.portfolio-headline { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.02em; }

.portfolio-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 360px;
  gap: 20px;
}
.project-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  transition: transform 0.35s cubic-bezier(.16,.84,.44,1), border-color 0.35s ease;
  will-change: transform;
}
.project-card:hover { border-color: var(--line-strong); }
.project-glare {
  position: absolute;
  top: 0; left: 0;
  width: 200px; height: 200px;
  margin-left: -100px;
  margin-top: -100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  filter: blur(36px);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:hover .project-glare { opacity: 1; }
.project-card--large { grid-column: span 2; grid-row: span 2; }
.project-card--wide { grid-column: span 2; }

.project-visual { position: absolute; inset: 0; }
.project-placeholder {
  position: relative;
  width: 100%; height: 100%;
  background: var(--c1, #1a1a2e);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15%;
  overflow: hidden;
  transition: transform 0.7s var(--ease);
}
.project-card--large .project-placeholder { align-items: center; padding-top: 0; }
.project-card:hover .project-placeholder { transform: scale(1.06); }

.project-logo-text {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1.15;
  color: rgba(255,255,255,0.92);
  text-align: center;
  letter-spacing: 0.02em;
}

.project-shape { position: absolute; opacity: 0.5; }
.project-shape--circle { width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); top: -60px; right: -60px; }
.project-shape--square { width: 140px; height: 140px; border: 1px solid rgba(255,255,255,0.2); bottom: -30px; left: -30px; transform: rotate(20deg); }
.project-shape--tri { width: 0; height: 0; border-left: 90px solid transparent; border-right: 90px solid transparent; border-bottom: 150px solid rgba(255,255,255,0.08); bottom: -20px; right: 10%; }
.project-shape--ring { width: 180px; height: 180px; border-radius: 50%; border: 22px solid rgba(255,255,255,0.08); top: 50%; left: 50%; transform: translate(-50%,-50%); }
.project-shape--wave { width: 340px; height: 340px; border-radius: 40%; background: rgba(255,255,255,0.06); top: -140px; left: -60px; }
.project-shape--cross { width: 160px; height: 1px; background: rgba(255,255,255,0.2); top: 50%; left: 50%; transform: translate(-50%,-50%); }
.project-shape--cross::after { content:''; position:absolute; width: 1px; height: 160px; background: rgba(255,255,255,0.2); top: -80px; left: 0; }
.project-shape--diamond { width: 130px; height: 130px; border: 1px solid rgba(255,255,255,0.22); transform: rotate(45deg); top: 20%; right: 15%; }
.project-shape--dots { width: 100%; height: 100%; background: rgba(255,255,255,0.06); opacity: 0.4; }
.project-shape--arc { width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); border-bottom-color: transparent; border-left-color: transparent; top: -80px; right: -80px; }

.project-meta {
  /* This scrim sits over saturated flat-color artwork and stays dark
     regardless of site theme, so its accent text must stay the bright
     gold rather than the theme-adjusted (darker, light-mode) accent. */
  --accent: #d3a34e;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 26px 22px 22px;
  background: rgba(0,0,0,0.82);
}
.project-index { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 700; }
.project-info h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; color: #f3f1ec; }
.project-info p { font-size: 12px; color: rgba(255,255,255,0.65); }
.project-tags { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.project-tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
}
.project-hover-cta {
  position: absolute;
  top: 22px; right: 22px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 100px;
  background: var(--accent);
  color: var(--bg);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.project-hover-cta svg { width: 14px; height: 14px; }
.project-card:hover .project-hover-cta { opacity: 1; transform: translateY(0); }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.lightbox.is-open { visibility: visible; opacity: 1; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,6,8,0.92);
  backdrop-filter: blur(6px);
}
.lightbox-inner {
  position: relative;
  z-index: 2;
  width: min(1000px, 92vw);
  max-height: 88vh;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transform: scale(0.94) translateY(16px);
  transition: transform 0.45s var(--ease);
}
.lightbox.is-open .lightbox-inner { transform: scale(1) translateY(0); }

.lightbox-visual {
  position: relative;
  min-height: 320px;
  background: var(--c1, #1a1a2e);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox-visual .project-logo-text { font-size: clamp(22px, 3vw, 34px); }

.lightbox-details {
  padding: 44px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.lightbox-index { font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--accent); letter-spacing: 0.05em; margin-bottom: 14px; }
.lightbox-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; margin-bottom: 14px; line-height: 1.15; }
.lightbox-desc { color: var(--text-dim); margin-bottom: 24px; }
.lightbox-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.lightbox-tags span {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text-dim);
}
.lightbox-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.lightbox-meta-row span:first-child { font-family: var(--font-mono); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.lightbox-meta { margin-top: auto; }

.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(10,10,12,0.75);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.lightbox-close svg { width: 18px; height: 18px; color: #fff; }
.lightbox-close:hover { background: var(--accent); transform: rotate(90deg); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease);
}
.lightbox-nav svg { width: 20px; height: 20px; color: #fff; }
.lightbox-nav:hover { background: var(--accent); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 720px) {
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

/* =========================================================
   PROCESS
   ========================================================= */
.process-header { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter) 30px; }
.process-headline { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.02em; margin-bottom: 18px; }
.process-intro { color: var(--text-dim); max-width: 56ch; }

.process-steps {
  max-width: var(--container);
  margin: 40px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.process-step { position: relative; padding: 30px 28px 0 0; }
.step-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 20px;
}
.step-line {
  position: absolute;
  top: 8px;
  left: 0; right: 0;
  height: 1px;
  background: var(--line);
}
.step-line::after {
  content: '';
  position: absolute;
  top: -3px; left: -3px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.step-icon {
  width: 48px; height: 48px;
  margin-bottom: 22px;
  color: var(--accent);
  transition: transform 0.4s cubic-bezier(.2,.9,.3,1);
}
.step-icon svg { width: 100%; height: 100%; }
.step-icon path, .step-icon circle, .step-icon rect {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.3s cubic-bezier(.16,.84,.44,1);
}
.process-step.is-visible .step-icon path,
.process-step.is-visible .step-icon circle,
.process-step.is-visible .step-icon rect { stroke-dashoffset: 0; }
.process-step[data-step="2"] .step-icon path,
.process-step[data-step="2"] .step-icon circle,
.process-step[data-step="2"] .step-icon rect { transition-delay: 0.1s; }
.process-step[data-step="3"] .step-icon path,
.process-step[data-step="3"] .step-icon circle,
.process-step[data-step="3"] .step-icon rect { transition-delay: 0.2s; }
.process-step[data-step="4"] .step-icon path,
.process-step[data-step="4"] .step-icon circle,
.process-step[data-step="4"] .step-icon rect { transition-delay: 0.3s; }
.process-step:hover .step-icon { transform: translateY(-6px) rotate(-4deg); }
.step-content h3 { font-size: 21px; font-weight: 600; margin-bottom: 10px; }
.step-content p { color: var(--text-dim); font-size: 14px; max-width: 30ch; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 90px);
}
.contact-headline { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 5.5vw, 66px); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 22px; }
.contact-sub { color: var(--text-dim); max-width: 42ch; margin-bottom: 40px; }

.contact-details { display: flex; flex-direction: column; gap: 16px; margin-bottom: 46px; }
.contact-detail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 15px;
  width: fit-content;
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.contact-detail:hover { border-color: var(--accent); color: var(--accent); }
.detail-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.contact-socials { display: flex; gap: 12px; }
.social-link {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.2s cubic-bezier(.2,.9,.3,1);
}
.social-link-inner {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-link svg { width: 18px; height: 18px; fill: currentColor; transition: fill 0.35s var(--ease); position: relative; z-index: 2; }
.social-link:hover { color: #fff; border-color: transparent; }
.social-link::after {
  content: attr(aria-label);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 6px 11px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  border: 1px solid var(--line);
  z-index: 3;
}
.social-link:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.social-link .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
  z-index: 1;
}
@keyframes rippleAnim {
  to { transform: scale(2.4); opacity: 0; }
}
.social-link[data-brand="linkedin"]:hover { background: #0A66C2; }
.social-link[data-brand="twitter"]:hover { background: #000000; }
.social-link[data-brand="dribbble"]:hover { background: #EA4C89; }
.social-link[data-brand="github"]:hover { background: #ffffff; color: #0a0a0c; }
.social-link[data-brand="github"] .ripple { background: rgba(10,10,12,0.35); }
.social-link[data-brand="instagram"]:hover { background: #E1306C; }
.social-link[data-brand="behance"]:hover { background: #1769FF; }

.contact-form { display: flex; flex-direction: column; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-field { display: flex; flex-direction: column; gap: 10px; position: relative; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.form-field input,
.form-field select,
.form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 10px 2px;
  transition: border-color 0.3s var(--ease);
  resize: none;
}
.form-field select { cursor: pointer; }
.form-field select option { background: var(--bg-alt); color: var(--text); }
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-faint); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--accent); outline: none; }
.form-field input:invalid:not(:placeholder-shown),
.form-field textarea:invalid:not(:placeholder-shown) { border-color: var(--error); }
.field-error {
  font-size: 11px;
  color: var(--error);
  min-height: 14px;
}
.honey-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 17px 34px;
  border-radius: 100px;
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: fit-content;
  transition: transform 0.35s var(--ease), opacity 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.form-submit::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 35%; height: 100%;
  background: rgba(255,255,255,0.35);
  transform: skewX(-20deg);
  transition: left 0.65s cubic-bezier(.2,.9,.3,1);
  pointer-events: none;
}
.form-submit:hover:not(:disabled)::before { left: 130%; }
.form-submit svg { width: 16px; height: 16px; }
.form-submit:hover:not(:disabled) { transform: translateY(-2px); }
.form-submit:disabled { opacity: 0.6; cursor: progress; }
.form-submit .btn-spinner {
  display: none;
  width: 15px; height: 15px;
  border: 2px solid rgba(10,10,12,0.3);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.form-submit.is-loading .btn-spinner { display: inline-block; }
.form-submit.is-loading svg { display: none; }
.form-submit.is-loading span { opacity: 0.85; }

.form-success, .form-error {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 14px 18px;
  border-radius: 6px;
  margin-top: 4px;
}
.form-success { background: rgba(124,138,114,0.15); color: var(--success); border: 1px solid rgba(124,138,114,0.35); }
.form-error { background: rgba(194,91,74,0.12); color: var(--error); border: 1px solid rgba(194,91,74,0.35); }
.form-success.is-visible, .form-error.is-visible { display: flex; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative;
  padding: 70px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.footer-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-logo { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.01em; }
.footer-tagline { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); letter-spacing: 0.04em; }
.footer-copy { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 20px; }
.footer-bg-text {
  font-family: var(--font-display);
  font-weight: 800;
  position: absolute;
  bottom: -0.28em;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(90px, 18vw, 220px);
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  white-space: nowrap;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

/* =========================================================
   SCROLL REVEAL BASE STATE (JS toggles .is-visible)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-soft);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Headline wipe: text is unmasked left-to-right as it enters view.
   Implemented as a keyframe animation (not a static clipped start state) so
   the IntersectionObserver can still detect the element before it reveals. */
@keyframes wipeIn {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(-10% -5% -10% -5%); }
}
.about-headline[data-reveal].is-visible,
.services-headline[data-reveal].is-visible,
.portfolio-headline[data-reveal].is-visible,
.process-headline[data-reveal].is-visible,
.contact-headline[data-reveal].is-visible {
  animation: wipeIn 1.1s var(--ease) both;
}

/* Portfolio cards: rise + scale in (uses translate/scale so it never conflicts with the tilt transform) */
.project-card[data-reveal] {
  transform: none;
  translate: 0 50px;
  scale: 0.94;
  transition: opacity 0.9s var(--ease-soft), translate 1s var(--ease), scale 1s var(--ease), transform 0.35s cubic-bezier(.16,.84,.44,1), border-color 0.35s ease;
}
.project-card[data-reveal].is-visible { translate: 0 0; scale: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
  .hero-name-word span { transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1140px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { margin-top: 40px; }
  .hero-stats { position: static; flex-direction: row; margin-top: 60px; gap: 40px; text-align: left; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }

  .process-steps { grid-template-columns: 1fr 1fr; gap: 50px 24px; }
  .process-step { padding-right: 0; }

  .portfolio-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 300px; }
  .project-card--large { grid-column: span 2; grid-row: span 1; }
  .project-card--wide { grid-column: span 2; }

  .lightbox-inner { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
  .lightbox-visual { min-height: 220px; }
}

@media (max-width: 720px) {
  section { padding: 70px 0; }
  .hero { padding-top: 120px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { justify-content: center; }

  .skills-grid { grid-template-columns: 1fr; gap: 26px; }

  .service-item { flex-wrap: wrap; align-items: flex-start; gap: 18px; padding: 30px 4px; }
  .service-arrow { display: none; }

  .portfolio-grid { grid-template-columns: 1fr; grid-auto-rows: 320px; }
  .project-card--large, .project-card--wide { grid-column: span 1; grid-row: span 1; }

  .process-steps { grid-template-columns: 1fr; gap: 42px; }

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

  .footer-bg-text { display: none; }
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.back-to-top-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.back-to-top-ring-track { fill: none; stroke: var(--line); stroke-width: 2; }
.back-to-top-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.1s linear, stroke 0.3s ease;
}
.back-to-top:hover .back-to-top-ring-fill { stroke: var(--bg); }
.back-to-top-arrow {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 2;
  transition: transform 0.3s var(--ease);
}
.back-to-top:hover .back-to-top-arrow { transform: translateY(-3px); }

@media (max-width: 720px) {
  .back-to-top { right: 18px; bottom: 18px; width: 48px; height: 48px; }
  .back-to-top-arrow { width: 16px; height: 16px; }
}

@media (max-width: 480px) {
  .hero-name { font-size: clamp(42px, 15vw, 60px); }
  .preloader-count { font-size: 56px; }
}


/* =========================================================
   REAL IMAGES (assets/images/*) — sit above the placeholders.
   If a file is missing, onerror removes the <img> and the
   flat-color placeholder underneath shows instead.
   ========================================================= */
.project-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 3;
  transition: transform 0.7s var(--ease);
}
.project-card:hover .project-img { transform: scale(1.06); }

.portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 3;
}

.lightbox-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* =========================================================
   PLAYGROUND (replaces Selected Work)
   ========================================================= */
.pg-header{max-width:var(--container);margin:0 auto;padding:0 var(--gutter) 56px}
.pg-headline{font-family:var(--font-display);font-weight:800;font-size:clamp(34px,5vw,60px);letter-spacing:-.02em}
.pg-headline[data-reveal].is-visible{animation:wipeIn 1.1s var(--ease) both}
.pg-intro{max-width:52ch;margin-top:18px;color:var(--text-dim)}
.pg-intro strong{font-family:var(--font-mono);color:var(--accent)}
.pg-grid{max-width:var(--container);margin:0 auto;padding:0 var(--gutter);display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.pg-card{position:relative;display:flex;flex-direction:column;min-height:340px;background:var(--bg-alt);border:1px solid var(--line);border-radius:4px;overflow:hidden;transition:border-color .3s}
.pg-card:hover,.pg-card:focus-within{border-color:var(--line-strong)}
.pg-card--wide{grid-column:span 2}
.pg-card header{padding:20px 22px 0;position:relative;z-index:2;pointer-events:none}
.pg-card h3{font-size:16px;font-weight:600}
.pg-card header p{font-size:12px;color:var(--text-dim);margin-top:2px}
#pg-swarm{position:absolute;inset:0;width:100%;height:100%;background:#0a0a0c;touch-action:none;cursor:crosshair}
.pg-card--wide header h3,.pg-card--wide header p{color:#f3f1ec}.pg-card--wide header p{opacity:.6}
.pg-live{flex:1;display:flex;flex-direction:column;gap:10px;padding:14px 22px 22px;min-height:0}
.pg-live-stage{flex:1;min-height:110px;display:grid;place-items:center;background:var(--bg);border-radius:3px;overflow:hidden}
.pg-live-el{width:88px;height:88px}
.pg-chips{display:flex;gap:6px}
.pg-chips button,.pg-heart{font-family:var(--font-mono);font-size:11px}
.pg-chips button{padding:4px 12px;border:1px solid var(--line-strong);border-radius:99px;color:var(--text-dim);transition:all .2s}
.pg-chips button:hover{border-color:var(--accent);color:var(--accent)}
#pg-css{width:100%;height:96px;resize:none;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:3px;padding:10px;font:12px/1.6 var(--font-mono);tab-size:2}
@keyframes pgspin{to{rotate:360deg}}
@keyframes pgfloat{50%{translate:0 -14px}}
.pg-micro{flex:1;display:flex;align-items:center;justify-content:space-around;gap:12px;padding:20px;flex-wrap:wrap}
.pg-switch{width:64px;height:34px;border-radius:99px;background:var(--bg);border:1px solid var(--line-strong);position:relative;transition:background .3s}
.pg-switch i{position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:var(--text-dim);transition:transform .5s cubic-bezier(.34,1.9,.5,1),background .3s}
.pg-switch[aria-checked=true]{background:var(--accent)}
.pg-switch[aria-checked=true] i{transform:translateX(30px);background:var(--bg)}
.pg-heart{position:relative;width:56px;height:56px;border-radius:50%;border:1px solid var(--line-strong)}
.pg-heart svg{width:26px;height:26px;margin:auto;fill:none;stroke:var(--text-dim);stroke-width:1.6;transition:transform .4s cubic-bezier(.34,1.9,.5,1)}
.pg-heart.on svg{fill:#e0574b;stroke:#e0574b;transform:scale(1.2)}
.pg-spark{position:absolute;left:50%;top:50%;width:6px;height:6px;margin:-3px;border-radius:50%;background:var(--accent);animation:pgspark .6s ease-out forwards;pointer-events:none}
@keyframes pgspark{from{transform:rotate(var(--a)) translateY(0)}to{transform:rotate(var(--a)) translateY(-40px) scale(0);opacity:0}}
.pg-stars{display:flex;gap:2px;width:100%;justify-content:center}
.pg-stars button{font-size:26px;line-height:1;color:var(--text-faint);transition:color .15s,transform .25s cubic-bezier(.34,1.9,.5,1)}
.pg-stars button.on{color:var(--accent);transform:scale(1.25)}
.pg-holo-wrap{flex:1;display:grid;place-items:center;perspective:700px;padding:16px}
.pg-holo{--mx:50%;--my:50%;width:170px;height:220px;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#f3f1ec;background:radial-gradient(circle at var(--mx) var(--my),rgba(255,255,255,.35),transparent 45%),conic-gradient(from 210deg at var(--mx) var(--my),#d3a34e,#c2453f,#5b6fd6,#3fb6a8,#d3a34e),#111;background-blend-mode:overlay,normal;box-shadow:0 24px 50px rgba(0,0,0,.45);transition:transform .15s ease-out;touch-action:none}
.pg-holo span{font-weight:800;font-size:54px;letter-spacing:-.04em;mix-blend-mode:overlay}
.pg-holo small{font-family:var(--font-mono);font-size:10px;letter-spacing:.06em;opacity:.8}
.pg-wave-wrap{flex:1;display:flex;flex-direction:column;justify-content:center;gap:18px;padding:16px 18px 22px;touch-action:none}
#pg-wave{display:flex;flex-wrap:wrap;justify-content:center;font-size:clamp(30px,3.4vw,44px);line-height:1.15;min-height:100px;align-content:center}
#pg-wave span{display:inline-block;text-align:center;font-weight:100;transition:font-weight .12s,transform .2s}
#pg-wave-in{background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:3px;padding:9px 12px;font:13px var(--font-mono)}
.pg-pads{flex:1;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:16px 22px 22px}
.pg-pad{position:relative;overflow:hidden;border:1px solid var(--line-strong);border-radius:4px;background:var(--bg);font:700 13px var(--font-mono);color:var(--text-dim);min-height:64px;transition:background .1s,color .1s,transform .1s}
.pg-pad.hit{background:var(--accent);color:var(--bg);transform:scale(.94)}
.pg-ring{position:absolute;left:50%;top:50%;width:10px;height:10px;margin:-5px;border-radius:50%;border:2px solid var(--accent);animation:pgring .7s ease-out forwards;pointer-events:none}
@keyframes pgring{to{transform:scale(9);opacity:0}}
.pg-done{max-width:var(--container);margin:36px auto 0;padding:0 var(--gutter);font-family:var(--font-serif);font-style:italic;font-size:24px;color:var(--accent)}
.pg-done a{text-decoration:underline;text-underline-offset:4px}
@media(max-width:980px){.pg-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.pg-grid{grid-template-columns:1fr}.pg-card--wide{grid-column:auto;min-height:380px}}

/* Holo card with real portrait */
.pg-holo{position:relative;overflow:hidden;width:180px;height:225px}
.pg-holo-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1}
.pg-holo.has-photo{background:#111}
.pg-holo.has-photo span{display:none}
.pg-holo.has-photo::after{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;mix-blend-mode:color-dodge;opacity:.55;background:radial-gradient(circle at var(--mx) var(--my),rgba(255,255,255,.55),transparent 45%),conic-gradient(from 210deg at var(--mx) var(--my),#d3a34e,#c2453f,#5b6fd6,#3fb6a8,#d3a34e)}
.pg-holo.has-photo small{position:absolute;left:0;right:0;bottom:0;z-index:3;padding:22px 0 10px;text-align:center;background:linear-gradient(transparent,rgba(0,0,0,.7))}
