/* =========================================================
   HAMOUDA — Premium Personal Portfolio (v3)
   - All sections full-width on desktop
   - Personal photo in brand (replaces H), hero, About, footer
   - Light theme by default + dark mode toggle
   - Ghiath-inspired minimal layout
   ========================================================= */

/* ---------------------------------------------------------
   1. Tokens — LIGHT theme (default)
   --------------------------------------------------------- */
:root,
[data-theme="light"] {
  --bg: #f4f4f1;
  --bg-2: #ececea;
  --bg-3: #e2e2df;
  --surface: rgba(20, 20, 24, 0.04);
  --surface-2: rgba(20, 20, 24, 0.07);
  --surface-3: rgba(20, 20, 24, 0.11);
  --border: rgba(20, 20, 24, 0.12);
  --border-2: rgba(20, 20, 24, 0.22);

  --text: #14141a;
  --text-2: #4d4d57;
  --text-3: #8a8a93;
  --text-4: #b8b8be;

  --accent: #ff5a3c;
  --accent-2: #ff8a5b;
  --accent-3: #e63b1f;
  --accent-glow: rgba(255, 90, 60, 0.18);
  --cool: #0a84ff;
  --cool-2: #30d158;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.12);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 3vw, 56px);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.32, 1);
  --t-fast: 180ms;
  --t: 320ms;
  --t-slow: 600ms;

  --header-h: 64px;
}

[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg-2: #0f0f12;
  --bg-3: #131318;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.18);

  --text: #f3f3f5;
  --text-2: #c6c6cd;
  --text-3: #8a8a93;
  --text-4: #5e5e66;

  --accent: #ff7e5f;
  --accent-2: #ffae8a;
  --accent-3: #ff5a3c;
  --accent-glow: rgba(255, 126, 95, 0.25);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------
   2. Reset & base
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
img, svg, video { display: block; max-width: 100%; }
img { user-select: none; -webkit-user-drag: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: 0.01em; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* ---------------------------------------------------------
   3. Layout helpers
   --------------------------------------------------------- */
.section-inner {
  width: 100%;
  padding: 0 var(--gutter);
}
.section {
  padding: clamp(60px, 8vw, 100px) 0;
  position: relative;
  border-top: 1px solid var(--border);
}

/* ---------------------------------------------------------
   4. Ambient background — minimal, static, theme-aware
   --------------------------------------------------------- */

/* Skip link — visible only on focus, for keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 16px; outline: 2px solid var(--accent); outline-offset: 2px; }
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: var(--bg);
  transition: background var(--t) var(--ease);
}
.bg-noise {
  position: absolute; inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
[data-theme="dark"] .bg-noise { mix-blend-mode: overlay; opacity: 0.04; }

/* ---------------------------------------------------------
   5. Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn svg { transition: transform var(--t) var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
[data-theme="dark"] .btn-primary {
  background: var(--accent);
  color: #14141a;
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-2);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--text);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------
   6. Header — minimal: menu (left) · signature (center) · pill (right)
   --------------------------------------------------------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: padding var(--t) var(--ease), background var(--t);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border-bottom-color: var(--border);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 40px);
  position: relative;
}

/* Dropdown menu trigger (top-left) */
.header-menu-wrap { position: relative; justify-self: start; }
.header-icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  display: grid; place-items: center;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.header-icon-btn:hover { color: var(--text); background: var(--surface); }
.header-icon-btn .icon-close { display: none; }
.header-icon-btn.is-open .icon-menu { display: none; }
.header-icon-btn.is-open .icon-close { display: block; }
.header-icon-btn.is-open { color: var(--text); }

/* Dropdown panel */
.header-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
  z-index: 110;
}
.header-dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dd-link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text);
  font-family: var(--font-mono);
  transition: color var(--t-fast), background var(--t-fast);
}
.dd-link:hover { color: var(--accent); background: var(--surface); }
.dd-link.is-active { color: var(--accent); }

/* Logo (center) */
.header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  text-decoration: none;
  justify-self: center;
  transition: transform var(--t) var(--ease);
}
.header-logo img {
  width: 36px; height: 36px;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 22%, transparent));
}
.header-logo:hover { transform: scale(1.08); }
.header-logo:active { transform: scale(0.96); }

/* Top-right action cluster: "Contact" pill + theme pill */
.header-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: #14141a;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--accent) 50%, transparent);
}
.header-cta:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 92%, #fff);
  box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}
.header-cta:active { transform: translateY(0); }
.header-cta svg { display: block; }

/* Pill theme toggle (top-right) */
.theme-pill {
  position: relative;
  width: 62px; height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
  overflow: hidden;
}
.theme-pill:hover { background: var(--surface-3); border-color: var(--text-3); }
.theme-pill-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 320ms var(--ease-out), background var(--t) var(--ease);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
[data-theme="dark"] .theme-pill { background: var(--surface-3); }
[data-theme="dark"] .theme-pill-knob {
  transform: translateX(32px);
  background: var(--accent);
}

