/* ==========================================================================
   Berrahou Taha — Portfolio
   Colors sampled directly from the Canva design exports.
   ========================================================================== */

:root {
  --bg: #17181f;            /* page background (bottom of every Canva page) */
  --bg-top: #000000;        /* top of every Canva page gradient */
  --text: #ffffff;
  --text-soft: #e9e9ee;
  --muted: #b9bac4;
  --cream: #ffffe4;         /* "Core capabilities:", "Education & certifications" */
  --green: #00ff84;         /* highlight green */
  --green-badge: #00793e;   /* "Lunched ✓" / "Delivered" badges */
  --blue: #38b6ff;          /* "Revenue Generating", "Algeria" */
  --blue-soft: #98befc;     /* hero quote highlight */
  --mint: #c5f5de;          /* hero quote highlight end */
  --yellow: #faca36;        /* "My leadership approach…", "Pre-Revenue" */
  --arrow-yellow: #ffde59;
  --grey-badge: #737373;
  --tan: #b4896c;           /* case-study labels */
  --bar: #b4b4b4;
  --folder-blue: #43bfde;

  --font: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-alt: "DM Sans", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(16px, 12vw, 164px);
  --fs-body: clamp(15.5px, 1.32vw, 18.5px);
  --fs-h2: clamp(26px, 2.5vw, 34px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

/* ---------- Site-wide background = the exact hero background (copied 1:1: same gradients,
   same two blurred smoky light streaks), fixed behind every page of the website ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 85% 40%, rgba(120, 112, 100, .16), transparent 60%),
    linear-gradient(90deg, #17181f 0%, #0b0b0e 35%, #050506 100%);
}
html::before,
html::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(26px);
  pointer-events: none;
}
html::before {
  width: 140%;
  height: 46%;
  left: -10%;
  top: 30%;
  border-top: 26px solid rgba(190, 175, 150, .10);
  transform: rotate(-14deg);
}
html::after {
  width: 110%;
  height: 60%;
  left: 20%;
  top: -8%;
  border-bottom: 34px solid rgba(220, 210, 190, .07);
  transform: rotate(22deg);
}
html { overflow-x: hidden; }

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

/* ---------- Content protection (deterrent) ---------- */
html {
  -webkit-user-select: none;
  user-select: none;                 /* no text selection */
  -webkit-touch-callout: none;       /* no long-press "Save image" menu on iOS */
}
img, svg {
  -webkit-user-drag: none;           /* images & icons can't be dragged out */
}
img { pointer-events: none; }        /* no right-click / long-press directly on photos */
@media print {
  body { display: none !important; } /* printing / "Save as PDF" gives a blank page */
}
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding-left: 1.65em; }
li { padding-left: .1em; }

/* One continuous background: sections flow into each other (no per-section dark bands) */
.page {
  background: transparent;
  padding: clamp(48px, 6vw, 72px) var(--gutter);
}
.page--flat { background: transparent; }

h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.15;
}

.indent { text-indent: 1.4em; }
.green { color: var(--green); }
.cream { color: var(--cream); }
.yellow { color: var(--yellow); }
.stack > * + * { margin-top: 0; }
.mt-s { margin-top: .9em; }
.mt-m { margin-top: 1.6em; }
.mt-l { margin-top: 2.6em; }

/* ---------- Non-clickable link placeholders ----------
   <a> without href is not clickable or focusable.
   To activate one later, add: href="https://..." target="_blank" rel="noopener"  */
a { color: inherit; }
a:not([href]) { cursor: default; text-decoration: none; }
a[href] { cursor: pointer; }
.li-word[href], .socials a[href], a.u[href] { transition: opacity .2s ease, transform .2s ease; }
.li-word[href]:hover, .socials a[href]:hover, a.u[href]:hover { opacity: .75; }
.socials a[href]:hover { transform: translateY(-2px); }
a[href]:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
a.u { text-decoration: underline; text-underline-offset: 2px; }

/* LinkedIn wordmark (text + box) */
.li-word {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: -.02em;
  color: #fff;
  vertical-align: middle;
}
.li-word .li-box {
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: #000;
  border-radius: 3px;
  width: 1.12em;
  height: 1.12em;
  font-size: .95em;
  line-height: 1;
  padding-top: .04em;
}
.li-word .li-dot { font-size: .5em; align-self: flex-end; margin-left: 1px; }

