/* ==========================================================================
   THALHA AHAMED — AI ENGINEER
   Visual language ported from "Kintaro Awwwards Portfolio" (xkintaro, MIT).
   Neutral zero-chroma dark palette · Inter Black display · system mono labels.
   Rebuilt in vanilla CSS — no Tailwind, no framework, no build step.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS  (shadcn neutral dark, oklch converted to hex)
   -------------------------------------------------------------------------- */
:root {
  /* Light theme, from the Simplex Noise shader's palette:
     #101010 / #F5F5F5 / #B0B0B0 / #3A3A3A */
  --bg-deep:           #F5F5F5;
  --background:        #F5F5F5;
  --bg-raised:         #FFFFFF;
  --foreground:        #101010;
  --card:              rgba(255, 255, 255, 0.62);
  --card-solid:        #FFFFFF;
  --secondary:         rgba(16, 16, 16, 0.06);
  --muted:             rgba(16, 16, 16, 0.06);
  --muted-foreground:  #3A3A3A;
  --dim-foreground:    #6E6E6E;
  --primary:           #101010;
  --flow:              #101010;
  --border:            rgba(16, 16, 16, 0.14);
  --border-soft:       rgba(16, 16, 16, 0.07);
  --input:             rgba(16, 16, 16, 0.28);

  /* Legacy aliases so older markup keeps resolving */
  --accent:            #FAFAFA;
  --text-primary:      #FAFAFA;
  --text-secondary:    #A1A1A1;

  --radius:     0.625rem;                      /* 10px */
  --radius-sm:  calc(var(--radius) - 4px);     /* 6px  */
  --radius-lg:  var(--radius);
  --radius-2xl: calc(var(--radius) + 8px);     /* 18px */
  --radius-3xl: calc(var(--radius) + 12px);    /* 22px */
  --radius-4xl: calc(var(--radius) + 16px);    /* 26px */

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  /* Horizontal page inset — matches the template's --container-spacing ramp */
  --gutter: 1rem;
  --maxw: 1280px;

  /* Vertical section rhythm — matches .container-void */
  --void-y: 4rem;

  --nav-py: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px)  { :root { --gutter: 1.5rem; --void-y: 6rem; } }
@media (min-width: 768px)  { :root { --gutter: 2rem;   --void-y: 6rem; } }
@media (min-width: 1024px) { :root { --gutter: 2.5rem; --void-y: 8rem; } }
@media (min-width: 1280px) { :root { --gutter: 3rem;   --void-y: 10rem; } }
@media (min-width: 1536px) { :root { --gutter: 4rem;   --void-y: 9rem; } }
@media (min-width: 1920px) { :root { --gutter: 5rem; } }

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* overflow-x must be `hidden`, not `clip`: with `clip` the cross axis also
   computes to clip and the page becomes unscrollable. The template avoids
   this only because Lenis transforms a wrapper instead of scrolling natively. */
html { width: 100%; max-width: 100vw; }
body { width: 100%; max-width: 100vw; overflow-x: hidden; overscroll-behavior-y: none; }

/* The template hides scrollbars entirely; the progress bar reports position. */
::-webkit-scrollbar { display: none; width: 0; height: 0; }

body {
  background: var(--bg-deep);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.loading { overflow: hidden; height: 100vh; }
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul, ol { list-style: none; }
strong { color: var(--foreground); font-weight: 700; }
em { font-style: italic; }

::selection { background: var(--foreground); color: #F5F5F5; }

/* Fixed gradient wash behind everything. Sections sit on it transparently
   and the cards provide the surfaces. */
/* Simplex Noise shader host — fixed, cost independent of page length. */
.page-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: #F5F5F5;
}

#simplex-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
  /* The palette carries #101010 and #3A3A3A, so at full strength dark blobs
     drift under the copy. Veiling it against the #F5F5F5 beneath keeps the
     tonality of the reference render and the text legible at all times. */
  opacity: 0.30;
}

/* A whisper of grain so the large soft noise fields don't band. */
.page-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

/* --------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-void,
.section { padding-block: var(--void-y) calc(var(--void-y) * 0.5); position: relative; }

.text-center { text-align: center; }

/* .title-counter — the mono index that heads every section */
.section-label,
.title-counter,
.more-heading,
.achievements-col-label,
.case-section-title,
.case-meta {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .section-label, .title-counter, .more-heading,
  .achievements-col-label, .case-section-title, .case-meta { font-size: 1rem; }
}

/* .title — bold, uppercase, tracking-tighter, leading-none */
.section-heading,
.title {
  text-shadow: 0 1px 16px rgba(245, 245, 245, 0.9);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--foreground);
}

@media (min-width: 1024px) { .section-heading, .title { font-size: 3rem; } }
@media (min-width: 1280px) { .section-heading, .title { font-size: 3.75rem; } }

