
:root {
  /* Colors */
  --bg:        #0C0C0B;
  --bg2:       #141413;
  --fg:        #EDEDE8;
  --muted:     #93938F;
  --border:    rgba(237, 237, 232, 0.09);
  --border-hv: rgba(237, 237, 232, 0.38);
  --accent:    #FF3D00;
  --green:     rgba(0, 220, 100, 0.85);
  --green-bd:  rgba(0, 220, 100, 0.28);

  /* Card hover glow - change this one value to recolor particles + border */
  --card-glow: #E2E8F0; /* Icy silver for minimal look */

  /* Typography */
  --font-sans:    'Inter', system-ui, sans-serif;
  
  --font-display: 'Syne', sans-serif;

  /* Layout */
  --pad-x: 44px;
  --radius: 14px;

  /* Easing */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="light"] {
  --bg:        #F0EDE5;
  --bg2:       #E8E5DD;
  --fg:        #0C0C0B;
  --muted:     #5B5A57;
  --border:    rgba(12, 12, 11, 0.10);
  --border-hv: rgba(12, 12, 11, 0.38);
  --green:     #006E2D;
  --green-bd:  rgba(0, 110, 45, 0.35);
  --card-glow: #64748B; /* Slate grey for light mode */
}

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

html {
  /* Lenis takes over scrolling on desktop - overflow hidden prevents native scroll */
  overflow: hidden;
}

/* On touch devices, allow normal scroll with smooth behavior */
@media (pointer: coarse) {
  html {
    overflow: auto;
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

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

/* Restore cursor on touch devices */
@media (pointer: coarse) {
  *, *::before, *::after { cursor: auto !important; }
  .cursor { display: none !important; }
}

/* ── NOISE OVERLAY ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 9997;
  contain: strict;
  backface-visibility: hidden;
  will-change: auto; /* prevent compositing overhead - static overlay */
}

/* ── KEYFRAMES ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes shline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .sh-line::after               { animation: none; }
  .pill-dot, .wip-dot           { animation: none; }
}

@media (pointer: coarse) {
  *,
  *::before,
  *::after {
    cursor: auto !important;
  }
  #canvas {
    display: none !important;
  }
} 
 

#canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}
#cursor-dot,
#cursor-canvas,
.cursor,
.cursor-ring,
#cursorRing,
.cursor-label,
.cursor-arrow {
  display: none !important;
}


/* ── CINEMATIC INTRO - all styles are inline/dynamic via js/intro/ ── */

/* ── NAV ── */
nav { 
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  z-index: 200; 
  padding: 22px var(--pad-x); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  overflow: visible; 
  border: 1px solid transparent;
  border-radius: 0;
  transition: 
    top 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    right 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.4s ease,
    backdrop-filter 0.4s ease,
    -webkit-backdrop-filter 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}


nav.scrolled {
  top: 16px;
  left: 22%;
  right: 22%;
  padding: 14px 36px;
  border-radius: 100px;
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 -1px 1px rgba(255, 255, 255, 0.05);
}

[data-theme="light"] nav.scrolled {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 1),
    inset 0 -1px 1px rgba(0, 0, 0, 0.03);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
  overflow: visible;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
  position: relative;
}

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

.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }

/* ── Nav Resume Button (Standout CTA) ── */
.nav-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  z-index: 1;
  color: #0C0C0B;
  background: linear-gradient(135deg, #EDEDE8 0%, #d4d4ce 50%, #EDEDE8 100%);
  background-size: 200% 200%;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-position 0.4s ease;
  box-shadow:
    0 0 12px rgba(237, 237, 232, 0.15),
    0 0 30px rgba(237, 237, 232, 0.06);
}

/* Shimmer sweep overlay */
.nav-resume-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  transition: none;
  animation: resumeShimmer 3s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
}

/* Outer glow ring */
.nav-resume-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(237,237,232,0.3), rgba(255,255,255,0.05), rgba(237,237,232,0.3));
  z-index: -1;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.nav-resume-btn:hover {
  transform: translateY(-1px);
  background-position: 100% 100%;
  box-shadow:
    0 0 20px rgba(237, 237, 232, 0.3),
    0 0 50px rgba(237, 237, 232, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-resume-btn:hover::after {
  opacity: 1;
}

.nav-resume-btn:hover .nav-resume-arrow {
  transform: translate(2px, -2px);
}

.nav-resume-btn svg {
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.nav-resume-arrow {
  transition: transform 0.3s var(--ease);
  position: relative;
  z-index: 3;
}

.nav-resume-label {
  position: relative;
  z-index: 3;
}

/* Light theme overrides */
[data-theme="light"] .nav-resume-btn {
  color: #F0EDE5;
  background: linear-gradient(135deg, #1a1a18 0%, #2d2d2a 50%, #1a1a18 100%);
  background-size: 200% 200%;
  box-shadow:
    0 0 12px rgba(12, 12, 11, 0.15),
    0 0 30px rgba(12, 12, 11, 0.06);
}

[data-theme="light"] .nav-resume-btn::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
}

[data-theme="light"] .nav-resume-btn::after {
  background: linear-gradient(135deg, rgba(12,12,11,0.3), rgba(0,0,0,0.05), rgba(12,12,11,0.3));
}

[data-theme="light"] .nav-resume-btn:hover {
  box-shadow:
    0 0 20px rgba(12, 12, 11, 0.25),
    0 0 50px rgba(12, 12, 11, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Removed glow keyframes for performance */

@keyframes resumeShimmer {
  0%, 70%, 100% { left: -100%; }
  85%           { left: 100%; }
}

/* Theme toggle - magnetic target */
.theme-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 15px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  position: relative; /* needed for magnetic offset */
  cursor:pointer;
}

.audio-btn {
  width: 40px;
  justify-content: center;
  padding-inline: 0;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.02);
}

/* Invisible pseudo-element to increase click area without altering visual size */
.audio-btn::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  border-radius: inherit;
  cursor:pointer;
}

[data-theme="light"] .audio-btn {
  background: rgba(12, 12, 11, 0.03);
}

.audio-btn:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ── Audio popup tooltip ── */
.audio-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
}

.audio-popup {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--bg2);
  border: 1px solid var(--border-hv);
  border-radius: 100px;
  padding: 6px 14px;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  animation: popupEntry 0.6s 1.8s ease forwards, popupBob 2.4s 2.4s ease-in-out infinite;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
  z-index: 201;
}

