/*
=============================================================================
style.css — Portfolio · dark monochrome, editorial hero
Reference: https://webflow.com/made-in-webflow/website/dh-portfolio-site
Sections: Reset & base | Variables | Layout | Utilities | Header & Nav
          Hero | About | Services | Projects | Experience | Certificates
          CV | Skills | Contact | Footer | Reduced motion
=============================================================================
*/

/* --- Reset & base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.68;
  letter-spacing: 0.01em;
  color: var(--color-text);
  background-color: var(--color-bg-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body:not(.is-loaded) {
  overflow: hidden;
}

/* Reading progress — subtle top edge */
.scroll-progress {
  position: fixed;
  top: var(--safe-top);
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1001;
  pointer-events: none;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(
    90deg,
    var(--accent-red-deep),
    var(--accent-red-core) 45%,
    #f87171
  );
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.35);
}

.section--dark .section-head,
.section--charcoal .section-head {
  border-bottom-color: var(--color-border-dark);
}

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

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-accent-hover);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* --- Variables --- */
:root {
  /* Dark monochrome — Darren Harroff portfolio–style system */
  --color-bg-cream: #0a0a0a;
  --color-bg-cream-dark: #050505;
  --color-charcoal: #111111;
  --color-charcoal-soft: #161616;
  --color-black: #000000;
  --color-heading: #fafafa;
  --color-text: #a3a3a3;
  --color-text-muted: #737373;
  --color-text-on-dark: #fafafa;
  --color-text-muted-on-dark: #a3a3a3;
  --color-accent: #fafafa;
  --color-accent-hover: #ffffff;
  --color-accent-dark: #d4d4d4;
  --color-sand: #e5e5e5;
  --color-olive-muted: rgba(255, 255, 255, 0.12);
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-dark: rgba(255, 255, 255, 0.14);

  /* Product / delivery accent — red signal lines */
  --accent-red: #f87171;
  --accent-red-core: #ef4444;
  --accent-red-deep: #dc2626;
  --accent-red-glow: rgba(239, 68, 68, 0.45);
  /* Card hovers (everywhere except Featured work / .project-card) */
  --card-hover-red-border: rgba(252, 165, 165, 0.42);
  --card-hover-red-border-strong: rgba(248, 113, 113, 0.55);
  --card-hover-red-fill: rgba(239, 68, 68, 0.08);
  --card-hover-red-glow-soft: 0 0 36px rgba(239, 68, 68, 0.12);

  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-display: "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 60px rgba(255, 255, 255, 0.04);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
  --transition-fast: 0.2s var(--ease-out-expo);
  --transition-med: 0.4s var(--ease-out-expo);
  --transition-slow: 0.65s var(--ease-out-expo);

  --container-max: 1160px;
  /* Safe areas — notches, home indicators, fold inner edges (needs viewport-fit=cover) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Sticky band: matches .site-header--dh padding + fixed island height + notch */
  --header-island-h: 3.5rem;
  --header-height: calc(0.65rem + var(--header-island-h) + 0.5rem + var(--safe-top));

  /* Navbar — smooth, slow motion (ease-out, long deceleration) */
  --ease-nav-soft: cubic-bezier(0.22, 1, 0.32, 1);
  --nav-dur-island: 1.15s;
  --nav-dur-panel: 1.1s;
  --nav-dur-fade: 0.75s;
  --nav-dur-link: 0.95s;
  --nav-dur-toggle: 0.95s;
}

/* Phones / small foldables: slightly snappier nav motion (less jank on GPU) */
@media (max-width: 959px) {
  :root {
    --nav-dur-island: 0.88s;
    --nav-dur-panel: 0.82s;
    --nav-dur-fade: 0.58s;
    --nav-dur-link: 0.72s;
    --nav-dur-toggle: 0.78s;
  }
}

/* Tablet: balance between desktop and phone */
@media (min-width: 600px) and (max-width: 959px) {
  :root {
    --nav-dur-island: 0.95s;
    --nav-dur-panel: 0.92s;
  }
}

/* --- Motion keyframes (delivery / blueprint metaphor — subtle) --- */
@keyframes heroMeshDrift {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(-3%, 2%) scale(1.03);
  }
}

@keyframes heroGridBreath {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.55;
  }
}

