/* ============================================
   TOKENS
============================================ */
:root {
  --bg: #090c10;
  --bg-elev: #10151d;
  --bg-elev-2: #171e28;
  --text: #edeff3;
  --text-muted: #8e9aaa;
  --text-faint: #59626f;
  --accent: #00d6a0;
  --accent-soft: rgba(0, 214, 160, 0.12);
  --accent-2: #ff9f45;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);

  --font-display: "Space Grotesk", "Arial", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1120px;
  --gap: clamp(1.5rem, 4vw, 3rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

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

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

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

::selection {
  background: var(--accent);
  color: #04140f;
}

/* subtle film-grain overlay for texture, apple-esque premium feel */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================
   NAV
============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 12, 16, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(9, 12, 16, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-mark span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); }

.nav-cta {
  font-size: 0.88rem;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-cta:hover, .nav-cta:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid rgba(0, 214, 160, 0.35);
  background: var(--accent-soft);
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

a.availability-pill:hover,
a.availability-pill:focus-visible {
  background: rgba(0, 214, 160, 0.2);
  border-color: rgba(0, 214, 160, 0.55);
}

.availability-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 214, 160, 0.55);
  animation: pulseDot 2s ease-out infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(0, 214, 160, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(0, 214, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 214, 160, 0); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav .availability-pill { display: none; }
}

#open-to-work {
  scroll-margin-top: 100px;
}

/* focus visibility across the page */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   HERO (Apple-style layered stage)
============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 28px 48px;
  overflow: visible;
  box-sizing: border-box;
}

#mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.22;
}

.hero-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-height: 0;
  gap: 20px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 760px;
  margin: 16px auto 0;
  flex-shrink: 0;
  padding: 8px 12px 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 7vw, 4.75rem); /* ~46–76px */
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
  /* preserve former eyebrow height + gap under nav */
  margin-top: calc(clamp(0.875rem, 1.2vw, 1rem) + 10px);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.15s forwards;
}

.hero-tagline {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.4vw, 2.125rem); /* ~26–34px */
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.28s forwards;
}

.hero-sub {
  margin: 16px auto 0;
  max-width: 560px;
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); /* 17–19px */
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.6;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.4s forwards;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.52s forwards;
}

.hero-actions .btn {
  padding: 13px 26px;
  font-size: 0.95rem;
}

/* Full-hero DEVOPS watermark (size/font match reference; pulse kept) */
.hero-wordmarks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.hero-wordmark {
  position: absolute;
  font-family: var(--font-body);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.82;
  user-select: none;
  background: linear-gradient(
    115deg,
    #5a6570 0%,
    #d7dde5 22%,
    #7a8794 38%,
    #eef2f6 52%,
    #6b7785 68%,
    #c5ced8 82%,
    #4e5966 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
  animation: wordPulse 3.6s ease-in-out infinite;
  will-change: opacity, filter;
}

.hero-wordmark--main {
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  /* ~85–90% viewport width, cropped by hero edges like 6.jpg */
  font-size: min(24vw, 42vh);
  white-space: nowrap;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

/* Layered visual: infinity symbol + floating cards */
.hero-visual {
  position: relative;
  z-index: 1;
  margin: 8px auto 0;
  width: min(1100px, 100%);
  flex: 1 1 auto;
  min-height: 320px;
  display: grid;
  place-items: center;
  perspective: 1200px;
  opacity: 0;
  animation: rise 1s var(--ease) 0.35s forwards;
  will-change: transform;
  overflow: visible;
  padding: 24px 32px 28px;
  box-sizing: border-box;
}

@keyframes wordPulse {
  0%, 100% {
    opacity: 0.22;
    filter: brightness(0.65) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
  }
  50% {
    opacity: 0.48;
    filter: brightness(1.05) drop-shadow(0 14px 30px rgba(0, 214, 160, 0.1));
  }
}

.hero-product {
  position: relative;
  z-index: 2;
  width: min(640px, 84vw);
  transform-style: preserve-3d;
  will-change: transform;
  animation: heroFloat 5.5s ease-in-out infinite;
}

.hero-product-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  display: block;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.4));
}