/* Small arrow pointing up to the button */
.audio-popup::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--border-hv);
}

.audio-popup::after {
  content: '';
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: var(--bg2);
}

/* Entry animation */
@keyframes popupEntry {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Gentle floating bob */
@keyframes popupBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-3px); }
}

/* Hide state (after click or sound already on) */
.audio-popup.hidden {
  animation: popupExit 0.35s ease forwards;
}

@keyframes popupExit {
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(6px) scale(0.9);
    pointer-events: none;
  }
}

.audio-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.audio-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.theme-btn:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.theme-btn:active {
  transform: scale(0.95) !important;
}

.t-icon { font-size: 18px; line-height: 1; }

/* ── SETTINGS GEAR ── */
.settings-wrap {
  position: relative;
}

.settings-btn {
  width: 40px;
  justify-content: center;
  padding-inline: 0;
  color: var(--fg);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.5s;
}

.settings-btn.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.settings-btn svg {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.settings-btn.active svg {
  transform: rotate(90deg);
}

/* ── SETTINGS PANEL ── */
.settings-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 240px;
  background: rgba(12, 12, 11, 0.6) !important;
  backdrop-filter: blur(32px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 12px 40px rgba(0, 0, 0, 0.3);
  border-radius: 14px;
  padding: 18px 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  z-index: 1000;
  pointer-events: none;
}

[data-theme="light"] .settings-panel {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 12px 40px rgba(0, 0, 0, 0.1) !important;
}

.settings-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.settings-panel-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  cursor: pointer;
  gap: 16px;
}

.settings-row:hover .settings-label {
  color: var(--fg);
}

.settings-label {
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s;
  white-space: nowrap;
  user-select: none;
}

/* ── TOGGLE SWITCH ── */
.settings-toggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 20px;
  flex-shrink: 0;
  transition: background 0.3s, border-color 0.3s;
}

.settings-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}

.settings-toggle:checked + .settings-switch {
  background: #3B82F6;
  border-color: #3B82F6;
}

.settings-toggle:checked + .settings-switch::after {
  transform: translateX(16px);
  background: #fff;
}

/* ── Disable card particles & glow via attribute ── */
[data-no-particles] .card-particle {
  display: none !important;
}

[data-no-particles] .pcard:not(.pcard--wip):hover,
[data-no-particles] .pcard:not(.pcard--wip).is-active {
  border-color: var(--border-hv);
  box-shadow: none;
}

/* ── HERO ── */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--pad-x) max(56px, calc(56px + env(safe-area-inset-bottom)));
  position: relative;

}
@media (max-width: 480px) {
  #hero {
    margin-top: 0;
  }
}


.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  overflow: hidden;
}

.hero-eyebrow span {
  display: inline-block;
  will-change: transform;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(72px, 12vw, 176px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.05em;
  margin-bottom: 48px;
}

.hero-title .tl {
  overflow: hidden;
  display: block;
}

.hero-title .tl span {
  display: block;
  transform: translateY(0);
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.hero-desc {
  max-width: 360px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* ── PILLS ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 100px;
  color: var(--muted);
}

.pill.available {
  border-color: var(--green-bd);
  color: var(--green);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 2.2s ease infinite;
}

/* ── SCROLL HINT ── */
.scroll-hint {
  position: absolute;
  top: 140px;
  right: var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}


.scroll-hint span {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-lr;
}

.sh-line {
  width: 1px;
  height: 64px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.sh-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: shline 2.4s ease infinite;
}

/* ── SKILLS STRIP (LogoLoop mount) ── */
.skills-logoloop-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  overflow: hidden;
}

/* ── SECTION COMMON ── */
.s-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
  overflow: visible;
}

.s-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.s-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 110px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.88;
}

.s-title .tl {
  overflow: hidden;
  display: block;
}

.s-title .tl span {
  display: block;
  transform: translateY(0%) !important;
}

/* ── CV / LINK BUTTON ── */
.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 15px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.cv-btn:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.cv-btn:hover svg {
  stroke: var(--bg);
  transform: translateX(3px);
}

.cv-btn svg {
  flex-shrink: 0;
  transition: stroke 0.3s, transform 0.3s;
}

/* ── WORK SECTION ── */
#work { 
  margin-top: -50px; 
}
#work,
#experience {
  padding: 120px var(--pad-x); 
}

/* ── Skeleton Loading Effect for Experience Cards ── */
.exp-skeleton-wrap {
  display: flex;
  gap: 32px;
  margin-top: 10px;
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

.skeleton-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-block {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 2s infinite linear;
  border-radius: 4px;
}

[data-theme="light"] .skeleton-block {
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.09) 50%, rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sk-val {
  width: 300px;
  height: 190px;
}

.sk-label {
  width: 135px;
  height: 15px;
}

.sk-label.short {
  width: 90px;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── PROJECT CARDS ── */
.pcard {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative; /* Changed from overflow: hidden so particles can escape */
  transition: border-color 0.4s ease;
  height: 30rem;
}

.pcard:not(.pcard--wip):hover,
.pcard:not(.pcard--wip).is-active {
  border-color: var(--card-glow);
  box-shadow: 0 0 35px color-mix(in srgb, var(--card-glow) 45%, transparent),
              inset 0 0 20px color-mix(in srgb, var(--card-glow) 20%, transparent);
}

.pcard--featured:hover,
.pcard--featured.is-active {
  border-color: rgba(110, 231, 183, 0.5);
}

.pcard--wip { pointer-events: none; }
.pcard--wip .p-arrow { display: none; }

.wip-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 100px;
  padding: 5px 12px;
}

.completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6EE7B7;
  background: rgba(110, 231, 183, 0.08);
  border: 1px solid rgba(110, 231, 183, 0.25);
  border-radius: 100px;
  padding: 5px 12px;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9BE7C8;
  background: rgba(110, 231, 183, 0.08);
  border: 1px solid rgba(110, 231, 183, 0.24);
  border-radius: 100px;
  padding: 5px 12px;
}