@keyframes heroLineIn {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(1.15rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroPortraitIn {
  from {
    opacity: 0;
    transform: translateY(1.75rem) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes metaDotPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes heroStackLineIn {
  from {
    opacity: 0;
    transform: translate3d(0, 1.05em, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroEnter {
  from {
    opacity: 0;
    transform: scale(0.9) translate3d(0, 28px, 0);
  }
  to {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
}

@keyframes heroAmbient {
  0% {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
  100% {
    opacity: 0.88;
    transform: scale(1.06) translate3d(1.5%, -1.2%, 0);
  }
}

/* Island intro: fade only — scroll state owns transform (compact ↔ open) */
@keyframes navIslandIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes loaderBar {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(380%);
  }
}

/* Pipeline flow — suggests continuous delivery / throughput */
@keyframes pipelineFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* Live signal — backlog / health-check pulse */
@keyframes signalPulse {
  0%,
  100% {
    opacity: 0.55;
    filter: drop-shadow(0 0 6px var(--accent-red-glow));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 14px rgba(248, 113, 113, 0.65));
  }
}

/* Sprint tick — light rhythm under emphasis copy */
@keyframes sprintGlow {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25), 0 2px 20px rgba(185, 28, 28, 0.15);
  }
  50% {
    box-shadow: 0 0 22px rgba(248, 113, 113, 0.45), 0 4px 28px rgba(220, 38, 38, 0.22);
  }
}

/* --- Page loader (after assets load) --- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-cream-dark);
  transition:
    opacity 0.65s var(--ease-out-expo),
    visibility 0.65s step-end;
}

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

.page-loader__glow {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 42% 38%, rgba(255, 255, 255, 0.04), transparent 42%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.02), transparent 38%);
  animation: heroMeshDrift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.page-loader__inner {
  position: relative;
  text-align: center;
  padding: max(var(--space-lg), var(--safe-top)) max(var(--space-lg), var(--safe-right))
    max(var(--space-lg), var(--safe-bottom)) max(var(--space-lg), var(--safe-left));
  max-width: 22rem;
}

.page-loader__logo {
  height: 52px;
  width: auto;
  max-width: 240px;
  margin-inline: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 4px 20px rgba(255, 255, 255, 0.06));
}

.page-loader__label {
  margin: var(--space-md) 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted-on-dark);
}

.page-loader__bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: var(--space-md);
}

.page-loader__bar-fill {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, #737373, #fafafa);
  animation: loaderBar 1.35s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .page-loader__glow {
    animation: none;
  }

  .page-loader__bar-fill {
    animation: none;
    width: 100%;
    transform: none;
  }

  .page-loader {
    transition: opacity 0.15s ease;
  }
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-left: max(var(--space-md), var(--safe-left));
  padding-right: max(var(--space-md), var(--safe-right));
}

.section {
  position: relative;
  padding-block: calc(var(--space-xl) + 0.25rem);
  overflow: hidden;
  scroll-margin-top: calc(var(--header-height) + var(--space-sm));
}

@media (min-width: 960px) {
  .section {
    padding-block: calc(var(--space-2xl) + 0.35rem);
  }
}

.section--cream {
  background-color: var(--color-bg-cream);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section--cream.section--hero {
  border-top: none;
}

.section--projects.section--cream,
.section--skills.section--cream {
  background: linear-gradient(180deg, #0e0e0e 0%, var(--color-bg-cream) 48%);
}

/* Projects directly under hero: one shared edge with hero bottom border */
.section--projects-below-hero.section--cream {
  border-top: none;
  padding-top: calc(var(--space-lg) + 0.15rem);
}

.section--dark {
  background-color: var(--color-charcoal);
  color: var(--color-text-on-dark);
}

/* Cream-dark base + soft red light (matches accent reds elsewhere) */
.section--contact.section--dark {
  background-color: var(--color-bg-cream-dark);
  background-image:
    radial-gradient(ellipse 115% 90% at 82% -5%, rgba(248, 113, 113, 0.12) 0%, transparent 52%),
    radial-gradient(ellipse 75% 55% at 5% 100%, rgba(239, 68, 68, 0.08) 0%, transparent 48%),
    linear-gradient(168deg, #0a0808 0%, var(--color-bg-cream-dark) 42%, #060404 100%);
}

.section--charcoal {
  background: linear-gradient(165deg, var(--color-charcoal-soft) 0%, var(--color-black) 100%);
  color: var(--color-text-on-dark);
}

.section-head {
  position: relative;
  max-width: 52rem;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(239, 68, 68, 0.15) 18%,
    rgba(252, 165, 165, 0.95) 50%,
    rgba(239, 68, 68, 0.15) 82%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: pipelineFlow 5.5s linear infinite;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.35);
}

@media (min-width: 768px) {
  .section-head {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: var(--space-sm) var(--space-xl);
    align-items: baseline;
  }

  .section-head .section-label {
    grid-column: 1;
    margin-bottom: 0;
    padding-top: 0.35rem;
    border-top: 2px solid var(--accent-red-core);
    box-shadow: 0 -1px 0 rgba(248, 113, 113, 0.35);
    animation: signalPulse 3.2s ease-in-out infinite;
  }

  .section-head .section-title {
    grid-column: 2;
    margin-bottom: 0;
  }

  .section-head .section-intro {
    grid-column: 1 / -1;
    margin-top: var(--space-sm);
  }
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin: 0 0 var(--space-sm);
}

.section-label--on-dark {
  color: var(--color-sand);
}

.section-label--muted {
  color: var(--color-text-muted-on-dark);
}

/* About block label (no .section-head grid) — same “signal” as section headers */
.section--about-dh .about__text > .section-label {
  position: relative;
  display: inline-block;
  padding-bottom: 0.55rem;
  margin-bottom: var(--space-xs);
  color: #e5e5e5;
}

.section--about-dh .about__text > .section-label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    var(--accent-red-core) 0%,
    rgba(248, 113, 113, 0.4) 100%
  );
  box-shadow: 0 0 14px var(--accent-red-glow);
  animation: signalPulse 3.4s ease-in-out infinite;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 0 0 var(--space-sm);
  color: var(--color-heading);
}

.section-title--on-dark {
  color: var(--color-text-on-dark);
}

.section-intro {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

.section-intro--on-dark {
  color: var(--color-text-muted-on-dark);
}

/* --- Utilities --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  background: #fafafa;
  color: #0a0a0a;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
  outline: 2px solid var(--color-heading);
  outline-offset: 2px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  padding: 0.95rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn--primary {
  background-color: #fafafa;
  color: #0a0a0a;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 45%,
    transparent 70%
  );
  background-size: 200% 100%;
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-out-expo);
}

.btn--primary:hover::before {
  transform: translateX(100%);
}

.btn--primary:hover {
  background-color: #ffffff;
  color: #0a0a0a;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-on-dark);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
}

.section--dark .btn--ghost,
.section--charcoal .btn--ghost {
  color: var(--color-text-on-dark);
  box-shadow: inset 0 0 0 1.5px var(--color-border-dark);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.section--dark .btn--ghost:hover,
.section--charcoal .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn--sm {
  padding: 0.65rem 1.25rem;
  font-size: 0.75rem;
}

/* --- Header & Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Classic full-width bar (only if not using dynamic island) */
.site-header:not(.site-header--dh) {
  height: var(--header-height);
  background: rgba(247, 245, 240, 0.86);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition:
    background var(--transition-med),
    border-color var(--transition-med),
    box-shadow var(--transition-med);
}

.site-header:not(.site-header--dh).is-scrolled {
  background: rgba(247, 245, 240, 0.96);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* Dynamic island only: floating pill — no full-width strip, no container max-width */
.site-header--dh {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: auto;
  min-height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding-top: max(0.65rem, var(--safe-top));
  padding-bottom: 0.45rem;
  padding-left: max(clamp(0.5rem, 2vw, 1rem), var(--safe-left));
  padding-right: max(clamp(0.5rem, 2vw, 1rem), var(--safe-right));
}

.site-header--dh.is-scrolled {
  background: transparent;
}

/*
 * Dynamic island — fixed height both states; collapsed = logo only; scroll = opens nav.
 */
.site-header--dh .site-header__inner {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: fit-content;
  max-width: min(56rem, 100%);
  height: var(--header-island-h);
  min-height: var(--header-island-h);
  max-height: var(--header-island-h);
  margin-inline: auto;
  padding: 0 0.85rem;
  border-radius: 9999px;
  transform: translateZ(0) scale(1);
  transform-origin: center top;
  overflow: hidden;
  background: rgba(14, 14, 14, 0.55);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 6px 24px rgba(0, 0, 0, 0.32);
  transition:
    transform var(--nav-dur-island) var(--ease-nav-soft),
    background calc(var(--nav-dur-island) * 0.92) var(--ease-nav-soft),
    border-color calc(var(--nav-dur-island) * 0.92) var(--ease-nav-soft),
    box-shadow var(--nav-dur-island) var(--ease-nav-soft),
    backdrop-filter calc(var(--nav-dur-island) * 0.85) ease,
    padding calc(var(--nav-dur-island) * 0.88) var(--ease-nav-soft),
    gap calc(var(--nav-dur-island) * 0.85) var(--ease-nav-soft);
  animation: navIslandIn 1s var(--ease-nav-soft) both;
}

.site-header--dh.is-scrolled .site-header__inner {
  justify-content: space-between;
  transform: translateZ(0) scale(1);
  gap: clamp(0.45rem, 1.5vw, 0.75rem);
  padding: 0 0.75rem 0 0.95rem;
  background: rgba(8, 8, 8, 0.78);
  backdrop-filter: blur(32px) saturate(1.12);
  -webkit-backdrop-filter: blur(32px) saturate(1.12);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 10px 36px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.25);
}

@media (min-width: 960px) {
  .site-header--dh.is-scrolled .site-header__inner {
    gap: var(--space-md);
    padding: 0 1rem 0 1.1rem;
  }

  /* Desktop: hide nav until scroll — width + slide + blur */
  .site-header--dh:not(.is-scrolled) .site-nav {
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    max-width: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(0.75rem);
    filter: blur(6px);
    transition:
      opacity 0.5s ease,
      max-width var(--nav-dur-panel) var(--ease-nav-soft),
      transform var(--nav-dur-panel) var(--ease-nav-soft),
      filter 0.65s ease,
      visibility 0s linear 0.55s;
  }

  .site-header--dh.is-scrolled .site-nav {
    flex: 1 1 auto;
    width: auto;
    max-width: min(48rem, 70vw);
    min-width: 0;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
    filter: blur(0);
    transition:
      opacity var(--nav-dur-fade) ease 0.12s,
      max-width var(--nav-dur-panel) var(--ease-nav-soft),
      transform var(--nav-dur-panel) var(--ease-nav-soft),
      filter 0.7s ease 0.15s,
      visibility 0s linear 0s;
  }

  /* Staggered link motion when island opens */
  .site-header--dh:not(.is-scrolled) .site-nav__link {
    opacity: 0;
    transform: translateY(0.4rem);
    transition: opacity 0.45s ease, transform 0.5s var(--ease-nav-soft);
  }

  .site-header--dh.is-scrolled .site-nav__link {
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity var(--nav-dur-link) var(--ease-nav-soft),
      transform calc(var(--nav-dur-link) * 1.05) var(--ease-nav-soft);
  }

  .site-header--dh.is-scrolled .site-nav__list li:nth-child(1) .site-nav__link {
    transition-delay: 0.08s;
  }
  .site-header--dh.is-scrolled .site-nav__list li:nth-child(2) .site-nav__link {
    transition-delay: 0.14s;
  }
  .site-header--dh.is-scrolled .site-nav__list li:nth-child(3) .site-nav__link {
    transition-delay: 0.2s;
  }
  .site-header--dh.is-scrolled .site-nav__list li:nth-child(4) .site-nav__link {
    transition-delay: 0.26s;
  }
  .site-header--dh.is-scrolled .site-nav__list li:nth-child(5) .site-nav__link {
    transition-delay: 0.32s;
  }
  .site-header--dh.is-scrolled .site-nav__list li:nth-child(6) .site-nav__link {
    transition-delay: 0.38s;
  }
  .site-header--dh.is-scrolled .site-nav__list li:nth-child(7) .site-nav__link {
    transition-delay: 0.44s;
  }
  .site-header--dh.is-scrolled .site-nav__list li:nth-child(8) .site-nav__link {
    transition-delay: 0.5s;
  }
}

/* Mobile: menu button width + scale in (fixed island height) */
.site-header--dh:not(.is-scrolled) .nav-toggle {
  position: relative;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  transform: scale(0.65) rotate(-8deg);
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  transition:
    width var(--nav-dur-toggle) var(--ease-nav-soft),
    opacity 0.55s ease,
    transform calc(var(--nav-dur-toggle) * 0.95) var(--ease-nav-soft),
    visibility 0s linear 0.55s;
}

.site-header--dh.is-scrolled .nav-toggle {
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  opacity: 1;
  transform: scale(1) rotate(0deg);
  overflow: visible;
  pointer-events: auto;
  visibility: visible;
  transition:
    width var(--nav-dur-toggle) var(--ease-nav-soft),
    opacity 0.6s ease 0.12s,
    transform calc(var(--nav-dur-toggle) * 0.95) var(--ease-nav-soft) 0.1s,
    visibility 0s linear 0s;
}

.site-header--dh .site-header__logo-img {
  filter: brightness(0) invert(1);
  height: 40px;
}

@media (min-width: 960px) {
  .site-header--dh .site-header__logo-img {
    height: 44px;
    max-width: min(240px, 38vw);
  }
}

.site-header--dh .nav-toggle__bar {
  background: #fafafa;
}

.site-header--dh .site-nav__link {
  color: rgba(250, 250, 250, 0.92);
  font-weight: 600;
}

.site-header--dh .site-nav__link:hover,
.site-header--dh .site-nav__link.is-active {
  color: #ffffff;
  opacity: 0.92;
}

.site-header--dh .site-nav__link::after {
  background: #fafafa;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-md);
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.site-header__logo:hover {
  opacity: 0.88;
}

.site-header__logo:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.site-header__logo-img {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(260px, 52vw);
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 960px) {
  .site-header__logo-img {
    height: 54px;
    max-width: 300px;
  }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-heading);
  border-radius: 1px;
  transition: transform var(--transition-med), opacity var(--transition-fast);
  margin-inline: auto;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-nav {
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background: var(--color-charcoal);
  padding-top: var(--space-lg);
  padding-left: max(var(--space-md), var(--safe-left));
  padding-right: max(var(--space-md), var(--safe-right));
  padding-bottom: max(var(--space-lg), var(--safe-bottom));
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform var(--transition-med),
    visibility var(--transition-med);
}

/* Mobile drawer: glassy transparent panel (matches transparent island header) */
@media (max-width: 959px) {
  .site-header--dh .site-nav {
    background: rgba(5, 5, 5, 0.42);
    backdrop-filter: blur(22px) saturate(1.1);
    -webkit-backdrop-filter: blur(22px) saturate(1.1);
  }
}

.site-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.site-nav__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--color-heading);
  text-decoration: none;
  padding: var(--space-xs) 0;
  display: inline-block;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.site-nav__link:hover {
  color: var(--color-accent-dark);
}

.site-nav__link.is-active {
  color: var(--color-accent-dark);
}

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

  .site-nav {
    position: static;
    inset: auto;
    padding: 0;
    transform: none;
    visibility: visible;
    background: transparent;
  }

  .site-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-md);
  }

  .site-nav__link {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: var(--space-xs) 0;
    position: relative;
  }

  .site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
    border-radius: 1px;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.4s var(--ease-out-expo), transform-origin 0s 0.4s;
  }

  .site-nav__link:hover::after,
  .site-nav__link.is-active::after {
    transform: scaleX(1);
    transform-origin: left center;
    transition: transform 0.4s var(--ease-out-expo);
  }

  /* Compact link rhythm inside the island pill (single row when open) */
  .site-header--dh .site-nav__list {
    gap: 0.4rem 0.55rem;
    row-gap: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .site-header--dh .site-nav__link {
    font-size: 0.76rem;
    letter-spacing: 0.055em;
  }
}

/* --- Hero — black & white, editorial --- */
.section--hero {
  --hero-scroll: 0;
  position: relative;
  isolation: isolate;
  /* Size container: widths use cqi so they match layout box, not scrollbar-wide 100vw */
  container-type: inline-size;
  container-name: hero;
  min-height: calc(100svh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: calc(var(--space-lg) + var(--space-xs)) var(--space-xl);
  background:
    radial-gradient(ellipse 88% 50% at 50% 0%, rgba(255, 255, 255, 0.045), transparent 55%),
    radial-gradient(ellipse 70% 42% at 50% 100%, rgba(255, 255, 255, 0.03), transparent 50%),
    linear-gradient(180deg, #0d0d0d 0%, #060606 45%, #0a0a0a 100%);
  border-bottom: 1px solid var(--color-border);
  overflow: visible;
}

.section--hero::before {
  content: "";
  position: absolute;
  inset: -32% -18% -18%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 48% at 22% 28%, rgba(239, 68, 68, 0.09), transparent 58%),
    radial-gradient(ellipse 45% 40% at 78% 72%, rgba(255, 255, 255, 0.045), transparent 52%);
  animation: heroAmbient 22s ease-in-out infinite alternate;
}

.hero--dh {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  text-align: center;
  overflow: visible;
}

.hero__figure {
  margin: 0 auto;
  width: 100%;
  max-width: var(--container-max);
  overflow: visible;
}

/* Narrow column for the photo; headline is much wider than frame (reference) */
.hero__visual {
  position: relative;
  isolation: isolate;
  width: min(540px, 94vw, calc(min(82dvh, 760px) * 433 / 577));
  width: min(540px, 94cqi, calc(min(82dvh, 760px) * 433 / 577));
  margin-inline: auto;
  overflow: visible;
}

.hero__parallax,
.hero__enter {
  overflow: visible;
}

/* Scroll-driven layer (reference: hero scales / lifts while leaving view) */
.hero__parallax {
  transform: translate3d(
    0,
    calc(var(--hero-scroll, 0) * -18vh),
    0
  )
    scale(calc(1 - var(--hero-scroll, 0) * 0.11));
  transform-origin: center center;
  will-change: transform;
}

/* Entrance: runs once after loader — separate from scroll so transforms don’t fight */
.hero__enter {
  transform-origin: center center;
}

body.is-loaded .hero__enter {
  animation: heroEnter 1.5s var(--ease-out-expo) both;
}

.hero__frame {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 433 / 577;
  border-radius: 8px;
  overflow: visible;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 32px 80px rgba(0, 0, 0, 0.55);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  filter: grayscale(1) contrast(1.07) brightness(1.03)
    drop-shadow(0 14px 36px rgba(0, 0, 0, 0.45));
  transform: translate3d(0, calc(var(--hero-scroll, 0) * 10%), 0);
  will-change: transform;
}

/* Shared: screen-filling type, wider than portrait (reference scale) */
.hero__stack {
  position: absolute;
  left: 50%;
  width: min(calc(100vw - 1rem), 78rem);
  width: min(calc(100cqi - 1rem), 78rem);
  margin: 0;
  padding: 0 var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  pointer-events: none;
  will-change: transform, opacity;
}

/* Name — behind cutout, light on dark */
.hero__stack--rear {
  z-index: 0;
  top: 22%;
  mix-blend-mode: normal;
  filter: drop-shadow(0 0 48px rgba(255, 255, 255, 0.06));
  transform: translate3d(
    -50%,
    calc(-50% + var(--hero-scroll, 0) * -26px),
    0
  );
  opacity: calc(1 - var(--hero-scroll, 0) * 0.52);
}

/* Role — serif over lower figure */
.hero__stack--front {
  z-index: 4;
  top: 62%;
  mix-blend-mode: normal;
  filter: drop-shadow(0 3px 24px rgba(0, 0, 0, 0.65));
  transform: translate3d(
    -50%,
    calc(-50% + var(--hero-scroll, 0) * -34px),
    0
  );
  opacity: calc(1 - var(--hero-scroll, 0) * 0.52);
}

.hero__stack-line {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  /* min(vw, dvh) keeps name scale balanced on wide-short and tall-narrow viewports */
  font-size: clamp(4rem, min(21vw, 18dvh), 11rem);
  line-height: 0.8;
  letter-spacing: -0.055em;
  opacity: 0;
}

.hero__stack--rear .hero__stack-line--rear:nth-child(1) {
  color: #fafafa;
}

.hero__stack--rear .hero__stack-line--rear:nth-child(2) {
  color: #a3a3a3;
}

.hero__stack-line--front {
  color: rgba(250, 250, 250, 0.95);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.75);
}

.hero__stack--front .hero__stack-line--front:nth-child(2) {
  color: rgba(212, 212, 212, 0.92);
}

body.is-loaded .section--hero .hero__stack-line--rear,
body.is-loaded .section--hero .hero__stack-line--front {
  animation: heroStackLineIn 1.25s var(--ease-out-expo) both;
}

body.is-loaded .section--hero .hero__stack--rear .hero__stack-line--rear:nth-child(1) {
  animation-delay: 0.32s;
}

body.is-loaded .section--hero .hero__stack--rear .hero__stack-line--rear:nth-child(2) {
  animation-delay: 0.5s;
}

body.is-loaded .section--hero .hero__stack--front .hero__stack-line--front:nth-child(1) {
  animation-delay: 0.72s;
}

body.is-loaded .section--hero .hero__stack--front .hero__stack-line--front:nth-child(2) {
  animation-delay: 0.92s;
}

.hero__stack-line--serif {
  font-family: var(--font-heading);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.5rem, min(12.5vw, 11dvh), 6.25rem);
  letter-spacing: -0.02em;
  line-height: 0.92;
  margin-top: 0.02em;
}