/* ---------------------------------------------------------
   7. Hero — minimal centered: big stacked name + photo + tagline
   --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-h) + 16px) 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
  transition: background var(--t) var(--ease);
}
.hero-inner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 0 var(--gutter);
}

.hero-name-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}
.hero-name-line {
  font-family: "Fira Code", var(--font-mono);
  font-weight: 700;
  font-size: clamp(40px, 8.5vw, 130px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  white-space: nowrap;
  max-width: 100%;
}
.hero-name-line span {
  display: inline-block;
  filter: blur(10px);
  opacity: 0;
  transform: translateY(-24px);
  transition: filter 0.5s var(--ease-out), opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  white-space: pre;
}
.hero-name-line.is-in span {
  filter: blur(0);
  opacity: 1;
  transform: translateY(0);
}

/* Photo, absolute-centered over the two name lines */
.hero-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: auto;
}
.hero-photo-frame {
  width: clamp(120px, 13vw, 200px);
  height: clamp(120px, 13vw, 200px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--bg);
  background: var(--bg-2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  transition: transform 300ms var(--ease);
}
.hero-photo:hover .hero-photo-frame { transform: scale(1.08); }
.hero-photo-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: contrast(1.04) saturate(1.05);
}

/* Kicker — small all-caps line above the name */
.hero-kicker {
  margin: 0 0 16px 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  max-width: 92%;
  white-space: nowrap;
}
.hero-kicker span {
  display: inline-block;
  filter: blur(10px);
  opacity: 0;
  transform: translateY(-12px);
  transition: filter 0.5s var(--ease-out), opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  white-space: pre;
}
.hero-kicker.is-in span {
  filter: blur(0);
  opacity: 1;
  transform: translateY(0);
}

.hero-tagline {
  margin-top: 40px;
  font-size: clamp(14px, 1.4vw, 18px);
  color: var(--text-3);
  font-style: italic;
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}
.hero-tagline span {
  display: inline-block;
  filter: blur(10px);
  opacity: 0;
  transform: translateY(20px);
  transition: filter 0.5s var(--ease-out), opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.hero-tagline.is-in span {
  filter: blur(0);
  opacity: 1;
  transform: translateY(0);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-3);
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  animation: hero-bounce 2.4s ease-in-out infinite;
}
.hero-scroll:hover { color: var(--text); background: var(--surface); transform: translateX(-50%) translateY(2px); }
@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ---------------------------------------------------------
   8. Section heads (shared)
   --------------------------------------------------------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
  max-width: 900px;
}
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.eyebrow-num {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0;
  font-family: var(--font-display);
}
.section-title {
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.section-title-soft { color: var(--text-3); display: block; font-weight: 500; font-size: 0.72em; margin-top: 6px; line-height: 1.4; }

/* ---------------------------------------------------------
   9. About — REDESIGNED (photo + story side-by-side)
   --------------------------------------------------------- */
.about { background: var(--bg); }
.about-stage {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

/* Photo card (left) */
.about-photo {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  transition: transform var(--t-slow) var(--ease);
  max-width: 380px;
  margin: 0 auto;
}
.about-photo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.25) 100%);
  z-index: 1;
  pointer-events: none;
}
.about-photo:hover .about-photo-frame { transform: translateY(-4px); }
.about-photo-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: contrast(1.04) saturate(1.08);
  transition: transform var(--t-slow) var(--ease);
}
.about-photo:hover .about-photo-img { transform: scale(1.03); }
.about-photo-cap {
  position: absolute;
  bottom: 16px; left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-2);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}
.cap-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* Story + info cards (right) */
.about-body { display: flex; flex-direction: column; gap: 28px; }
.about-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.about-card p { font-size: 15px; line-height: 1.65; color: var(--text-2); margin-bottom: 14px; }
.about-card p:last-child { margin-bottom: 0; }
.about-card strong { color: var(--text); font-weight: 600; }
.about-card .about-lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.about-card .about-lead:last-child { border-bottom: 0; }

.about-grid-info {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 12px;
}
.info-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.info-card:hover { border-color: var(--border-2); background: var(--surface-2); }
.info-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-3); margin-bottom: 12px; font-weight: 600; }
.info-list { display: flex; flex-direction: column; gap: 8px; }
.info-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 14px; font-size: 12px; color: var(--text-2);
  padding-bottom: 8px; border-bottom: 1px dashed var(--border);
}
.info-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.info-list b { color: var(--text); font-weight: 500; text-align: right; word-break: break-word; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-2);
  font-weight: 500;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.tag:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-2); }

/* ---------------------------------------------------------
   10. Project (Circle) — bigger 3D card, responsive
   --------------------------------------------------------- */