.section-head { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .section-heading { margin: 0; }

.section-desc {
  text-shadow: 0 1px 14px rgba(245, 245, 245, 0.9);
  margin-top: 1rem;
  max-width: 42rem;
  color: var(--muted-foreground);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.rule { height: 1px; width: 6rem; background: var(--border); }

/* --------------------------------------------------------------------------
   4. PRELOADER
   -------------------------------------------------------------------------- */
.loader,
#preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--background);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}

.loader.loaded, #preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-name {
  font-size: clamp(2rem, 9vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.85;
  text-transform: uppercase;
  color: var(--foreground);
  text-align: center;
}

.loader-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.loader-bar { width: min(240px, 60vw); height: 1px; background: var(--border); overflow: hidden; }

.loader-progress {
  height: 100%;
  width: 100%;
  background: var(--foreground);
  transform: scaleX(0);
  transform-origin: left;
}

/* --------------------------------------------------------------------------
   5. SCROLL PROGRESS + CUSTOM CURSOR
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 9999;
  pointer-events: none;
}

.cursor-dot, .cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 10002;
  opacity: 0;
  transition: opacity 0.3s, width 0.3s var(--ease-out), height 0.3s var(--ease-out),
              margin 0.3s var(--ease-out), background-color 0.3s, border-color 0.3s;
  will-change: transform;
}

body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-outline { opacity: 1; }

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--foreground);
}

.cursor-outline {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(250, 250, 250, 0.35);
}

.cursor-outline.hovering {
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  background: rgba(250, 250, 250, 0.08);
  border-color: rgba(250, 250, 250, 0.12);
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-outline { display: none !important; }
}

/* Legacy atmosphere elements — retired, kept inert. */
.grain-overlay, .vignette, .ambient { display: none !important; }
.ripple { display: none; }

/* --------------------------------------------------------------------------
   6. NAVBAR
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: var(--nav-py);
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(245, 245, 245, 0.78);
  border-bottom: 1px solid var(--border-soft);
  opacity: var(--nav-bg, 0);
  backdrop-filter: blur(var(--nav-blur, 0px));
  -webkit-backdrop-filter: blur(var(--nav-blur, 0px));
  pointer-events: none;
}

.nav-inner {
  margin-inline: auto;
  padding-inline: var(--gutter);
  max-width: var(--nav-w, 100vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.nav-logo {
  position: relative;
  z-index: 110;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--foreground);
  transition: opacity 0.3s;
  white-space: nowrap;
}

.nav-logo:hover { opacity: 0.7; }

@media (min-width: 640px) { .nav-logo { font-size: 1.5rem; } }

.nav-links { display: none; align-items: center; gap: 1.5rem; }

.nav-links a {
  position: relative;
  display: block;
  padding-block: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  transition: color 0.3s;
}

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

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

.nav-cta-group { display: none; align-items: center; gap: 0.5rem; }

.nav-cta svg,
.nav-gamedev svg { width: 13px; height: 13px; flex: none; }

.nav-cta,
.nav-gamedev {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding-inline: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.nav-cta:hover,
.nav-gamedev:hover { color: var(--foreground); border-color: var(--input); background: rgba(16, 16, 16, 0.045); }
.nav-gamedev { color: var(--foreground); }
.nav-gamedev svg { flex: none; }

@media (min-width: 1280px) {
  .nav-links { display: flex; }
  .nav-cta-group { display: flex; }
}

.nav-toggle {
  position: relative;
  z-index: 110;
  width: 44px;
  height: 44px;
  margin-right: -0.5rem;
  color: var(--foreground);
  flex: none;
}

.nav-toggle span {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.2s;
}

.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 26px; }

.nav-toggle.active span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (min-width: 1280px) { .nav-toggle { display: none; } }

/* --------------------------------------------------------------------------
   7. MOBILE MENU — full-bleed, huge black type
   -------------------------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #F5F5F5;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 6.5rem var(--gutter) calc(env(safe-area-inset-bottom) + 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-nav.active { opacity: 1; visibility: visible; }

.mobile-nav a {
  display: block;
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--foreground);
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), padding-left 0.3s;
}

.mobile-nav.active a { opacity: 1; transform: none; }
.mobile-nav a:active { padding-left: 1rem; }
.mobile-nav .mobile-gamedev svg { width: 16px; height: 16px; flex: none; }

.mobile-nav a.mobile-gamedev {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   8. BUTTONS
   -------------------------------------------------------------------------- */
.btn-primary,
.btn-secondary,
.btn-gamedev {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  padding-inline: 1.5rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.5s var(--ease-out), color 0.5s, border-color 0.5s, transform 0.5s var(--ease-out);
}

@media (min-width: 1280px) {
  .btn-primary, .btn-secondary, .btn-gamedev { height: 4rem; padding-inline: 2.5rem; font-size: 1rem; }
}

.btn-primary {
  background: var(--foreground);
  color: var(--background);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 18px 40px -16px rgba(16, 16, 16, 0.28);
}

.btn-primary:hover {
  background: transparent;
  color: var(--foreground);
  border-color: rgba(250, 250, 250, 0.3);
  transform: translateY(-2px);
}

/* Shine sweep — the template's signature button micro-interaction */
.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2rem;
  background: rgba(16, 16, 16, 0.3);
  transform: translateX(-400%) skewX(-12deg);
  transition: transform 1s var(--ease-out);
  pointer-events: none;
}

.btn-primary:hover::before { transform: translateX(1600%) skewX(-12deg); }

.btn-secondary,
.btn-gamedev {
  color: var(--muted-foreground);
  border-color: var(--border);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.btn-secondary:hover,
.btn-gamedev:hover {
  color: var(--foreground);
  background: rgba(16, 16, 16, 0.10);
  border-color: var(--input);
}

.btn-secondary svg, .btn-gamedev svg { opacity: 0.5; transition: opacity 0.3s; flex: none; }
.btn-secondary:hover svg, .btn-gamedev:hover svg { opacity: 1; }

.btn-text {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  transition: color 0.3s;
}

.btn-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.btn-text:hover { color: var(--foreground); }
.btn-text:hover::after { transform: scaleX(1); }

.arrow { display: inline-block; transition: transform 0.5s var(--ease-out); }
.btn-primary:hover .arrow, .btn-text:hover .arrow, .btn-secondary:hover .arrow { transform: translateX(4px); }

.btn-icon { display: inline-flex; align-items: center; gap: 0.5rem; }

/* --------------------------------------------------------------------------
   9. HERO — layout after "Hero 04" by Ali Imam (21st.dev).
   Composition ported to the site's light theme: index number, oversized
   display type overlapping a centred portrait, services list, vertical
   location, mono blurb, pill CTA.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 6.5rem var(--gutter) 3.5rem;
  overflow: hidden;
  background: transparent;
  z-index: 1;
}

@media (min-width: 768px) { .hero { padding: 8rem 4rem 4rem; } }

#particles,
#shader-bg,
#flow-grid,
#kinetic-matrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(64% 56% at 50% 46%, rgba(245, 245, 245, 0.62) 0%, transparent 76%),
    linear-gradient(180deg, rgba(245, 245, 245, 0.55) 0%, transparent 22%, transparent 74%, #F5F5F5 100%);
}

.h4 {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

/* Index number, top-left — the reference's "1.996" slot. */
.h4-index {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  color: var(--muted-foreground);
}

/* --- Stage: portrait with the display type layered over it --- */
.h4-stage {
  position: relative;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.h4-photo {
  position: relative;
  z-index: 1;
  box-shadow: 0 30px 70px -45px rgba(16, 16, 16, 0.45);
  width: clamp(200px, 25vw, 320px);
  aspect-ratio: 3 / 4.1;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  background: #E4E4E4;
  display: grid;
  place-items: center;
}

.h4-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1) contrast(1.06);
}

/* Shown by site.js only when the portrait is missing, so the composition
   never collapses into an empty frame. */
.h4-photo-fallback {
  display: none;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: rgba(16, 16, 16, 0.22);
}

.h4-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(245, 245, 245, 0.06) 0%,
    rgba(245, 245, 245, 0.10) 34%,
    rgba(245, 245, 245, 0.70) 50%,
    rgba(245, 245, 245, 0.80) 72%,
    rgba(245, 245, 245, 0.62) 100%);
}

