/* ═══════════════════════════════════════════════════════════════
   AWSMX PORTFOLIO — Editorial Brutalist Dark Luxury
   Fonts: DM Serif Display · Syne · DM Sans
═══════════════════════════════════════════════════════════════ */

/* ── Tokens: Dark (default) ─────────────────────────────── */
:root {
  --ink: #0a0a08;
  --ink-2: #111110;
  --ink-3: #1c1c1a;
  --surface: #161614;
  --rule: rgba(255, 255, 255, 0.08);
  --rule-2: rgba(255, 255, 255, 0.16);
  --rule-3: rgba(255, 255, 255, 0.26);

  --cream: #f7f4eb;
  --cream-2: #e0d7c5;
  --text: #f2ece1;
  --muted: #b8b0a2;
  --faint: #8e887d;

  --amber: #f5ad26;
  --amber-2: #ffc857;
  --amber-glow: rgba(245, 173, 38, 0.22);

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-ui: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --tog-w: 52px;
  --tog-h: 28px;
  --knob-s: 20px;
}

/* ── Tokens: Light ──────────────────────────────────────── */
/* ── Tokens: Light ──────────────────────────────────────── */
body.light {
  --ink: #faf8f5;
  --ink-2: #ffffff;
  --ink-3: #f3eee7;
  --surface: #ffffff;
  --rule: rgba(0, 0, 0, 0.08);
  --rule-2: rgba(0, 0, 0, 0.16);
  --rule-3: rgba(0, 0, 0, 0.26);
  --cream: #0f172a;
  --cream-2: #334155;
  --text: #1e293b;
  --muted: #475569;
  --faint: #64748b;
  --amber: #d97706;
  --amber-2: #ea580c;
  --amber-glow: rgba(217, 119, 6, 0.22);
}

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

html {
  scroll-behavior: smooth;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Body ───────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Global theme transitions (exclude animated elements) */
body *:not(.loader-ring):not(.loader-dot):not(.toggle-knob):not(.knob-icon) {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* Ambient blobs */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(232, 160, 32, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 90% 100%, rgba(217, 79, 61, 0.05) 0%, transparent 60%);
  transition: background 0.5s ease;
}

body.light::after {
  background:
    radial-gradient(circle 600px at 10% 5%, rgba(217, 119, 6, 0.14) 0%, transparent 70%),
    radial-gradient(circle 650px at 90% 20%, rgba(99, 102, 241, 0.14) 0%, transparent 70%),
    radial-gradient(circle 600px at 50% 85%, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
}

body:not(.is-loaded) .site-header,
body:not(.is-loaded) main {
  opacity: 0;
}

/* ── Background grid ────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at center, black 30%, transparent 80%);
}

/* ── Custom Cursor System ────────────────────────────────── */
@media (max-width: 720px),
(pointer: coarse) {

  .cursor-dot,
  .cursor-ring,
  .cursor-glow {
    display: none !important;
  }
}

@media (pointer: fine) and (min-width: 721px) {

  body.custom-cursor-active,
  body.custom-cursor-active a,
  body.custom-cursor-active button,
  body.custom-cursor-active [role="button"] {
    cursor: none !important;
  }
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--amber);
  box-shadow: 0 0 10px var(--amber), 0 0 20px var(--amber-glow);
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  transition: transform 0.15s ease-out, background-color 0.2s ease, width 0.2s ease, height 0.2s ease;
  will-change: transform;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--amber);
  background: rgba(245, 173, 38, 0.04);
  pointer-events: none;
  z-index: 9998;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  will-change: transform;
}

/* Hover States on Interactive Elements */
body.cursor-hover .cursor-dot {
  width: 12px;
  height: 12px;
  background-color: #ffffff;
  box-shadow: 0 0 14px var(--amber), 0 0 24px var(--amber-glow);
}

body.cursor-hover .cursor-ring {
  width: 58px;
  height: 58px;
  border-color: var(--amber);
  background: var(--amber-glow);
}

