/* ═══════════════════════════════════════════════════════════════
   AESTIVO V2 — Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --green:        #5a9e5a;
  --green-dark:   #3d7a3d;
  --green-light:  #7ab87a;
  --green-pale:   #e8f4e8;
  --green-bg:     #f0f7f0;

  --dark:         #1a2420;
  --dark-2:       #243028;
  --dark-3:       #2c3a32;

  --text:         #1f2937;
  --text-mid:     #4b5563;
  --text-light:   #9ca3af;
  --white:        #ffffff;
  --off-white:    #f8faf8;
  --border:       #e2ebe2;

  --terminal-bg:      #0d1117;
  --terminal-text:    #c9d1d9;
  --terminal-comment: #8b949e;
  --terminal-cmd:     #79c0ff;
  --terminal-success: #56d364;
  --terminal-string:  #a5d6ff;
  --terminal-error:   #ff7b72;
  --terminal-prompt:  #5a9e5a;

  --font:      'Raleway', sans-serif;
  --font-code: 'Fira Code', 'Courier New', monospace;

  --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.18);

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

  --ease:       cubic-bezier(.4,0,.2,1);
  --t:          .25s;
  --t-slow:     .5s;

  --nav-h:      68px;
  --max-w:      1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img, video, iframe { max-width: 100%; display: block; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
address { font-style: normal; }
abbr[title] { text-decoration: underline dotted; cursor: help; }

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: .5rem 1rem;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 9999;
  transition: top var(--t);
}
.skip-link:focus { top: 0; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 600; }

p { max-width: 65ch; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  transition: transform var(--t) var(--ease),
              box-shadow var(--t) var(--ease),
              background var(--t) var(--ease),
              color var(--t) var(--ease),
              border-color var(--t) var(--ease);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(90,158,90,.35);
}
.btn-primary:hover {
  background: var(--green-dark);
  box-shadow: 0 6px 20px rgba(90,158,90,.45);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,.1);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--green-dark);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.btn-white:hover {
  background: var(--green-pale);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

.btn-full { width: 100%; justify-content: center; }

.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.loading .btn-text { display: none; }
.btn.loading .btn-loader { display: block; }

/* ── Section shared ─────────────────────────────────────────── */
.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-title {
  color: var(--text);
  margin-bottom: .75rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  margin: .75rem auto 0;
}

.section-subtitle {
  color: var(--text-mid);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-inline: auto;
  margin-top: .5rem;
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  transition: background var(--t-slow) var(--ease),
              box-shadow var(--t-slow) var(--ease);
}
#navbar.scrolled {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
}

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

.nav-logo img {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter var(--t);
}
#navbar.scrolled .nav-logo img { filter: none; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(.5rem, 2vw, 1.75rem);
}

.nav-link {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  font-weight: 500;
  position: relative;
  padding: .25rem 0;
  transition: color var(--t);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--green);
  border-radius: 1px;
  transition: width var(--t) var(--ease);
}
.nav-link:hover,
.nav-link.active { color: var(--white); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
#navbar.scrolled .nav-link { color: var(--text-mid); }
#navbar.scrolled .nav-link:hover,
#navbar.scrolled .nav-link.active { color: var(--green-dark); }

.nav-cta {
  background: var(--green);
  color: var(--white) !important;
  padding: .5rem 1.25rem;
  border-radius: 50px;
  font-weight: 600;
  transition: background var(--t), transform var(--t);
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--green-dark); transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  z-index: 901;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: transform var(--t) var(--ease), opacity var(--t);
}
#navbar.scrolled .hamburger span { background: var(--text); }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 25%, rgba(90,158,90,.2) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 75%, rgba(90,158,90,.12) 0%, transparent 50%),
    linear-gradient(145deg, var(--dark) 0%, var(--dark-2) 50%, var(--dark-3) 100%);
}