.project { background: var(--bg); }
.project-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
  padding: clamp(32px, 3.4vw, 56px);
  max-width: 1320px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1200px;
  will-change: transform;
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  --shine-x: 50%;
  --shine-y: 50%;
}
.project-card:hover {
  box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--accent) 22%, transparent),
              0 8px 24px -8px color-mix(in srgb, var(--text) 14%, transparent);
}
/* Subtle ambient gradient overlay — gives the card a soft "lit" feel */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(10, 132, 255, 0.06), transparent 50%),
              radial-gradient(circle at 90% 100%, rgba(48, 209, 88, 0.04), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
/* Cursor-following shine that follows mouse position */
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    320px circle at var(--shine-x) var(--shine-y),
    color-mix(in srgb, var(--accent) 12%, transparent),
    transparent 50%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  mix-blend-mode: screen;
}
[data-theme="dark"] .project-card::after { mix-blend-mode: plus-lighter; }
.project-card:hover::after { opacity: 1; }
.project-visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateZ(30px);
}

/* ----- Project stage (logo ↔ live demo toggle) ----- */
.project-stage {
  display: none;
  position: relative;
  width: 100%;
  min-height: 520px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.project-stage.is-active { display: block; animation: stage-fade 360ms var(--ease-out); }
@keyframes stage-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo view — clean, centered, with brand-tinted glow */
.stage-logo {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--cool) 8%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.stage-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--border) 60%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--border) 60%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}
.stage-logo-img {
  position: relative;
  width: clamp(160px, 22vw, 240px);
  height: auto;
  filter: drop-shadow(0 16px 40px color-mix(in srgb, var(--accent) 28%, transparent));
  transition: transform 500ms var(--ease-out);
}
.stage-logo:hover .stage-logo-img { transform: scale(1.04) rotate(-2deg); }
.stage-logo-tag {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* Toggle pill (Logo / Live demo) — sits below the stage */
.stage-toggle {
  display: inline-flex;
  align-self: center;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  gap: 2px;
  position: relative;
  z-index: 2;
}
.stage-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--text-3);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  font-family: var(--font-mono);
}
.stage-toggle-btn:hover { color: var(--text); }
.stage-toggle-btn.is-active {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--text) 30%, transparent);
}
[data-theme="dark"] .stage-toggle-btn.is-active {
  background: var(--accent);
  color: #14141a;
}
.project-mock {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  transform: perspective(1000px) rotateX(2deg) rotateY(-3deg);
  transition: transform 500ms var(--ease-out);
}
/* Live demo state — iframe takes the full canvas */
.project-mock[data-live="true"] {
  display: flex;
  flex-direction: column;
}
.mock-iframe {
  width: 100%;
  flex: 1;
  min-height: 520px;
  border: 0;
  background: var(--bg-2);
  display: block;
}
.mock-open {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
}
.mock-open:hover { color: var(--accent); background: var(--surface-2); }
.project-card:hover .project-mock { transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(-4px); }

/* Logo hover animation — when hovering the logo, the whole bar wiggles */
.mock-bar {
  transition: transform 400ms var(--ease-out), background 300ms var(--ease);
  transform-origin: left center;
}
.project-visual:hover .mock-bar {
  transform: translateX(6px) scale(1.005);
  background: color-mix(in srgb, var(--bg-3) 80%, var(--accent) 5%);
}
.mock-url {
  position: relative;
  transition: color 300ms var(--ease);
}
.project-visual:hover .mock-url { color: var(--accent); }

/* Logo itself gets a subtle pulse on hover */
.mock-image {
  transition: transform 400ms var(--ease-out), border-radius 500ms var(--ease-out);
}
.project-visual:hover .mock-image {
  animation: logo-pulse 1.2s var(--ease) infinite;
  transform: scale(1.04);
}
@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 var(--accent-glow)); }
  50% { filter: drop-shadow(0 0 12px var(--accent-glow)); }
}