.wip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F59E0B;
  flex-shrink: 0;
  animation: blink 2.2s ease infinite;
}

.completed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fe3333;
  flex-shrink: 0;
  animation: blink 2.2s ease infinite;
}

.featured-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6EE7B7;
  flex-shrink: 0;
  animation: blink 2.2s ease infinite;
}

.pcard-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
}

/* ── CARD PARTICLES ── */
.card-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--card-glow);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 6px var(--card-glow), 0 0 12px var(--card-glow);
  z-index: 10;
}

.pcard-info {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.pcard-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.pnum {
  font-size: 10px;
  padding-top: 5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 25rem;
  width: 100%;
}

.tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
}

.pcard-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  padding: 4px 0;
}

.pyear-sub {
  font-size: 12px;
  color: var(--muted);
}

.pdesc {
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 42ch;
}

.pname {
  font-family: var(--font-sans);
  font-size: clamp(20px, 2.8vw, 35px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.pmetrics {
  display: flex;
  gap: 32px;
}

.pmetric {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pm-val {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--muted);
}

.pm-label {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  max-width: 130px;
}

/* ── CARD VISUAL PANEL ── */
.pcard-vis {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  align-self: stretch;
  height: 100%;
  width: 100%;
}

/* Base wrapper (removed 116% extension to prevent clipping) */
.pcard-vis-inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
}

.pcard-bg {
  position: absolute;
  inset: 0;
}

/* Card gradients */
.p-gfg     .pcard-bg { background: linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 55%, #2a2a2a 100%); }
.p-quests  .pcard-bg { background: linear-gradient(145deg, #001A0A 0%, #004A20 55%, #00A854 100%); }
.p-referral .pcard-bg { background: linear-gradient(145deg, #001209 0%, #003D1A 55%, #00C96B 100%); }
.p-nexus   .pcard-bg { background: linear-gradient(145deg, #00120c 0%, #003825 55%, #0f5d44 100%); }
.p-streamcore .pcard-bg { background: linear-gradient(145deg, #0b1020 0%, #172240 55%, #2c4a7a 100%); }

/* Blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.22;
  transition: transform 0.9s ease, opacity 0.9s ease;
}

.pcard:hover .blob,
.pcard.is-active .blob {
  opacity: 0.38;
  transform: scale(1.2) rotate(20deg);
}

.p-quests  .blob1 { width: 300px; height: 300px; top: -60px;  right: -50px; background: #00C96B; }
.p-quests  .blob2 { width: 180px; height: 180px; bottom: 40px; right: 60px;  background: #6EE7B7; opacity: 0.10; }
.p-referral .blob1 { width: 320px; height: 320px; top: -80px;  right: -70px; background: #00C96B; }
.p-referral .blob2 { width: 200px; height: 200px; bottom: 30px; right: 70px;  background: #6EE7B7; opacity: 0.10; }
.p-nexus .blob1 { width: 320px; height: 320px; top: -70px; right: -60px; background: #6EE7B7; }
.p-nexus .blob2 { width: 180px; height: 180px; bottom: 26px; right: 64px; background: #A7F3D0; opacity: 0.12; }
.p-streamcore .blob1 { width: 300px; height: 300px; top: -70px; right: -60px; background: #93C5FD; }
.p-streamcore .blob2 { width: 180px; height: 180px; bottom: 28px; right: 66px; background: #60A5FA; opacity: 0.12; }

/* Project images */
.pcard-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.pcard-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
  z-index: 2;
}

/* SVG scene fallback - hidden by default, shown only on image error */
.scene-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* Arrow CTA */
.p-arrow {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.pcard:hover .p-arrow,
.pcard.is-active .p-arrow {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: rotate(45deg) scale(1.05);
}

.pcard:hover .p-arrow svg path,
.pcard.is-active .p-arrow svg path { stroke: #fff; }

[data-theme="light"] .p-arrow {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .pcard:hover .p-arrow,
[data-theme="light"] .pcard.is-active .p-arrow {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .p-arrow svg path { stroke: #000; }
[data-theme="light"] .pcard:hover .p-arrow svg path,
[data-theme="light"] .pcard.is-active .p-arrow svg path { stroke: #000; }

.p-arrow.left-arrow {
  right: auto;
  left: 24px;
}

/* GitHub Logo CTA */
.p-github {
  position: absolute;
  bottom: 24px;
  right: 76px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.3s, border-color 0.3s, transform 0.3s, color 0.3s, box-shadow 0.3s;
  color: white;
}

.pcard:hover .p-github,
.pcard.is-active .p-github {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: rotate(45deg) scale(1.05);
  color: white;
}

[data-theme="light"] .p-github {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  color: #000;
}

[data-theme="light"] .pcard:hover .p-github,
[data-theme="light"] .pcard.is-active .p-github {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.1);
  color: #000;
}

/* ── PDF STRIP ── */
.pdf-strip {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.pdf-strip > a.cv-btn {
  margin-left: 5rem;
  margin-right: auto;
}

.pdf-strip p:first-child {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--fg);
}

.pdf-strip p:last-child {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── SHOWCASE STRIP ── */
#showcase {
  padding: 0 0 0 var(--pad-x);
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 48px var(--pad-x) 0;
}

.sc-drag-hint {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-drag-hint::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--muted);
}

.showcase-inner {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 40px var(--pad-x) 48px 0;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  cursor: grab;
}

.showcase-inner:active { cursor: grabbing; }
.showcase-inner::-webkit-scrollbar { display: none; }

.sc-card {
  flex: 0 0 300px;
  height: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  transition: border-color 0.4s ease;
}

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

.sc-card-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.9s var(--ease);
}

.sc-card:hover .sc-card-bg { transform: scale(1.06); }

.sc-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.08) 60%, transparent 100%);
  z-index: 2;
}

.sc-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  z-index: 3;
}

.sc-card-co {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(237, 237, 232, 0.50);
  margin-bottom: 6px;
}

.sc-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #EDEDE8;
}

.sc-card-tags {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sc-card-tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid rgba(237, 237, 232, 0.18);
  border-radius: 100px;
  color: rgba(237, 237, 232, 0.50);
}

/* Gradient palettes for showcase cards */
.sc-bg-bank    { background: linear-gradient(145deg, #0A0014 0%, #2A006B 55%, #6B21A8 100%); }
.sc-bg-go      { background: linear-gradient(145deg, #0A0A00 0%, #3B2800 55%, #B45309 100%); }
.sc-bg-chal    { background: linear-gradient(145deg, #000D14 0%, #003052 55%, #0369A1 100%); }
.sc-bg-tv      { background: linear-gradient(145deg, #0D000A 0%, #3D0024 55%, #9D174D 100%); }
.sc-bg-onboard { background: linear-gradient(145deg, #001209 0%, #003D1A 55%, #16A34A 100%); }

/* ── ABOUT ── */
#about { 
  padding: 0px var(--pad-x); 
  opacity: 1 !important;
  visibility: visible !important;
  display: block;
  min-height: 600px;
  margin-bottom: 3rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  margin-top: 80px;
  opacity: 1 !important;
  visibility: visible !important;
  min-height: auto;
  height: auto;
}

.about-bio {
  opacity: 1 !important;
  visibility: visible !important;
  display: block;
}

.about-bio p {
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.62;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 24px;
  opacity: 1 !important;
  visibility: visible !important;
}

.about-bio p:last-of-type { margin-bottom: 0; }

.about-bio strong {
  font-weight: 300;
  color: var(--fg);
  opacity: 1 !important;
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 44px;
  opacity: 1 !important;
  visibility: visible !important;
}

.detail-h {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.exp-list,
.awards-list {
  display: flex;
  flex-direction: column;
}

.exp-item,
.award-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.ei-l,
.aw-l {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ei-co,
.aw-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ei-role,
.aw-issuer {
  font-size: 12px;
  color: var(--muted);
}

.ei-yr,
.aw-yr {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-pill {
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: default;
}

[data-theme="light"] .skill-pill {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
}

.skill-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  transition: none;
}

[data-theme="light"] .skill-pill::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.skill-pill:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px) scale(1.05);
}

[data-theme="light"] .skill-pill:hover {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.08);
}

.skill-pill:hover::before {
  animation: skillSheen 1.2s ease forwards;
}

@keyframes skillSheen {
  100% {
    left: 200%;
  }
}

/* ── CONTACT ── */
#contact { padding: 120px var(--pad-x) 80px; }

.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(52px, 9vw, 130px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.88;
  margin: 56px 0 72px;
}

.contact-headline .tl {
  overflow: hidden;
  display: block;
}

.contact-headline .tl span {
  display: block;
}

.contact-headline a {
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

.contact-headline a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--accent);
  transition: width 0.55s var(--ease);
}

.contact-headline a:hover { color: var(--accent); }
.contact-headline a:hover::after { width: 100%; }

.contact-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 36px;
}

.cf-left { display: flex; flex-direction: column; }

.cf-email-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-left p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}

.cf-email-row:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--fg); }
.copy-btn.copied { color: #00C96B; opacity: 1; }

.cf-right {
  display: flex;
  gap: 24px;
}

.cf-right a {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}

.cf-right a:hover { color: var(--fg); }

.copy {
  font-size: 11px;
  color: var(--muted);
  margin-top: 32px;
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════
   MORE WORK - alectear.com scatter effect
   Moving mouse rapidly over the section spawns images
   at the cursor position. They stay where they land.
═══════════════════════════════════════════════════════ */

#more-work {
  position: relative;
  padding: 80px var(--pad-x) 100px;
  min-height: 800px;
  cursor: auto;
  overflow: hidden;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* contain: paint isolates the scatter canvas repaints to this element */
  contain: paint;
}

#more-work .mw-header {
  position: relative;
  z-index: 2;          /* sits above scattered images */
  pointer-events: none;
  margin-bottom: 20px;
}

#more-work .s-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, rgba(237,237,232,0.45));
  margin-bottom: 10px;
  display: block;
}

#more-work .s-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--fg);
}

/* Hint text at bottom of section */
#more-work .mw-hint {
  position: absolute;
  bottom: 28px;
  left: var(--pad-x);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted, rgba(237,237,232,0.3));
  pointer-events: none;
  z-index: 2;
}

/* Desktop hint - shown on devices with fine pointer (mouse) */
#more-work .mw-hint-mobile {
  display: none;
}

/* Mobile hint - hidden on desktop */
@media (pointer: coarse) {
  #more-work .mw-hint-desktop {
    display: none;
  }
  #more-work .mw-hint-mobile {
    display: block;
  }
}

/* ── Swaying finger guide (mobile only) ── */
.mw-finger-guide {
  display: none; /* hidden on desktop */
  position: absolute;
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.mw-finger-guide.is-hidden {
  opacity: 0;
  transition: opacity 0.15s ease;
}



.mw-finger-img {
  width: 44px;
  height: auto;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.3));
  transform-origin: 50% 85%;
}

@media (pointer: coarse) {
  .mw-finger-guide {
    display: block;
  }
}

/* ── Scatter container - fills the section ── */
.mw-scatter-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
  /* contain:strict tells the browser this subtree doesn't affect outside layout */
  contain: strict;
}

/* ── Each spawned image ── */
/* Styles set inline by JS for per-image size/position/rotation */
.mw-scattered-img {
  position: absolute;
  object-fit: cover;
  border-radius: 6px;
  pointer-events: none;
  user-select: none;
  display: block;
  transform-origin: 50% 50%;
}
/* Removed pulse-glow keyframes for performance */

/* ── Try It Yourself Button ── */
.try-btn {
  position: absolute;
  bottom: 24px;
  right: 128px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 3;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

[data-theme="light"] .try-btn {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.2);
  color: #000;
}

.try-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  transform: scale(1.05);
  animation: none;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .try-btn:hover {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.4);
  color: #000;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ── Status View inside Modal ── */
.demo-status-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: var(--bg);
  border-radius: 16px;
  z-index: 2;
  transition: opacity 0.4s ease;
}