/* Subtle grid pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: calc(var(--nav-h) + 2rem) clamp(1rem, 4vw, 2rem) 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-eyebrow {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-light);
}

.hero-title {
  color: var(--white);
  line-height: 1.15;
}
.hero-title .highlight {
  color: var(--green-light);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  color: rgba(255,255,255,.72);
  font-size: 1.05rem;
  max-width: 46ch;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .25rem;
}

.hero-badge {
  margin-top: .5rem;
}
.hero-badge img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .7;
  transition: opacity var(--t);
}
.hero-badge a:hover img { opacity: 1; }

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.45);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: fadeInUp 1s 1.5s both;
}
.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 3px;
  height: 7px;
  background: rgba(255,255,255,.5);
  border-radius: 2px;
  animation: scrollWheel 1.8s ease-in-out infinite;
}

/* ── Terminal window ────────────────────────────────────────── */
.hero-terminal {
  display: flex;
  justify-content: center;
  align-items: center;
}

.terminal-window {
  width: 100%;
  max-width: 520px;
  background: var(--terminal-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
  overflow: hidden;
  animation: heroIn .7s .5s var(--ease) both;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
  background: #21262d;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #28c840; }

.terminal-filename {
  margin-left: .5rem;
  font-family: var(--font-code);
  font-size: .72rem;
  color: rgba(255,255,255,.35);
  flex: 1;
  text-align: center;
}

.terminal-body {
  padding: 1.25rem 1.25rem 1.5rem;
  min-height: 320px;
  font-family: var(--font-code);
  font-size: .82rem;
  line-height: 1.7;
  color: var(--terminal-text);
  position: relative;
}

#terminal-output { white-space: pre-wrap; word-break: break-all; }

.terminal-line { display: block; }
.t-cmd     { color: var(--terminal-cmd); }
.t-prompt  { color: var(--terminal-prompt); font-weight: 500; }
.t-success { color: var(--terminal-success); }
.t-comment { color: var(--terminal-comment); font-style: italic; }
.t-code    { color: var(--terminal-text); }
.t-error   { color: var(--terminal-error); }
.t-output  { color: rgba(201,209,217,.65); }

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--terminal-text);
  vertical-align: text-bottom;
  animation: blink .9s step-end infinite;
  margin-left: 1px;
}

/* ══════════════════════════════════════════════════════════════
   ABOUT / VIDEO
   ══════════════════════════════════════════════════════════════ */
.section-about {
  background: var(--white);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.about-text h3 {
  color: var(--text);
  margin-bottom: .25rem;
}
.about-text p {
  color: var(--text-mid);
  line-height: 1.75;
}

.value-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: .5rem;
}
.value-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text-mid);
  font-size: .95rem;
}
.value-list svg { color: var(--green); flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   SERVICES
   ══════════════════════════════════════════════════════════════ */
.section-services {
  background: var(--green-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--t) var(--ease),
              box-shadow var(--t) var(--ease),
              border-color var(--t);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-light);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  flex-shrink: 0;
  transition: background var(--t), color var(--t);
}
.service-card:hover .service-icon {
  background: var(--green);
  color: var(--white);
}

.service-body { display: flex; flex-direction: column; gap: .6rem; }
.service-body h3 { color: var(--text); }
.service-body p  { color: var(--text-mid); font-size: .92rem; line-height: 1.7; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .25rem;
}
.tag-list li {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--green-dark);
  background: var(--green-pale);
  border-radius: 50px;
  padding: .2rem .65rem;
  border: 1px solid var(--green-light);
  transition: background var(--t), color var(--t);
}
.service-card:hover .tag-list li {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

/* ══════════════════════════════════════════════════════════════
   PORTFOLIO
   ══════════════════════════════════════════════════════════════ */
.section-portfolio {
  background: var(--white);
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: .5rem 1.25rem;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-mid);
  border: 2px solid var(--border);
  background: var(--white);
  transition: all var(--t) var(--ease);
}
.filter-btn:hover {
  border-color: var(--green);
  color: var(--green-dark);
}
.filter-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.filter-btn:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.portfolio-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
  cursor: default;
}
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease), filter var(--t-slow);
}
.portfolio-item:hover img {
  transform: scale(1.06);
  filter: brightness(.7);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(26,36,32,.9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; }

.portfolio-info h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: .2rem;
}
.portfolio-info p {
  color: var(--green-light);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Hidden state for filter */
.portfolio-item.hidden {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   1% FOR THE PLANET
   ══════════════════════════════════════════════════════════════ */
.section-engagement {
  background: var(--green);
  color: var(--white);
  overflow: hidden;
  position: relative;
}
.section-engagement::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  pointer-events: none;
}

.engagement-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.engagement-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: .75rem;
}

