/* ==========================================================================
   Fratzeskos Dafereras — portfolio
   Design system
   ========================================================================== */

:root {
  /* Palette */
  --ink:        #0e1116;
  --ink-2:      #171c24;
  --ink-3:      #232a34;
  --paper:      #faf8f4;
  --paper-2:    #f2efe8;
  --line:       #e0dbd1;
  --line-dark:  #2c333e;

  --text:       #16191f;
  --text-soft:  #5a6270;
  --text-mute:  #868d9a;
  --on-ink:     #f4f2ee;
  --on-ink-soft:#a8b0bd;

  --accent:     #d9532c;
  --accent-ink: #b8401e;
  --accent-soft:#fdeee8;
  --teal:       #17605b;
  --teal-soft:  #e5f0ee;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;

  /* Layout */
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(14,17,22,.05), 0 2px 8px rgba(14,17,22,.05);
  --shadow-md: 0 2px 6px rgba(14,17,22,.06), 0 12px 32px rgba(14,17,22,.09);
  --shadow-lg: 0 4px 12px rgba(14,17,22,.07), 0 28px 64px rgba(14,17,22,.14);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
/* width/height attributes reserve layout space; let CSS drive the rendered box. */
img[width][height] { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: .45em; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
.section { padding: clamp(4rem, 8vw, 7.5rem) 0; }
.section--tight { padding: clamp(3rem, 5vw, 4.5rem) 0; }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--ink h2, .section--ink h3 { color: var(--on-ink); }
.section--paper2 { background: var(--paper-2); }

/* Inline text link for places `.prose a` and `.hero__sub a` do not reach:
   the About block on the ink section, the certifications list, meta rows.
   Nest it as <strong><a class="ilink"> …, never the other way round, or the
   `strong` colour rules win over the link colour. */
.ilink {
  color: var(--accent-ink);
  border-bottom: 1px solid rgba(184,64,30,.3);
  transition: color .16s ease, border-color .16s ease;
}
.ilink:hover { border-bottom-color: var(--accent-ink); }

.eyebrow {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  flex: none;
}
.section--ink .eyebrow { color: #f0906e; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.06;
}
.h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  color: var(--text-soft);
  max-width: 62ch;
}
.section--ink .lede { color: var(--on-ink-soft); }
.section-head { max-width: 68ch; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
.section-head h2 { margin-bottom: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .78rem 1.4rem;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 550;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: var(--on-ink); }
.btn--primary:hover { background: var(--accent); }
.btn--ghost { border-color: var(--line); background: transparent; color: var(--text); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(14,17,22,.04); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-ink); }
.btn--on-ink { border-color: rgba(255,255,255,.22); color: var(--on-ink); }
.btn--on-ink:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.4); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250,248,244,.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 72px;
}
.brand { display: flex; align-items: baseline; gap: .55rem; font-weight: 600; letter-spacing: -.02em; }
.brand__mark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
}
.brand__role { font-size: .78rem; color: var(--text-mute); font-weight: 500; letter-spacing: .01em; }
.nav__links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  padding: .5rem .78rem;
  border-radius: 8px;
  font-size: .92rem;
  color: var(--text-soft);
  font-weight: 500;
  transition: color .16s ease, background .16s ease;
}
.nav__links a:hover { color: var(--text); background: rgba(14,17,22,.05); }
.nav__links a.is-active { color: var(--accent); }
/* Holds only the mobile menu toggle, so it stays out of the desktop flex row
   (otherwise space-between leaves a dead gap to the right of the nav links). */