.demo-modal.processing .demo-modal-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.demo-modal.processing .demo-status-view {
  opacity: 1;
  pointer-events: auto;
}

.status-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08); /* Neutral loading background */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transform: scale(0.8);
  opacity: 0;
  border: 1px solid rgba(255,255,255,0.15);
}

#statusLoaderSvg {
  animation: svg-spin 1.2s linear infinite;
}

@keyframes svg-spin {
  100% { transform: rotate(360deg); }
}

.demo-modal.processing .status-circle {
  animation: pop-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.25s;
}

@keyframes pop-in {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.status-text-wrap {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg);
  text-align: center;
}

.status-text-wrap span { display: inline-block; }

/* ── Demo Modal ── */
.demo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.demo-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.demo-modal-inner {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.demo-modal.active .demo-modal-inner {
  transform: translateY(0) scale(1);
}

.demo-modal-inner h4 {
  font-family: var(--font-sans);
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--fg);
}

.demo-modal-inner p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.demo-input-group {
  display: flex;
  gap: 8px;
}

#demoEmail {
  padding-bottom: 5px;
  padding-top: 2px;
}

.demo-input-group input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 16px;
  height: 44px;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.demo-input-group input::placeholder {
  font-size: 13px;
}

.demo-input-group input:focus {
  border-color: var(--fg);
}