.h4-photo.is-missing img { display: none; }
.h4-photo.is-missing .h4-photo-fallback { display: block; }

/* The headline straddles the portrait. `difference` keeps it legible over
   both the light page and the dark suit without hand-tuning either. */
.h4-title {
  position: absolute;
  top: 66%;
  left: 50%;
  translate: -50% -50%;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.02em;
  font-size: clamp(2.6rem, 11.5vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.84;
  text-transform: uppercase;
  color: var(--foreground);
  pointer-events: none;
  white-space: nowrap;
}

.h4-name {
  position: relative;
  z-index: 3;
  margin-top: clamp(0.75rem, 2vw, 1.5rem);
  font-size: clamp(0.9rem, 2.2vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--foreground);
}

/* --- Services + location --- */
.h4-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.h4-services-block { display: flex; flex-direction: column; gap: 0.6rem; align-items: center; text-align: center; }

.h4-services-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.h4-services {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: clamp(0.9rem, 1.6vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--foreground);
  align-items: center;
}

/* Slash prefix removed per design preference */

.h4-location {
  writing-mode: vertical-rl;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* --- Blurb + CTA --- */
.h4-blurb {
  margin: clamp(2rem, 5vw, 3.25rem) auto 0;
  max-width: 46rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.3vw, 0.9375rem);
  line-height: 1.9;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.h4-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

.hero-scroll {
  margin: auto auto 0;
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-scroll-line { width: 1px; height: 3rem; background: var(--border); position: relative; overflow: hidden; }

.hero-scroll-line span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--foreground);
  animation: scroll-tick 2.5s ease-in-out infinite;
}

@keyframes scroll-tick {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(100%); }
}

.hero-scroll-text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  writing-mode: vertical-lr;
}

@media (max-width: 700px) {
  .h4-meta { flex-direction: column; align-items: center; text-align: center; gap: 1.25rem; }
  .h4-location { writing-mode: horizontal-tb; text-align: center; }
  .h4-title { letter-spacing: -0.045em; }
}

/* Everything after the hero scrolls above the fixed shader. */
.after-hero { position: relative; z-index: 10; }

/* --------------------------------------------------------------------------
   9b. CARD SYSTEM — the surfaces that sit on the gradient
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0.35) 100%),
    rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.9) inset,
    0 24px 50px -30px rgba(16, 16, 16, 0.22);
  overflow: hidden;
  transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out), background 0.4s;
}

/* Top sheen line, the detail that makes a glass card read as glass. */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  pointer-events: none;
}

.card-pad { padding: clamp(1.5rem, 3vw, 2.25rem); }

.card:hover { border-color: var(--input); transform: translateY(-3px); }
.card.is-static:hover { transform: none; }