/* Light mode cursor styling */
body.light .cursor-dot {
  background-color: #d97706;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.6);
}

body.light .cursor-ring {
  border-color: rgba(217, 119, 6, 0.6);
  background: rgba(217, 119, 6, 0.05);
}

body.light.cursor-hover .cursor-ring {
  border-color: #ea580c;
  background: rgba(217, 119, 6, 0.15);
}

/* Ambient Cursor Glow Spotlight */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--amber-glow) 0%, transparent 68%);
  pointer-events: none;
  z-index: -1;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
}

body.light .cursor-glow {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.16) 0%, rgba(217, 119, 6, 0.10) 40%, transparent 70%);
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════
   PAGE LOADER
══════════════════════════════════════════════════════════ */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--ink);
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-core {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--rule-2);
  border-top-color: var(--amber);
  animation: spin 1s linear infinite;
}

.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.page-loader p {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════════
   HEADER / NAV
══════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 18px 0;
  transition: padding 0.4s var(--ease-out), background 0.4s ease, border-color 0.4s;
}

.site-header.scrolled {
  padding: 10px 0;
  background: rgba(10, 10, 8, 0.88);
  backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--rule);
}

body.light .site-header.scrolled {
  background: rgba(245, 240, 232, 0.90);
}

body.is-loaded .site-header {
  animation: slideDown 0.8s var(--ease-out) both;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand */
.brand {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-back);
}

.brand:hover {
  color: var(--amber);
}

.brand:hover::before {
  transform: scale(1.5);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  position: relative;
  transition: color 0.22s, border-color 0.22s, background 0.22s !important;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 16px;
  height: 1.5px;
  background: var(--amber);
  border-radius: 999px;
  transition: transform 0.25s var(--ease-out);
}

