/* ==========================================================================
   majid.sh — main stylesheet
   --------------------------------------------------------------------------
   1.  Design tokens  ← colors, type scale and spacing live here
   2.  Font
   3.  Base
   4.  Layout & shared pieces (container, section titles, buttons, icons)
   5.  Header
     6. Hero (6b: delivery flow animation)
   7.  Work (projects)
   8.  Skills
     9. Contact (9b: live architecture animation)
   10. Footer
   11. Intro animation
   12. Responsive
   ========================================================================== */


/* 1. Design tokens
   ========================================================================== */
:root {
  /* Colors */
  --navy: #0b2653;          /* brand navy: hero, contact, header */
  --navy-deep: #081d40;     /* footer, pressed states */
  --green: #00c881;         /* brand green: buttons and accents on navy */
  --green-ink: #00875a;     /* green that is readable on light backgrounds */
  --paper: #f4f6f9;         /* light section background */
  --white: #ffffff;
  --ink: #0b2653;           /* headings on light backgrounds */
  --steel: #4f6690;         /* body text on light backgrounds */
  --mist: #a9b8d3;          /* secondary text on navy */
  --line: #dfe5ee;          /* borders on light backgrounds */
  --line-dark: rgba(255, 255, 255, .16); /* borders on navy */
  --danger: #ff6b81;        /* blocked / malicious traffic in the hero diagram */

  /* Typography: Geist for text & headings, Geist Mono for small UI labels */
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --tight: -.045em;         /* letter-spacing for large headings */

  --text-xs: .8125rem;      /* 13px, mono labels */
  --text-sm: .9375rem;      /* 15px */
  --text-base: 1.0625rem;   /* 17px */
  --text-lg: 1.25rem;       /* 20px */
  --text-xl: clamp(1.25rem, 1rem + .8vw, 1.5rem);
  --text-2xl: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  --text-display: clamp(2.75rem, .5rem + 7.2vw, 7.5rem);

  /* Spacing & layout */
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-space: clamp(88px, 6rem + 4vw, 176px);
  --radius-sm: 8px;
  --radius-lg: 14px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}


/* 2. Fonts (self-hosted variable fonts, weight 100–900, OFL licence)
   ========================================================================== */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
}

/* Small UI text set in mono (nav, labels, links, lists) */
.mono,
.site-nav a,
.btn,
.hero__hello,
.status,
.social-links a,
.project__tagline,
.project__link,
.site-footer {
  font-family: var(--font-mono);
  letter-spacing: 0;
}


/* 3. Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* keeps anchored sections clear of the sticky header */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--steel);
  background: var(--navy); /* sits behind the translucent sticky header */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--navy);
  background: var(--green);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}


/* 4. Layout & shared pieces
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-title {
  max-width: 20ch;
  margin-bottom: clamp(56px, 6vw, 96px);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--ink);
  text-wrap: balance;
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}

.btn .icon {
  font-size: 1.15em;
}

.btn--primary {
  color: var(--navy);
  background: var(--green);
}

.btn--primary:hover {
  background: #3ddca2;
}

.btn--ghost {
  color: var(--white);
  border-color: var(--line-dark);
}

.btn--ghost:hover {
  border-color: var(--white);
}

.btn--small {
  padding: 10px 16px;
  font-size: var(--text-xs);
}

.btn--large {
  padding: 18px 28px;
  font-size: var(--text-base);
}


/* 5. Header (sticky)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 38, 83, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.site-logo {
  margin-right: auto;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--white);
  text-decoration: none;
}

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

.site-nav a {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--mist);
  text-decoration: none;
  transition: color .2s;
}

.site-nav a:hover {
  color: var(--white);
}


/* 6. Hero
   ========================================================================== */
.hero {
  color: var(--mist);
  background: var(--navy);
  overflow: hidden;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 69px); /* screen height minus the header (68px + 1px border) */
  padding-top: clamp(40px, 5vw, 80px);
}

.hero__hello {
  margin-bottom: clamp(20px, 2.5vw, 36px);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--green);
}