/* --------------------------------------------------------------------------
   10. REVEAL
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }

/* --------------------------------------------------------------------------
   11. ABOUT — after the "Spline Scene" component by Serafim (21st.dev).
   Dark card + spotlight + gradient heading, with the Spline 3D scene on the
   right. The scene is lazy-loaded by site.js via Spline's framework-agnostic
   <spline-viewer> web component, so no React is required.
   -------------------------------------------------------------------------- */

/* "w-full h-[500px] bg-black/[0.96] relative overflow-hidden" */
.spline-card {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: 1.25rem;
  /* Angled so the copy side stays deep and the model side lifts to a
     graphite the near-black robot can actually be seen against. */
  background:
    linear-gradient(105deg, #0A0A0A 0%, #0E0E0E 42%, #23262B 78%, #33383F 100%);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 30px 70px -40px rgba(16, 16, 16, 0.5);
}

/* The <Spotlight> element — a soft off-axis wash from the top-left. */
.spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(58% 52% at 28% 6%, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 42%, transparent 68%);
}

.spline-inner { display: flex; flex-direction: column; height: 100%; }
@media (min-width: 768px) { .spline-inner { flex-direction: row; } }

/* "flex-1 p-8 relative z-10 flex flex-col justify-center" */
.spline-copy {
  flex: 1;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.spline-copy .title-counter { color: rgba(255, 255, 255, 0.45); }

/* "text-4xl md:text-5xl font-bold bg-clip-text text-transparent
    bg-gradient-to-b from-neutral-50 to-neutral-400" */
.spline-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(180deg, #FAFAFA 0%, #A3A3A3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (min-width: 768px) { .spline-title { font-size: 3rem; } }

/* "mt-4 text-neutral-300 max-w-lg" */
.spline-copy p {
  max-width: 32rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #D4D4D4;
}

/* "flex-1 relative" */
.spline-stage {
  flex: 1;
  position: relative;
  min-height: 200px;
}

/* A soft pool of light directly behind the model. */
.spline-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(58% 52% at 52% 55%, rgba(255, 255, 255, 0.17) 0%, rgba(255, 255, 255, 0.05) 46%, transparent 74%);
}

.spline-stage spline-viewer,
.spline-stage canvas { width: 100%; height: 100%; display: block; }

.spline-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

.spline-stage.is-ready .spline-status {
  opacity: 0 !important;
  visibility: hidden !important;
  display: none !important;
}

@media (max-width: 767px) {
  .spline-card { height: auto; min-height: 560px; }
  .spline-stage { min-height: 280px; }
}

/* Stat row */
.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.about-stats .stat {
  padding: clamp(1.25rem, 2.6vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: center;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.5) 100%),
    rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.4s, transform 0.4s var(--ease-out);
}

.about-stats .stat:hover { border-color: var(--input); transform: translateY(-3px); }

.stat-value {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 0.75rem; font-weight: 600; line-height: 1.35; color: var(--foreground); }

.stat-src {
  margin-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   12. PROJECTS — expandable image gallery
   Ported from the PrebuiltUI "Image Gallery" component (21st.dev).
   Desktop: horizontal row of tiles that expand on hover (flex-grow accordion).
   Mobile: falls back to a wrapped grid since hover isn't available.
   -------------------------------------------------------------------------- */

/* "max-w-3xl text-center px-4" header block */
.ig-head {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
  padding-inline: 1rem;
}

.ig-head .section-heading { margin-top: 0.75rem; margin-bottom: 0; }

/* "text-sm text-slate-500 mt-2" */
.ig-sub {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* --- Expandable gallery: tiles in a single row that fan out on hover --- */
.ig-gallery {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 26rem;
  width: 100%;
  max-width: 72rem;
  margin: clamp(2.5rem, 5vw, 3rem) auto 0;
  padding-inline: var(--gutter);
}

.ig-tile {
  position: relative;
  display: block;
  flex-grow: 1;
  width: 3.5rem;           /* collapsed base width — flex-grow does the rest */
  height: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #E8E8E8;
  isolation: isolate;
  transition: flex-grow 0.5s var(--ease-out), width 0.5s var(--ease-out);
}

/* On hover the tile expands dramatically */
.ig-tile:hover,
.ig-tile:focus-visible { flex-grow: 9; }

.ig-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease-out);
}

.ig-tile:hover img,
.ig-tile:focus-visible img { transform: scale(1.04); }

/* Logo-on-cream asset still needs its own exposure or it reads as a blank tile. */
.ig-tile[href="nutrix.html"] img { filter: brightness(0.9); transition: transform 0.6s var(--ease-out), filter 0.5s var(--ease-out); }
.ig-tile[href="nutrix.html"]:hover img { filter: brightness(1); }

/* Overlay — stays hidden by default, appears on hover with the expanded tile */
/* Typographic stand-in shown by site.js when a tile has no screenshot yet. */
.ig-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  text-align: center;
  background: linear-gradient(160deg, #1A1A1A 0%, #2C2C2C 60%, #3A3A3A 100%);
  color: rgba(255, 255, 255, 0.82);
}

.ig-fallback svg { width: 34px; height: 34px; }

.ig-fallback > span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ig-tile.no-image img { display: none; }
.ig-tile.no-image .ig-fallback { display: flex; }