/* ==========================================================================
   01 — HERO
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 512fr) minmax(0, 854fr);
  min-height: clamp(600px, 56.25vw, 1080px); /* Canva page ratio 1366 × 768 */
  background: transparent;
}
/* Titles band above the photo: hidden on tablets & PCs, shown on phones (see max-width: 760px) */
.hero__top {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(26px, 3vw, 40px) 16px clamp(20px, 2.4vw, 30px);
}
.hero__top .hero__role { font-size: clamp(16px, 1.45vw, 20px); line-height: 1.25; }
.hero__top .hero__li { margin: 12px 0 0; }
.hero__photo { position: relative; overflow: hidden; background: #000; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 14% top; } /* leans left so the signature in the photo stays whole */

.hero__content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(40px, 5vw, 60px) clamp(16px, 4vw, 48px);
  /* transparent: the hero shows the same site-wide background as every other part of the website */
  background: transparent;
}

.hero__inner { width: 100%; max-width: 445px; }
.hero__role {
  text-align: center;
  font-size: clamp(16px, 1.32vw, 18.5px);
  font-weight: 500;
  line-height: 1.12;
}
.hero__li { display: flex; justify-content: center; margin: 14px 0 8px; }
.hero__li .li-word { font-size: 19px; }
.hero__name {
  font-size: clamp(32px, 2.95vw, 40.5px);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.hero__tag { margin-top: 10px; font-size: clamp(12px, .98vw, 13.5px); color: var(--muted); }
.hero__quote { margin-top: 44px; font-size: clamp(16px, 1.32vw, 18.5px); line-height: 1.36; }
.hero__quote .hl {
  background: linear-gradient(90deg, var(--blue-soft), #a7d0f2 55%, var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__bio { margin-top: 24px; font-size: clamp(16px, 1.32vw, 18.5px); line-height: 1.36; }
.hero__bio p { text-indent: 1.5em; }
.hero__loc {
  margin-top: 26px;
  text-align: center;
  font-size: clamp(14px, 1.17vw, 16.2px);
  color: var(--text-soft);
  line-height: 1.24;
}

/* ==========================================================================
   02 — DEAR VISITOR
   ========================================================================== */
.visitor { display: flex; justify-content: center; padding-top: clamp(70px, 8vw, 92px); padding-bottom: clamp(50px, 6vw, 60px); }
.visitor__inner { max-width: 440px; width: 100%; }
.visitor__title { font-size: clamp(30px, 2.65vw, 36px); font-weight: 500; letter-spacing: -.01em; }
.visitor__lead { margin-top: 36px; }
.visitor__lead .big { font-size: clamp(28px, 2.5vw, 34px); font-weight: 500; letter-spacing: -.01em; line-height: 1; margin-right: .35em; }

/* ==========================================================================
   03 — EXPERTISE & EXPERIENCE
   ========================================================================== */
.expertise { padding-left: clamp(16px, 3.7vw, 50px); padding-right: clamp(16px, 3.7vw, 50px); padding-bottom: 18px; }
.expertise h2 { font-weight: 600; letter-spacing: -.015em; font-size: var(--fs-h2); }
.expertise h2 + * { margin-top: 18px; }
.exp-line {
  margin-top: 26px;
  color: var(--green);
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: .35em;
  row-gap: 4px;
}
.exp-site { font-weight: 600; color: var(--cream); display: inline-block; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.exp-site[href]:hover, .exp-site[href]:focus-visible { border-bottom-color: currentColor; }
.exp-break { flex-basis: 100%; height: 0; margin-top: -4px; } /* tablets & PCs: domain on its own line under the title */
@media (max-width: 760px) {
  .exp-break { display: none; }                               /* phones: domain beside the LinkedIn logo */
  .exp-line .exp-site { margin-left: .9em; }
}
.exp-body { margin-top: 24px; max-width: 1040px; }
.exp-body p { text-indent: 1.2em; }
.wide-photo { display: block; width: 100%; }
.wide-photo img { width: 100%; }
/* soft fade into the page so photos don't cut the page into blocks */
.wide-photo--fade-both img {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 80%, transparent 100%);
}
.wide-photo--fade-top img {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%);
}

/* ==========================================================================
   04 / 05 / 06 — CAPABILITIES
   ========================================================================== */
.caps h2 + * { margin-top: 1.5em; }
.caps h2.tight + * { margin-top: .35em; }
.caps ul { line-height: 1.36; }
.caps .block + .block { margin-top: 2.4em; }
.caps p.lead { max-width: 1090px; }
.caps .narrow { max-width: 680px; }

/* ---------- Folder navigation ---------- */
.folders {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px 12px;
  margin: clamp(60px, 7vw, 110px) calc(var(--gutter) * -0.62) 0;
  text-align: center;
}
.folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(14px, 1.3vw, 18px);
  border-radius: 12px;
  padding: 10px 4px;
  transition: transform .25s ease;
}
.folder svg {
  width: clamp(84px, 9.4vw, 128px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45));
  transition: transform .3s ease, filter .3s ease;
}
.folder .paper { transition: transform .35s cubic-bezier(.3, .7, .3, 1); }
.folder:hover svg,
.folder:focus-visible svg { transform: translateY(-3px); filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .55)); }
.folder:hover .paper,
.folder:focus-visible .paper { transform: translateY(-9px); }
.folder:focus-visible { outline: 2px solid #ebbd55; outline-offset: 4px; }

/* ---------- Leadership philosophy ---------- */
.philosophy { margin-top: clamp(70px, 8vw, 110px); }
.philosophy h2 + * { margin-top: 1.4em; }
.principle { color: var(--green); font-weight: 600; }

/* ---------- International career & contact ---------- */
.career h2 + * { margin-top: 3.2em; }
.career .lead-i::first-letter { font-weight: 700; }
.contact-title { font-weight: 700; padding-left: 1em; }

.socials {
  display: flex;
  justify-content: center;
  gap: clamp(26px, 3.2vw, 44px);
  margin-top: clamp(56px, 6vw, 70px);
}
.socials a { display: inline-flex; }
.socials svg { width: clamp(42px, 3.6vw, 50px); height: clamp(42px, 3.6vw, 50px); }
.copyright { text-align: center; margin-top: 10px; font-size: clamp(14px, 1.2vw, 16.5px); }

/* ==========================================================================
   SUB-PAGES (shared)
   ========================================================================== */
.back {
  position: absolute;
  top: 18px;
  left: var(--gutter);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
}
.back:hover, .back:focus-visible { color: #fff; }
.sub { position: relative; min-height: 100vh; padding-top: clamp(80px, 8vw, 104px); }

/* ---------- Technology portfolio ---------- */
.tp-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 34px; margin-top: 50px; }
.tp-title h1 { font-size: clamp(28px, 2.5vw, 34px); font-weight: 600; letter-spacing: -.015em; }
.tp-title span { font-size: clamp(17px, 1.75vw, 24px); color: var(--text-soft); }

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  font-weight: 500;
}
.project + .divider { margin-top: 32px; }
.project__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-weight: 600; }
.project__sub { margin-top: 28px; font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; }
.platforms { display: grid; grid-template-columns: max-content 1fr; column-gap: 34px; }
.platforms.tight { column-gap: 26px; }