/* The headline is the signature element: very large, tightly tracked */
.hero__title {
  font-size: var(--text-display);
  font-weight: 700;
  line-height: .95;
  letter-spacing: var(--tight);
  color: var(--white);
}

.hero__line {
  display: block;
}

.hero__body {
  margin-top: 20px; /* space between the headline and the lead text */
  margin-bottom: 40px;
}

.hero__lead {
  max-width: 34ch;
  font-size: var(--text-xl);
  line-height: 1.5;
  color: var(--mist);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* Lead text full width, buttons below it */
.hero__text .hero__lead {
  max-width: none;
}


/* 6b. Hero delivery flow: Plan → Build → Ship → Run → Protect → Observe
   main.js adds .is-playing to .flow, then .is-on / .is-current to each step.
   Each step's small animation (fa-…) plays while that step .is-current.
   -------------------------------------------------------------------------- */
.flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 4.5vw, 64px);
  margin-bottom: clamp(48px, 5vw, 72px); /* space above the "Currently …" status bar */
}

.flow__step {
  padding: 20px 18px 22px;
  border-top: 3px solid var(--green);
  border-radius: 2px 2px 10px 10px;
  background: rgba(255, 255, 255, .03);
  transition: opacity .5s, background-color .5s, border-color .5s;
}

.flow.is-playing .flow__step:not(.is-on) {
  opacity: .4;
  border-top-color: var(--line-dark);
}

.flow__step.is-current {
  background: rgba(0, 200, 129, .08);
}

.flow__art {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 18px;
  overflow: visible;
}

.flow__title {
  font-size: var(--text-lg);
  font-weight: 650;
  letter-spacing: -.02em;
  color: var(--white);
}

.flow__text {
  margin-top: 8px;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.flow__tools {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--green);
}

/* Shared pieces of the small illustrations */
.flow__art text {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--mist);
  text-anchor: middle;
}

.flow__art .fa-label {
  text-anchor: start;
}

.flow__art .fa-mid {
  text-anchor: middle;
}

.flow__art .fa-iac {
  font-size: 10px;
  fill: var(--green);
}

.fa-note,
.fa-track,
.fa-node rect,
.fa-node circle,
.fa-task rect,
.fa-box rect {
  fill: rgba(255, 255, 255, .06);
  stroke: var(--line-dark);
}

.fa-box rect,
.fa-task rect {
  stroke: var(--green);
}