/* Must start after loader (is-loaded) — otherwise motion finishes while still covered */
.hero__below {
  flex-shrink: 0;
  max-width: 42rem;
  width: 100%;
  opacity: 0;
}

body.is-loaded .hero__below {
  animation: heroRise 1.3s var(--ease-out-expo) 1.15s both;
}

.hero--dh .hero__lead {
  position: relative;
  font-size: clamp(1.05rem, 2.4vw, 1.22rem);
  font-weight: 400;
  color: #b8b8b8;
  max-width: none;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  line-height: 1.68;
  letter-spacing: 0.01em;
}

.hero--dh .hero__lead::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(20rem, 92%);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(239, 68, 68, 0.35) 30%,
    rgba(248, 113, 113, 0.85) 50%,
    rgba(239, 68, 68, 0.35) 70%,
    transparent
  );
  background-size: 180% 100%;
  animation: pipelineFlow 8s linear infinite reverse;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.3);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.hero--dh .hero__actions {
  justify-content: center;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.hero--dh .hero__meta {
  justify-content: center;
}

/* Red accent glow under CV · Skills */
.section--hero .hero__meta {
  position: relative;
  padding-bottom: 0.75rem;
}

.section--hero .hero__meta::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(11rem, 85%);
  height: 1px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(248, 113, 113, 0.15) 20%,
    rgba(239, 68, 68, 0.95) 50%,
    rgba(248, 113, 113, 0.15) 80%,
    transparent 100%
  );
  box-shadow:
    0 0 16px rgba(239, 68, 68, 0.65),
    0 0 36px rgba(220, 38, 38, 0.35),
    0 4px 24px rgba(185, 28, 28, 0.25);
}