.ig-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.25rem;
  padding: 1.25rem;
  color: #FFFFFF;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.25) 45%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.ig-tile:hover .ig-overlay,
.ig-tile:focus-visible .ig-overlay { opacity: 1; }

.ig-meta {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* "Live" marker — the tile itself is one <a>, so this is a badge, not a
   nested link; the case page carries the actual Try-it-now button. */
.ig-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  margin-bottom: 0.15rem;
  padding: 0.2rem 0.5rem 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.ig-live i {
  width: 0.4rem;
  height: 0.4rem;
  flex: none;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65);
  animation: ig-live-pulse 2s var(--ease-out) infinite;
}

@keyframes ig-live-pulse {
  70%  { box-shadow: 0 0 0 0.35rem rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .ig-live i { animation: none; }
}

.ig-title {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
  color: #FFFFFF;
}

.ig-more {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.25s;
}

.ig-tile:hover .ig-more { color: #FFFFFF; }
.ig-more svg { flex: none; }

/* Touch / mobile fallback — the expand-on-hover pattern needs a pointer,
   so below 860px we switch to a traditional wrapped grid. Overlay stays
   permanently visible since there's no hover. */
@media (hover: none) {
  .ig-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.28) 55%, transparent 100%);
  }
}

@media (max-width: 860px) {
  .ig-gallery {
    flex-wrap: wrap;
    height: auto;
    gap: 0.75rem;
    max-width: none;
  }
  .ig-tile {
    flex-grow: 0;
    width: calc(50% - 0.375rem);
    height: 15rem;
  }
  .ig-tile:hover,
  .ig-tile:focus-visible { flex-grow: 0; }
  .ig-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.28) 55%, transparent 100%);
  }
}

@media (max-width: 520px) {
  .ig-gallery { gap: 0.6rem; }
  .ig-tile { width: calc(50% - 0.3rem); height: 14rem; }
}

/* --------------------------------------------------------------------------
   13. MORE PROJECTS — after "Dropdown 01" by Awanish Verma (21st.dev).
   Built from anchors rather than a <select> so each project stays a real,
   crawlable link you can middle-click.
   -------------------------------------------------------------------------- */
.dd-head { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.25rem; text-align: center; }

.dd-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.dd-sub { font-size: 0.8125rem; color: var(--muted-foreground); }

.dd { position: relative; max-width: 26rem; margin-inline: auto; }

.dd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 0.8rem;
  border: 1.5px solid var(--foreground);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  text-align: left;
  transition: background 0.25s, box-shadow 0.25s;
}

.dd-trigger:hover { background: rgba(255, 255, 255, 0.95); }
.dd[data-open] .dd-trigger { box-shadow: 0 8px 24px -12px rgba(16, 16, 16, 0.35); }

.dd-chevron { width: 17px; height: 17px; flex: none; transition: transform 0.3s var(--ease-out); }
.dd[data-open] .dd-chevron { transform: rotate(180deg); }

.dd-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  right: 0;
  z-index: 40;
  border-radius: 0.8rem;
  border: 1.5px solid var(--foreground);
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 24px 50px -24px rgba(16, 16, 16, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out), visibility 0.22s;
}

.dd[data-open] .dd-menu { opacity: 1; visibility: visible; transform: none; }

.dd-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.dd-option:last-child { border-bottom: 0; }
.dd-option:hover,
.dd-option:focus-visible { background: rgba(16, 16, 16, 0.05); }

.dd-option-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  padding-top: 0.2rem;
  flex: none;
}

.dd-option-text { display: flex; flex-direction: column; gap: 0.15rem; }
.dd-option-name { font-size: 0.875rem; font-weight: 600; color: var(--foreground); }
.dd-option-desc { font-size: 0.75rem; line-height: 1.45; color: var(--muted-foreground); }

/* --------------------------------------------------------------------------
   14. EXPERIENCE — after "Order Tracking" by Javi (21st.dev)
   -------------------------------------------------------------------------- */
.track { display: flex; flex-direction: column; }

.track-step {
  position: relative;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0 1.25rem;
  padding-bottom: 2.5rem;
}

.track-step:last-child { padding-bottom: 0; }

/* The connecting rail between nodes. */
.track-step::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 2rem;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: var(--border);
}

.track-step:last-child::before { display: none; }
.track-step.is-done::before { background: var(--foreground); opacity: 0.22; }

.track-node {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 2px solid var(--border);
  background: var(--background);
  color: transparent;
  z-index: 1;
}

.track-node svg { width: 14px; height: 14px; }

.track-step.is-done .track-node {
  border-color: var(--foreground);
  background: var(--foreground);
  color: #F5F5F5;
}

.track-body { padding-top: 0.15rem; }

/* Everything under the company name sits in its own card. */
.track-card {
  margin-top: 1rem;
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -30px rgba(16, 16, 16, 0.3);
  transition: border-color 0.35s, transform 0.35s var(--ease-out);
}

.track-step:hover .track-card { border-color: var(--input); transform: translateY(-2px); }

.track-time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.4rem;
}

.track-name {
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--foreground);
}

.track-role {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.exp-details { display: flex; flex-direction: column; gap: 0.7rem; }

.exp-details li {
  position: relative;
  padding-left: 1.5rem;
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  max-width: 70ch;
}

.exp-details li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.7rem; height: 1px; background: var(--input); }