.nav-links a:hover {
  color: var(--cream);
  background: var(--rule);
  border-color: var(--rule-2);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-links a.active {
  color: var(--amber);
}

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ══════════════════════════════════════════════════════════
   THEME TOGGLE
══════════════════════════════════════════════════════════ */
.theme-toggle {
  position: relative;
  width: var(--tog-w);
  height: var(--tog-h);
  border-radius: 999px;
  padding: 0;
  flex-shrink: 0;
  outline: none;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 999px;
}

.toggle-track {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #1e1c18;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 0 4px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.3s ease;
}

body.light .toggle-track {
  background: #c8dcf0;
  border-color: rgba(0, 0, 0, 0.12);
}

.theme-toggle:hover .toggle-track {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.toggle-knob {
  position: relative;
  z-index: 2;
  width: var(--knob-s);
  height: var(--knob-s);
  border-radius: 50%;
  background: #f2ecdc;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.45s var(--ease-back), background 0.4s ease, box-shadow 0.3s ease !important;
}

body.light .toggle-knob {
  background: #fffbe8;
  transform: translateX(calc(var(--tog-w) - var(--knob-s) - 8px));
  box-shadow: 0 2px 8px rgba(196, 124, 0, 0.35);
}

.theme-toggle:hover .toggle-knob {
  box-shadow: 0 2px 10px rgba(232, 160, 32, 0.5);
}

.knob-icon {
  position: absolute;
  width: 11px;
  height: 11px;
  transition: opacity 0.3s ease, transform 0.4s var(--ease-back) !important;
}

.knob-moon {
  opacity: 1;
  transform: scale(1);
  color: #1a1714;
}

.knob-sun {
  opacity: 0;
  transform: rotate(-120deg) scale(0.4);
  color: var(--amber);
}

body.light .knob-moon {
  opacity: 0;
  transform: rotate(120deg) scale(0.4);
}

body.light .knob-sun {
  opacity: 1;
  transform: scale(1);
}

.toggle-stars {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding-right: 2px;
  z-index: 1;
  transition: opacity 0.3s ease !important;
}

.toggle-stars span {
  display: block;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.toggle-stars span:nth-child(1) {
  width: 3px;
  height: 3px;
}

.toggle-stars span:nth-child(2),
.toggle-stars span:nth-child(3) {
  width: 2px;
  height: 2px;
}

body.light .toggle-stars {
  opacity: 0;
}

/* ── Hamburger ──────────────────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  transition: border-color 0.2s, background 0.2s;
}

.menu-toggle:hover {
  border-color: var(--rule-3);
  background: var(--rule);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s !important;
}

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

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

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

/* ══════════════════════════════════════════════════════════
   MAIN
══════════════════════════════════════════════════════════ */
main {
  padding-top: 80px;
  padding-bottom: 60px;
}

body.is-loaded main {
  animation: fadeUp 1s var(--ease-out) 0.1s both;
}

/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
.hero {
  min-height: clamp(520px, 75vh, 660px);
  display: grid;
  grid-template-areas: "copy visual";
  grid-template-columns: 1fr 420px;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: visible;
}

/* Big decorative number */
.hero::before {
  content: '01';
  position: absolute;
  top: -20px;
  right: -10px;
  font-family: var(--font-display);
  font-size: clamp(180px, 20vw, 320px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

body.light .hero::before {
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.04);
}

.hero-copy {
  grid-area: copy;
  padding: 28px 0 40px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-visual {
  grid-area: visual;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  padding: 0;
  margin-bottom: 20px;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--amber);
  transition: width 0.4s var(--ease-out);
}

.hero-copy:hover .eyebrow::before {
  width: 48px;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6.5rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin-bottom: 28px;
}

.hero-copy h1 em {
  font-style: italic;
  color: var(--amber);
}

.hero-copy>p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-back), box-shadow 0.25s ease,
    background 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.2s !important;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-primary {
  background: var(--amber);
  color: #0a0a08;
  box-shadow: 0 6px 24px var(--amber-glow);
}

.btn-primary:hover {
  box-shadow: 0 12px 36px var(--amber-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--cream);
  border-color: var(--rule-2);
}

.btn-secondary:hover {
  background: var(--rule);
  border-color: var(--rule-3);
}

/* Highlight chips */
.highlight-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.highlight-chip {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color 0.2s, border-color 0.2s, background 0.2s,
    transform 0.2s var(--ease-back) !important;
}

.highlight-chip:hover {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-glow);
  transform: translateY(-1px);
}

/* ── Hero visual / 3D profile stage ────────────────────────── */
.profile-3d-stage {
  position: relative;
  width: 100%;
  max-width: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease-out);
}

.profile-shell {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 440px;
  border-radius: var(--r-lg);
  background: var(--ink-3);
  overflow: hidden;
  border: 1.5px solid rgba(217, 119, 6, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(217, 119, 6, 0.15);
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease, border-color 0.5s ease;
  z-index: 2;
}

.profile-3d-stage:hover .profile-shell {
  transform: rotateY(-6deg) rotateX(6deg) translateZ(12px);
  border-color: var(--amber);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 40px var(--amber-glow);
}

/* 3D Orbiting Glow Backdrop System */
.orbit-ring-3d {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 2.5px solid rgba(217, 119, 6, 0.7);
  box-shadow: 0 0 24px rgba(217, 119, 6, 0.45), inset 0 0 24px rgba(217, 119, 6, 0.3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(68deg) rotateY(-12deg);
  animation: orbitRotate 18s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.orbit-ring-outer {
  position: absolute;
  width: 530px;
  height: 530px;
  border-radius: 50%;
  border: 2px dashed rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(68deg) rotateY(20deg);
  animation: orbitRotateRev 24s linear infinite;
  pointer-events: none;
  z-index: 1;
}

body.light .orbit-ring-3d {
  border-color: rgba(217, 119, 6, 0.85);
  box-shadow: 0 0 28px rgba(217, 119, 6, 0.45);
}

body.light .orbit-ring-outer {
  border-color: rgba(245, 158, 11, 0.75);
}

@keyframes orbitRotate {
  from { transform: translate(-50%, -50%) rotateX(68deg) rotateY(-12deg) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotateX(68deg) rotateY(-12deg) rotate(360deg); }
}

@keyframes orbitRotateRev {
  from { transform: translate(-50%, -50%) rotateX(68deg) rotateY(20deg) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotateX(68deg) rotateY(20deg) rotate(0deg); }
}

/* Orbiting Node Dots */
.orbit-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber), 0 0 24px var(--amber);
}

.node-a { top: 0; left: 50%; transform: translate(-50%, -50%); }
.node-b { bottom: 0; left: 50%; transform: translate(-50%, 50%); }
.node-c { top: 50%; left: 0; transform: translate(-50%, -50%); background: #38bdf8; box-shadow: 0 0 16px #38bdf8; }
.node-d { top: 50%; right: 0; transform: translate(50%, -50%); }

.orbit-particle-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 580px;
  height: 580px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.glow-orb-3d {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

.glow-orb-1 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.35) 0%, transparent 70%);
  top: -20px;
  right: -30px;
  animation: floatOrb 6s ease-in-out infinite alternate;
}

.glow-orb-2 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
  bottom: -20px;
  left: -20px;
  animation: floatOrb 8s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-20px) scale(1.1);
  }
}