/* Handles shimmer on hover */
.mock-handles span {
  transition: transform 300ms var(--ease), border-color 300ms var(--ease);
}
.project-visual:hover .mock-handles span:nth-child(1) { transform: translate(-50%, -50%) scale(1.4); }
.project-visual:hover .mock-handles span:nth-child(2) { transform: translate(50%, -50%) scale(1.4); }
.project-visual:hover .mock-handles span:nth-child(3) { transform: translate(-50%, 50%) scale(1.4); }
.project-visual:hover .mock-handles span:nth-child(4) { transform: translate(50%, 50%) scale(1.4); }
.mock-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-2); }
.mock-dot:nth-child(1) { background: #ff5f57; opacity: 0.7; }
.mock-dot:nth-child(2) { background: #febc2e; opacity: 0.7; }
.mock-dot:nth-child(3) { background: #28c840; opacity: 0.7; }
.mock-url {
  flex: 1; text-align: center;
  font-size: 11px; color: var(--text-3);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 6px;
  margin-left: 6px;
}
.mock-body { display: flex; flex-direction: column; min-height: 380px; flex: 1; }
.mock-side { padding: 18px 12px; background: var(--bg-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.mock-side-item {
  font-size: 12px; color: var(--text-3);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
}
.mock-side-item.is-active { background: var(--surface-2); color: var(--text); }
.mock-canvas {
  position: relative;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-3) 100%);
  display: grid; place-items: center;
  padding: 30px;
  overflow: hidden;
}
.mock-canvas::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.4;
  pointer-events: none;
}
.mock-image {
  width: 100%; max-width: 240px;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  border-radius: 24px;
  display: grid; place-items: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18), 0 0 0 1px var(--border-2);
  position: relative;
  z-index: 1;
  transition: border-radius 500ms var(--ease-out);
}
.mock-image:hover { border-radius: 50px; }
.mock-logo { width: 75%; height: auto; }
.mock-handles { position: absolute; inset: 30px; pointer-events: none; }
.mock-handles span {
  position: absolute;
  width: 12px; height: 12px;
  border: 1.5px solid var(--cool);
  background: var(--bg);
  border-radius: 3px;
}
.mock-handles span:nth-child(1) { top: 0; left: 0; transform: translate(-50%, -50%); }
.mock-handles span:nth-child(2) { top: 0; right: 0; transform: translate(50%, -50%); }
.mock-handles span:nth-child(3) { bottom: 0; left: 0; transform: translate(-50%, 50%); }
.mock-handles span:nth-child(4) { bottom: 0; right: 0; transform: translate(50%, 50%); }
.mock-controls { padding: 18px; background: var(--bg-2); border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.mock-control { display: flex; flex-direction: column; gap: 6px; }
.mock-control > span { font-size: 11px; color: var(--text-3); }
.mock-bar-mini { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.mock-bar-mini i { display: block; height: 100%; background: linear-gradient(90deg, var(--cool), var(--cool-2)); border-radius: 2px; }
.mock-btn {
  padding: 9px 12px;
  background: linear-gradient(135deg, var(--cool) 0%, var(--cool-2) 100%);
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.project-info { position: relative; z-index: 1; transform: translateZ(20px); }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}
.pill-live { color: #1d8a3a; border-color: rgba(29, 138, 58, 0.3); background: rgba(48, 209, 88, 0.08); }
[data-theme="dark"] .pill-live { color: #58e07a; border-color: rgba(88, 224, 122, 0.3); background: rgba(88, 224, 122, 0.08); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #1d8a3a; box-shadow: 0 0 8px #1d8a3a; animation: pulse 2s infinite; }
[data-theme="dark"] .pill-dot { background: #58e07a; box-shadow: 0 0 8px #58e07a; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.6; } }
.project-name {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--text);
}
.project-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 22px;
  max-width: 520px;
}
.project-desc strong { color: var(--text); font-weight: 600; }
.project-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.project-features li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); }
.project-features li:last-child { border-bottom: 1px solid var(--border); }
.feat-num {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  padding-top: 2px;
}
.project-features h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.project-features p { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.project-note { font-size: 12px; color: var(--text-3); }
[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* ---------------------------------------------------------
   11. Socials
   --------------------------------------------------------- */
.socials { background: var(--bg); }

/* Followers stat — sits under the section title */
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 360ms var(--ease-out), background var(--t), border-color var(--t), box-shadow 360ms var(--ease);
  position: relative;
  overflow: hidden;
  will-change: transform;
}
/* Subtle gradient sweep on hover (same as before) */
.social-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, var(--accent-glow) 100%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}
/* Brand-tinted glow ring on hover — uses currentColor from the brand icon */
.social-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 30%) var(--my, 50%),
              color-mix(in srgb, var(--brand, var(--accent)) 32%, transparent) 0%,
              transparent 60%);
  opacity: 0;
  transition: opacity 360ms var(--ease);
  pointer-events: none;
  z-index: 0;
}
.social-card:hover {
  transform: translateY(-4px) scale(1.012);
  border-color: color-mix(in srgb, var(--brand, var(--accent)) 40%, var(--border-2));
  background: var(--surface-2);
  box-shadow: 0 14px 32px -10px color-mix(in srgb, var(--brand, var(--accent)) 30%, transparent),
              0 0 0 1px color-mix(in srgb, var(--brand, var(--accent)) 20%, transparent);
}
.social-card:hover::before { opacity: 1; }
.social-card:hover::after { opacity: 1; }
/* Track pointer position for the glow to follow */
.social-card > * { position: relative; z-index: 1; }
.social-ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform var(--t) var(--ease);
}
.social-card:hover .social-ico { transform: scale(1.08) rotate(-3deg); }