.engagement-content h2 {
  color: var(--white);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}
.engagement-content h2 em {
  font-style: normal;
  color: rgba(255,255,255,.85);
}
.engagement-content p {
  color: rgba(255,255,255,.82);
  line-height: 1.75;
  margin-bottom: .85rem;
}
.engagement-content strong { color: var(--white); font-weight: 700; }
.engagement-content .btn-white { margin-top: .5rem; }

.engagement-visual {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.engagement-logo-wrap {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.engagement-logo-wrap img {
  max-height: 56px;
  width: auto;
}

.engagement-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.stat-item {
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: .35rem;
}
.stat-label {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  line-height: 1.4;
}

.stat-divider {
  width: 1px;
  height: 50px;
  background: rgba(255,255,255,.25);
}

/* ══════════════════════════════════════════════════════════════
   TERMINAL — tokens syntaxiques + prompts REPL
   ══════════════════════════════════════════════════════════════ */

/* Prompts */
.t-prompt { color: var(--terminal-prompt); font-weight: 600; }   /* bash $        */
.t-repl   { color: #79c0ff; user-select: none; }                 /* php >, php (  */
.t-mysql  { color: #ffa657; user-select: none; }                 /* mysql>, ->    */
.t-here   { color: rgba(201,209,217,.35); user-select: none; }   /* heredoc >     */

/* Tokens code */
.t-kw      { color: #ff7b72; }                                   /* keywords      */
.t-fn      { color: #d2a8ff; }                                   /* fonctions     */
.t-str     { color: #a5d6ff; }                                   /* chaînes       */
.t-num     { color: #f2cc60; }                                   /* nombres       */
.t-type    { color: #79c0ff; }                                   /* types PHP     */
.t-var     { color: #ffa657; }                                   /* $variables    */
.t-obj     { color: #ffa657; }                                   /* objets JS     */
.t-op      { color: #ff7b72; }                                   /* opérateurs    */

/* CSS tokens */
.t-sel     { color: #7ee787; }                                   /* .sélecteurs   */
.t-prop    { color: #79c0ff; }                                   /* propriétés    */
.t-val     { color: #ffa657; }                                   /* valeurs       */
.t-color   { color: #f2cc60; }                                   /* var(--xx)     */

/* Générique */
.t-comment { color: var(--terminal-comment); font-style: italic; }
.t-success { color: var(--terminal-success); }
.t-out     { color: rgba(201,209,217,.55); }
.t-error   { color: #ff7b72; }

/* ══════════════════════════════════════════════════════════════
   CONTACT — nouvelle version sans formulaire
   ══════════════════════════════════════════════════════════════ */
.section-contact {
  background: var(--dark);
  color: var(--white);
}

/* Availability badge */
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: rgba(86,211,100,.12);
  border: 1px solid rgba(86,211,100,.3);
  color: #56d364;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .4rem .9rem;
  border-radius: 50px;
}
.avail-dot {
  width: 8px;
  height: 8px;
  background: #56d364;
  border-radius: 50%;
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(86,211,100,.6); }
  50%       { box-shadow: 0 0 0 5px rgba(86,211,100,0); }
}

/* Hero zone */
.ct-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.ct-headline {
  color: var(--white);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  max-width: none;
}
.ct-headline em {
  font-style: normal;
  color: var(--green-light);
}

.ct-lead {
  color: rgba(255,255,255,.6);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 44ch;
  margin-inline: auto;
}

/* Big email CTA — inspired by Instrument / Locomotive */
.ct-email-cta {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--white);
  border-bottom: 2px solid var(--green-light);
  padding-bottom: .2rem;
  transition: color var(--t), border-color var(--t), gap var(--t);
}
.ct-email-cta:hover {
  color: var(--green-light);
  gap: 1rem;
}
.ct-email-cta svg {
  flex-shrink: 0;
  transition: transform var(--t) var(--ease);
}
.ct-email-cta:hover svg {
  transform: translate(3px, -3px);
}

/* Option cards — 3 colonnes */
.ct-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ct-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  transition: background var(--t), border-color var(--t), transform var(--t) var(--ease);
}
.ct-card:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(90,158,90,.5);
  transform: translateY(-3px);
}

.ct-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(90,158,90,.15);
  border: 1px solid rgba(90,158,90,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-light);
  transition: background var(--t), border-color var(--t);
}
.ct-card:hover .ct-card-icon {
  background: rgba(90,158,90,.25);
  border-color: rgba(90,158,90,.5);
}

.ct-card-body { flex: 1; }
.ct-card-body h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: .4rem;
}
.ct-card-body p {
  color: rgba(255,255,255,.55);
  font-size: .875rem;
  line-height: 1.6;
}

.ct-card-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--green-light);
  font-size: .875rem;
  font-weight: 600;
  transition: gap var(--t) var(--ease), color var(--t);
  margin-top: .25rem;
}
.ct-card-link:hover {
  color: var(--white);
  gap: .65rem;
}
.ct-card-link svg { flex-shrink: 0; }

/* Meta bar */
.ct-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 1.5rem;
  color: rgba(255,255,255,.4);
  font-size: .85rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 2rem;
}
.ct-meta-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.ct-meta-item svg { color: var(--green-light); flex-shrink: 0; }
.ct-meta-sep { opacity: .4; }

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.site-footer {
  background: #0f1a14;
  color: rgba(255,255,255,.55);
  font-size: .88rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 3.5rem clamp(1rem, 4vw, 2rem) 2rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.footer-brand img {
  margin-bottom: .75rem;
  filter: brightness(0) invert(1);
  opacity: .6;
}
.footer-brand p { line-height: 1.6; }

.footer-nav h4,
.footer-legal-col h4 {
  color: rgba(255,255,255,.85);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .85rem;
}

.footer-nav ul,
.footer-legal-col ul {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer-nav a,
.footer-legal-col a {
  transition: color var(--t);
}
.footer-nav a:hover,
.footer-legal-col a:hover { color: var(--green-light); }

.footer-rcs {
  margin-top: .85rem;
  font-size: .78rem;
  opacity: .5;
}

.footer-planet { padding-top: .5rem; }
.footer-planet img {
  filter: brightness(0) invert(1);
  opacity: .45;
  height: 24px;
  width: auto;
  transition: opacity var(--t);
}
.footer-planet a:hover img { opacity: .8; }

.footer-bottom {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center;
  font-size: .8rem;
}

/* ── Back to top ────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(90,158,90,.4);
  transition: transform var(--t) var(--ease),
              opacity var(--t),
              box-shadow var(--t);
  z-index: 800;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(90,158,90,.5);
}
.back-to-top:focus-visible {
  outline: 3px solid var(--green-light);
  outline-offset: 3px;
}
.back-to-top[hidden] { display: none; }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes scrollWheel {
  0%   { transform: translateY(0); opacity: 1; }
  75%  { transform: translateY(10px); opacity: 0; }
  76%  { transform: translateY(0); opacity: 0; }
  100% { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Scroll-driven reveal */
[data-aos] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
[data-aos].aos-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-aos-delay="60"]  { transition-delay: 60ms; }
[data-aos-delay="100"] { transition-delay: 100ms; }
[data-aos-delay="120"] { transition-delay: 120ms; }
[data-aos-delay="180"] { transition-delay: 180ms; }

[data-aos="zoom-in"] {
  transform: scale(.94);
}
[data-aos="zoom-in"].aos-visible {
  transform: scale(1);
}

[data-aos="fade-right"] {
  transform: translateX(-24px);
}
[data-aos="fade-right"].aos-visible {
  transform: translateX(0);
}

[data-aos="fade-left"] {
  transform: translateX(24px);
}
[data-aos="fade-left"].aos-visible {
  transform: translateX(0);
}

/* ══════════════════════════════════════════════════════════════
   BARRE DE PROGRESSION
   ══════════════════════════════════════════════════════════════ */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, var(--green), var(--green-light));
  z-index: 9999;
  transition: width .08s linear;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(90,158,90,.5);
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS D'ENTRÉE HERO
   ══════════════════════════════════════════════════════════════ */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow                  { animation: heroIn .65s .15s var(--ease) both; }
.hero-title .line:nth-child(1) { animation: heroIn .65s .30s var(--ease) both; }
.hero-title .line:nth-child(2) { animation: heroIn .65s .42s var(--ease) both; }
.hero-title .line:nth-child(3) { animation: heroIn .65s .54s var(--ease) both; }
.hero-subtitle                 { animation: heroIn .65s .70s var(--ease) both; }
.hero-actions                  { animation: heroIn .65s .85s var(--ease) both; }
.hero-badge                    { animation: heroIn .65s .95s var(--ease) both; }

/* Terminal header — easter egg hint */
.terminal-header { cursor: pointer; }
.terminal-header:hover .terminal-filename {
  color: rgba(255,255,255,.65);
  transition: color .2s;
}

/* Input dans le terminal interactif */
.term-input {
  background: none;
  border: none;
  outline: none;
  color: var(--terminal-text);
  font-family: var(--font-code);
  font-size: .82rem;
  width: 65%;
  caret-color: var(--green-light);
}

/* ══════════════════════════════════════════════════════════════
   HERO — TYPEWRITER
   ══════════════════════════════════════════════════════════════ */
.hero-title .line {
  display: block;
}
.hero-title .line--accent {
  color: var(--green-light);
}
/* Curseur clignotant après le mot qui se tape */
.typewriter::after {
  content: '|';
  display: inline-block;
  animation: blink .7s step-end infinite;
  color: var(--green-light);
  margin-left: 1px;
  font-weight: 300;
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   STATS BAR
   ══════════════════════════════════════════════════════════════ */
.stats-bar {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.stats-bar__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stats-bar__item {
  text-align: center;
  padding: 2rem 1rem;
  border-right: 1px solid rgba(255,255,255,.06);
}
.stats-bar__item:last-child { border-right: none; }

.stats-bar__value {
  display: block;
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--green-light);
  line-height: 1;
  margin-bottom: .45rem;
  font-family: var(--font);
  letter-spacing: -.02em;
}
.stats-bar__label {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  line-height: 1.4;
  letter-spacing: .02em;
}

/* ══════════════════════════════════════════════════════════════
   SECTION VARIANTS
   ══════════════════════════════════════════════════════════════ */
.section--alt    { background: var(--off-white); }
.section--darker { background: var(--green-bg); }

/* ══════════════════════════════════════════════════════════════
   ABOUT GRID
   ══════════════════════════════════════════════════════════════ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* ══════════════════════════════════════════════════════════════
   README EDITOR
   ══════════════════════════════════════════════════════════════ */
.editor {
  background: var(--terminal-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-code);
  font-size: .84rem;
  border: 1px solid rgba(255,255,255,.06);
}
.editor__tabs {
  display: flex;
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 0 .75rem;
  gap: .15rem;
}
.editor__tab {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem .9rem;
  font-size: .76rem;
  color: rgba(255,255,255,.3);
  border-bottom: 2px solid transparent;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}
.editor__tab.is-active {
  color: rgba(255,255,255,.85);
  border-bottom-color: var(--green);
}
.editor__tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.editor__tab-dot--md   { background: #f97316; }
.editor__tab-dot--json { background: #3b82f6; }

.editor__body {
  padding: 1.25rem 1.5rem 1.75rem;
  line-height: 1.95;
  color: var(--terminal-text);
  min-height: 320px;
}

.md-h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  max-width: none;
}
.md-h2 {
  font-size: .9rem;
  font-weight: 600;
  color: #58a6ff;
  margin-top: .1rem;
  max-width: none;
}
.md-p {
  color: var(--terminal-text);
  line-height: 1.9;
  max-width: none;
}
.md-li {
  color: var(--terminal-text);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.9;
  max-width: none;
}
.md-li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--green);
}
.md-bold { color: #ffffff; font-weight: 600; }

.md-badge {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.md-badge a {
  font-size: .68rem;
  padding: .15rem .5rem;
  border-radius: 20px;
  background: rgba(90,158,90,.18);
  border: 1px solid rgba(90,158,90,.4);
  color: var(--green-light);
  font-family: var(--font-code);
  transition: background var(--t);
}
.md-badge a:hover { background: rgba(90,158,90,.3); }

/* ══════════════════════════════════════════════════════════════
   BROWSER FRAME
   ══════════════════════════════════════════════════════════════ */
.browser {
  background: var(--terminal-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.06);
}
.browser__bar {
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
}
.browser__dots {
  display: flex;
  gap: .35rem;
  flex-shrink: 0;
}
.browser__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.browser__dot:nth-child(1) { background: #ff5f57; }
.browser__dot:nth-child(2) { background: #ffbd2e; }
.browser__dot:nth-child(3) { background: #28c840; }

.browser__url {
  flex: 1;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  padding: .2rem .65rem;
  font-family: var(--font-code);
  font-size: .7rem;
  color: rgba(255,255,255,.32);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser__body {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.browser__body iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ══════════════════════════════════════════════════════════════
   SECTION HEADER — style V3 (tag + title + sub)
   ══════════════════════════════════════════════════════════════ */
.section__header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section__tag {
  display: inline-block;
  font-family: var(--font-code);
  font-size: .78rem;
  color: var(--green-dark);
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  padding: .25rem .75rem;
  border-radius: 4px;
  margin-bottom: .9rem;
  letter-spacing: .02em;
}
.section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  margin: .75rem auto 0;
}
.section__sub {
  color: var(--text-mid);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-inline: auto;
  margin-top: .5rem;
}

/* ══════════════════════════════════════════════════════════════
   PKG-CARDS (services)
   ══════════════════════════════════════════════════════════════ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pkg-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--t) var(--ease),
              box-shadow var(--t) var(--ease),
              border-color var(--t);
  position: relative;
}
.pkg-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.pkg-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-light);
}
.pkg-card:hover::before { transform: scaleX(1); }

.pkg-card__header {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.25rem;
  background: var(--green-bg);
  border-bottom: 1px solid var(--border);
}
.pkg-card__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pkg-card__icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.pkg-card__name {
  font-family: var(--font-code);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.pkg-card__scope { color: var(--green); }

.pkg-card__version {
  font-family: var(--font-code);
  font-size: .7rem;
  color: var(--text-light);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .15rem .55rem;
  white-space: nowrap;
}

.pkg-card__body {
  padding: 1.35rem 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.pkg-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.pkg-card__desc {
  font-size: .9rem;
  color: var(--text-mid);
  line-height: 1.75;
  flex: 1;
  max-width: none;
}
.pkg-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .1rem;
}
.pkg-tag {
  font-size: .7rem;
  font-weight: 600;
  font-family: var(--font-code);
  color: var(--green-dark);
  background: var(--green-pale);
  border: 1px solid rgba(90,158,90,.3);
  border-radius: 4px;
  padding: .18rem .55rem;
  transition: background var(--t), color var(--t);
}
.pkg-card:hover .pkg-tag {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

/* ══════════════════════════════════════════════════════════════
   STACK GRID
   ══════════════════════════════════════════════════════════════ */
.stack__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.stack-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding: 1.25rem .75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  transition: border-color var(--t), transform var(--t) var(--ease), box-shadow var(--t);
  cursor: default;
}
.stack-item:hover {
  border-color: var(--green-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.stack-item__icon { font-size: 1.65rem; line-height: 1; }
.stack-item__name {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: .02em;
  line-height: 1.3;
}

/* ══════════════════════════════════════════════════════════════
   V3 TERMINAL — CSS stagger animation
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.t-line {
  display: block;
  opacity: 0;
  animation: fadeIn .3s forwards;
  white-space: pre;
}
.t-blank {
  display: block;
  height: .55em;
}
.t-ok   { color: var(--terminal-success); }
.t-info { color: rgba(201,209,217,.6); }
.t-flag { color: var(--green-light); }

/* ══════════════════════════════════════════════════════════════
   PORTFOLIO — style V3 avec liens
   ══════════════════════════════════════════════════════════════ */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.port-item {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  cursor: pointer;
}
.port-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease), filter var(--t-slow);
  display: block;
}
.port-item:hover img,
.port-item:focus-visible img {
  transform: scale(1.06);
  filter: brightness(.6);
}
.port-item.is-hidden { display: none; }

.port-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(20,32,24,.95) 0%, transparent 65%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.port-item:hover .port-item__overlay,
.port-item:focus-visible .port-item__overlay { opacity: 1; }

.port-item__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: .2rem;
  max-width: none;
}
.port-item__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  max-width: none;
}
.port-item__sub {
  font-size: .76rem;
  color: rgba(255,255,255,.5);
  margin-top: .15rem;
  max-width: none;
}
.port-item__link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .76rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin-top: .65rem;
  padding-bottom: .1rem;
  border-bottom: 1px solid rgba(255,255,255,.3);
  width: fit-content;
  transition: color var(--t), border-color var(--t);
}
.port-item:hover .port-item__link {
  color: var(--white);
  border-bottom-color: var(--white);
}

/* Variante logo : fond blanc + contain */
.port-item--logo {
  background: var(--white);
}
.port-item--logo img {
  object-fit: contain;
  padding: 1.75rem 2.5rem;
  background: var(--white);
}
/* Logo blanc sur fond gris (ex : Rochecolombe) */
.port-item--logo-grey {
  background: #e8e8e8;
}
.port-item--logo-grey img {
  object-fit: contain;
  padding: 1.75rem 2.5rem;
  background: #e8e8e8;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { align-items: center; }
  .hero-subtitle { margin-inline: auto; }
  .hero-terminal { width: 100%; max-width: 560px; margin-inline: auto; }
  .terminal-window { max-width: 100%; }
  .terminal-body { min-height: 240px; }

  .about__grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stack__grid { grid-template-columns: repeat(4, 1fr); }
  .portfolio__grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .engagement-layout { grid-template-columns: 1fr; text-align: center; }
  .engagement-content p { margin-inline: auto; }
  .ct-options { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .stats-bar__inner { grid-template-columns: repeat(2, 1fr); }
  .stats-bar__item:nth-child(2) { border-right: none; }
  .stats-bar__item:nth-child(3) { border-right: 1px solid rgba(255,255,255,.06); }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    top: 0; right: 0;
    width: min(320px, 80vw);
    height: 100dvh;
    background: var(--dark);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transform: translateX(110%);
    transition: transform var(--t-slow) var(--ease);
    box-shadow: -8px 0 40px rgba(0,0,0,.4);
  }
  .nav-menu.open { transform: translateX(0); }

  .nav-link {
    font-size: 1.1rem;
    color: rgba(255,255,255,.8) !important;
  }
  .nav-cta {
    align-self: flex-start;
    color: var(--white) !important;
  }

  .hero-container { padding-bottom: 5rem; }
  .services__grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .stack__grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio__grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .stats-bar__inner { grid-template-columns: repeat(2, 1fr); }
  .ct-options { grid-template-columns: 1fr; }
  .ct-headline { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-planet { padding-top: 0; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .engagement-stats { flex-direction: column; gap: 1.25rem; }
  .stat-divider { width: 60px; height: 1px; }
  .stack__grid { grid-template-columns: repeat(3, 1fr); }
  .stats-bar__inner { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   ACCESSIBILITY — focus & reduced motion
   ══════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-aos] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .terminal-cursor { animation: none; opacity: 1; }
  .scroll-wheel { animation: none; }
  .hero-eyebrow, .hero-subtitle, .hero-actions, .hero-badge,
  .hero-title .line, .terminal-window {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