/* Floating 3D Cards / Badges with Z-Depth */
.badge-3d {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  white-space: nowrap;
  background: rgba(17, 17, 16, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 16px rgba(217, 119, 6, 0.12);
  z-index: 5;
  transform: translateZ(40px);
  transition: transform 0.4s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto;
}

body.light .badge-3d {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(217, 119, 6, 0.28);
  box-shadow: 0 14px 32px rgba(217, 119, 6, 0.18);
}

.badge-3d:hover {
  transform: translateZ(64px) scale(1.06);
  border-color: var(--amber);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6), 0 0 28px var(--amber-glow);
}

.badge-3d-top-right {
  top: 16px;
  right: -8px;
  animation: floatBadge1 4.5s ease-in-out infinite alternate;
}

.badge-3d-bottom-left {
  bottom: 20px;
  left: -12px;
  animation: floatBadge2 5.2s ease-in-out infinite alternate;
}

.badge-3d-top-left {
  top: 28px;
  left: -12px;
  animation: floatBadge3 6s ease-in-out infinite alternate;
}

@keyframes floatBadge1 {
  0% {
    transform: translateZ(40px) translateY(0px);
  }

  100% {
    transform: translateZ(52px) translateY(-10px);
  }
}

@keyframes floatBadge2 {
  0% {
    transform: translateZ(40px) translateY(0px);
  }

  100% {
    transform: translateZ(54px) translateY(8px);
  }
}

@keyframes floatBadge3 {
  0% {
    transform: translateZ(35px) translateY(0px);
  }

  100% {
    transform: translateZ(48px) translateY(-6px);
  }
}

.badge-3d-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: rgba(217, 119, 6, 0.15);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-icon-amber {
  background: rgba(245, 158, 11, 0.18);
  color: var(--amber);
}

.badge-icon-cyan {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.badge-3d-text {
  display: flex;
  flex-direction: column;
}

.badge-3d-text span {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
}

.badge-3d-text small {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--muted);
}

/* 3D Orbiting Node Dots */
.node-3d {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
  z-index: 4;
  pointer-events: none;
}

.node-1 {
  top: 12%;
  left: 14%;
  animation: pulseNode 3s ease-in-out infinite alternate;
}

.node-2 {
  bottom: 22%;
  right: 8%;
  animation: pulseNode 4s ease-in-out 1s infinite alternate;
}

.node-3 {
  top: 52%;
  right: -18px;
  animation: pulseNode 3.5s ease-in-out 0.5s infinite alternate;
}

@keyframes pulseNode {
  0% {
    transform: scale(0.8);
    opacity: 0.4;
  }

  100% {
    transform: scale(1.4);
    opacity: 1;
    box-shadow: 0 0 22px var(--amber);
  }
}