.badge {
  display: inline-block;
  padding: 1px 8px 2px;
  border-radius: 999px;
  font-size: .97em;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}
.badge--green { background: var(--green-badge); color: #fff; }
.badge--blue { background: var(--blue); color: #fff; }
.badge--yellow { background: var(--yellow); color: #111; }
.badge--grey { background: var(--grey-badge); color: #fff; }

.visual { position: relative; display: flex; flex-direction: column; align-items: center; }
/* Link buttons — one classic outlined style, identical size for every link */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px 0 16px;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: #fff;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: .015em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.pill span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.visual .cta { max-width: 100%; min-width: 0; }
.visual .pill { min-width: 0; }
.pill svg { width: 17px; height: 17px; flex: none; }
.pill svg.out { width: 15px; height: 15px; opacity: .7; margin-left: -2px; transition: transform .25s ease, opacity .25s ease; }
.pill[href]:hover,
.pill[href]:focus-visible { background: #fff; color: #111; border-color: #fff; }
.pill[href]:hover svg.out { transform: translate(2px, -2px); opacity: 1; }

/* ---------- "Let's talk" contact form: classic letter on cream paper ---------- */
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
.letter-wrap { margin-top: clamp(44px, 5vw, 64px); max-width: 780px; margin-left: auto; margin-right: auto; }
.letter {
  --paper: #f7f2e6;
  --ink: #1d1b17;
  --ink-soft: #4a4335;             /* darker secondary text for comfortable reading */
  --line: #b3a787;
  position: relative;
  padding: clamp(28px, 4vw, 48px) clamp(20px, 4.4vw, 52px) clamp(26px, 3.6vw, 40px);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .55), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 24px 60px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .25);
}
/* thin classic inner frame */
.letter::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(29, 27, 23, .14);
  pointer-events: none;
}
.letter__head { text-align: center; }
.letter__cup { width: 110px; height: 110px; color: var(--ink); opacity: .88; overflow: visible; }
.letter__cup g { stroke-width: 1.35; }           /* finer lines at this size */
@media (max-width: 640px) { .letter__cup { width: 84px; height: 84px; } }
/* rising coffee steam: three wisps drift up, sway and fade, slightly out of step */
.letter__cup .steam {
  stroke-width: 1.15;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: steam-rise 3.2s ease-in-out infinite;
}
.letter__cup .steam--2 { animation-delay: 1.05s; animation-duration: 3.6s; }
.letter__cup .steam--3 { animation-delay: 2.1s; animation-duration: 3.4s; }
@keyframes steam-rise {
  0%   { opacity: 0;   transform: translate(0, 5px) scale(.9, .7); }
  20%  { opacity: .85; }
  50%  { opacity: .7;  transform: translate(1.2px, -2px) scale(1, 1) skewX(-6deg); }
  80%  { opacity: .3;  transform: translate(-1px, -6px) scale(1.05, 1.1) skewX(5deg); }
  100% { opacity: 0;   transform: translate(.6px, -9px) scale(1.1, 1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .letter__cup .steam { animation: none; opacity: .75; }
}
.letter__title {
  margin-top: 6px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: .005em;
  line-height: 1.1;
}
.letter__sub {
  margin: 10px auto 0;
  max-width: 470px;
  font-size: 17.5px;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.4;
}
.letter__head::after {           /* double rule under the heading */
  content: "";
  display: block;
  width: 120px;
  margin: 20px auto 6px;
  border-top: 3px double rgba(29, 27, 23, .55);
}
.letter__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 30px;
  margin-top: 18px;
}
.field { display: flex; flex-direction: column; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 16px;                 /* normal case, solid black: easy to read, but quieter than the typed text */
  letter-spacing: .01em;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);               /* solid black ink for maximum contrast */
}
.field label .opt { font-variant: normal; text-transform: none; letter-spacing: 0; font-weight: 400; font-style: italic; }
.field input,
.field select,
.field textarea {
  width: 100%;
  margin-top: 4px;
  padding: 6px 2px 7px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  line-height: 1.35;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-user-select: text;          /* the site blocks selection; form fields must allow it */
  user-select: text;
}
.field input::placeholder,
.field textarea::placeholder { color: #857a63; font-style: italic; opacity: 1; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b6250' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center; background-size: 12px; }
.field select:invalid { color: #a99f88; font-style: italic; }
.field select option { color: var(--ink); font-style: normal; }
.field textarea {
  resize: vertical;
  min-height: 140px;
  /* ruled writing paper */
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 30.6px, rgba(201, 190, 164, .55) 30.6px, rgba(201, 190, 164, .55) 31.6px);
  background-position: 0 6px;
  line-height: 31.6px;
  padding-top: 0;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-bottom-color: #9b2c2c; box-shadow: 0 1px 0 #9b2c2c; }
.field__error { min-height: 18px; margin-top: 4px; font-size: 16.5px; font-style: italic; color: #8f1f1f; }
/* soft highlight on the field the visitor is guided to */
.field.is-attention { animation: field-attention 1.4s ease-out; border-radius: 3px; }
@keyframes field-attention {
  0%   { background: rgba(214, 170, 74, .30); box-shadow: 0 0 0 8px rgba(214, 170, 74, .30); }
  100% { background: rgba(214, 170, 74, 0);   box-shadow: 0 0 0 8px rgba(214, 170, 74, 0); }
}
@media (prefers-reduced-motion: reduce) { .field.is-attention { animation: none; } }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.letter__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.letter__note { font-size: 16.5px; font-style: italic; color: var(--ink-soft); max-width: none; }
.letter__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  height: 48px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 17px;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: .14em;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
  transition: background .2s ease, transform .1s ease;
}
.letter__send:hover { background: #000; }
.letter__send:active { transform: translateY(1px); }
.letter__send:disabled { opacity: .65; cursor: progress; }
.letter__send:focus-visible { outline: 2px solid #8a6d2b; outline-offset: 3px; }
.letter__status { margin-top: 10px; min-height: 20px; font-size: 17px; font-style: italic; max-width: none; }
.letter__status.is-error { color: #8f1f1f; }

.letter__thanks { text-align: center; padding: 26px 0 18px; outline: none; }
.letter__thanks p { margin: 12px auto 0; max-width: 480px; font-size: 18.5px; line-height: 1.45; }
.letter__thanks .letter__sign { margin-top: 18px; font-style: italic; color: var(--ink-soft); }

@media (max-width: 640px) {
  .letter__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .letter__foot { flex-direction: column-reverse; align-items: stretch; }
  .letter__send { width: 100%; }
  .letter__note { text-align: center; }
}

/* ---------- Classic resume button + preview dialog ---------- */
.hero__cv { display: flex; justify-content: center; margin-top: 22px; }
.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 18px 0 15px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: #fff;
  font: inherit;
  font-family: Georgia, "Times New Roman", serif;   /* classic touch, like the resume itself */
  font-size: 14.5px;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.cv-btn svg { width: 17px; height: 17px; flex: none; }
.cv-btn:hover, .cv-btn:focus-visible { background: #fff; color: #111; border-color: #fff; }
.cv-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

html.cv-open { overflow: hidden; }
.cv-dialog {
  width: min(900px, 94vw);
  height: min(92vh, 1120px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: #1c1d25;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.cv-dialog[open] { display: flex; flex-direction: column; animation: cv-in .28s ease-out; }
.cv-dialog::backdrop { background: rgba(4, 4, 7, .72); backdrop-filter: blur(4px); }
@keyframes cv-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cv-dialog[open] { animation: none; } }

.cv-dialog__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.cv-dialog__title { font-family: Georgia, "Times New Roman", serif; font-size: 15px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-dialog__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 15px 0 12px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease;
}
.cv-download:hover { background: var(--cream); }
.cv-download svg { width: 17px; height: 17px; }
.cv-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .2s ease;
}
.cv-close:hover { background: rgba(255, 255, 255, .1); }
.cv-close svg { width: 18px; height: 18px; }
.cv-download:focus-visible, .cv-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cv-dialog__frame { flex: 1; width: 100%; border: 0; background: #e9e7e1; }

@media (max-width: 520px) {
  .cv-dialog { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .cv-dialog__title { font-size: 13.5px; }
  .cv-download span { display: none; }   /* icon-only on small phones */
  .cv-download { padding: 0 10px; }
}

/* ---------- Animated cursor tour (title → badges → link) ---------- */
.tour-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transform-origin: 5.7px 3.5px;          /* scale around the arrow tip */
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5));
  will-change: transform, opacity;
}
.tour-cursor svg { display: block; }
.tour-ripple {
  position: absolute;
  left: 5.7px;
  top: 3.5px;
  width: 44px;
  height: 44px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.badge { transition: box-shadow .3s ease; }
.badge.is-tour-hover { box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.pill.is-tour-hover { background: #fff; color: #111; border-color: #fff; }
.pill.is-tour-hover svg.out { transform: translate(2px, -2px); opacity: 1; }
.pointer { width: 46px; height: 46px; flex: none; }
.os-icons { display: flex; align-items: center; gap: 14px; }
.os-icons svg { width: 62px; height: 62px; }
.os-icons .mac { width: 60px; height: 60px; }

.v-m26 { align-items: flex-end; }
.v-m26 .logo { width: 190px; margin-right: 76px; }
.v-m26 .cta { display: flex; align-items: flex-end; margin-right: 10px; }
.v-m26 .pointer { margin: 0 4px -44px 0; position: relative; z-index: 2; }
.v-m26 .device { position: relative; width: 100%; display: flex; justify-content: flex-end; margin-top: 18px; }
.v-m26 .shot { width: min(640px, 100%); }

.v-btp { align-items: flex-end; }
.v-btp .device { position: relative; width: 100%; display: flex; justify-content: flex-end; }
.v-btp .shot { width: min(720px, 100%); }

/* Mockup image with invisible link areas over the store icons baked into the artwork */
.shot { position: relative; }
.shot img { width: 100%; }
.shot .hot { position: absolute; border-radius: 10px; }
.shot .hot[href]:hover,
.shot .hot[href]:focus-visible { outline: 2px solid rgba(255, 255, 255, .5); outline-offset: 2px; }
.v-btp .cta { display: flex; align-items: flex-start; gap: 0; margin-top: 18px; margin-right: 14px; }
.v-btp .pointer { margin-top: 18px; margin-right: -4px; }

.v-pos { align-items: center; }
.v-pos .logo { width: 70px; margin-left: 40px; }
.v-pos .device img { width: min(526px, 100%); margin-top: 8px; }
.v-pos .cta { display: flex; flex-direction: column; align-items: center; margin-top: 4px; }
.v-pos .pointer { margin-left: -90px; margin-top: 2px; }

.win-solo svg { width: 64px; height: 64px; margin-top: 26px; }
.divider {
  width: min(440px, 70%);
  margin: 40px auto;
  border: 0;
  border-top: 3px dashed #fff;
  opacity: .95;
}
.tech-expertise h2 { font-size: clamp(28px, 2.5vw, 34px); margin-top: 60px; }
.tech-expertise ul { margin-top: 44px; font-size: clamp(15px, 1.33vw, 18px); line-height: 1.33; }

/* ---------- Cybersecurity portfolio ---------- */
.cyber { display: grid; grid-template-columns: minmax(0, 612px) minmax(0, 430px); gap: 46px; align-items: end; padding-left: clamp(16px, 12.7vw, 174px); padding-right: 16px; }
.cyber h1, .cyber h2 { color: var(--green); font-size: clamp(22px, 1.9vw, 25.5px); font-weight: 600; letter-spacing: -.01em; }
.cyber p { text-indent: 1em; }
.cyber .resp dt { font-weight: 600; padding-left: 1em; }
.cyber .resp dd { margin: 0; }
.cyber figure { margin: 0; }

/* ---------- Financial impact ---------- */
.fin { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 40px; padding-left: clamp(16px, 13.2vw, 180px); padding-right: clamp(16px, 9vw, 128px); }
.fin h1 { font-size: clamp(28px, 2.5vw, 34px); font-weight: 600; letter-spacing: -.015em; }
.fin-list { list-style: none; padding: 0; margin-top: 1.5em; }
.fin-list li { padding: 0; }
.fin-list li + li { margin-top: 1.5em; }
.fin-row { display: flex; align-items: center; gap: 10px; }
.fin-row::before { content: "•"; margin: 0 6px 0 10px; }
.cyber, .fin, .cert { align-content: start; }
.fin-row .conn { flex: 1; min-width: 44px; max-width: 200px; height: 9px; position: relative; margin-left: 6px; }
.fin-row .conn::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; border-top: 2px dashed #fff; transform: translateY(-1px); }
.fin-row .conn::after,
.fin-row .conn i { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: translateY(-50%); }
.fin-row .conn::after { right: 0; }
.fin-row .conn i { left: 0; }
.fin-row .place { color: var(--blue); font-size: 1.05em; }

.turnover { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 50px; position: relative; }
.turnover::before {
  content: "";
  position: absolute;
  /* always a perfect circle that fits the screen, fading out fully before its edges (no hard cut on phones) */
  width: min(380px, 100%); aspect-ratio: 1; height: auto;
  left: 50%; top: 40px;
  transform: translateX(-50%);
  background: radial-gradient(circle closest-side, rgba(0, 255, 132, .16) 0%, rgba(0, 255, 132, .06) 56%, transparent 100%);
  pointer-events: none;
}
.turnover .arrow { width: 52px; align-self: center; margin-left: 250px; position: relative; }
.turnover .big { font-size: clamp(56px, 6vw, 82px); font-weight: 600; letter-spacing: -.02em; line-height: 1; margin-top: 2px; position: relative; }
.turnover .note { margin-top: 32px; font-size: 16px; line-height: 1.3; position: relative; }
.turnover .cap { margin-top: 42px; font-size: clamp(16px, 1.36vw, 19px); line-height: 1; position: relative; }

.chart { grid-column: 1 / -1; margin-top: 40px; position: relative; font-size: 11px; }
.chart__axis, .chart__row { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; }
.chart__axis .scale { position: relative; height: 16px; }
.chart__axis .scale span { position: absolute; transform: translateX(-50%); }
.chart__controls { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; }
.chart__controls button {
  font: inherit;
  font-weight: 600;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chart__controls button:hover { border-color: rgba(255, 255, 255, .6); color: #fff; }
.chart__controls button[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }
.chart__controls .replay { padding: 5px 9px; }
.chart__controls button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.chart__rows { position: relative; height: 128px; }
.chart__grid { position: absolute; inset: 0 70px 0 150px; pointer-events: none; }
.chart__grid i { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(255, 255, 255, .07); }
.chart__row { position: absolute; top: 0; left: 0; right: 0; height: 32px; transition: transform .7s cubic-bezier(.65, 0, .35, 1); }
.chart__row .lbl { text-align: right; padding-right: 8px; }
.chart__row .track { height: 28px; display: flex; align-items: center; min-width: 0; }
.chart__row .bar { flex: none; height: 100%; background: var(--bar); border-radius: 0 3px 3px 0; transition: width 1.1s cubic-bezier(.65, 0, .35, 1); }
.chart__row .num { padding-left: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.chart__year { position: absolute; right: 10%; bottom: 8px; text-align: right; pointer-events: none; }
.chart__year .yr { display: block; font-size: clamp(36px, 4.1vw, 56px); font-weight: 400; line-height: 1; transition: opacity .3s ease, transform .3s ease; }
.chart__year .yr.swap { opacity: 0; transform: translateY(10px); }
.chart__year .cum { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.chart__year .cum b { color: var(--green); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.chart.no-anim .chart__row, .chart.no-anim .bar, .chart.no-anim .yr { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .chart__row, .chart__row .bar, .chart__year .yr { transition: none; }
}

/* ---------- Education & certifications ---------- */
.cert { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 560px); gap: 30px; align-items: center; padding: clamp(80px, 8vw, 96px) 16px 40px clamp(16px, 12.7vw, 174px); }
.cert h1 { color: var(--cream); font-size: clamp(28px, 2.45vw, 33.5px); font-weight: 600; letter-spacing: -.015em; }
.cert h2 { color: var(--green); font-size: clamp(21px, 1.7vw, 23.5px); font-weight: 600; letter-spacing: -.01em; }
.cert h3 { color: var(--green); font-size: clamp(16px, 1.3vw, 18px); font-weight: 600; text-transform: uppercase; letter-spacing: -.01em; }
.cert ul { padding-left: 1.5em; }
.cert li strong { font-weight: 600; }
.cert .pad { padding-left: .1em; display: block; }

/* ---------- Case studies (Canva used DM Sans here) ---------- */
.cases { font-family: var(--font-alt); max-width: calc(568px + 2 * var(--gutter)); padding-left: clamp(16px, 12.4vw, 170px); padding-right: 16px; box-sizing: content-box; }
.cases .col { max-width: 585px; }
.cases h1 { color: var(--bar); font-size: clamp(28px, 2.4vw, 33px); font-weight: 700; letter-spacing: -.01em; }
.cases h2 { color: var(--green); font-size: clamp(20px, 1.75vw, 24px); font-weight: 600; letter-spacing: -.01em; margin-top: 1.7em; }
.cases .lbl { color: var(--tan); font-weight: 600; }
.cases .lbl.u { text-decoration: underline; text-underline-offset: 3px; }
.cases p.indent { text-indent: 1.1em; }
.cases .divider { width: 440px; max-width: 70%; margin: 44px 0 40px 350px; }

/* ==========================================================================
   LANDING PAGE — one continuous page
   Every section shares the same left edge (var(--gutter)) and reading width.
   ========================================================================== */
.landing { --measure: 900px; }
.landing .page { padding-block: clamp(56px, 6.5vw, 92px); }
.landing .visitor { display: block; }
.landing .visitor__inner { max-width: var(--measure); }
.landing .expertise { padding-left: var(--gutter); padding-right: var(--gutter); }
.landing .page p,
.landing .page ul { max-width: var(--measure); }
.landing .page p.exp-line { max-width: none; }
/* classic hairline between consecutive text sections, aligned to the text column */
.landing main > .page + .page {
  background-image: linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .1));
  background-repeat: no-repeat;
  background-size: calc(100% - 2 * var(--gutter)) 1px;
  background-position: center top;
}

/* ---------- Footer: centered on every screen size ---------- */
.landing .site-footer,
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 0 16px clamp(40px, 5vw, 56px);
}
.site-footer .socials { flex-wrap: wrap; justify-content: center; margin-left: auto; margin-right: auto; }
.landing .site-footer p,
.site-footer p { max-width: none; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Reveal-on-scroll (only when JS runs; content is visible without JS)
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .project, .cyber, .fin, .cert { grid-template-columns: minmax(0, 1fr); }
  .visual { margin-top: 26px; }
  .v-m26 .logo { margin-right: 20px; }
  .cyber figure { max-width: 480px; }
  .turnover .arrow { margin-left: 200px; }
  .cases .divider { margin-left: auto; margin-right: auto; }
  .hero { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); } /* tablets: wider photo keeps the whole signature */
  .hero__photo img { object-position: 8% top; }
}

@media (max-width: 860px) {
  /* small tablets: photo gets half the width and keeps its natural shape, so the signature and caption are never cropped */
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero__photo { align-self: start; aspect-ratio: 512 / 768; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero__top { display: flex; }        /* phones: titles above the photo */
  .hero__titles { display: none; }     /* …and not repeated in the text column */
  .hero__photo { aspect-ratio: 512 / 768; max-height: none; } /* full photo, signature and caption included */
  /* phones only: Cybersecurity page shows the team photo first, above everything */
  .cyber figure { order: -1; max-width: none; }
  .cyber { row-gap: 28px; }
  /* phones only: closer crop of the desk photo (≈2× larger) framing the gentleman and the full laptop */
  .wide-photo--fade-top img { aspect-ratio: 13 / 10; height: auto; object-fit: cover; object-position: 51% center; }
  .hero__content { padding-top: 44px; padding-bottom: 56px; }
  .folders { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-left: 0; margin-right: 0; }
  .os-icons svg { width: 46px; height: 46px; }
  .os-icons .mac { width: 44px; height: 44px; }
  .pointer { width: 34px; height: 34px; }
  .v-m26 .logo { width: 150px; margin-right: 0; }
  .v-m26 .pointer { margin-bottom: -22px; }
  .chart__axis, .chart__row { grid-template-columns: 116px 1fr 48px; }
  .chart__grid { left: 116px; right: 48px; }
  .chart__year { position: static; margin-top: 18px; }
  .chart__controls { justify-content: flex-start; }
  .chart { margin-top: 50px; }
  .turnover .arrow { margin-left: 160px; }
  .platforms { column-gap: 22px; }
}

@media (max-width: 480px) {
  .visual .pointer { display: none; }
  .visual .cta { margin-right: 0; margin-top: 14px; }
  .pill { font-size: 14px; gap: 8px; padding: 0 14px 0 13px; }
}

@media (max-width: 420px) {
  .pill { font-size: 13px; gap: 7px; padding: 0 12px 0 11px; height: 40px; }
  .pill svg { width: 15px; height: 15px; }
  .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart__axis, .chart__row { grid-template-columns: 96px 1fr 44px; font-size: 10px; }
  .chart__grid { left: 96px; right: 44px; }
}