.nav__cta { display: none; align-items: center; gap: .6rem; }
.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav__toggle span { display: block; width: 17px; height: 1.5px; background: var(--text); position: relative; }
.nav__toggle span::before, .nav__toggle span::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 1.5px; background: var(--text);
  transition: transform .2s ease, top .2s ease;
}
.nav__toggle span::before { top: -5.5px; }
.nav__toggle span::after  { top:  5.5px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 6vw, 5.5rem); overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 40% 30% -25%;
  background: radial-gradient(closest-side, rgba(217,83,44,.13), transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 20% -20% -35% 45%;
  background: radial-gradient(closest-side, rgba(23,96,91,.14), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .82fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .4rem .85rem .4rem .6rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 1.5rem;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #1a9e63; box-shadow: 0 0 0 3px rgba(26,158,99,.18); flex: none; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.022em;
  margin-bottom: 1.35rem;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero__sub { font-size: clamp(1.02rem, 1.6vw, 1.16rem); color: var(--text-soft); max-width: 56ch; margin-bottom: 2rem; }
.hero__sub strong { color: var(--text); font-weight: 600; }
.hero__sub a { text-decoration: underline; text-decoration-color: rgba(217,83,44,.45); text-underline-offset: 3px; transition: text-decoration-color .16s ease, color .16s ease; }
.hero__sub a:hover { color: var(--accent-ink); text-decoration-color: var(--accent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2.4rem; }
.hero__roles { display: flex; flex-wrap: wrap; gap: .45rem; }
.role-chip {
  font-size: .8rem;
  font-weight: 500;
  padding: .34rem .78rem;
  border-radius: 999px;
  background: rgba(23,96,91,.09);
  color: var(--teal);
  border: 1px solid rgba(23,96,91,.16);
}

.hero__figure { position: relative; }
.hero__photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1 / 1;
  background: var(--paper-2);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__badge {
  position: absolute;
  left: -1.2rem;
  bottom: -1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  box-shadow: var(--shadow-md);
  max-width: 17.5rem;
}
.hero__badge b { display: block; font-size: .92rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin-bottom: .5rem; }
.hero__badge-org { font-size: .78rem; color: var(--accent-ink); font-weight: 600; letter-spacing: .01em; display: block; margin-bottom: .4rem; }
a.hero__badge-org { border-bottom: 1px solid rgba(184,64,30,.3); width: fit-content; transition: border-color .16s ease; }
a.hero__badge-org:hover { border-bottom-color: var(--accent-ink); }
.hero__badge-list { font-size: .74rem; color: var(--text-mute); line-height: 1.5; display: block; }

/* ---------- Marquee / trust strip ---------- */
.trust {
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,.5);
  padding: 1.35rem 0;
}
.trust__inner { display: flex; align-items: center; gap: clamp(1rem, 4vw, 3rem); flex-wrap: wrap; justify-content: center; }
.trust__label { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-mute); font-weight: 600; }
.trust__item { font-size: .95rem; font-weight: 550; color: var(--text-soft); letter-spacing: -.01em; }
a.trust__item { transition: color .16s ease; }
a.trust__item:hover { color: var(--accent-ink); }
.trust__sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* ---------- Capability cards ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.cap-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.9rem 1.7rem;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.cap-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cfc8ba; }
.cap-card__icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  margin-bottom: 1.15rem;
}
.cap-card__icon svg { width: 21px; height: 21px; }
.cap-card h3 { font-size: 1.14rem; margin-bottom: .6rem; letter-spacing: -.015em; }
.cap-card p { font-size: .95rem; color: var(--text-soft); margin-bottom: 1rem; }
.cap-card ul { list-style: none; padding: 0; margin: 0; }
.cap-card li {
  font-size: .89rem;
  color: var(--text-soft);
  padding-left: 1.35rem;
  position: relative;
  margin-bottom: .5rem;
}
.cap-card li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--teal); opacity: .5;
}