.exp-impact {
  margin-top: 1.25rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--foreground);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--foreground);
}

.exp-cert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.exp-cert-link:hover {
  background: var(--foreground);
  color: #fff;
  border-color: var(--foreground);
  transform: translateY(-1px);
}
.exp-cert-link svg { flex-shrink: 0; }

@media (max-width: 520px) {
  .track-step { grid-template-columns: 1.5rem 1fr; gap: 0 0.9rem; }
  .track-step::before { left: 0.75rem; top: 1.5rem; }
  .track-node { width: 1.5rem; height: 1.5rem; }
  .track-node svg { width: 11px; height: 11px; }
}

/* --------------------------------------------------------------------------
   15. STACK — brand icon grid
   Marks are Simple Icons (CC0); each brand remains the property of its owner
   and is used here only to identify the tool.
   -------------------------------------------------------------------------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.35rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.5) 100%),
    rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  transition: border-color 0.35s, transform 0.35s var(--ease-out), box-shadow 0.35s;
}

.tool:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--brand) 55%, transparent);
}

.tool-icon {
  width: 30px;
  height: 30px;
  flex: none;
  fill: var(--brand);
  transition: transform 0.35s var(--ease-out);
}

.tool:hover .tool-icon { transform: scale(1.12); }

.tool-name {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--muted-foreground);
}

.tool:hover .tool-name { color: var(--foreground); }

/* Concepts have no vendor mark, so they stay as text. */
.focus-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.focus-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.focus-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.focus-chip {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.5);
  transition: color 0.3s, border-color 0.3s;
}

.focus-chip:hover { color: var(--foreground); border-color: var(--input); }

@media (max-width: 520px) {
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.6rem; }
  .tool { padding: 1.1rem 0.5rem; gap: 0.55rem; }
  .tool-icon { width: 26px; height: 26px; }
  .tool-name { font-size: 0.625rem; letter-spacing: 0.06em; }
}

/* --------------------------------------------------------------------------
   16. EDUCATION + CERTIFICATIONS — card grid after "Sortable" by Dice UI.
   The reference is drag-to-reorder; that affordance is dropped here because
   reordering someone else's credentials does nothing and wouldn't persist.
   -------------------------------------------------------------------------- */
.edu-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 0.75rem; }

.edu-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem 1.4rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.edu-title { font-size: 1rem; font-weight: 600; color: var(--foreground); }
.edu-meta { font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.6; color: var(--muted-foreground); }

.sort-label {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.sort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 0.75rem; }

.sort-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.15rem 1.3rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.35s, transform 0.35s var(--ease-out), box-shadow 0.35s;
}

a.sort-card:hover {
  border-color: var(--input);
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -20px rgba(16, 16, 16, 0.35);
}

.sort-title { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--foreground); }
.sort-arrow { font-size: 0.8em; color: var(--muted-foreground); }
.sort-meta { font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.6; color: var(--muted-foreground); }

.sort-card.is-featured {
  border-color: var(--input);
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.06) 0%, rgba(255, 255, 255, 0.6) 100%);
  grid-column: span 2;
}

@media (max-width: 620px) { .sort-card.is-featured { grid-column: span 1; } }

/* --------------------------------------------------------------------------
   17. CONTACT — after "Contact Card" by Shaban Haider (21st.dev)
   -------------------------------------------------------------------------- */
.contact { position: relative; padding-block: var(--void-y); }

.cc {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: 0 30px 70px -45px rgba(16, 16, 16, 0.4);
}

@media (min-width: 860px) { .cc { grid-template-columns: 1fr 1fr; } }

.cc-side { padding: clamp(1.75rem, 3.5vw, 2.75rem); border-bottom: 1px solid var(--border); }
@media (min-width: 860px) { .cc-side { border-bottom: 0; border-right: 1px solid var(--border); } }

.cc-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--foreground);
}

.cc-lead { margin-top: 1rem; max-width: 34ch; font-size: 0.9375rem; line-height: 1.7; color: var(--muted-foreground); }

.cc-details { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }

.cc-detail { display: flex; align-items: flex-start; gap: 0.85rem; }

.cc-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--foreground);
}

.cc-icon svg { width: 17px; height: 17px; }

a.cc-detail:hover .cc-icon { border-color: var(--input); background: #FFFFFF; }

.cc-detail-text { display: flex; flex-direction: column; gap: 0.1rem; }
.cc-detail-label { font-size: 0.9375rem; font-weight: 600; color: var(--foreground); }
.cc-detail-value { font-size: 0.8125rem; color: var(--muted-foreground); word-break: break-word; }

.cc-links { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

.cc-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  transition: color 0.25s;
}

.cc-links a:hover { color: var(--foreground); }
.cc-links svg { width: 15px; height: 15px; flex: none; }

.cc-form { display: flex; flex-direction: column; gap: 0.9rem; padding: clamp(1.75rem, 3.5vw, 2.75rem); }

.cc-field { display: flex; flex-direction: column; gap: 0.4rem; }

.cc-field > span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
}

.cc-field input,
.cc-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--foreground);
  transition: border-color 0.25s, background 0.25s;
}

.cc-field textarea { resize: vertical; min-height: 7rem; }