.hero__meta-link {
  color: var(--color-text-muted-on-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hero__meta-link:hover {
  color: var(--color-text-on-dark);
}

.hero__meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-muted);
  opacity: 0.9;
  animation: metaDotPulse 3.6s ease-in-out infinite;
}

/*
 * About blocks used data-dh-reveal for scroll-scrubbed opacity (DH-style).
 * Without JS driving --dh-t → 1, the default left a permanent dim “layer” on copy.
 * Full opacity + no offset until/unless a scrub script is wired again.
 */
[data-dh-reveal] {
  --dh-t: 1;
  opacity: 1;
  transform: none;
}

.section--about-dh {
  padding-block: calc(var(--space-xl) + var(--space-md));
  /* Same surface as portrait frame — single cream band (no lifted charcoal vs cream mismatch) */
  background-color: var(--color-bg-cream);
  background-image: none;
  border-top-color: rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Brighter copy + chrome inside About (reads on lifted background) */
.section--about-dh .about__text .section-title {
  color: #fafafa;
}

.section--about-dh .about__p {
  color: #c9c9c9;
}

.section--about-dh .about__p--accent {
  color: #b3b3b3;
}

.section--about-dh .pullquote {
  background: linear-gradient(135deg, #1f1f1f 0%, #181818 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

.section--about-dh .pullquote footer {
  color: #b8b8b8;
}

.section--about-dh .about__tags li {
  background: rgba(255, 255, 255, 0.1);
  color: #f0f0f0;
  border-color: rgba(255, 255, 255, 0.1);
}

.section--about-dh .about__tags li:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

/* --- About --- */
.about {
  display: grid;
  gap: var(--space-lg);
  align-items: start;
}

@media (min-width: 960px) {
  .about {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-xl);
  }
}

/* Right column: portrait above pullquote + tags */
.about__column {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 0;
}

@keyframes about-photo-border-sheen {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

@keyframes about-photo-border-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.08);
  }
  50% {
    box-shadow: 0 0 32px 6px rgba(239, 68, 68, 0.32);
  }
}