/* ---------- Work cards ---------- */
.work-list { display: grid; gap: clamp(1.5rem, 3vw, 2.2rem); }
.work-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(1.5rem, 4vw, 3.4rem);
  align-items: center;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.6rem);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.work-card:hover { transform: translateY(-4px); border-color: #3c4553; background: #1a212b; }
.work-card--flip { grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); }
.work-card--flip .work-card__media { order: -1; }
.work-card__no {
  font-family: var(--font-display);
  font-size: .95rem;
  color: #f0906e;
  letter-spacing: .06em;
  margin-bottom: .9rem;
  display: block;
}
.work-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.1;
  margin-bottom: .55rem;
}
.work-card__role { font-size: .86rem; color: #f0906e; font-weight: 500; margin-bottom: 1rem; letter-spacing: .01em; }
.work-card p { color: var(--on-ink-soft); font-size: .98rem; }
.work-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.6rem;
  margin: 1.5rem 0 1.7rem;
  padding: 1.2rem 0;
  border-block: 1px solid var(--line-dark);
}
.work-card__stats div { min-width: 0; }
.work-card__stats b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--on-ink);
  margin-bottom: .3rem;
}
.work-card__stats span { font-size: .78rem; color: var(--on-ink-soft); letter-spacing: .01em; line-height: 1.35; display: block; }
.work-card__taglist {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin: 1.5rem 0 1.7rem; padding: 1.2rem 0;
  border-block: 1px solid var(--line-dark);
}
.work-card__taglist span {
  font-size: .78rem; font-weight: 500;
  padding: .32rem .75rem; border-radius: 999px;
  background: rgba(240,144,110,.1); color: #f0906e;
  border: 1px solid rgba(240,144,110,.28);
}
.work-card__link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .95rem; font-weight: 550; color: var(--on-ink);
  border-bottom: 1px solid rgba(255,255,255,.3);
  padding-bottom: .2rem;
  transition: gap .2s ease, border-color .2s ease, color .2s ease;
}
.work-card:hover .work-card__link { gap: .8rem; color: #f0906e; border-color: #f0906e; }
.work-card__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: #0a0d12;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.work-card__media img { width: 100%; height: 100%; object-fit: contain; aspect-ratio: 16/10; }

/* ---------- Compact work grid ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.25rem; }
.mini-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mini-card__tag {
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 600; color: var(--teal); margin-bottom: .8rem;
}
.mini-card h3 { font-size: 1.08rem; margin-bottom: .5rem; }
.mini-card p { font-size: .91rem; color: var(--text-soft); margin-bottom: 1rem; }
.mini-card .meta { margin-top: auto; font-size: .8rem; color: var(--text-mute); display: flex; gap: .5rem; flex-wrap: wrap; }
.mini-card .meta span { background: var(--paper-2); padding: .2rem .55rem; border-radius: 6px; }

/* ---------- Tags ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-size: .77rem; font-weight: 500;
  padding: .25rem .62rem; border-radius: 6px;
  background: var(--paper-2); color: var(--text-soft); border: 1px solid var(--line);
}

/* ---------- Job experience cards ---------- */
.job-list { display: grid; gap: 1.1rem; }
.job-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.job-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform .3s ease;
}
.job-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cfc8ba; }
.job-card:hover::before { transform: scaleY(1); }
.job-card__top { display: flex; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.job-card h3 { font-size: 1.24rem; margin-bottom: .22rem; letter-spacing: -.015em; }
.job-card__org { font-size: .95rem; color: var(--text-soft); font-weight: 550; }
.job-card__client { font-size: .84rem; color: var(--text-mute); margin-top: .18rem; }
.job-card__period {
  font-size: .78rem; font-weight: 600; color: var(--text-soft);
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 999px; padding: .28rem .78rem;
  white-space: nowrap; align-self: flex-start; flex: none;
  display: inline-flex; align-items: center; gap: .45rem;
}
.job-card__period--now { color: var(--accent-ink); background: var(--accent-soft); border-color: rgba(217,83,44,.22); }
.job-card__period .dot { width: 6px; height: 6px; box-shadow: 0 0 0 3px rgba(26,158,99,.16); }
.job-card p { font-size: .95rem; color: var(--text-soft); margin-bottom: 1rem; }
.job-card__cta {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.1rem;
  font-size: .89rem; font-weight: 550; color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .55rem 1.15rem;
  transition: gap .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.job-card__cta svg { width: 15px; height: 15px; }
.job-card:hover .job-card__cta { background: var(--ink); color: var(--on-ink); border-color: var(--ink); gap: .75rem; }

/* ---------- Toolbox ---------- */
.tool-groups { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1.6rem 2rem; }
.tool-group h4 { font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; color: var(--text-mute); margin-bottom: .9rem; font-weight: 600; }
.tool-group ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tool-group li {
  margin: 0;
  font-size: .85rem;
  padding: .3rem .68rem;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-soft);
}

/* ---------- Education / credentials ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.25rem; }
.edu-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; gap: 1.1rem; align-items: flex-start;
}
.edu-card__year { font-size: .78rem; font-weight: 600; color: var(--accent); white-space: nowrap; padding-top: .18rem; }
.edu-card h3 { font-size: 1.02rem; margin-bottom: .25rem; }
.edu-card p { font-size: .88rem; color: var(--text-soft); margin: 0; }

.cert-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2.5rem; }
.cert-list li {
  break-inside: avoid;
  font-size: .92rem;
  color: var(--text-soft);
  padding: .55rem 0 .55rem 1.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.cert-list li::before {
  content: "✓"; position: absolute; left: 0; top: .5rem;
  color: var(--teal); font-size: .82rem; font-weight: 700;
}
.cert-list li b { color: var(--text); font-weight: 600; }
.cert-list li span { display: block; font-size: .8rem; color: var(--text-mute); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-photo { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-dark); }
.about-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about-body p { color: var(--on-ink-soft); font-size: 1.03rem; }
.about-body p strong { color: var(--on-ink); font-weight: 600; }
/* Must come after the `strong` rule above: the link sits inside the <strong>,
   so this is what actually colours it. */
.about-body .ilink { color: var(--on-ink); border-bottom-color: rgba(240,144,110,.45); }
.about-body .ilink:hover { color: #f0906e; border-bottom-color: #f0906e; }
.pull {
  border-left: 2px solid var(--accent);
  padding-left: 1.3rem;
  margin: 2rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.3vw, 1.6rem);
  line-height: 1.35;
  color: var(--on-ink);
}
.fact-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.5rem; margin-top: 2.2rem; padding-top: 2rem; border-top: 1px solid var(--line-dark); }
.fact-row b {
  display: block; font-family: var(--font-display); font-weight: 400;
  font-size: 1.9rem; line-height: 1; color: var(--on-ink); margin-bottom: .35rem;
}
.fact-row span { font-size: .82rem; color: var(--on-ink-soft); }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--on-ink); }
.contact__box {
  background: linear-gradient(140deg, #1b222c 0%, #12171e 60%);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact__box::before {
  content: ""; position: absolute; inset: -60% 30% 60% -20%;
  background: radial-gradient(closest-side, rgba(217,83,44,.22), transparent 70%);
}
.contact__box > * { position: relative; }
.contact__box h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 1rem; }
.contact__box p { color: var(--on-ink-soft); max-width: 52ch; margin-inline: auto; margin-bottom: 2rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.contact__meta { display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: center; margin-top: 2.4rem; font-size: .88rem; color: var(--on-ink-soft); }
.contact__meta a:hover { color: #f0906e; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-soft); border-top: 1px solid var(--line-dark); padding: 2.2rem 0; font-size: .85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.site-footer a:hover { color: var(--on-ink); }
.footer-links { display: flex; gap: 1.2rem; }

/* ==========================================================================
   Case study pages
   ========================================================================== */
.cs-hero { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); position: relative; overflow: hidden; }
.cs-hero::before {
  content: ""; position: absolute; inset: -40% 30% 40% -20%;
  background: radial-gradient(closest-side, rgba(217,83,44,.11), transparent 72%);
}
.cs-hero .wrap { position: relative; }
.back-link { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--text-soft); margin-bottom: 2rem; transition: gap .18s ease, color .18s ease; }
.back-link:hover { gap: .75rem; color: var(--accent); }
.cs-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.3rem, 5.5vw, 4rem); line-height: 1.04; letter-spacing: -.02em;
  margin-bottom: 1.1rem; max-width: 20ch;
}
.cs-hero__lede { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--text-soft); max-width: 62ch; }
.cs-meta {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1.5rem; margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--line);
}
/* Job pages carry an extra Company field. Declared here so the responsive
   overrides further down still collapse it to 2 and then 1 column. */