/* Brand-colored social icon variants — like real app icons */
.ico-instagram {
  background: linear-gradient(135deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
  border: none;
  color: #fff;
}
.ico-tiktok {
  background: #010101;
  border: none;
  color: #fff;
}
.ico-tiktok svg { filter: drop-shadow(-1.8px 0 0 #25F4EE) drop-shadow(1.8px 0 0 #FE2C55); }
.ico-youtube {
  background: #FF0000;
  border: none;
  color: #fff;
}
.ico-snapchat {
  background: #FFFC00;
  border: none;
  color: #000;
}
/* Linktree — brand green */
.ico-linktree {
  background: #39E09B;
  border: none;
  color: #14141a;
}

.social-meta { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; z-index: 1; }
.social-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.social-handle { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* CTA pill on the right — appears on hover with label + arrow */
.social-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.social-cta svg { transition: transform var(--t-fast) var(--ease); }
.social-card:hover .social-cta {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateX(2px);
}
.social-card:hover .social-cta svg { transform: translate(2px, -2px); }
[data-theme="dark"] .social-card:hover .social-cta { background: var(--accent); color: #14141a; border-color: var(--accent); }

/* ---------------------------------------------------------
   12. Contact
   --------------------------------------------------------- */
.contact { background: var(--bg); }
.contact-wrap {
  position: relative;
  padding: clamp(36px, 4.5vw, 60px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
/* Decorative gradient blobs that glow behind the content */
.contact-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%,   color-mix(in srgb, var(--accent) 8%, transparent), transparent 40%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--cool) 7%, transparent), transparent 40%);
  pointer-events: none;
  z-index: 0;
}
.contact-wrap > * { position: relative; z-index: 1; }

/* Header: eyebrow + title + description (centered) */
.contact-head { text-align: center; margin-bottom: clamp(28px, 3vw, 44px); }
.contact-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-3);
  margin-bottom: 18px;
  font-family: var(--font-mono);
}
.contact-title {
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}
.contact-title-soft { color: var(--accent); display: block; font-style: italic; font-weight: 500; font-size: 0.85em; }
.contact-desc {
  font-size: 15px;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Two-column grid: direct channels (left) + form (right) */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 3.5vw, 48px);
  align-items: start;
}

/* Left aside: direct channels list */
.contact-aside { display: flex; flex-direction: column; gap: 12px; }
.contact-aside-label {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
  padding-inline-start: 2px;
}
/* Reassurance line under the channels — "usually replies within 24h" */
.contact-reassure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.contact-reassure-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 0 0 #23a55a;
  animation: contact-pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}