.fa-arrow,
.fa-link,
.fa-check,
.fa-shield,
.fa-chart {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fa-rail,
.fa-grid {
  fill: none;
  stroke: var(--line-dark);
  stroke-width: 2;
  stroke-dasharray: 2 6;
}

.fa-fill,
.fa-span,
.fa-packet,
.fa-dot--ok {
  fill: var(--green);
}

.fa-dot--bad {
  fill: var(--danger);
}

.fa-stage {
  fill: var(--green);
  stroke: var(--green);
  stroke-width: 2;
}

.fa-v1 {
  opacity: 0;
}

.fa-v2 {
  fill: var(--white);
}

.fa-dot,
.fa-packet {
  opacity: 0;
}

/* Animations: only while the step is running (.is-current) */
.fa-note,
.fa-box,
.fa-fill,
.fa-check,
.fa-span,
.fa-task,
.fa-stage,
.fa-dot {
  transform-box: fill-box;
}

.is-current .fa-note {
  animation: fa-in .5s var(--ease) both;
  animation-delay: var(--d);
}

.is-current .fa-arrow {
  animation: fa-in .4s var(--ease) .6s both;
}

.is-current .fa-box {
  transform-origin: center;
  animation: fa-pop .45s var(--ease) both;
  animation-delay: var(--d);
}

.is-current .fa-link {
  stroke-dasharray: 100;
  animation: fa-draw .6s ease-out 1.4s both;
}

.is-current .fa-build g .fa-fill {
  transform-origin: left;
  animation: fa-grow .6s ease-out both;
}

.is-current .fa-build g .fa-check {
  animation: fa-in .3s ease-out both;
}

.is-current .fa-build g:nth-of-type(1) .fa-fill {
  animation-delay: 0s;
}

.is-current .fa-build g:nth-of-type(1) .fa-check {
  animation-delay: .6s;
}

.is-current .fa-build g:nth-of-type(2) .fa-fill {
  animation-delay: .6s;
}

.is-current .fa-build g:nth-of-type(2) .fa-check {
  animation-delay: 1.2s;
}

.is-current .fa-build g:nth-of-type(3) .fa-fill {
  animation-delay: 1.2s;
}

.is-current .fa-build g:nth-of-type(3) .fa-check {
  animation-delay: 1.8s;
}

.is-current .fa-stage {
  animation: fa-light .4s ease-out both;
  animation-delay: var(--d);
}

.is-current .fa-packet {
  animation: fa-travel 1.6s ease-in-out .1s both;
}

.is-current .fa-iac {
  animation: fa-in .4s ease-out 1.7s both;
}

.is-current .fa-task .fa-v1 {
  animation: fa-out .35s ease-out both;
  animation-delay: var(--d);
  opacity: 1;
}

.is-current .fa-task .fa-v2 {
  animation: fa-in .35s ease-out both;
  animation-delay: var(--d);
}

.is-current .fa-task rect {
  animation: fa-swap .5s ease-out both;
  animation-delay: var(--d);
}

.is-current .fa-task--new {
  transform-origin: center;
  animation: fa-pop .45s var(--ease) both;
  animation-delay: var(--d);
}

.is-current .fa-dot--ok {
  animation: fa-pass 1.8s linear infinite;
  animation-delay: var(--d);
}

.is-current .fa-dot--bad {
  animation: fa-block 1.8s linear infinite;
  animation-delay: var(--d);
}

.is-current .fa-chart {
  stroke-dasharray: 100;
  animation: fa-draw 1.2s ease-out both;
}

.is-current .fa-span {
  transform-origin: left;
  animation: fa-grow .5s ease-out both;
  animation-delay: var(--d);
}

@keyframes fa-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fa-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fa-pop {
  from {
    opacity: 0;
    transform: scale(.6);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fa-grow {
  from {
    transform: scaleX(0);
  }

  to {
    transform: none;
  }
}

@keyframes fa-draw {
  from {
    stroke-dashoffset: 100;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fa-light {
  from {
    fill: var(--navy);
    stroke: var(--mist);
  }

  to {
    fill: var(--green);
    stroke: var(--green);
  }
}

@keyframes fa-swap {
  from {
    stroke: var(--mist);
  }

  to {
    stroke: var(--green);
  }
}

@keyframes fa-travel {
  0% {
    opacity: 1;
    transform: translateX(0);
  }

  90% {
    opacity: 1;
    transform: translateX(140px);
  }

  100% {
    opacity: 0;
    transform: translateX(140px);
  }
}
@keyframes fa-pass {
  0% {
    opacity: 0;
    transform: translateX(0);
  }

  10% {
    opacity: 1;
  }

  85% {
    opacity: 1;
    transform: translateX(118px);
  }

  100% {
    opacity: 0;
    transform: translateX(118px);
  }
}
@keyframes fa-block {
  0% {
    opacity: 0;
    transform: translateX(0);
  }

  10% {
    opacity: 1;
  }

  40% {
    opacity: 1;
    transform: translateX(44px);
  }

  55% {
    opacity: 0;
    transform: translateX(44px);
  }

  100% {
    opacity: 0;
    transform: translateX(44px);
  }
}


/* Status bar along the bottom of the hero */
.hero__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
  margin-top: auto;
  padding-block: 28px;
  border-top: 1px solid var(--line-dark);
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
  color: var(--white);
}

.status a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.status a:hover {
  text-decoration-thickness: 2px;
}

/* Small "online" dot, like a service status indicator */
.status__dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  from { transform: scale(1); opacity: .6; }
  to   { transform: scale(3); opacity: 0; }
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--mist);
  text-decoration: none;
  transition: color .2s;
}

.social-links a:hover {
  color: var(--white);
}

.social-links .icon {
  font-size: 1.15em;
}


/* 7. Work (projects)
   ========================================================================== */
.work {
  padding-block: var(--section-space);
  background: var(--white);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.project + .project {
  margin-top: clamp(96px, 10vw, 160px);
}

/* Every second project: image on the left */
.project:nth-of-type(even) .project__body {
  order: 2;
}

.project__name {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tight);
  color: var(--ink);
}

.project__tagline {
  margin-top: 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.5;
  color: var(--green-ink);
}

.project__summary {
  max-width: 46ch;
  margin-top: 24px;
}

/* What Majid did on the project; the green rule marks it as his part */
.project__role {
  max-width: 46ch;
  margin-top: 24px;
  padding-left: 20px;
  border-left: 3px solid var(--green);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}

.project__link {
  display: inline-block;
  margin-top: 32px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-decoration-color .2s, color .2s;
}

.project__link:hover {
  color: var(--green-ink);
}

.project__shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -40px rgba(11, 38, 83, .45);
}

/* Impact panel (used instead of a screenshot for the current role) */
.project__impact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 32px;
  padding: clamp(28px, 4vw, 56px);
  color: var(--mist);
  background: var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -40px rgba(11, 38, 83, .45);
}