.demo-input-group button {
  height: 44px;
  padding: 0 24px;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.demo-input-group button:active {
  transform: scale(0.96);
}

.demo-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}

.demo-close:hover {
  color: var(--fg);
}

/* ── NEXUS CARD VIDEO ── */
.nexus-media-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.nexus-img {
  transition: opacity 0.4s ease;
}

.nexus-video-wrapper {
  position: absolute;
  background: var(--bg);
  border-radius: 16px;
  z-index: 2;
  transition: opacity 0.4s ease;
}

.demo-modal.processing .demo-modal-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.demo-modal.processing .demo-status-view {
  opacity: 1;
  pointer-events: auto;
}

.status-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08); /* Neutral loading background */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transform: scale(0.8);
  opacity: 0;
  border: 1px solid rgba(255,255,255,0.15);
}

#statusLoaderSvg {
  animation: svg-spin 1.2s linear infinite;
}

@keyframes svg-spin {
  100% { transform: rotate(360deg); }
}

.demo-modal.processing .status-circle {
  animation: pop-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.25s;
}

@keyframes pop-in {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.status-text-wrap {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg);
  text-align: center;
}

.status-text-wrap span { display: inline-block; }

/* ── Demo Modal ── */
.demo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.demo-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.demo-modal-inner {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.demo-modal.active .demo-modal-inner {
  transform: translateY(0) scale(1);
}

.demo-modal-inner h4 {
  font-family: var(--font-sans);
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--fg);
}

.demo-modal-inner p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.demo-input-group {
  display: flex;
  gap: 8px;
}

#demoEmail {
  padding-bottom: 5px;
  padding-top: 2px;
}

.demo-input-group input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 16px;
  height: 44px;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.demo-input-group input::placeholder {
  font-size: 13px;
}

.demo-input-group input:focus {
  border-color: var(--fg);
}

.demo-input-group button {
  height: 44px;
  padding: 0 24px;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.demo-input-group button:active {
  transform: scale(0.96);
}

.demo-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}

.demo-close:hover {
  color: var(--fg);
}

/* ── NEXUS CARD VIDEO ── */
.nexus-media-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.nexus-img {
  transition: opacity 0.4s ease;
}

.nexus-video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
  z-index: 5; /* Above overlay */
}

.nexus-video {
  width: 100%;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
}

/* On Hover (Desktop) */
@media (hover: hover) and (pointer: fine) {
  .p-nexus:hover .nexus-img {
    opacity: 0;
  }
  .p-nexus:hover .nexus-video-wrapper {
    opacity: 1;
    visibility: visible;
  }
}

/* On Mobile */
@media (hover: none), (pointer: coarse) {
  .nexus-img {
    opacity: 0;
    display: none;
  }
  .nexus-video-wrapper {
    opacity: 1;
    visibility: visible;
  }
}

/* Video Controls */
.nexus-video-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none; /* Let hover pass through initially */
}

.p-nexus:hover .nexus-video-controls,
.nexus-video-controls.mobile-active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nexus-video-controls button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.nexus-video-controls button:hover {
  color: #6EE7B7;
}