/* Left-edge fade that blends into the page background */
.profile-shell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 80px;
  background: linear-gradient(90deg, var(--ink) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Amber accent line */
.profile-shell::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  bottom: 0;
  background: linear-gradient(180deg, var(--amber) 0%, transparent 100%);
  z-index: 3;
  pointer-events: none;
}

/* ── Profile image: Grayscale default, full color on hover ── */
.profile-shell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.9;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.5s var(--ease-out), opacity 0.5s ease, transform 0.6s var(--ease-out) !important;
}

.hero-visual:hover .profile-shell img,
.profile-3d-stage:hover .profile-shell img,
.profile-shell:hover img {
  filter: grayscale(0%) contrast(1.05);
  opacity: 1;
  transform: scale(1.03);
}

body.light .profile-shell img {
  filter: grayscale(100%) contrast(1.02);
  opacity: 0.95;
}

body.light .hero-visual:hover .profile-shell img,
body.light .profile-3d-stage:hover .profile-shell img,
body.light .profile-shell:hover img {
  filter: grayscale(0%) contrast(1.02);
  opacity: 1;
}

.image-ring {
  display: none;
}

.floating-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px;
  z-index: 4;
  background: linear-gradient(0deg, rgba(10, 10, 8, 0.95) 0%, transparent 100%);
  transition: background 0.4s ease;
}

body.light .floating-panel {
  background: linear-gradient(0deg, rgba(245, 240, 232, 0.97) 0%, transparent 100%);
}

.floating-panel span {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 6px;
}

.floating-panel strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--cream);
  display: block;
  margin-bottom: 2px;
}

.floating-panel p {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
}

.social-row {
  display: none;
}

/* ══════════════════════════════════════════════════════════
   SECTIONS
══════════════════════════════════════════════════════════ */
.section {
  padding: 100px 0 0;
}

.section-heading {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule-2);
  position: relative;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, transparent 100%);
  box-shadow: 0 0 10px var(--amber-glow);
}

body.light .section-heading {
  border-bottom-color: rgba(217, 119, 6, 0.2);
}

body.light .section-heading::after {
  background: linear-gradient(90deg, #d97706 0%, #ea580c 100%);
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.35);
}

.section-heading span,
.section-kicker {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 10px;
}

.section-heading h2,
.contact-card h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--cream);
  letter-spacing: -0.01em;
}

/* ── Card base ──────────────────────────────────────────── */
.about-card,
.info-card,
.info-card-2,
.project-card,
.contact-card {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 36px;
}

/* ── About ──────────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2px;
  align-items: stretch;
}

.about-card {
  background: var(--ink-2);
  border: none;
}

.info-card {
  background: var(--surface);
  border: none;
}

.info-card-2 {
  background: var(--ink-2);
  border: none;
}

.info-stack {
  display: grid;
  gap: 2px;
}

.about-card p,
.info-card p {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.8;
}

.about-card p+p {
  margin-top: 16px;
}

.info-card h3,
.info-card-2 h3 {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
}

/* ── Stats ──────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
}

.stat-pill {
  padding: 24px 20px;
  background: var(--surface);
}

.stat-pill:hover {
  background: var(--ink-3);
}

.stat-pill strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.stat-pill:hover strong {
  color: var(--amber);
}

.stat-pill span {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Skills ─────────────────────────────────────────────── */
.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pill {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 9px 16px;
  transition: color 0.2s, border-color 0.2s, background 0.2s,
    transform 0.2s var(--ease-back) !important;
}

.skill-pill:hover {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-glow);
  transform: translateY(-2px);
}

/* ── Project carousel ───────────────────────────────────── */
.project-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.project-carousel-controls {
  display: none;
}

.project-side-btn {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--rule);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s,
    transform 0.2s var(--ease-back) !important;
}

.project-side-btn svg {
  width: 18px;
  height: 18px;
}