.impact {
  padding-top: 20px;
  border-top: 2px solid var(--green);
}

.impact__value {
  font-size: clamp(3rem, 2rem + 3.5vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tight);
  color: var(--white);
}

.impact__label {
  max-width: 28ch;
  margin-top: 16px;
  font-size: var(--text-base);
  line-height: 1.5;
}

.impact__tools {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--mist);
}

.project__shot img {
  width: 100%;
  transition: transform .6s var(--ease);
}

.project__shot:hover img {
  transform: scale(1.02);
}


/* 8. Skills: the stack, layer by layer
   A green rail with a node per layer runs down the left.
   ========================================================================== */
.skills {
  padding-block: var(--section-space);
  background: var(--paper);
}

.skills__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 88px);
}

.skills__header .section-title {
  margin-bottom: 0;
}

.skills__intro {
  max-width: 46ch;
  font-size: var(--text-lg);
  line-height: 1.5;
}

.stack {
  position: relative;
  counter-reset: layer;
}

/* The rail */
.stack::before {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: 7px;
  width: 2px;
  background: linear-gradient(var(--green), var(--green-ink));
  opacity: .5;
}

.layer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 17rem);
  gap: 16px 48px;
  align-items: start;
  padding: 28px 0 28px 48px;
  border-top: 1px solid var(--line);
}

.layer:last-child {
  border-bottom: 1px solid var(--line);
}

/* The node on the rail */
.layer::before {
  content: "";
  position: absolute;
  top: 33px;
  left: 0;
  width: 16px;
  height: 16px;
  border: 2px solid var(--green-ink);
  border-radius: 50%;
  background: var(--paper);
  transition: background-color .2s;
}

.layer:hover::before {
  background: var(--green);
}

.layer__name {
  font-size: var(--text-xl);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--ink);
}

.layer__desc {
  margin-top: 6px;
  font-size: var(--text-sm);
}

.layer__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.layer__tools li {
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.layer__proof {
  font-size: var(--text-sm);
  line-height: 1.5;
}

.layer__proof strong {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tight);
  color: var(--green-ink);
}

.skills__extra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 64px;
  margin-top: 48px;
  padding-left: 48px;
}

.skills__extra p {
  max-width: 52ch;
  font-size: var(--text-sm);
}

.skills__extra-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 650;
  color: var(--ink);
}


/* 9. Contact
   ========================================================================== */
.contact {
  padding-block: var(--section-space);
  color: var(--mist);
  background: var(--navy);
}

.contact__title {
  max-width: 14ch;
  font-size: clamp(2.4rem, 1rem + 4.4vw, 5rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: var(--tight);
  color: var(--white);
  text-wrap: balance;
}

.contact__text {
  margin-top: 28px;
  font-size: var(--text-xl);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: 44px;
}

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 56px clamp(40px, 6vw, 96px);
  align-items: center;
}