.hero-float-card {
  position: absolute;
  z-index: 3;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: rgba(10, 14, 18, 0.94);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
  opacity: 0.94;
}

.hero-float-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.95;
}

.hero-float-card--arch {
  width: min(176px, 28vw);
  height: min(108px, 17vw);
  left: -8%;
  bottom: 8%;
  --r: -7deg;
  transform: rotate(var(--r));
  animation: heroFloatSoft 6.5s ease-in-out infinite;
}

.hero-float-card--stack {
  width: min(164px, 26vw);
  height: min(102px, 16vw);
  right: -6%;
  top: 6%;
  --r: 6deg;
  transform: rotate(var(--r));
  animation: heroFloatSoft 7.2s ease-in-out infinite reverse;
}

.hero-float-card--terraform {
  width: min(168px, 27vw);
  height: min(104px, 16.5vw);
  left: -6%;
  top: 4%;
  --r: 5deg;
  transform: rotate(var(--r));
  animation: heroFloatSoft 6.8s ease-in-out infinite;
  animation-delay: 0.4s;
}

.hero-float-card--k8s {
  width: min(160px, 25vw);
  height: min(100px, 16vw);
  right: -8%;
  bottom: 6%;
  --r: -6deg;
  transform: rotate(var(--r));
  animation: heroFloatSoft 7.6s ease-in-out infinite reverse;
  animation-delay: 0.7s;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes heroFloatSoft {
  0%, 100% { transform: translateY(0) rotate(var(--r, -8deg)); }
  50% { transform: translateY(-8px) rotate(var(--r, -8deg)); }
}

.hero-below {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  margin: 8px auto 0;
  flex-shrink: 0;
  padding: 0 4px 8px;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.7s forwards;
}

.hero-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hero-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 29, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}

.hero-link-card:hover,
.hero-link-card:focus-visible {
  border-color: rgba(0, 214, 160, 0.4);
  background: rgba(23, 30, 40, 0.9);
  transform: translateY(-2px);
}

.hero-link-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(0, 214, 160, 0.22);
}

.hero-link-icon svg {
  width: 18px;
  height: 18px;
}

.hero-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hero-link-label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.hero-link-value {
  font-size: 0.72rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 860px) {
  .hero-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-visual { padding: 20px 20px 24px; }
  .hero-product { width: min(540px, 88vw); }
  .hero-float-card--arch { left: -4%; bottom: 6%; }
  .hero-float-card--stack { right: -2%; top: 4%; }
  .hero-float-card--terraform { left: -2%; top: 2%; }
  .hero-float-card--k8s { right: -4%; bottom: 4%; }
}

@media (max-width: 560px) {
  .hero { padding: 96px 16px 28px; }
  .hero-links { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-link-card { padding: 12px 14px; }
  .hero-visual { padding: 16px 12px 20px; }
  .hero-product { width: min(400px, 92vw); }
  .hero-float-card--arch {
    width: min(120px, 30vw);
    height: min(74px, 18vw);
    left: 0;
    bottom: 4%;
  }
  .hero-float-card--stack {
    width: min(112px, 28vw);
    height: min(70px, 17vw);
    right: 0;
    top: 2%;
  }
  .hero-float-card--terraform,
  .hero-float-card--k8s { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-product,
  .hero-float-card--arch,
  .hero-float-card--stack,
  .hero-wordmark {
    animation: none !important;
  }
  .hero-wordmark { opacity: 0.4; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #04140f;
}

.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  background: #1fe8b3;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 32px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.hero-scroll span {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--text-faint), transparent);
  position: relative;
  overflow: hidden;
}

.hero-scroll span::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollLine 2.2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

@media (max-width: 720px) {
  .hero-scroll { display: none; }
}

/* ============================================
   HERO MARQUEE (tool logos)
============================================ */
.marquee {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  max-width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tool-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.92rem;
  white-space: nowrap;
}

.tool-badge img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  filter: saturate(1.05);
}

@media (max-width: 720px) {
  .marquee { margin-top: 44px; }
}

/* ============================================
   WRITING / BLOG SERIES (manual slider)
============================================ */
.writing {
  position: relative;
  padding: 72px 0 80px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}

.writing-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 32px;
  letter-spacing: 0.02em;
}