.project-side-btn--prev-mobile,
.project-side-btn--next-mobile {
  display: none;
}

.project-side-btn:hover:not(:disabled) {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-glow);
  transform: scale(1.1);
}

.project-side-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.project-side-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.project-slider-shell {
  overflow: hidden;
}

.project-grid.project-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2px) / 2);
  gap: 2px;
  overflow: hidden;
  scroll-behavior: smooth;
  background: var(--rule);
}

/* ── Project card ───────────────────────────────────────── */
.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: none;
  padding: 36px;
  transition: background 0.3s ease !important;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rule);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out), background 0.3s !important;
}

.project-card:hover {
  background: var(--ink-2);
}

.project-card:hover::before {
  background: var(--amber);
  transform: scaleX(1);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.project-index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3rem;
  color: var(--faint);
  line-height: 1;
  transition: color 0.3s, transform 0.3s var(--ease-back) !important;
}

.project-card:hover .project-index {
  color: var(--amber);
  transform: scale(1.05) translateX(-2px);
}

.project-status {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6fcf97;
  background: rgba(111, 207, 151, 0.08);
  border: 1px solid rgba(111, 207, 151, 0.2);
  padding: 5px 10px;
  border-radius: var(--r-sm);
}

.project-card-body {
  flex: 1;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 10px;
  line-height: 1.2;
  transition: color 0.2s;
}

.project-card:hover h3 {
  color: var(--amber);
}

.project-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

.project-feature-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-feature-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s, padding-left 0.2s !important;
}

.project-feature-list li::before {
  content: '→';
  color: var(--amber);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-back) !important;
}

.project-feature-list li:hover {
  color: var(--text);
  padding-left: 4px;
}

.project-feature-list li:hover::before {
  transform: translateX(3px);
}

.project-card-footer {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule-2);
  padding: 4px 10px;
  transition: color 0.2s, border-color 0.2s;
}

.project-tags span:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.project-link {
  width: 100%;
  justify-content: center;
}

.project-btns {
  display: flex;
  gap: 10px;
  width: 100%;
}

.project-btns .btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.72rem;
  justify-content: center;
  gap: 6px;
}

/* ── Contact ────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2px;
  align-items: stretch;
  background: var(--rule);
}

.contact-card {
  background: var(--surface);
  border: none;
}

.contact-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ink-2);
}

.contact-main p {
  max-width: 50ch;
  margin-top: 8px;
}

.contact-card a[href^="mailto:"] {
  color: var(--amber);
}

.contact-card a[href^="mailto:"]:hover {
  text-decoration: underline;
}

.contact-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin: 28px 0;
  background: var(--rule);
}

.contact-meta-item {
  padding: 18px 20px;
  background: var(--surface);
}

.contact-meta-item:hover {
  background: var(--ink-3);
}

.contact-meta-item small {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
}

.contact-meta-item strong {
  color: var(--text);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-actions .btn {
  flex: 1 1 180px;
}

.contact-btn {
  min-height: 50px;
  gap: 10px;
  padding: 13px 20px;
  justify-content: center;
}

.contact-btn.btn-secondary {
  color: var(--text);
  border-color: var(--rule-2);
}

.contact-btn.btn-secondary:hover {
  background: var(--rule);
  border-color: var(--rule-3);
}

.contact-btn.btn-primary span {
  color: #0a0a08;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.contact-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-side h3 {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

.contact-side>p {
  font-size: 0.88rem;
  margin-bottom: 20px;
  color: var(--muted);
}

.profile-blocks {
  display: grid;
  gap: 1px;
  background: var(--rule);
}

.profile-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--ink-2);
  transition: background 0.2s, padding-left 0.25s var(--ease-out) !important;
}

.profile-block::after {
  content: '↗';
  font-size: 0.9rem;
  color: var(--faint);
  transition: color 0.2s, transform 0.25s var(--ease-back) !important;
}

.profile-block:hover {
  background: var(--surface);
  padding-left: 24px;
}

.profile-block:hover::after {
  color: var(--amber);
  transform: translate(2px, -2px);
}

.profile-block strong {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}

.profile-block:hover strong {
  color: var(--amber);
}

.profile-block span {
  display: none;
}

.icon-find {
  display: none;
}

.social-link {
  color: var(--muted);
  transition: color 0.2s, transform 0.2s var(--ease-back) !important;
}

.social-link:hover {
  color: var(--amber);
  transform: translateY(-2px) scale(1.15);
}

/* ── Reveal on scroll ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out) !important;
  will-change: transform, opacity;
}

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

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  padding: 40px 0 60px;
  text-align: center;
}

.site-footer p {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ══════════════════════════════════════════════════════════
   KEYFRAMES
══════════════════════════════════════════════════════════ */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Skill groups ───────────────────────────────────────── */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--rule);
}