.cc-field input:focus,
.cc-field textarea:focus { outline: none; border-color: var(--foreground); background: #FFFFFF; }

.cc-field input:user-invalid,
.cc-field textarea:user-invalid { border-color: #C0392B; }

.cc-submit {
  margin-top: 0.35rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.7rem;
  background: var(--foreground);
  color: #F5F5F5;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
}

.cc-submit:hover { opacity: 0.88; transform: translateY(-1px); }

.cc-note { min-height: 1.4rem; font-size: 0.8125rem; color: var(--muted-foreground); margin-top: 0.25rem; transition: color 0.3s; }
.cc-note.is-error { color: #C0392B; font-weight: 500; }
.cc-note.is-success { color: var(--foreground); font-weight: 600; }

/* --------------------------------------------------------------------------
   18. FOOTER
   -------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding-block: 2rem; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   19. CASE STUDY PAGES
   -------------------------------------------------------------------------- */
.case-hero { position: relative; padding-top: 9rem; padding-bottom: var(--void-y); overflow: hidden; }

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  transition: color 0.3s, gap 0.3s var(--ease-out);
}

.case-back:hover { color: var(--foreground); gap: 0.85rem; }

.case-meta { margin-bottom: 1rem; }

.case-title {
  font-size: clamp(2.75rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.85;
  text-transform: uppercase;
  color: var(--foreground);
}

.case-tagline { max-width: 46rem; margin-top: 1.5rem; font-size: 1.0625rem; font-weight: 300; line-height: 1.7; color: var(--muted-foreground); }
@media (min-width: 768px) { .case-tagline { font-size: 1.25rem; } }

.case-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

.case-hero-image { position: relative; margin-top: 3.5rem; border: 1px solid var(--border); border-radius: var(--radius-3xl); overflow: hidden; background: var(--card); }
.case-hero-image img { width: 100%; }

.case-section { padding-block: calc(var(--void-y) * 0.6); }

.case-section-title { padding-bottom: 1rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--border); color: var(--foreground); }

.case-section-content { max-width: 52rem; }
.case-section-content p { margin-bottom: 1.25rem; font-size: 1.0625rem; font-weight: 300; line-height: 1.8; color: var(--muted-foreground); }
.case-section-content p:last-child { margin-bottom: 0; }
@media (min-width: 768px) { .case-section-content p { font-size: 1.125rem; } }

.case-video { position: relative; border: 1px solid var(--border); border-radius: var(--radius-3xl); overflow: hidden; background: var(--card); }
.case-video video { width: 100%; display: block; }
.case-video.portrait { max-width: 420px; margin-inline: auto; }
.case-video-desc { margin-top: 1.25rem; max-width: 60rem; font-size: 0.875rem; font-weight: 300; color: var(--muted-foreground); }

.case-arch {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 2;
  white-space: pre;
  overflow-x: auto;
  color: var(--foreground);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: rgba(16, 16, 16, 0.09);
  -webkit-overflow-scrolling: touch;
}

.case-features { display: flex; flex-direction: column; }
.case-features li { position: relative; padding: 1.1rem 0 1.1rem 1.75rem; font-weight: 300; line-height: 1.7; color: var(--muted-foreground); border-bottom: 1px solid var(--border); }
.case-features li:first-child { border-top: 1px solid var(--border); }
.case-features li::before { content: ""; position: absolute; left: 0; top: 1.85em; width: 0.75rem; height: 1px; background: var(--input); }

.case-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.25rem; }

.case-gallery-item { cursor: zoom-in; border: 1px solid var(--border); border-radius: var(--radius-2xl); overflow: hidden; background: var(--card); transition: border-color 0.4s; }
.case-gallery-item:hover { border-color: var(--input); }

.case-gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.8s var(--ease-out);
}

.case-gallery-item:hover img { transform: scale(1.03); }

.case-gallery-caption { padding: 1.1rem 1.25rem; border-top: 1px solid var(--border); }
.case-gallery-caption h5 { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--foreground); margin-bottom: 0.35rem; }
.case-gallery-caption p { font-size: 0.8125rem; font-weight: 300; line-height: 1.6; color: var(--muted-foreground); }

.case-tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1.75rem; }
.case-tech-group h5 { padding-bottom: 0.75rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--foreground); }
.case-tech-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Orphan widgets kept styled in case older markup returns */
.vision-card { border: 1px solid var(--border); border-radius: var(--radius-2xl); overflow: hidden; background: var(--card); }
.vision-header { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.vision-title { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted-foreground); }
.vision-body { position: relative; padding: 1.1rem; }
.mac-dots { display: flex; gap: 0.35rem; }
.mac-dots span { width: 9px; height: 9px; border-radius: 9999px; background: var(--input); }
.bounding-box { position: absolute; border: 1.5px solid var(--foreground); border-radius: 2px; pointer-events: none; }
.box-label { position: absolute; top: -20px; left: -1px; padding: 2px 6px; border-radius: 2px; background: var(--foreground); color: var(--background); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.scanning-line { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--foreground), transparent); animation: scanline 3.2s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { top: 6%; opacity: 0.2; } 50% { top: 94%; opacity: 0.9; } }
.project-showcase { display: grid; gap: 2rem; padding-block: 3rem; border-top: 1px solid var(--border); }
.hero-visual { position: relative; }