.contact__media .diagram {
  display: block;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  overflow: visible;
  }
  
  /* 9b. Contact animated diagram (live architecture)
     The finished diagram is the default. main.js adds .is-playing, then turns
     each [data-step] on (.is-on) in order; see DIAGRAMS in main.js.
     .is-current marks the step that is running right now.
     -------------------------------------------------------------------------- */
  .diagram {
    --dg-card: #10306a;
    --dg-dim: rgba(169, 184, 211, .35);
    --dg-time: .45s;
  }
  
  .dg-card>rect {
    fill: var(--dg-card);
    stroke: var(--line-dark);
  }
  
  .dg-dot {
    fill: var(--dg-dim);
  }
  
  .dg-text {
    font-family: var(--font-mono);
    font-size: 15px;
    fill: var(--mist);
  }
  
  .dg-text--white {
    fill: var(--white);
  }
  
  .dg-text--small {
    font-size: 13px;
  }
  
  .dg-region {
    fill: rgba(255, 255, 255, .03);
    stroke: var(--dg-dim);
    stroke-dasharray: 6 6;
  }
  
  .dg-region-label {
    fill: var(--white);
  }
  
  /* Hero: live architecture */
  .dg-text--tiny {
    font-size: 11px;
  }
  
  .dg-node>rect {
    fill: var(--dg-card);
    stroke: var(--line-dark);
    transition: stroke var(--dg-time);
  }
  
  .dg-wire {
    fill: none;
    stroke: var(--line-dark);
    stroke-width: 2;
    stroke-dasharray: 2 6;
  }
  
  .dg-pk {
    fill: var(--green);
  }
  
  .dg-pk--bad {
    fill: var(--danger);
  }
  
  .dg-live,
  .dg-ok {
    fill: var(--green);
  }
  
  .dg-live {
    animation: dg-blink 1.6s ease-in-out infinite;
  }
  
  @keyframes dg-blink {
    50% {
      opacity: .35;
    }
  }
  
  .dg-shield {
    fill: none;
    stroke: var(--green);
    stroke-width: 2;
    stroke-linejoin: round;
    transition: stroke var(--dg-time);
  }
  
  .dg-waf-note {
    transition: fill var(--dg-time);
  }
  
  /* WAF while it is blocking the attack */
  .dg-waf.is-current>rect,
  .dg-waf.is-current .dg-shield {
    stroke: var(--danger);
  }
  
  .dg-waf.is-current .dg-waf-note {
    fill: var(--danger);
  }
  
  .dg-attack {
    opacity: 0;
    transition: opacity .3s;
  }
  
  .dg-attack.is-current {
    opacity: 1;
  }
  
  /* Pods: green outline = running the new version (v2) */
  .dg-hpod {
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity .5s var(--ease), transform .5s var(--ease);
  }
  
  .dg-hpod rect {
    fill: var(--dg-card);
    stroke: var(--green);
    stroke-width: 1.5;
    transition: stroke var(--dg-time), fill var(--dg-time);
  }
  
  .dg-hpod.is-current rect {
    fill: rgba(0, 200, 129, .16);
  }
  
  .dg-ver {
    fill: var(--white);
  }
  
  .dg-cube {
    fill: none;
    stroke: var(--green);
    stroke-width: 2;
    stroke-linejoin: round;
  }
  
  .dg-spark {
    fill: none;
    stroke: var(--green);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* "Off" states, only while an animation is playing */
.is-playing .dg-hpod:not(.is-on) rect {
  stroke: var(--dg-dim);
}

.is-playing .dg-hpod--extra:not(.is-on) {
  opacity: 0;
  transform: scale(.8);
}


/* 10. Footer
   ========================================================================== */
.site-footer {
  font-size: var(--text-xs);
  color: var(--mist);
  background: var(--navy-deep);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
}

.site-footer__social {
  display: flex;
  gap: 20px;
  font-size: 20px;
}

.site-footer__social a {
  display: flex;
  color: var(--mist);
  transition: color .2s;
}

.site-footer__social a:hover {
  color: var(--green);
}


/* 11. Intro animation
   The hero pieces (class "intro") rise in one after another on page load.
   This is the only automatic animation on the page.
   ========================================================================== */
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.intro {
  animation: rise .9s var(--ease) both;
}

.hero__hello.intro            { animation-delay: .05s; }
.hero__line.intro:nth-child(1) { animation-delay: .15s; }
.hero__line.intro:nth-child(2) { animation-delay: .27s; }
.hero__lead.intro             { animation-delay: .45s; }
.hero__actions.intro          { animation-delay: .55s; }
.flow.intro {
  animation-delay: .6s;
}
.hero__status.intro           { animation-delay: .75s; }

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

  .intro,
  .status__dot::after,
    .dg-live,
    .flow__art * {
      animation: none !important;
  }

  .project__shot img {
    transition: none;
  }
}