.nexus-video-controls svg {
  width: 20px;
  height: 20px;
}

/* Mobile specific sizing */
@media (max-width: 768px) {
  .nexus-video-controls {
    padding: 6px 8px;
    gap: 8px;
    top: 12px;
    right: 12px;
  }
  .nexus-video-controls svg {
    width: 16px;
    height: 16px;
  }
}

/* Ensure buttons remain clickable over the video wrapper */
.pcard-vis .p-github,
.pcard-vis .p-arrow,
.pcard-vis .try-btn {
  z-index: 20;
}

/* -- Try It Yourself Button Responsiveness -- */
@media (max-width: 900px) {
  .desktop-try-btn { display: none !important; }
}
@media (min-width: 901px) {
  .mobile-try-btn { display: none !important; }
}



.logoloop {
  position: relative;

  --logoloop-gap: 32px;
  --logoloop-logoHeight: 28px;
  --logoloop-fadeColorAuto: #ffffff;
}

.logoloop--vertical {
  height: 100%;
  display: inline-block;
}

.logoloop--scale-hover {
  padding-top: calc(var(--logoloop-logoHeight) * 0.1);
  padding-bottom: calc(var(--logoloop-logoHeight) * 0.1);
}

[data-theme="dark"] .logoloop {
  --logoloop-fadeColorAuto: #0b0b0b;
}

[data-theme="light"] .logoloop {
  --logoloop-fadeColorAuto: #f0ede5;
}

.logoloop__track {
  display: flex;
  width: max-content;
  will-change: transform;
  user-select: none;
  position: relative;
  z-index: 0;
  cursor: grab;
}

.logoloop--vertical .logoloop__track {
  flex-direction: column;
  height: max-content;
  width: 100%;
}

.logoloop__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.logoloop--vertical .logoloop__list {
  flex-direction: column;
}

.logoloop__item {
  flex: 0 0 auto;
  margin-right: var(--logoloop-gap);
  font-size: var(--logoloop-logoHeight);
  line-height: 1;
}

.logoloop--vertical .logoloop__item {
  margin-right: 0;
  margin-bottom: var(--logoloop-gap);
}

.logoloop__item:last-child {
  margin-right: var(--logoloop-gap);
}

.logoloop--vertical .logoloop__item:last-child {
  margin-right: 0;
  margin-bottom: var(--logoloop-gap);
}

.logoloop__node {
  display: inline-flex;
  align-items: center;
}

.logoloop__item img {
  height: var(--logoloop-logoHeight);
  width: auto;
  display: block;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  -webkit-user-drag: none;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logoloop--scale-hover .logoloop__item {
  overflow: visible;
}

.logoloop--scale-hover .logoloop__item:hover img,
.logoloop--scale-hover .logoloop__item:hover .logoloop__node {
  transform: scale(1.2);
  transform-origin: center center;
}

.logoloop--scale-hover .logoloop__node {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logoloop__link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 4px;
  color: inherit;
  transition: opacity 0.2s ease;
}

.logoloop__link:hover {
  opacity: 0.8;
}

.logoloop__link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.logoloop--fade::before,
.logoloop--fade::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(24px, 8%, 120px);
  pointer-events: none;
  z-index: 10;
}