.writing-slider {
  position: relative;
  max-width: none;
  margin: 0 auto;
  padding: 0 52px;
  width: 100%;
}

.writing-viewport {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.writing-viewport::-webkit-scrollbar {
  display: none;
}

.writing-track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 4px calc((100vw - min(1120px, calc(100vw - 104px))) / 2) 12px;
}

.writing-card {
  flex: 0 0 auto;
  width: min(1120px, calc(100vw - 104px));
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  min-height: 340px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(9, 12, 16, 0.65);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.writing-card:hover,
.writing-card:focus-visible {
  border-color: rgba(0, 214, 160, 0.4);
  transform: translateY(-2px);
}

.writing-card-media {
  position: relative;
  min-height: 300px;
  background: #070a0e;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.writing-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.writing-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 36px 32px;
}

.writing-card-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-family: var(--font-display);
}

.writing-card-body h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: var(--text);
  line-height: 1.25;
}

.writing-card-body p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.writing-card-cta {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
}

.writing-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(16, 21, 29, 0.95);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.writing-nav svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.writing-nav:hover,
.writing-nav:focus-visible {
  border-color: rgba(0, 214, 160, 0.45);
  color: var(--accent);
  background: rgba(9, 12, 16, 0.98);
}

.writing-nav--prev { left: 8px; }
.writing-nav--next { right: 8px; }