/* --------------------------------------------------------------------------
   20. LIGHTBOX
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3.5rem);
  background: rgba(245, 245, 245, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: zoom-out;
}

.lightbox.active { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius-2xl); }

.lightbox-close {
  position: absolute;
  top: clamp(0.75rem, 2.5vw, 1.75rem);
  right: clamp(0.75rem, 2.5vw, 1.75rem);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: rgba(16, 16, 16, 0.045);
  transition: background 0.3s, border-color 0.3s;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--input); }

/* --------------------------------------------------------------------------
   21. RESPONSIVE TRIM
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .hero { padding-top: 6.5rem; }
  .hero-title { font-size: 2.6rem; }
  .contact-cards { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 2.25rem; }
}

/* Touch devices: no hover choreography, images already legible. */
@media (hover: none) {
  .achievement-link:hover { padding-left: 0; }
  .btn-primary:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   21b. MOBILE PASS
   Everything below is phone-specific trimming: tighter rhythm, single
   columns, and touch targets that clear 44px.
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  /* Background — disable vibrating micro-line grid on mobile and soften noise */
  #flow-grid { display: none !important; }
  #simplex-bg { opacity: 0.12; }

  /* Hero — the Hero 04 stack needs breathing room, not desktop scale. */
  .hero { padding: 6rem var(--gutter) 2.5rem; }
  .h4-stage { margin-top: 1rem; }
  .h4-photo { width: min(58vw, 240px); }
  .h4-title { font-size: clamp(2.4rem, 13vw, 4.5rem); top: 64%; }
  .h4-name { letter-spacing: 0.3em; text-indent: 0.3em; font-size: 0.8rem; }
  .h4-meta { margin-top: 2rem; align-items: center; text-align: center; }
  .h4-services-block { align-items: center; text-align: center; margin-inline: auto; }
  .h4-location { text-align: center; margin-inline: auto; }
  .h4-blurb { margin-top: 1.75rem; font-size: 0.8125rem; line-height: 1.8; text-align: center; }
  .h4-cta { margin-top: 1.5rem; }
  .hero-scroll { display: none; }

  /* About — the Spline card stacks, so the model needs its own height. */
  .spline-card { height: auto; min-height: 0; }
  .spline-stage { min-height: 320px; }
  .spotlight { top: -6rem; left: -2rem; }

  /* Stats read better as two-up than as four squeezed columns. */
  .about-stats { grid-template-columns: repeat(2, 1fr); }

  /* Contact form fields must not zoom the viewport on focus (needs >=16px). */
  .cc-field input,
  .cc-field textarea { font-size: 16px; }
  .cc-submit { padding-block: 0.95rem; }
  .cc-detail { align-items: center; }
}

@media (max-width: 600px) {
  .h4-index { font-size: 0.6875rem; }
  .h4-services { font-size: 0.9rem; }
  .about-stats { grid-template-columns: 1fr; }
  .stat-value { font-size: 2.5rem; }

  /* Gallery text sizes for small phones. */
  .ig-title { font-size: 1rem; }
  .ig-meta { font-size: 0.5625rem; letter-spacing: 0.12em; }
  .ig-more { font-size: 0.75rem; }
  .ig-overlay { padding: 0.75rem 0.7rem; gap: 0.15rem; }

  /* Certifications + education single column. */
  .sort-grid, .edu-row { grid-template-columns: 1fr; }

  /* Dropdown spans the gutter on a phone. */
  .dd { max-width: none; }

  /* Timeline: pull the rail in so copy gets the width. */
  .track-step { padding-bottom: 2rem; }
  .track-name { font-size: 1.5rem; }
  .exp-details li { font-size: 0.875rem; padding-left: 1.25rem; }
  .exp-impact { font-size: 0.875rem; }

  /* Footer stacks. */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (max-width: 500px) {
  .spline-stage { min-height: 220px; }
  .dd-menu { max-height: 65vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 400px) {
  .ig-tile { width: 100%; height: 16rem; }
  .h4-title { font-size: clamp(2rem, 12.5vw, 3rem); }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .footer-inner { font-size: 0.5625rem; letter-spacing: 0.15em; }
  .case-arch { white-space: pre-wrap; word-break: break-word; font-size: 0.6875rem; }
}

/* Touch: nothing should depend on hover to be reachable. */
@media (hover: none) {
  .track-step:hover .track-card { transform: none; }
  a.sort-card:hover { transform: none; }
  .tool:hover { transform: none; }
  .about-stats .stat:hover { transform: none; }
  .cc-submit:hover { transform: none; }
  /* Every tap target clears the 44px minimum. */
  .dd-option { min-height: 44px; }
  .cc-links a { min-height: 44px; }
  .nav-toggle { min-width: 44px; min-height: 44px; }
}

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

  .reveal { opacity: 1; transform: none; }
  .mobile-nav a { opacity: 1; transform: none; }
  .ig-overlay { opacity: 1; }
  .hero { position: relative; height: auto; min-height: 100svh; }
}

/* --------------------------------------------------------------------------
   23. PRINT
   -------------------------------------------------------------------------- */
@media print {
  .nav, .mobile-nav, .loader, #preloader, .scroll-progress, .cursor-dot, .cursor-outline,
  #particles, #flow-grid, #simplex-bg, .lightbox, .spline-card { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
  .hero { position: static; height: auto; }
}