/* 12. Responsive
   ========================================================================== */

/* Laptops and desktops: header + hero fit in one screen.
   Sizes below scale with the screen height (vh) so shorter screens get a
   slightly smaller headline and tighter spacing instead of a scroll. */
@media (min-width: 1025px) {
  .hero__inner {
    padding-top: clamp(16px, 3.2vh, 56px);
  }

  .hero__hello {
    margin-bottom: clamp(12px, 2vh, 28px);
  }

  .hero__title {
    font-size: min(var(--text-display), 10vh);
  }

  .hero__lead {
    font-size: min(var(--text-xl), 2.6vh);
  }

  .hero__actions {
    margin-top: clamp(16px, 2.6vh, 32px);
  }

  /* Spare height on tall screens is shared above and below the flow */
  .hero__body {
    margin-bottom: clamp(16px, 3vh, 48px);
  }

  .flow {
    gap: 12px;
    margin-top: auto;
    margin-bottom: clamp(16px, 3vh, 56px);
  }

  .flow__step {
    padding: clamp(12px, 1.8vh, 20px) 16px clamp(14px, 2vh, 22px);
  }

  .flow__art {
    max-height: 10vh;
    margin-bottom: clamp(8px, 1.4vh, 18px);
  }

  .flow__title {
    font-size: min(var(--text-lg), 2.2vh);
  }

  .flow__text {
    margin-top: 6px;
    font-size: min(var(--text-sm), 1.7vh);
  }

  .flow__tools {
    margin-top: 8px;
    font-size: min(var(--text-xs), 1.5vh);
  }

  .hero__status {
    padding-block: clamp(12px, 2vh, 28px);
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .contact__inner {
    grid-template-columns: 1fr;
  }

    .contact__media .diagram {
    max-width: 600px;
    margin-left: 0;
  }

  .project,
  .project:nth-of-type(even) {
    grid-template-columns: 1fr;
  }

  .project:nth-of-type(even) .project__body {
    order: 0;
  }

  .project__summary,
  .project__role {
    max-width: 60ch;
  }

  .skills__header {
    grid-template-columns: 1fr;
  }

    .flow {
      grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .layer {
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  }

  .layer__head {
    grid-row: span 2;
  }

  .layer__proof {
    grid-column: 2;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .site-nav {
    gap: 18px;
  }

  .site-header__inner {
    height: 60px;
  }

  .hero__inner {
    min-height: 0;
    padding-top: 40px;
  }

  .hero__hello {
    font-size: var(--text-xs);
  }


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

  .layer {
    grid-template-columns: 1fr;
    padding-left: 36px;
  }

  .layer__head {
    grid-row: auto;
  }

  .layer__proof {
    grid-column: auto;
  }

  .stack::before {
    left: 6px;
  }

  .layer::before {
    width: 14px;
    height: 14px;
  }

  .skills__extra {
    grid-template-columns: 1fr;
    padding-left: 36px;
  }

  .project__impact {
    grid-template-columns: 1fr;
  }

    .flow {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }
  
    .flow__step {
      padding: 16px 14px 18px;
    }
  .site-footer__inner {
    flex-direction: column-reverse;
  }
}