.cs-meta--5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.cs-meta h4 { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--text-mute); margin-bottom: .45rem; font-weight: 600; }
.cs-meta p { font-size: .92rem; margin: 0; color: var(--text); font-weight: 500; }
.cs-meta a {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--accent-ink); border-bottom: 1px solid rgba(184,64,30,.28);
  transition: border-color .16s ease;
}
.cs-meta a:hover { border-bottom-color: var(--accent-ink); }
.cs-meta a svg { width: 12px; height: 12px; flex: none; }

.cs-cover { margin: 0 0 clamp(2.5rem, 5vw, 4rem); }
.cs-cover .shot { margin: 0; }

.prose { max-width: 74ch; }
.prose h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.12;
  margin: 3.2rem 0 1rem; letter-spacing: -.015em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.16rem; margin: 2.2rem 0 .7rem; letter-spacing: -.015em; }
.prose p, .prose li { color: #33383f; }
.prose strong { color: var(--text); font-weight: 600; }
.prose > ul, .prose > ol { margin-bottom: 1.4rem; }
.prose a { color: var(--accent-ink); border-bottom: 1px solid rgba(184,64,30,.3); }
.prose a:hover { border-bottom-color: var(--accent-ink); }

.callout {
  background: var(--teal-soft);
  border: 1px solid rgba(23,96,91,.18);
  border-left: 3px solid var(--teal);
  border-radius: 12px;
  padding: 1.3rem 1.5rem;
  margin: 1.8rem 0;
}
.callout h4 { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: .55rem; font-weight: 700; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout--accent { background: var(--accent-soft); border-color: rgba(217,83,44,.2); border-left-color: var(--accent); }
.callout--accent h4 { color: var(--accent-ink); }

/* ---------- User story card ----------
   A structured requirement: the statement, acceptance criteria written as
   Given / When / Then, the business rules, and an explicit out-of-scope list.
   Specificity note: every inner rule is prefixed with .ustory so it beats
   `.prose p, .prose li` and the base ul/li reset.                              */
.ustory {
  margin: 2.2rem 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ustory__head {
  display: flex; align-items: baseline; gap: .3rem .85rem; flex-wrap: wrap;
  padding: 1rem 1.5rem;
  background: var(--ink);
}
.ustory__tag {
  flex: none;
  font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: #f0906e;
}
.ustory__head h4 {
  margin: 0; color: #fff;
  font-size: 1rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35;
}
.ustory__body { padding: clamp(1.15rem, 3vw, 1.6rem); }

.ustory .ustory__statement {
  margin: 0 0 1.5rem;
  padding: .1rem 0 .1rem 1.15rem;
  border-left: 3px solid var(--accent);
  font-size: 1rem; line-height: 1.62; color: var(--text);
}
.ustory h5 {
  margin: 1.9rem 0 1rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
  font-size: .68rem; letter-spacing: .15em; text-transform: uppercase;
  font-weight: 700; color: var(--text-mute);
}
.ustory h5:first-child { margin-top: 0; }

.ustory .ac { margin-bottom: 1.2rem; }
.ustory .ac:last-child { margin-bottom: 0; }
.ustory .ac__title {
  margin: 0 0 .5rem;
  font-size: .9rem; font-weight: 600; color: var(--text); line-height: 1.4;
}
.ustory .ac__title b { color: var(--accent-ink); font-weight: 700; }

/* Given / When / Then, keyword column aligned so the logic reads down the page */
.ustory .gwt { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.ustory .gwt li {
  margin: 0;
  display: grid; grid-template-columns: 3.3rem 1fr; gap: .7rem;
  font-size: .875rem; line-height: 1.55; color: var(--text-soft);
}
.ustory .gwt li b {
  font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; color: var(--teal); padding-top: .3rem;
}

.ustory .ustory__rules { margin: 0; padding-left: 1.15rem; }
.ustory .ustory__rules li {
  margin-bottom: .5rem;
  font-size: .89rem; line-height: 1.6; color: var(--text-soft);
}
.ustory .ustory__rules li:last-child { margin-bottom: 0; }

.ustory .ustory__chips {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .45rem;
}
.ustory .ustory__chips li {
  margin: 0;
  padding: .32rem .85rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .78rem; color: var(--text-mute);
}

/* ---------- Use case card ----------
   Same shell as .ustory (head bar, h5 rules, __rules, __chips); these are the
   use-case-only parts: the actor/goal/trigger header, success/failure
   postconditions, and numbered flow steps.                                     */
.ustory .uc-meta {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem 1.4rem;
  margin: 0 0 1.5rem; padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.ustory .uc-meta dt {
  margin-bottom: .3rem;
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: var(--text-mute);
}
.ustory .uc-meta dd { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--text); }

.ustory .uc-post { display: grid; gap: 1rem; }
.ustory .uc-post > div { padding-left: .95rem; border-left: 3px solid var(--line); }
.ustory .uc-post h6 {
  margin: 0 0 .4rem;
  font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 700;
}
.ustory .uc-post .is-success { border-left-color: #3d9152; }
.ustory .uc-post .is-success h6 { color: #2f7d45; }
.ustory .uc-post .is-fail { border-left-color: var(--accent); }
.ustory .uc-post .is-fail h6 { color: var(--accent-ink); }

/* Numbered steps. The counter resets per list, so alternative-flow
   sub-steps start again at 1.                                                  */
.ustory .uc-flow {
  list-style: none; margin: 0; padding: 0;
  counter-reset: ucstep;
  display: grid; gap: .45rem;
}
.ustory .uc-flow li {
  margin: 0; counter-increment: ucstep;
  display: grid; grid-template-columns: 1.65rem 1fr; gap: .7rem;
  font-size: .875rem; line-height: 1.55; color: var(--text-soft);
}
.ustory .uc-flow li::before {
  content: counter(ucstep);
  display: grid; place-items: center;
  height: 1.35rem;
  background: var(--paper-2); border-radius: 6px;
  font-size: .68rem; font-weight: 700; color: var(--text-mute);
}
.ustory .uc-at {
  display: inline-block; margin: 0 0 .55rem;
  padding: .2rem .65rem;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px;
  font-size: .7rem; color: var(--text-mute);
}

.metric-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin: 2rem 0 2.6rem;
}
.metric-strip div { background: #fff; padding: 1.4rem 1.2rem; }
.metric-strip b {
  display: block; font-family: var(--font-display); font-weight: 400;
  font-size: 2.1rem; line-height: 1; margin-bottom: .4rem; color: var(--ink);
}
.metric-strip span { font-size: .8rem; color: var(--text-soft); line-height: 1.4; display: block; }

.figure { margin: 2.4rem 0; }
.figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.figure figcaption { font-size: .84rem; color: var(--text-mute); margin-top: .8rem; line-height: 1.5; }
.figure--wide { width: min(100vw - 2.5rem, var(--wrap)); margin-left: 50%; transform: translateX(-50%); }
.fig-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.fig-grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.fig-grid img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.fig-grid--phones { grid-template-columns: repeat(5, minmax(0,1fr)); gap: .8rem; align-items: end; }
.fig-grid--phones img { border: none; border-radius: 0; box-shadow: none; }

/* ---------- Framed media (.shot) ----------
   A tinted panel holding a shadowed "window". Two flavours:
   .shot           — plate, for slides, diagrams, certificates, device mockups
   .shot--browser  — adds faux browser chrome, for live-product screenshots      */
.shot {
  margin: 2.6rem 0;
  padding: clamp(.85rem, 2.2vw, 1.6rem);
  background: linear-gradient(155deg, #f6f3ec 0%, #efeade 55%, #f4efe6 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.shot--wide { width: min(100vw - 2.5rem, 940px); margin-left: 50%; transform: translateX(-50%); }
.shot__frame {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(14,17,22,.10);
  box-shadow: 0 1px 2px rgba(14,17,22,.06), 0 16px 38px rgba(14,17,22,.16);
}
.shot__bar {
  display: flex;
  align-items: center;
  padding: .58rem .8rem;
  background: #f2efe9;
  border-bottom: 1px solid rgba(14,17,22,.09);
}
/* one element, three traffic lights */
.shot__dots {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #ef6f61;
  box-shadow: 14px 0 0 #f2c14e, 28px 0 0 #57bd6f;
  margin-right: 2.1rem;
}
.shot__url {
  font-size: .72rem;
  color: var(--text-mute);
  background: #fff;
  border: 1px solid rgba(14,17,22,.08);
  border-radius: 999px;
  padding: .16rem .7rem;
}
.shot img { display: block; width: 100%; }
.shot figcaption { font-size: .82rem; color: var(--text-mute); line-height: 1.5; margin: .9rem .25rem 0; }
.shot__grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(.7rem, 1.6vw, 1.1rem); }
.shot__grid .shot__frame { height: 100%; }

table.data {
  width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1.6rem 0 2rem;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
table.data th, table.data td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--paper-2); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); font-weight: 600; }
table.data tr:last-child td { border-bottom: none; }
table.data td:first-child { font-weight: 550; color: var(--text); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.next-case {
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}
.next-case__inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.next-case small { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); font-weight: 600; display: block; margin-bottom: .5rem; }
.next-case h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cards-3 { grid-template-columns: 1fr; }
  .tool-groups { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cs-meta { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .work-card, .work-card--flip { grid-template-columns: 1fr; }
  .work-card--flip .work-card__media { order: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
}
@media (max-width: 880px) {
  html { scroll-padding-top: 76px; }
  .nav__links {
    position: fixed;
    inset: 72px 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    gap: .1rem;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .8rem .5rem; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__cta { display: flex; }
  .nav__toggle { display: flex; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { max-width: 400px; margin-inline: auto; }
  .hero__badge { left: -.4rem; }
  .grid-2, .edu-grid, .fig-grid, .fig-grid--3 { grid-template-columns: 1fr; }
  .cert-list { columns: 1; }
  .fact-row { grid-template-columns: 1fr; gap: 1.1rem; }
  .fig-grid--phones { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .shot__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand__role { display: none; }
  .cs-meta, .metric-strip, .tool-groups { grid-template-columns: 1fr; }
  .metric-strip div { padding: 1.1rem; }
  .work-card__stats { grid-template-columns: 1fr; gap: .9rem; }
  .fig-grid--phones { grid-template-columns: repeat(2, 1fr); }
  .figure--wide { width: auto; margin-left: 0; transform: none; }
  .shot--wide { width: auto; margin-left: 0; transform: none; }
  .hero__badge { left: -.3rem; bottom: -.8rem; max-width: 13rem; padding: .7rem .9rem; }
  /* stack the Given/When/Then keyword above its clause so the text keeps a usable width */
  .ustory .gwt li { grid-template-columns: 1fr; gap: .1rem; }
  .ustory .gwt li b { padding-top: 0; }
  .ustory .uc-meta { grid-template-columns: 1fr; gap: .9rem; }
  /* smaller, tighter traffic lights — the margin must stay clear of the
     box-shadow dots (last one ends at offset + width) or the URL pill overlaps them */
  .shot__dots { width: 7px; height: 7px; box-shadow: 11px 0 0 #f2c14e, 22px 0 0 #57bd6f; margin-right: 1.7rem; }
  .shot__url { font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .nav, .contact, .next-case, .hero__actions { display: none !important; }
  body { background: #fff; }
}