.skill-group {
  background: var(--ink-2);
  padding: 24px 28px;
}

.skill-group:hover {
  background: var(--surface);
}

.group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.group-icon {
  color: var(--amber);
  font-size: 1rem;
  flex-shrink: 0;
}

.group-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

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

.skill-pill {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 6px 13px;
  transition: color 0.2s, border-color 0.2s, background 0.2s,
    transform 0.2s var(--ease-back) !important;
}

.skill-pill:hover {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-glow);
  transform: translateY(-2px);
}

/* ── Light Mode Colorful Accents ─────────────────────────── */
body.light .highlight-chip {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(217, 119, 6, 0.25);
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.08);
}

body.light .highlight-chip:hover {
  border-color: var(--amber);
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.18);
}

body.light .about-card,
body.light .info-card,
body.light .info-card-2,
body.light .project-card,
body.light .cert-card,
body.light .contact-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

body.light .about-card {
  background: linear-gradient(135deg, #ffffff 0%, #fffbf5 100%);
}

body.light .info-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

body.light .info-card-2 {
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

body.light .contact-main {
  background: linear-gradient(135deg, #ffffff 0%, #fefce8 100%);
}

body.light .project-card:hover,
body.light .cert-card:hover {
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(217, 119, 6, 0.14), 0 4px 12px rgba(99, 102, 241, 0.08);
}

body.light .skill-group {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

body.light .skill-group:hover {
  background: #fdfbf7;
}

body.light .skill-pill {
  background: #f8fafc;
  border-color: rgba(99, 102, 241, 0.18);
  color: #1e293b;
}

body.light .skill-pill:hover {
  background: rgba(217, 119, 6, 0.12);
  border-color: var(--amber);
  color: #b45309;
}

body.light .stat-pill {
  background: #ffffff;
}

body.light .stat-pill:hover {
  background: #fffbe8;
}

body.light .project-tags span {
  background: #f8fafc;
  border-color: rgba(99, 102, 241, 0.2);
  color: #334155;
}

body.light .project-tags span:hover {
  background: rgba(217, 119, 6, 0.12);
  border-color: var(--amber);
  color: #b45309;
}

body.light .btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}

body.light .btn-primary:hover {
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.5);
}

body.light .btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.light .btn-secondary:hover {
  background: #f8fafc;
  border-color: rgba(99, 102, 241, 0.4);
  color: #4f46e5;
}

/* ══════════════════════════════════════════════════════════
   TABLET ≤ 960px
══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  main {
    padding-top: 70px;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "visual";
    min-height: auto;
  }

  .hero-visual {
    min-height: auto;
    height: auto;
  }

  .hero-copy {
    padding: 36px 0;
  }

  .hero::before {
    font-size: 140px;
  }

  /* FIX: on tablet, shell needs explicit height since grid-area visual has auto height */
  .profile-shell {
    max-height: 460px;
    min-height: 460px;
  }

  .profile-shell img {
    position: absolute;
    /* stays absolute, fills shell naturally */
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-carousel {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .project-grid.project-slider {
    grid-auto-columns: 80%;
  }

  .project-side-btn--prev,
  .project-side-btn--next {
    display: none;
  }

  .project-carousel-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .project-side-btn--prev-mobile,
  .project-side-btn--next-mobile {
    display: inline-grid;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .skill-groups {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════════════════════════════════
   MOBILE ≤ 720px
══════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .container {
    width: calc(100% - 28px);
  }

  main {
    padding-top: 64px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 14px;
    right: 14px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 10, 8, 0.97);
    backdrop-filter: blur(24px);
    border: 1px solid var(--rule-2);
    border-radius: var(--r-md);
    padding: 0;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 0.38s var(--ease-out), opacity 0.28s ease,
      transform 0.3s var(--ease-out) !important;
  }

  body.light .nav-links {
    background: rgba(245, 240, 232, 0.97);
  }

  .nav-links.show {
    max-height: 300px;
    opacity: 1;
    padding: 8px;
    transform: translateY(0);
  }

  .nav-links a {
    text-align: center;
    padding: 12px 16px;
    border-radius: var(--r-sm);
  }

  .hero::before {
    display: none;
  }

  .hero-visual {
    display: none;
  }

  .highlight-strip {
    display: none;
  }

  .hero-copy {
    padding: 32px 0 20px;
    align-items: center;
    text-align: center;
  }

  .eyebrow {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .eyebrow::before {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    margin-bottom: 16px;
    text-align: center;
  }

  .hero-copy>p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    gap: 10px;
    margin-bottom: 0;
    justify-content: center;
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 140px;
    max-width: 200px;
    padding: 12px 18px;
    font-size: 0.75rem;
    justify-content: center;
  }

  .profile-shell::before,
  .profile-shell::after {
    display: none;
  }

  .profile-shell {
    border-radius: var(--r-lg);
    min-height: 280px;
    max-height: 300px;
    position: relative;
    overflow: visible;
  }

  .profile-shell img {
    border-radius: var(--r-lg);
  }

  .floating-panel {
    position: absolute;
    bottom: -16px;
    right: 10px;
    left: auto;
    width: 135px;
    height: 135px;
    border-radius: 50%;
    background: rgba(17, 17, 16, 0.94);
    backdrop-filter: blur(16px);
    border: 1.5px solid var(--amber);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px var(--amber-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    z-index: 5;
  }

  body.light .floating-panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--amber);
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.25);
  }

  .floating-panel span {
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
  }

  .floating-panel strong {
    font-size: 0.72rem;
    line-height: 1.2;
    margin-bottom: 2px;
    color: var(--cream);
  }

  .floating-panel p {
    font-size: 0.6rem;
    line-height: 1.2;
    color: var(--muted);
  }

  .about-card,
  .info-card,
  .info-card-2,
  .project-card,
  .contact-card,
  .cert-card {
    padding: 20px 18px;
  }

  .project-feature-list li {
    padding: 5px 0;
    font-size: 0.84rem;
  }

  .project-feature-list li:nth-child(n+4) {
    display: none;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-pill {
    padding: 16px 14px;
  }

  .stat-pill strong {
    font-size: 1.5rem;
  }

  .project-grid.project-slider {
    grid-auto-columns: 100%;
  }

  .project-index {
    font-size: 2.4rem;
  }

  .contact-meta {
    grid-template-columns: 1fr;
  }

  .profile-blocks {
    display: none;
  }

  .icon-find {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
  }

  .icon-find a {
    color: var(--muted);
  }

  .icon-find i {
    font-size: 1.5rem;
    transition: color 0.2s, transform 0.2s var(--ease-back) !important;
  }

  .icon-find a:hover i {
    color: var(--amber);
    transform: scale(1.2) translateY(-2px);
  }

  .section {
    padding: 48px 0 0;
  }

  .section-heading {
    margin-bottom: 28px;
    padding-bottom: 20px;
  }

  .section-heading h2 {
    font-size: 1.8rem;
  }

  .skill-groups,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .skill-group {
    padding: 18px 20px;
  }
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}