@media (max-width: 860px) {
  .writing-slider { padding: 0 44px; }
  .writing-track {
    padding-left: 8px;
    padding-right: 8px;
  }
  .writing-card {
    width: min(860px, calc(100vw - 88px));
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .writing-card-media {
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }
  .writing-card-body { padding: 24px 22px 28px; }
}

@media (max-width: 560px) {
  .writing { padding: 56px 0 64px; }
  .writing-slider { padding: 0 40px; }
  .writing-card { width: calc(100vw - 80px); }
  .writing-nav { width: 38px; height: 38px; }
}

/* ============================================
   SECTION SHELL
============================================ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 140px 32px;
}

.section-head {
  max-width: 100%;
  margin-bottom: 64px;
}

.section-head h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  margin-bottom: 16px;
  white-space: nowrap;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
}

@media (max-width: 900px) {
  .section-head h2 { white-space: normal; }
}

/* scroll reveal (JS toggles .in) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   ABOUT
============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--gap);
  align-items: start;
}

.about-photo img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  filter: grayscale(15%);
}

.about-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 24px;
  max-width: 560px;
}

.about-copy p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 620px;
  margin-bottom: 18px;
}

.stat-row {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-unit {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
}

.stat p {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 16ch;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 220px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   SKILLS
============================================ */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.skill-card {
  background: var(--bg-elev);
  padding: 32px;
  transition: background 0.3s var(--ease);
}

.skill-card:hover { background: var(--bg-elev-2); }

.skill-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.skill-icon svg {
  width: 20px;
  height: 20px;
}

.skill-card h3 {
  font-size: 1.05rem;
  margin-bottom: 18px;
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.in .chips span {
  opacity: 1;
  transform: translateY(0);
}

.chips span img {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.chips--dark span {
  background: rgba(0, 0, 0, 0.22);
}

@media (max-width: 900px) {
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .skill-grid { grid-template-columns: 1fr; }
}

/* ============================================
   EXPERIENCE / TIMELINE
============================================ */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.timeline::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  width: 2px;
  height: var(--tl-progress, 0%);
  background: var(--accent);
  transition: height 0.15s linear;
}

.tl-item {
  position: relative;
  padding-bottom: 64px;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-marker {
  position: absolute;
  left: -37px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.tl-date {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.tl-body h3 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.tl-org {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.tl-body ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tl-body li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.96rem;
  max-width: 720px;
}

.tl-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 1px;
  background: var(--text-faint);
}

/* ============================================
   PROJECTS
============================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.project-card:hover,
.project-card.is-diagram-open {
  transform: translateY(-4px);
  border-color: rgba(0, 214, 160, 0.35);
}

.project-card.has-diagram {
  cursor: pointer;
}

.project-card.has-diagram:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.project-card--wide {
  grid-column: span 2;
}

.project-tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--accent-2);
  margin-bottom: 16px;
  font-family: var(--font-display);
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.project-card > p:not(.project-diagram-hint) {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 16px;
  max-width: 620px;
}

.project-outcomes {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-outcomes li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
}

.project-outcomes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

.project-diagram-hint {
  margin: 18px 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.project-card:hover .project-diagram-hint,
.project-card.is-diagram-open .project-diagram-hint {
  color: var(--accent);
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.project-diagram {
  display: grid;
  grid-template-rows: 0fr;
  margin: 0;
  opacity: 0;
  transition: grid-template-rows 0.45s var(--ease), opacity 0.35s var(--ease), margin 0.35s var(--ease);
}

.project-diagram > * {
  min-height: 0;
  overflow: hidden;
}

.project-card:hover .project-diagram,
.project-card.is-diagram-open .project-diagram,
.project-card:focus-within .project-diagram {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 22px;
}

.project-diagram img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

@media (hover: none) {
  .project-card:hover .project-diagram,
  .project-card:focus-within .project-diagram {
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
  }

  .project-card.is-diagram-open .project-diagram {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 22px;
  }

  .project-card:hover .project-diagram-hint {
    color: var(--text-faint);
    opacity: 1;
    height: auto;
    margin: 18px 0 0;
    overflow: visible;
  }

  .project-card.is-diagram-open .project-diagram-hint {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
  }
}

@media (max-width: 780px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card--wide { grid-column: span 1; }
}

/* ============================================
   CREDENTIALS
============================================ */
.credentials {
  padding-top: 0;
  padding-bottom: 0;
}

.cred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 80px 0;
}

.cred-block h2 {
  font-size: 1.5rem;
  margin-bottom: 28px;
}

.cred-list { display: flex; flex-direction: column; gap: 18px; }

.cred-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 16px;
}

.cred-list li:last-child { border-bottom: none; }

.cred-list span { font-size: 1rem; color: var(--text); }
.cred-list em {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--text-faint);
}

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

/* ============================================
   CONTACT
============================================ */
.contact {
  text-align: left;
}

.contact h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  max-width: 100%;
  margin-bottom: 20px;
  white-space: nowrap;
}

.contact > p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .contact h2 { white-space: normal; }
}

.availability-card {
  position: relative;
  margin-bottom: 40px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elev);
  overflow: hidden;
}

.availability-banner-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.availability-banner-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(16, 21, 29, 0.92) 0%,
    rgba(16, 21, 29, 0.78) 45%,
    rgba(16, 21, 29, 0.88) 100%
  );
}

.availability-banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.22;
  filter: brightness(0.7) saturate(0.85);
}

.availability-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.availability-card-top p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.availability-grid {
  position: relative;
  z-index: 1;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 24px;
}

.availability-grid dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.availability-grid dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.contact-link {
  background: var(--bg-elev);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.3s var(--ease);
}

.contact-link:hover, .contact-link:focus-visible {
  background: var(--bg-elev-2);
}

.contact-label {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-family: var(--font-display);
}

.contact-value {
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-word;
}

@media (max-width: 1100px) {
  .contact-row { grid-template-columns: repeat(3, 1fr); }
  .availability-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .contact-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .contact-row { grid-template-columns: 1fr; }
  .availability-grid { grid-template-columns: 1fr; }
  .availability-card { padding: 22px; }
}

/* ============================================
   FOOTER
============================================ */
.footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 32px 60px;
  display: flex;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 520px) {
  .footer { flex-direction: column; gap: 8px; }
}