.logoloop--fade::before {
  left: 0;
  background: linear-gradient(
    to right,
    var(--logoloop-fadeColor, var(--logoloop-fadeColorAuto)) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.logoloop--fade::after {
  right: 0;
  background: linear-gradient(
    to left,
    var(--logoloop-fadeColor, var(--logoloop-fadeColorAuto)) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.logoloop--vertical.logoloop--fade::before,
.logoloop--vertical.logoloop--fade::after {
  left: 0;
  right: 0;
  width: 100%;
  height: clamp(24px, 8%, 120px);
}

.logoloop--vertical.logoloop--fade::before {
  top: 0;
  bottom: auto;
  background: linear-gradient(
    to bottom,
    var(--logoloop-fadeColor, var(--logoloop-fadeColorAuto)) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.logoloop--vertical.logoloop--fade::after {
  bottom: 0;
  top: auto;
  background: linear-gradient(
    to top,
    var(--logoloop-fadeColor, var(--logoloop-fadeColorAuto)) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Portfolio strip: match Syne / muted caps from former marquee */
.logoloop--skills .logoloop__node {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .logoloop__track {
    transform: translate3d(0, 0, 0) !important;
  }

  .logoloop__item img,
  .logoloop__node {
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE.CSS - mobile-first responsive overrides
   Breakpoints:  ≤ 900px  → tablet / small laptop
                 ≤ 600px  → phone landscape / large phone
                 ≤ 480px  → phone portrait
═══════════════════════════════════════════════════════ */

/* ── Touch devices (pointer: coarse) ── */
@media (pointer: coarse) {
  :is(.hero-title, .s-title, .contact-headline) .tl span {
    animation-duration: 0.5s;
  }

  * {
    -webkit-tap-highlight-color: transparent;
  }

  button, a, [role="button"] {
    -webkit-touch-callout: none;
  }
}


/* ── Desktop (min 901px) ── */
@media (min-width: 901px) {
  #hero {
    margin-top: -8rem;
    margin-bottom: 4rem;
  }

  .scroll-hint {
    top: 260px;
  }
}


/* ═══════════════════════════════════════════════════════
   ≤ 900px - Tablet / small-laptop
═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Optimize animations */
  @media (prefers-reduced-motion: no-preference) {
    *:not(.audio-popup) { animation-duration: 0.8s !important; }
  }

  :root {
    --pad-x: 24px;
  }

  /* ── Mobile Navbar (Ultra-minimal Liquid Glass) ── */
  nav, nav.scrolled {
    width: 88vw !important;
    max-width: 400px !important;
    margin: 0 !important;
    top: 16px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    gap: 0; /* width and justify-content handle spacing */
    padding: 8px 16px !important;
    border-radius: 100px;
    background: rgba(12, 12, 11, 0.4) !important;
    backdrop-filter: blur(32px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 12px 40px rgba(0, 0, 0, 0.3);
  }
  
  [data-theme="light"] nav, [data-theme="light"] nav.scrolled {
    background: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(0, 0, 0, 0.02);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 12px 40px rgba(0, 0, 0, 0.1);
  }
  .nav-links { display: none; }
  .nav-right { gap: 6px; }
  .nav-logo { opacity: 0.85; font-size: 13.5px; font-weight: 600; letter-spacing: 0.02em; }
  .audio-popup { display: none !important; }

  nav .nav-resume-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    aspect-ratio: 1;
    padding: 0;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: none;
    color: var(--fg);
    box-shadow: none;
    animation: none;
    overflow: visible;
    font-size: 0;
  }
  nav .nav-resume-btn svg:first-child {
    width: 14px;
    height: 14px;
    display: block;
    flex-shrink: 0;
  }
  nav .nav-resume-btn::before,
  nav .nav-resume-btn::after {
    display: none;
  }
  .nav-resume-label { display: none; }
  .nav-resume-arrow { display: none; }
  [data-theme="light"] nav .nav-resume-btn {
    color: var(--fg);
    background: none;
    box-shadow: none;
  }

  /* ── Settings Panel Mobile Detached ── */
  .settings-panel {
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    transform: translateY(-10px) !important;
    width: 90vw !important;
    max-width: 340px !important;
  }
  .settings-panel.open {
    transform: translateY(0) !important;
  }

  /* ── Audio popup - smaller on mobile ── */
  .audio-popup {
    font-size: 9px;
    padding: 5px 10px;
    top: calc(100% + 10px);
    letter-spacing: 0.06em;
  }

  .audio-popup::before {
    border-width: 4px;
  }

  .audio-popup::after {
    border-width: 3px;
  }

  /* ── Hero ── */
  #hero {
    padding: 15svh var(--pad-x) 0;
    justify-content: flex-start;
    min-height: 70svh;
  }

  .hero-eyebrow {
    margin-bottom: 12px;
  }

  .hero-title {
    margin-bottom: 32px;
    text-align: left;
    line-height: 1.05;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    
  }

  .hero-right {
    align-items: flex-start;
    margin-top: 30px;
  }

  .hero-desc {
    max-width: 100%;
    font-size: 14px;
  }

  /* Fix scroll hint on mobile - move to bottom */
  .scroll-hint {
    position: absolute;
    top: auto;
    bottom: 160px;
    right: var(--pad-x);
  }

  /* ── Logo loop ── */
  .skills-logoloop-wrap {
    padding: 4px 0;
    margin-top: -130px;
  }

  /* ── Section spacing ── */
  #work { padding: 80px var(--pad-x) 32px; }
  #experience { padding: 32px var(--pad-x); }
  #about { padding: 32px var(--pad-x) 80px; }
  #contact { padding: 80px var(--pad-x); }

  #more-work {
    min-height: 80vh !important;
    height: 80vh !important;
  }

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

  /* ── Project cards ── */
  .pcard {
    height: auto !important;
  }

  .exp-skeleton-wrap {
    display: none !important;
  }

  .pcard-inner {
    grid-template-columns: 1fr;
  }

  .pcard-vis {
    height: auto;
    min-height: 280px;
    aspect-ratio: 1536 / 1024;
    order: -1;
  }

  .pdesc {
    font-size: clamp(14px, 3.4vw, 16px);
    line-height: 1.5;
  }

  /* Compact button grouping on mobile, moved slightly down */
  .p-arrow { bottom: -2px; right: 16px; }
  .p-arrow.left-arrow { right: auto; left: 16px; }
  .p-github { bottom: -2px; right: 68px; }
  .try-btn { bottom: -2px; right: 120px; }

  /* ── About ── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    margin-top: 48px;
  }

  .about-bio p {
    font-size: clamp(15px, 3.5vw, 20px);
  }

  /* Fix CV button scaling on mobile */
  .cv-btn {
    scale: 1;
  }

  /* Fix inline-styled CV button in about-bio */
  .about-bio .cv-btn {
    margin-left: 0 !important;
    margin-top: 32px !important;
  }

  /* ── PDF strip ── */
  .pdf-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .pdf-strip > a.cv-btn {
    margin-left: 0;
    margin-right: 0;
  }

  /* ── Contact ── */
  .contact-footer {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }

  .contact-headline {
    margin: 40px 0 56px;
  }

  /* ── More work ── */
  #more-work {
    min-height: 500px;
    padding: 60px var(--pad-x) 80px;
  }

  /* ── Showcase ── */
  #showcase {
    padding-left: var(--pad-x);
  }

  .showcase-header {
    padding: 40px var(--pad-x) 0;
  }

  .showcase-inner {
    padding: 32px var(--pad-x) 40px 0;
  }

  .sc-card {
    flex: 0 0 250px;
    height: 320px;
  }

  /* ── Mobile-friendly touch targets ── */
  button, a[role="button"], .p-arrow, .p-github {
    min-height: 44px;
    min-width: 44px;
  }

  /* ── Performance ── */
  img {
    max-width: 100%;
    height: auto;
  }

  .nexus-video {
    padding-bottom: 56px;
  }

  .pcard-img, .pcard-img-overlay {
    will-change: auto;
    backface-visibility: hidden;
  }

  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}


/* ═══════════════════════════════════════════════════════
   ≤ 600px - Phone landscape / large phone
═══════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  :root {
    --pad-x: 18px;
  }

  /* Nav scrolled pill sits wider on small screens */
  nav.scrolled {
    left: 10px;
    right: 10px;
  }

  /* Even tighter grouping on small phones */
  .p-arrow { bottom: 4px; right: 12px; }
  .p-arrow.left-arrow { right: auto; left: 12px; }
  .p-github { bottom: 4px; right: 64px; }
  .try-btn { bottom: 4px; right: 116px; font-size: 9px; padding: 0 12px; }

  .nexus-video {
    padding-bottom: 48px;
  }

  /* Demo Modal Mobile Fixes */
  .demo-modal-inner {
    padding: 24px 20px;
    width: 92%;
  }

  .demo-modal-inner h4 {
    font-size: 18px;
    padding-right: 20px; /* Leave space for close button */
  }

  .demo-input-group {
    flex-direction: column;
  }

  .demo-input-group input {
    height: 50px;
    font-size: 15px;
  }

  .demo-input-group button {
    width: 100%;
    height: 50px;
    font-size: 14px;
  }

  .hero-title {
    font-size: clamp(48px, 13vw, 72px);
    margin-bottom: 24px;
  }

  .hero-eyebrow {
    font-size: 10px;
  }

  .hero-desc {
    font-size: 13px;
    line-height: 1.6;
  }

  .pill {
    font-size: 10px;
    padding: 6px 12px;
  }

  /* Section titles */
  .s-title {
    font-size: clamp(40px, 12vw, 80px);
  }

  /* Project cards */
  .pcard-vis {
    height: 220px;
  }

  .pcard-info {
    padding: 28px 20px;
  }

  .pdesc {
    font-size: clamp(13px, 3.6vw, 15px);
    line-height: 1.45;
  }

  .pname {
    font-size: clamp(18px, 5.5vw, 28px);
  }

  .pm-val {
    font-size: 22px;
  }

  .pm-label {
    font-size: 10px;
  }

  /* About section */
  #about {
    min-height: auto;
    margin-bottom: 1rem;
  }

  .about-grid {
    gap: 36px;
    margin-top: 36px;
  }

  .exp-item, .award-item {
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .skill-pill {
    font-size: 10px;
    padding: 5px 11px;
  }

  /* Contact */
  .contact-headline {
    font-size: clamp(40px, 11vw, 90px);
    margin: 32px 0 48px;
  }

  #contact {
    padding: 60px var(--pad-x) 60px;
  }

  /* More work */
  #more-work {
    min-height: 400px;
    padding: 48px var(--pad-x) 60px;
  }

  /* Logo loop strip */
  .skills-logoloop-wrap {
    margin-top: -140px;
    margin-bottom: 26px;
  }

  /* PDF strip */
  .pdf-strip h1,
  .pdf-strip h2 {
    font-size: clamp(18px, 5vw, 28px);
  }
}


/* ═══════════════════════════════════════════════════════
   ≤ 480px - Phone portrait
═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .hero-title {
    font-size: 11vw;
  }

  .s-title {
    font-size: 14vw;
  }

  #experience .s-title {
    font-size: clamp(28px, 9vw, 42px);
    letter-spacing: -0.02em;
  }

  .pname {
    font-size: 7vw;
  }

  .pcard-info {
    padding: 24px 18px;
  }

  .pdesc {
    font-size: 13px;
    line-height: 1.45;
  }

  .pcard-vis {
    height: 190px;
  }

  .contact-headline {
    font-size: 14vw;
  }

  .cf-right {
    flex-wrap: wrap;
    gap: 14px;
  }

  .cf-left p {
    font-size: 12px;
  }

  .copy {
    font-size: 10px;
  }

  /* Scroll hint smaller on small phones */
  .scroll-hint {
    bottom: 120px;
  }

  .sh-line {
    height: 40px;
  }

  /* About inline-button fix */
  .about-bio .cv-btn {
    margin-top: 24px !important;
  }

  /* More work minimal height */
  #more-work {
    min-height: 320px;
    padding: 40px var(--pad-x) 50px;
  }

  /* Experience list tighter */
  .ei-co, .aw-title {
    font-size: 13px;
  }

  .ei-yr, .aw-yr {
    font-size: 10px;
  }
}