.about__photo {
  position: relative;
  margin: clamp(0.5rem, 2vw, 0.85rem) clamp(0.35rem, 1.5vw, 0.65rem);
}

.about__photo:not(.about__photo--popout) {
  padding: 3px;
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(
    110deg,
    var(--accent-red-deep) 0%,
    var(--accent-red-core) 28%,
    #f87171 52%,
    var(--accent-red-core) 74%,
    var(--accent-red-deep) 100%
  );
  background-size: 240% 100%;
  animation:
    about-photo-border-sheen 5s ease-in-out infinite alternate,
    about-photo-border-glow 2.8s ease-in-out infinite alternate;
}

.about__photo:not(.about__photo--popout) .about__photo-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center 22%;
  aspect-ratio: 3 / 4;
  max-height: min(52vh, 420px);
  border-radius: calc(var(--radius-md) - 3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

@media (min-width: 960px) {
  .about__photo:not(.about__photo--popout) .about__photo-img {
    max-height: min(56vh, 440px);
  }
}

/* Pop-out: portrait in front; U-frame sits behind */
.about__photo--popout {
  position: relative;
  isolation: isolate;
  z-index: 0;
  overflow: visible;
  margin-top: clamp(1.5rem, 5vw, 2.75rem);
  margin-bottom: clamp(0.5rem, 2vw, 0.85rem);
  margin-inline: auto;
  padding: 0;
  width: 100%;
  max-width: min(100%, 300px);
  min-height: min(44vh, 340px);
  height: min(44vh, 340px);
  background: transparent;
  animation: none;
  border-radius: 0;
}

/*
 * U-shaped frame: negative z-index keeps it strictly behind the img inside this figure.
 */
.about__photo--popout .about__photo-frame {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border-left: 3px solid var(--accent-red-core);
  border-right: 3px solid var(--accent-red-core);
  border-bottom: 3px solid var(--accent-red-core);
  border-top: none;
  background: transparent;
  animation: about-photo-border-glow 2.8s ease-in-out infinite alternate;
  z-index: -1;
  pointer-events: none;
  box-sizing: border-box;
}

.about__photo--popout .about__photo-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: -3px;
  right: -3px;
  height: 3px;
  background: linear-gradient(
    105deg,
    var(--accent-red-deep) 0%,
    var(--accent-red-core) 32%,
    #f87171 50%,
    var(--accent-red-core) 68%,
    var(--accent-red-deep) 100%
  );
  background-size: 240% 100%;
  animation: about-photo-border-sheen 5s ease-in-out infinite alternate;
}

/* Figure size stays fixed; image modestly larger than frame, not extreme */
.about__photo--popout .about__photo-img {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 1;
  display: block;
  width: auto;
  max-width: min(122%, 360px);
  height: auto;
  max-height: min(68vh, 540px);
  object-fit: contain;
  object-position: bottom center;
  border-radius: 0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

@media (min-width: 960px) {
  .about__photo--popout {
    min-height: min(48vh, 380px);
    height: min(48vh, 380px);
    max-width: min(100%, 320px);
  }

  .about__photo--popout .about__photo-img {
    max-width: min(128%, 380px);
    max-height: min(72vh, 580px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about__photo:not(.about__photo--popout) {
    animation: none;
    background: var(--accent-red-core);
    box-shadow: none;
  }

  .about__photo--popout .about__photo-frame {
    animation: none;
    box-shadow: none;
  }

  .about__photo--popout .about__photo-frame::before {
    animation: none;
    background: var(--accent-red-core);
  }
}

.about__p {
  font-size: 1.125rem;
  color: var(--color-text);
}

.about__p--accent {
  position: relative;
  font-style: italic;
  color: var(--color-text-muted);
  border-left: 3px solid var(--accent-red-core);
  padding-left: var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
  animation: sprintGlow 2.8s ease-in-out infinite;
}

.pullquote {
  position: relative;
  margin: 0 0 var(--space-lg);
  padding: var(--space-lg) var(--space-lg) var(--space-lg) calc(var(--space-lg) + 4px);
  background: var(--color-charcoal-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--accent-red-core);
  box-shadow: inset 6px 0 24px -6px rgba(239, 68, 68, 0.12);
}

.pullquote p::after {
  content: "";
  display: block;
  margin-top: var(--space-md);
  height: 1px;
  max-width: 12rem;
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.85) 0%,
    rgba(248, 113, 113, 0.35) 55%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: pipelineFlow 7s linear infinite;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.pullquote p {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-style: italic;
  margin: 0 0 var(--space-sm);
  color: var(--color-heading);
}

.pullquote footer {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.about__tags li {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--color-olive-muted);
  color: var(--color-accent-dark);
  transition:
    transform 0.45s var(--ease-out-expo),
    box-shadow 0.45s var(--ease-out-expo),
    background 0.35s var(--ease-out-expo),
    border-color 0.35s var(--ease-out-expo);
  border: 1px solid transparent;
}

.about__tags li:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* --- Services --- */
.services-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-dark);
  transition:
    transform var(--transition-med),
    border-color var(--transition-med),
    box-shadow var(--transition-med),
    background var(--transition-med);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-red-border-strong);
  background: linear-gradient(165deg, var(--card-hover-red-fill) 0%, rgba(255, 255, 255, 0.06) 100%);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.24),
    var(--card-hover-red-glow-soft);
}

.service-card:hover .service-card__icon {
  color: var(--accent-red);
  transform: translateY(-3px) scale(1.08);
}

.service-card__icon {
  width: 40px;
  height: 40px;
  color: var(--color-sand);
  margin-bottom: var(--space-sm);
  transition:
    transform 0.55s var(--ease-out-expo),
    color 0.4s var(--ease-out-expo);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__title {
  font-size: 1.125rem;
  margin: 0 0 var(--space-xs);
  color: var(--color-text-on-dark);
}

.service-card__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted-on-dark);
  line-height: 1.55;
}