@keyframes contact-pulse {
  0%   { box-shadow: 0 0 0 0   color-mix(in srgb, #23a55a 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in srgb, #23a55a 0%,  transparent); }
  100% { box-shadow: 0 0 0 0   color-mix(in srgb, #23a55a 0%,  transparent); }
}
.contact-row {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
  position: relative; z-index: 1;
}
.contact-email {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 16px 22px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  font-family: var(--font-display);
  transition: background var(--t), border-color var(--t), transform var(--t);
}
.contact-email:hover { background: var(--surface-3); border-color: var(--text); transform: translateY(-2px); }
.ce-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--text-3); }
.ce-value { font-size: 16px; font-weight: 500; color: var(--text); }
.contact-copy { white-space: nowrap; }

/* Real contact form (Formspree) */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
  text-align: left;
  padding: clamp(20px, 2.5vw, 28px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-weight: 500;
}
.form-req { color: var(--accent); margin-left: 2px; }
.form-optional { color: var(--text-3); font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--font-sans); margin-left: 4px; font-size: 11px; }
.form-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: clamp(15px, 4.2vw, 16px);
  line-height: 1.5;
  resize: vertical;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  min-width: 0; /* allow inputs to shrink inside grid/flex parents */
}
.form-input::placeholder { color: var(--text-3); opacity: 0.7; }
.form-input:hover { border-color: var(--text-3); }
.form-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.form-input:invalid:not(:placeholder-shown) { border-color: #c0392b; }
.form-textarea { min-height: 120px; line-height: 1.55; font-family: inherit; }

/* ----- Form: visible rules block (shown BEFORE the user types) ----- */
.form-rules {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-2));
  border-radius: 12px;
  padding: 14px 16px;
  margin: 2px 0 6px;
}
.form-rules-title {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}
.form-rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.form-rules-list li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.form-rules-list .ok {
  color: #1d8a3a;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.5;
  flex: 0 0 auto;
}
[data-theme="dark"] .form-rules-list .ok { color: #58e07a; }

/* ----- Form: email input wrapper with inline validity indicator ----- */
.form-input-wrap { position: relative; }
.form-input-wrap .form-input { padding-right: 44px; }
.form-validity {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  pointer-events: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.form-validity.is-pending {
  display: flex;
  color: var(--text-3);
  background: transparent;
  font-weight: 500;
  animation: pulseDot 1s ease-in-out infinite;
}
.form-validity.is-valid {
  display: flex;
  color: #fff;
  background: #1d8a3a;
}
[data-theme="dark"] .form-validity.is-valid { background: #2bb053; }
.form-validity.is-invalid {
  display: flex;
  color: #fff;
  background: #c0392b;
}
[data-theme="dark"] .form-validity.is-invalid { background: #e0524a; }
@keyframes pulseDot { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }

/* ----- Email input state borders ----- */
.form-input.is-valid { border-color: #1d8a3a; }
[data-theme="dark"] .form-input.is-valid { border-color: #2bb053; }
.form-input.is-invalid { border-color: #c0392b; }
[data-theme="dark"] .form-input.is-invalid { border-color: #e0524a; }
.form-input.is-valid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, #1d8a3a 18%, transparent); border-color: #1d8a3a; }
.form-input.is-invalid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, #c0392b 18%, transparent); border-color: #c0392b; }
[data-theme="dark"] .form-input.is-valid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, #2bb053 22%, transparent); border-color: #2bb053; }
[data-theme="dark"] .form-input.is-invalid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, #e0524a 22%, transparent); border-color: #e0524a; }

/* ----- Inline hint (typo suggestion / error explanation under email) ----- */
.form-hint {
  margin: 6px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-3);
  min-height: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}
.form-hint.is-ok   { color: #1d8a3a; }
.form-hint.is-warn { color: #b46b00; }
.form-hint.is-bad  { color: #c0392b; }
[data-theme="dark"] .form-hint.is-ok   { color: #58e07a; }
[data-theme="dark"] .form-hint.is-warn { color: #ffb74d; }
[data-theme="dark"] .form-hint.is-bad  { color: #ff8a85; }
.hint-fix {
  background: transparent;
  border: 1px dashed currentColor;
  color: inherit;
  font: inherit;
  padding: 1px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.hint-fix:hover { background: color-mix(in srgb, currentColor 12%, transparent); }

/* ----- Form: 3-step progress indicator ----- */
.form-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.form-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-3);
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
  position: relative;
}
.form-steps .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  flex: 0 0 auto;
  line-height: 1;
}
.form-steps .step-label {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
}
.form-steps li.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
  color: var(--text);
}
.form-steps li.is-active .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.form-steps li.is-done {
  border-color: color-mix(in srgb, #1d8a3a 55%, var(--border-2));
  color: var(--text-2);
}
.form-steps li.is-done .step-num {
  background: #1d8a3a;
  border-color: #1d8a3a;
  color: #fff;
  font-size: 0;
}
.form-steps li.is-done .step-num::before {
  content: '✓';
  font-size: 13px;
  line-height: 1;
}
[data-theme="dark"] .form-steps li.is-done .step-num { background: #2bb053; border-color: #2bb053; }

/* ----- Form: step fieldsets (3 steps) ----- */
.form-step {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: formStepIn 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.form-step[hidden] { display: none; }
.form-step-legend {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0;
  margin: 0 0 4px;
}
.form-step-hint {
  font-size: 13px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.55;
}
.form-step-hint strong { color: var(--text); font-weight: 600; }
.form-step-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}
@keyframes formStepIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----- Code input ----- */
.form-code {
  font-family: var(--font-mono);
  font-size: 24px;
  letter-spacing: 0.5em;
  text-align: center;
  font-weight: 700;
  padding: 16px 12px;
}

/* On-screen code display (also emailed as backup) */
.code-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 16px;
  margin-bottom: 4px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--border));
  text-align: center;
}
.code-display-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.code-display-digits {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--text);
  line-height: 1;
  text-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 25%, transparent);
}
.code-display-hint {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
  max-width: 340px;
}
.form-code.is-shake {
  animation: shake 0.42s cubic-bezier(.36,.07,.19,.97) both;
  border-color: #c0392b !important;
}
[data-theme="dark"] .form-code.is-shake { border-color: #e0524a !important; }
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* ----- Link-style buttons (resend, change email) ----- */
.form-link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--text-3) 50%, transparent);
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
.form-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.form-link:disabled { color: var(--text-3); cursor: not-allowed; text-decoration: none; }
.form-link.is-loading { opacity: 0.6; pointer-events: none; }

/* Mobile: compact steps */
@media (max-width: 520px) {
  .form-steps { gap: 6px; }
  .form-steps li { padding: 8px 8px; }
  .form-steps .step-label { display: none; }
  .form-code { font-size: 20px; letter-spacing: 0.4em; }
}

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  padding: 14px 22px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.form-submit .submit-spinner { display: none; animation: spin 0.8s linear infinite; }
.form-submit.is-loading .submit-label { opacity: 0; }
.form-submit.is-loading .submit-icon { display: none; }
.form-submit.is-loading .submit-spinner { display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.form-submit:disabled { opacity: 0.7; cursor: wait; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.form-status {
  font-size: 13px;
  margin: 0;
  min-height: 18px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.form-status.is-sending { color: var(--text-3); }
.form-status.is-success { color: #1d8a3a; }
[data-theme="dark"] .form-status.is-success { color: #58e07a; }
.form-status.is-error { color: #c0392b; }
[data-theme="dark"] .form-status.is-error { color: #ff6b6b; }
.contact-fallback {
  font-size: 12px;
  color: var(--text-3);
  margin: 20px auto 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ----- Direct contact channels (Discord, Email, etc.) ----- */
.contact-channel {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  position: relative;
  overflow: hidden;
}
.contact-channel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, color-mix(in srgb, var(--channel-accent, var(--accent)) 18%, transparent) 100%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}
.contact-channel:hover {
  transform: translateY(-2px);
  background: var(--surface-3);
  border-color: color-mix(in srgb, var(--channel-accent, var(--accent)) 40%, var(--border-2));
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--channel-accent, var(--accent)) 35%, transparent);
}
.contact-channel:hover::before { opacity: 1; }

/* Discord channel — blurple */
.contact-channel-discord { --channel-accent: #5865F2; }
.contact-channel-discord .contact-channel-ico { background: #5865F2; }

/* Email channel — accent (orange) */
.contact-channel-mail { --channel-accent: var(--accent); }
.contact-channel-mail .contact-channel-ico { background: var(--accent); color: #14141a; }

.contact-channel-ico {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.contact-channel-ico svg { display: block; }
.contact-channel-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-2);
  position: relative;
  z-index: 1;
  background: var(--bg-2);
  margin-inline-start: -22px; /* overlap with the icon for a stacked feel */
  box-shadow: 0 0 0 3px var(--surface-2);
}
.contact-channel:hover .contact-channel-avatar { box-shadow: 0 0 0 3px var(--surface-3); }
.contact-channel-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: start;
  flex: 1;
  position: relative;
  z-index: 1;
}
.contact-channel-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-channel-handle {
  font-size: 12px;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-channel-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-2);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.contact-channel:hover .contact-channel-arrow {
  background: #5865F2;
  color: #fff;
  border-color: #5865F2;
  transform: rotate(-10deg);
}

/* Discord live status dot — animated when online */
.discord-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #80848e; /* default offline */
  display: inline-block;
  flex-shrink: 0;
}
.discord-status-dot.is-online  { background: #23a55a; box-shadow: 0 0 0 0 rgba(35,165,90,0.5); animation: ds-pulse 2.4s ease-out infinite; }
.discord-status-dot.is-idle   { background: #f0b232; }
.discord-status-dot.is-dnd    { background: #f23f43; }
.discord-status-dot.is-offline{ background: #80848e; }
@keyframes ds-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(35,165,90,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(35,165,90,0);    }
  100% { box-shadow: 0 0 0 0   rgba(35,165,90,0);    }
}
.contact-fallback a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-2);
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
.contact-fallback a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.contact-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease-out);
  z-index: 300;
  box-shadow: var(--shadow);
}
.contact-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------------------------------------------------
   12b. Stats / Metrics
   --------------------------------------------------------- */
.stats { background: var(--bg); }
.stats-stage {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.stat-card {
  position: relative;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--t) var(--ease), border-color var(--t), background var(--t);
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--border-2); background: var(--surface-2); }
.stat-card:hover::before { opacity: 1; }

.stat-num {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4.5vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--text);
}
.stat-num-value {
  background: linear-gradient(180deg, var(--text) 0%, color-mix(in srgb, var(--accent) 70%, var(--text)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
  min-width: 1ch;
}
.stat-suffix { color: var(--accent); margin-inline-start: 2px; }
.stat-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
}

/* Per-platform breakdown */
.stats-platforms {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stats-sub {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 4px;
}
.stats-platform-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stats-platform-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
.stats-platform-name {
  color: var(--text-2);
  font-weight: 500;
  font-size: 13px;
}
.stats-platform-bar {
  position: relative;
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.stats-platform-bar-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 999px;
  transition: width 1.2s var(--ease-out);
}
.stats-platform-bar-fill.is-fill { width: var(--w, 0%); }
.stats-platform-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 48px;
  text-align: end;
  font-family: var(--font-mono);
}

/* Inline social-card count */
.social-count {
  display: inline-block;
  font-size: 11px;
  color: var(--text-2);
  font-family: var(--font-mono);
  margin-inline-start: 4px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ---------------------------------------------------------
   13. Footer — minimal: photo + name + copyright. Mobile-first.
   --------------------------------------------------------- */
.footer {
  padding: 44px 0 24px;
  border-top: 1px solid var(--border);
  margin-top: 0;
  background: var(--bg);
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 580px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}
.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-avatar {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-2);
  background: var(--bg-2);
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.footer-avatar:hover { transform: scale(1.06); border-color: var(--accent); }
.footer-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 50%;
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  width: 100%;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.footer-copy { display: inline-block; }
.footer-totop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.footer-totop:hover { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* ---------------------------------------------------------
   13b. NEW ADDITIONS — scroll progress + back-to-top
   Performance: pure CSS where possible, tiny JS for state.
   --------------------------------------------------------- */

/* Scroll progress bar at the top of the page */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}
.scroll-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transform-origin: left;
  transition: width 80ms linear;
  will-change: width;
}

/* Back to top floating button */
.to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid var(--border-2);
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), background var(--t-fast), border-color var(--t-fast);
  box-shadow: var(--shadow);
}
.to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.to-top:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateY(-2px) scale(1.05);
}
[data-theme="dark"] .to-top:hover { background: var(--accent); color: #14141a; border-color: var(--accent); }

/* ---------------------------------------------------------
   14. Responsive
   --------------------------------------------------------- */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero-visual { order: -1; }
  .portrait { width: clamp(280px, 50vw, 380px); }
  .about-stage { grid-template-columns: 1fr; }
  .about-photo { max-width: 480px; margin: 0 auto; width: 100%; }
  .about-grid-info { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px; max-width: 100%; }
  .project-mock { max-width: 480px; }
}
@media (max-width: 720px) {
  .project-card { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
  .project-visual { max-width: 440px; margin: 0 auto; }
  .project-mock { max-width: 100%; }
  .mock-iframe { min-height: 420px; }
  /* Disable 3D tilt on touch — it's jittery and drains battery */
  .project-card { transform: none !important; }
  .project-card::after { display: none; }
}

@media (max-width: 880px) {
  .social-grid { grid-template-columns: 1fr; }
  .footer { padding: 38px 0 22px; }
  .footer-name { font-size: 19px; }
  .about-grid-info { grid-template-columns: 1fr; }
  .to-top { bottom: 20px; right: 20px; width: 38px; height: 38px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .section-inner { padding: 0 20px; }
  .section { padding: 56px 0; }
  .hero { padding-top: calc(var(--header-h) + 8px); }
  .hero-name-line { font-size: clamp(36px, 13vw, 72px); }
  .hero-photo-frame { width: 96px; height: 96px; }
  .hero-kicker { font-size: 10px; letter-spacing: 0.16em; white-space: normal; max-width: 320px; margin-bottom: 16px; }
  .hero-tagline { margin-top: 24px; padding: 0 20px; }
  .about-card { padding: 22px; }
  .about-card p { font-size: 14px; }
  .about-card .about-lead { font-size: 15px; }
  .project-card { padding: 22px; }
  .project-mock { transform: none; }
  .mock-body { grid-template-columns: 80px 1fr 110px; min-height: 280px; }
  .mock-side-item { font-size: 11px; padding: 6px 10px; }
  .contact-wrap { padding: 32px 20px; }
  .contact-row { flex-direction: column; }
  .contact-email { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
  .info-card { padding: 16px; }
  .contact-grid { grid-template-columns: 1fr; gap: 22px; }
  .contact-wrap { padding: 28px 20px; }
  .contact-head { margin-bottom: 28px; }
  .contact-form { padding: 18px; gap: 14px; }
  .contact-channel { padding: 12px 14px; gap: 12px; }
  .contact-channel-ico { width: 38px; height: 38px; border-radius: 11px; }
  .contact-channel-avatar { width: 32px; height: 32px; margin-inline-start: -18px; }
  .contact-channel-label { font-size: 13px; }
  .contact-channel-handle { font-size: 11px; }
  .contact-channel-arrow { width: 28px; height: 28px; }
  .contact-reassure { font-size: 11px; }
  .social-card { padding: 14px 16px; gap: 14px; }
  .social-ico { width: 44px; height: 44px; }
  .social-name { font-size: 15px; }
  .social-handle { font-size: 11px; }
  .social-cta { padding: 6px 8px 6px 10px; font-size: 10px; }
  .social-cta-label { display: none; }
  .footer { padding: 32px 0 20px; }
  .footer-inner { gap: 14px; }
  .footer-name { font-size: 18px; }
  .footer-avatar { width: 52px; height: 52px; }
  .footer-bottom { flex-direction: column; gap: 8px; padding-top: 12px; font-size: 10px; }
  .footer-totop { font-size: 10px; padding: 4px 8px; }
  /* Contact CTA: icon-only on small screens to save space */
  .header-cta { padding: 7px 10px; }
  .header-cta span { display: none; }
  .header-logo { width: 34px; height: 34px; }
  .header-logo img { width: 30px; height: 30px; }
  .header-icon-btn { width: 40px; height: 40px; }
  .theme-pill { width: 54px; height: 26px; }
  .theme-pill-knob { width: 18px; height: 18px; }
  [data-theme="dark"] .theme-pill-knob { transform: translateX(28px); }
}

@media (max-width: 400px) {
  .hero-title { font-size: 40px; }
  .section-title { font-size: 22px; }
  .project-name { font-size: 28px; }
  .contact-title { font-size: 28px; line-height: 1.02; }
  .contact-title-soft { font-size: 0.78em; }
  .contact-desc { font-size: 14px; }
  .contact-wrap { padding: 24px 16px; }
  .contact-form { padding: 16px; }
  .contact-channel { padding: 11px 12px; gap: 10px; }
  .contact-channel-ico { width: 36px; height: 36px; border-radius: 10px; }
  .contact-channel-avatar { width: 28px; height: 28px; margin-inline-start: -16px; }
  .contact-channel-arrow { display: none; } /* save space on very narrow screens */
  .mock-body { grid-template-columns: 60px 1fr 90px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 24px 20px; }
}

/* High-resolution / 4K */
@media (min-width: 1920px) {
  body { font-size: 16px; }
  .section-title { font-size: clamp(28px, 3.2vw, 44px); }
  .project-name { font-size: clamp(32px, 3.6vw, 52px); }
  .contact-title { font-size: clamp(32px, 3.8vw, 52px); }
  .hero-watermark { font-size: clamp(200px, 30vw, 600px); }
}