/* ═══════════════════════════════════════════════════════
   ≤ 360px - Extra-small phones
═══════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  :root {
    --pad-x: 14px;
  }

  .hero-title {
    font-size: 12vw;
  }

  .hero-desc {
    font-size: 12px;
  }

  .pill {
    font-size: 9px;
    padding: 5px 10px;
  }

  .pcard-vis {
    height: 160px;
  }

  .pcard-info {
    padding: 20px 14px;
  }

  .pdesc {
    font-size: 12px;
    line-height: 1.4;
  }

  .tag {
    font-size: 8px;
    padding: 3px 8px;
  }
}

@media (max-width: 768px) {
  #hero { margin-bottom: 80px; }
  .skills-logoloop-wrap { margin-bottom: 60px; }
}

@media (max-width: 600px) {
  .nav-right { gap: 8px; }
  #tLabel { display: none; }
  .theme-btn,
  .audio-btn,
  .settings-btn {
    padding: 0;
    width: 40px;
    aspect-ratio: 1;
    justify-content: center;
    border-radius: 50%;
  }
  nav, nav.scrolled {
    padding: 8px 14px !important;
  }
  .hero-right .cv-btn {
    padding: 6px 12px;
    font-size: 10px;
  }
  .hero-right .cv-btn svg {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 400px) {
  .nav-right { gap: 6px; }
  nav, nav.scrolled {
    padding: 8px 12px !important;
  }
  .theme-btn,
  .audio-btn,
  .settings-btn {
    width: 34px;
  }
  nav .nav-resume-btn {
    width: 34px;
  }
  nav .nav-resume-btn svg:first-child {
    width: 12px;
    height: 12px;
  }
  .nav-logo {
    font-size: 13px;
  }
}