/* --- Projects --- */
.projects-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: linear-gradient(165deg, #1a1a1a 0%, var(--color-charcoal-soft) 45%, #121212 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(0, 0, 0, 0.35) inset;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    border-color var(--transition-med);
}

/* Featured work: neutral hover (red card hovers used elsewhere only) */
.project-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.55), rgba(115, 115, 115, 0.4));
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform 0.45s var(--ease-out-expo);
}

.project-card:hover::before {
  transform: scaleY(1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  border-color: rgba(255, 255, 255, 0.24);
}

/* Aura & Luku: logo on top, centered text block below (mobile + desktop) */
.project-card--aura,
.project-card--luku {
  align-items: center;
  text-align: center;
}

.project-card--aura .project-card__logo-wrap,
.project-card--luku .project-card__logo-wrap {
  width: 100%;
  max-width: min(22rem, 100%);
  justify-content: center;
}

.project-card--aura .project-card__content,
.project-card--luku .project-card__content {
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 40rem;
}

.project-card--aura .project-card__name,
.project-card--luku .project-card__name {
  max-width: 24rem;
  margin-inline: auto;
}

.project-card--aura .project-card__brief,
.project-card--luku .project-card__brief {
  max-width: 48ch;
  margin-inline: auto;
}

.project-card--aura .project-card__logo {
  object-position: center center;
  margin-inline: auto;
}

.project-card--luku .project-card__wordmark,
.project-card--luku .project-card__wordmark--luku {
  align-items: center;
  text-align: center;
  width: 100%;
}

@media (min-width: 960px) {
  .project-card {
    display: grid;
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
    column-gap: var(--space-xl);
    row-gap: 0;
    align-items: stretch;
    padding: var(--space-lg) var(--space-xl);
  }

  .project-card__logo-wrap {
    grid-column: 1;
    grid-row: 1 / -1;
    margin-bottom: 0;
    align-self: start;
    justify-content: flex-start;
  }

  .project-card__content {
    grid-column: 2;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    min-height: 100%;
  }

  /* Aura & Luku: single column — logo centered, copy centered below */
  .project-card--aura,
  .project-card--luku {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xl);
    padding: var(--space-xl) var(--space-lg);
  }

  .project-card--aura .project-card__logo-wrap,
  .project-card--luku .project-card__logo-wrap {
    width: 100%;
    max-width: min(22rem, 100%);
    justify-content: center;
  }

  .project-card--aura .project-card__content,
  .project-card--luku .project-card__content {
    align-items: center;
    text-align: center;
    min-height: 0;
    width: 100%;
    max-width: 38rem;
    margin-inline: auto;
  }

  .project-card--aura .project-card__content .project-card__badge,
  .project-card--luku .project-card__content .project-card__badge {
    margin-top: 0;
    padding-top: var(--space-md);
    align-self: center;
  }
}

/* Text stack: label → title → body → action pinned to bottom when card is tall */
.project-card__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.project-card__content .project-card__name {
  margin-top: 0.1rem;
}

.project-card__content .project-card__brief {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.project-card__content .project-card__link,
.project-card__content .project-card__badge {
  margin-top: auto;
  padding-top: var(--space-md);
}

.project-card--aura .project-card__content .project-card__link,
.project-card--aura .project-card__content .project-card__badge,
.project-card--luku .project-card__content .project-card__link,
.project-card--luku .project-card__content .project-card__badge {
  margin-top: 0;
}

.project-card__logo-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

/* Light “mat” behind marks so dark logos read clearly on dark cards */
.project-card__logo-wrap--mat {
  min-height: 4.75rem;
  justify-content: center;
  padding: clamp(0.8rem, 2vw, 1.05rem) clamp(1rem, 2.5vw, 1.35rem);
  background: linear-gradient(165deg, #fafafa 0%, #ececf0 42%, #e2e2e8 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 28px rgba(0, 0, 0, 0.32);
}

@media (min-width: 960px) {
  .project-card__logo-wrap--mat {
    justify-content: flex-start;
  }

  .project-card--aura .project-card__logo-wrap--mat,
  .project-card--luku .project-card__logo-wrap--mat {
    justify-content: center;
  }
}

.project-card__logo {
  max-height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  filter: contrast(1.05);
  opacity: 1;
  transition:
    filter var(--transition-fast),
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.project-card:hover .project-card__logo {
  filter: contrast(1.08) saturate(1.03);
  opacity: 1;
  transform: translateY(-1px);
}

/* VATLEX — deeper navy on light mat (darker than default lift) */
.project-card--vatlex .project-card__logo {
  filter: brightness(0.72) contrast(1.22) saturate(0.92);
  opacity: 1;
}

.project-card--vatlex:hover .project-card__logo {
  filter: brightness(0.8) contrast(1.18) saturate(0.96);
  opacity: 1;
  transform: translateY(-1px);
}

.project-card--shiam .project-card__logo-wrap--mat {
  min-height: 7.75rem;
}

.project-card--shiam .project-card__logo {
  max-height: 124px;
}

/* Tighter light mat — logo sized to match other project marks (readable, not billboard-sized) */
.project-card--aura .project-card__logo-wrap--mat {
  min-height: 0;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: clamp(0.55rem, 1.1vw, 0.7rem) clamp(0.65rem, 1.25vw, 0.85rem);
}

.project-card--aura .project-card__logo {
  max-height: 76px;
  max-width: min(168px, 100%);
  width: auto;
  filter: contrast(1.1) brightness(1.06) saturate(1.06);
  opacity: 1;
}

.project-card--aura:hover .project-card__logo {
  filter: contrast(1.12) brightness(1.08) saturate(1.08);
  opacity: 1;
}

.project-card--luku .project-card__logo-wrap--mat {
  min-height: 0;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: clamp(0.75rem, 1.8vw, 0.95rem) clamp(1rem, 2.2vw, 1.3rem);
}

.project-card__wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
}

.project-card__wordmark--luku {
  max-height: none;
  min-height: 0;
  gap: 0.2rem;
}

.project-card--luku .project-card__wordmark--luku {
  gap: 0.22rem;
}

.project-card__wordmark--luku .project-card__wordmark-main {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-heading);
  opacity: 0.92;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.project-card--luku .project-card__wordmark--luku .project-card__wordmark-main {
  font-size: clamp(1.5rem, 3.2vw, 1.95rem);
  letter-spacing: -0.035em;
}

.project-card__wordmark--luku .project-card__wordmark-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.5rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--color-text-muted);
  opacity: 0.92;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.project-card--luku .project-card__wordmark--luku .project-card__wordmark-sub {
  font-size: clamp(0.5625rem, 1.35vw, 0.625rem);
  letter-spacing: 0.2em;
}

/* Wordmark sits on light mat — use ink tones */
.project-card--luku .project-card__logo-wrap--mat .project-card__wordmark--luku .project-card__wordmark-main {
  color: #111111;
}

.project-card--luku .project-card__logo-wrap--mat .project-card__wordmark--luku .project-card__wordmark-sub {
  color: #52525b;
}

.project-card--luku:hover .project-card__wordmark-main {
  color: var(--color-text-on-dark);
  opacity: 1;
}

.project-card--luku:hover .project-card__wordmark-sub {
  color: var(--color-accent-dark);
  opacity: 1;
}

.project-card--luku:hover .project-card__logo-wrap--mat .project-card__wordmark--luku .project-card__wordmark-main {
  color: #0a0a0a;
}

.project-card--luku:hover .project-card__logo-wrap--mat .project-card__wordmark--luku .project-card__wordmark-sub {
  color: #3f3f46;
}

.project-card__category {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin: 0;
}

.project-card__name {
  font-size: 1.35rem;
  margin: 0;
  color: var(--color-heading);
  line-height: 1.2;
  max-width: 38ch;
}

.project-card__brief {
  flex: 1 1 auto;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.58;
  max-width: 52ch;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-heading);
  margin-top: 0;
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.project-card__link:hover {
  color: var(--color-accent-dark);
  gap: 0.5rem;
}

.project-card__link-icon {
  font-size: 1rem;
  line-height: 1;
}

.project-card--static .project-card__brief {
  margin-bottom: 0;
}

.project-card__badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--color-bg-cream-dark);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  margin-top: 0;
}

/* --- Experience --- */
.experience {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 960px) {
  .experience {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .experience__intro {
    grid-column: 1 / -1;
    max-width: 40rem;
  }

  .experience__stats {
    grid-column: 1;
  }

  .academy-card {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: start;
  }
}

.experience__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 639px) {
  .experience__stats {
    grid-template-columns: 1fr;
  }
}

.stat-block {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-md);
  text-align: center;
  transition:
    transform 0.45s var(--ease-out-expo),
    border-color 0.45s var(--ease-out-expo),
    background 0.45s var(--ease-out-expo),
    box-shadow 0.45s var(--ease-out-expo);
}

.stat-block:hover {
  transform: translateY(-3px);
  border-color: var(--card-hover-red-border-strong);
  background: rgba(239, 68, 68, 0.09);
  box-shadow: var(--card-hover-red-glow-soft);
}

.stat-block__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-sand);
  margin-bottom: 0.25rem;
}

.stat-block__label {
  font-size: 0.8125rem;
  color: var(--color-text-muted-on-dark);
  line-height: 1.35;
}

.academy-card {
  position: relative;
  overflow: hidden;
  padding: var(--space-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  transition:
    transform var(--transition-med),
    border-color var(--transition-med),
    box-shadow var(--transition-med),
    background var(--transition-med);
}

.academy-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-red-core), var(--accent-red-deep));
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform 0.45s var(--ease-out-expo);
  pointer-events: none;
}

.academy-card:hover::before {
  transform: scaleY(1);
}

.academy-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-red-border-strong);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.22),
    var(--card-hover-red-glow-soft);
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.academy-card__logo-wrap {
  min-height: 48px;
  display: flex;
  align-items: center;
  margin-bottom: var(--space-md);
}

.academy-card__logo {
  max-height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
}

.academy-card__title {
  font-size: 1.5rem;
  margin: 0 0 var(--space-sm);
  color: var(--color-text-on-dark);
}

.academy-card__text {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted-on-dark);
  font-size: 1.0625rem;
}

/* --- Certificates --- */
.certificates-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

@media (max-width: 639px) {
  .certificates-strip {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-inline: calc(var(--space-md) * -1);
    padding-inline: var(--space-md);
  }

  .cert-thumb {
    flex: 0 0 min(78vw, 280px);
    scroll-snap-align: start;
  }
}

.cert-thumb {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background: var(--color-charcoal-soft);
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    border-color var(--transition-med);
}

.cert-thumb:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-red-border);
  box-shadow: var(--shadow-md), var(--card-hover-red-glow-soft);
}

.cert-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cert-thumb--image > a {
  display: block;
  color: inherit;
}

.cert-thumb--image > a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.cert-thumb--pdf-view {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--color-charcoal);
}

.cert-thumb--pdf-view .cert-thumb__pdf-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  border: none;
  display: block;
  background: var(--color-black);
}

/* --- CV --- */
.cv-block {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 960px) {
  .cv-block {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

.cv-preview-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border-dark);
  box-shadow: var(--shadow-md);
  background: var(--color-charcoal-soft);
  max-width: 320px;
  margin-inline: auto;
  transition:
    transform var(--transition-med),
    border-color var(--transition-med),
    box-shadow var(--transition-med);
}

.cv-preview-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-red-border);
  box-shadow: var(--shadow-md), var(--card-hover-red-glow-soft);
}

.cv-preview-card__img {
  width: 100%;
  display: block;
}

.cv-preview-card--embed {
  max-width: 320px;
  margin-inline: auto;
  min-height: 420px;
}

.cv-preview-card__object {
  width: 100%;
  min-height: 420px;
  border: none;
  display: block;
  background: var(--color-charcoal-soft);
}

.cv-preview-card__fallback {
  margin: 0;
  padding: var(--space-lg);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-text-muted-on-dark);
  text-align: center;
}

.cv-preview-card__fallback a {
  color: var(--color-text-on-dark);
  display: inline-block;
  margin-top: var(--space-sm);
  font-weight: 600;
}

.cv-block__meta {
  margin: var(--space-sm) 0 0;
}

.cv-block__open {
  font-size: 0.875rem;
  color: var(--color-text-muted-on-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.cv-block__open:hover {
  color: var(--color-text-on-dark);
}

/* --- Skills --- */
.skills-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 520px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 720px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 960px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
  }
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin: 0;
  padding: var(--space-md) var(--space-sm);
  min-height: 132px;
  text-align: center;
  background: var(--color-charcoal-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: none;
  transition:
    transform var(--transition-med) var(--ease-spring),
    box-shadow var(--transition-med),
    border-color var(--transition-med);
}

.skill-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-md), var(--card-hover-red-glow-soft);
  border-color: var(--card-hover-red-border-strong);
  background: linear-gradient(165deg, rgba(239, 68, 68, 0.07) 0%, var(--color-charcoal-soft) 55%);
}

.skill-card__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
}

.skill-card__logo {
  max-width: 100%;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: grayscale(0.08);
  opacity: 0.94;
  transition: filter var(--transition-fast), opacity var(--transition-fast);
}

.skill-card:hover .skill-card__logo {
  filter: grayscale(0);
  opacity: 1;
}

.skill-card__name {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--color-heading);
  margin: 0;
}

.skill-card__tag {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* --- Contact: portrait left · copy + cards stacked right --- */
.contact-layout {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: minmax(220px, min(38vw, 380px)) minmax(0, 1fr);
    gap: clamp(1.75rem, 4vw, 3rem);
  }
}

.contact-layout__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  min-width: 0;
}

.contact__intro {
  max-width: 46rem;
}

.contact__text {
  margin-bottom: var(--space-md);
}

.contact__cta-line {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-sand);
  margin: 0;
  line-height: 1.3;
}

.contact-strip__figure {
  margin: 0;
  position: relative;
}

.contact-strip__img {
  display: block;
  width: 100%;
  max-width: min(100%, 400px);
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  object-position: bottom center;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .contact-strip__figure {
    position: sticky;
    top: calc(var(--header-height) + var(--space-md));
  }

  .contact-strip__img {
    margin-inline: 0;
    max-width: 100%;
  }
}

.contact-strip__channels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-sm);
  width: 100%;
}

@media (min-width: 480px) {
  .contact-strip__channels {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .contact-strip__channels {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-strip__channel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: var(--space-md);
  min-height: 100%;
  text-align: left;
  text-decoration: none;
  color: var(--color-text-on-dark);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-md);
  transition:
    transform var(--transition-med),
    border-color var(--transition-med),
    box-shadow var(--transition-med),
    background var(--transition-med);
  cursor: pointer;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

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

.contact-strip__channel--mail:hover {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 12px 40px rgba(239, 68, 68, 0.2);
}

.contact-strip__channel--mail:hover .contact-strip__icon {
  color: #f87171;
}

.contact-strip__channel--whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.5);
  background: rgba(37, 211, 102, 0.09);
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.18);
}

.contact-strip__channel--whatsapp:hover .contact-strip__icon {
  color: #25d366;
}

.contact-strip__channel--linkedin:hover {
  border-color: rgba(10, 102, 194, 0.55);
  background: rgba(10, 102, 194, 0.12);
  box-shadow: 0 12px 40px rgba(10, 102, 194, 0.2);
}

.contact-strip__channel--linkedin:hover .contact-strip__icon {
  color: #0a66c2;
}

.contact-strip__channel--mail:focus-visible {
  outline: 2px solid #f87171;
  outline-offset: 3px;
}

.contact-strip__channel--whatsapp:focus-visible {
  outline: 2px solid #25d366;
  outline-offset: 3px;
}

.contact-strip__channel--linkedin:focus-visible {
  outline: 2px solid #0a66c2;
  outline-offset: 3px;
}

.contact-strip__icon {
  display: flex;
  color: var(--color-sand);
  margin-bottom: 0.15rem;
  transition: color var(--transition-med);
}

.contact-strip__label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-heading);
}

.contact-strip__hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted-on-dark);
  word-break: break-word;
}


/* --- Footer --- */
.site-footer {
  position: relative;
  padding-block: var(--space-xl);
  background: var(--color-black);
  color: var(--color-text-muted-on-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 5%,
    rgba(185, 28, 28, 0.35) 35%,
    rgba(252, 165, 165, 0.85) 50%,
    rgba(185, 28, 28, 0.35) 65%,
    transparent 95%
  );
  background-size: 220% 100%;
  animation: pipelineFlow 8s linear infinite;
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.2);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

@media (min-width: 720px) {
  .site-footer__copy {
    width: 100%;
    max-width: none;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-dark);
  }
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
}

.site-footer__nav a {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted-on-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(248, 113, 113, 0.85) 50%,
    transparent
  );
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s var(--ease-out-expo);
}

.site-footer__nav a:hover {
  color: var(--color-sand);
}

.site-footer__nav a:hover::after {
  transform: scaleX(1);
}

.site-footer__copy {
  margin: 0;
  font-size: 0.8125rem;
}

/* --- Scroll reveal (stagger via --reveal-delay from JS) --- */
.reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.992);
  filter: blur(5px);
  transition:
    opacity 0.85s var(--ease-out-expo),
    transform 0.85s var(--ease-out-expo),
    filter 0.65s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  will-change: auto;
}

.reveal--delay {
  --reveal-delay: 0.12s;
}

@media (max-width: 639px) {
  .reveal {
    filter: blur(0);
  }

  .reveal.is-visible {
    filter: none;
  }
}

/* Narrow phones / cover displays — keep island from feeling cramped */
@media (max-width: 380px) {
  .site-header--dh .site-header__inner {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .site-header--dh.is-scrolled .site-header__inner {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    gap: 0.35rem;
  }
}

/* Touch devices: slightly lighter backdrop blur (smoother on foldables / low-power GPUs) */
@media (max-width: 959px) and (hover: none) and (pointer: coarse) {
  .site-header--dh .site-nav {
    backdrop-filter: blur(14px) saturate(1.05);
    -webkit-backdrop-filter: blur(14px) saturate(1.05);
  }

  .site-header--dh .site-header__inner {
    backdrop-filter: blur(16px) saturate(1.05);
    -webkit-backdrop-filter: blur(16px) saturate(1.05);
  }

  .site-header--dh.is-scrolled .site-header__inner {
    backdrop-filter: blur(22px) saturate(1.08);
    -webkit-backdrop-filter: blur(22px) saturate(1.08);
  }
}

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

  .site-header--dh .site-header__inner {
    animation: none !important;
  }

  .site-header--dh .site-header__inner,
  .site-header--dh.is-scrolled .site-header__inner {
    transform: none !important;
  }

  .site-header--dh:not(.is-scrolled) .site-nav,
  .site-header--dh.is-scrolled .site-nav {
    transform: none !important;
    filter: none !important;
  }

  .site-header--dh.is-scrolled .site-nav__list li .site-nav__link {
    transition-delay: 0s !important;
  }

  .site-header--dh:not(.is-scrolled) .nav-toggle,
  .site-header--dh.is-scrolled .nav-toggle {
    transform: none !important;
  }

  .scroll-progress {
    opacity: 0 !important;
    visibility: hidden;
  }

  .section--hero {
    --hero-scroll: 0 !important;
  }

  .section--hero::before {
    animation: none !important;
  }

  .hero__below {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body.is-loaded .hero__below {
    animation: none !important;
  }

  .hero__parallax {
    transform: none !important;
  }

  body.is-loaded .hero__enter {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__figure {
    transform: none !important;
  }

  .hero__frame {
    transform: none !important;
  }

  .hero__img {
    transform: none !important;
    filter: grayscale(1) contrast(1.07) !important;
  }

  .hero__stack--rear {
    transform: translate3d(-50%, -50%, 0) !important;
    opacity: 1 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
  }

  .hero__stack--front {
    transform: translate3d(-50%, -50%, 0) !important;
    opacity: 1 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
  }

  .hero__stack-line--rear,
  .hero__stack-line--front {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }

  .hero__stack--rear .hero__stack-line--rear:nth-child(1) {
    color: #fafafa !important;
  }

  .hero__stack--rear .hero__stack-line--rear:nth-child(2) {
    color: #a3a3a3 !important;
  }

  .hero__stack--front .hero__stack-line--front {
    color: rgba(250, 250, 250, 0.95) !important;
    text-shadow: none !important;
  }

  .hero__stack--front .hero__stack-line--front:nth-child(2) {
    color: rgba(212, 212, 212, 0.92) !important;
    text-shadow: none !important;
  }

  [data-dh-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__meta-dot {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .skill-card:hover {
    transform: none;
  }

  .service-card:hover,
  .project-card:hover,
  .cert-thumb:hover,
  .stat-block:hover,
  .academy-card:hover,
  .cv-preview-card:hover,
  .contact-strip__channel:hover {
    transform: none;
  }

  .project-card:hover .project-card__logo {
    transform: none;
  }

  .project-card::before,
  .academy-card::before {
    transform: scaleY(1) !important;
  }

  .btn--primary::before {
    display: none;
  }

  .btn--primary:hover,
  .btn--ghost:hover {
    transform: none;
  }

  .site-nav__link::after {
    transition: none !important;
  }
}

  
