/* ============================================================
   torresani.eu - shared stylesheet
   Fonts are self-hosted (no requests to third parties).
   ============================================================ */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url('fonts/ibm-plex-sans-300.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('fonts/ibm-plex-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('fonts/ibm-plex-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('fonts/ibm-plex-sans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
}

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

:root {
  --bg:        #F7F8FA;
  --surface:   #FFFFFF;
  --slate:     #111827;
  --slate-2:   #1F2D45;
  --mid:       #4B5A72;
  --muted:     #5E6B7E;   /* darkened from #7A8799 for WCAG AA contrast */
  --border:    #E2E6ED;
  --accent:    #2A6672;
  --accent-d:  #1B4750;
  --accent-lt: #E7F0F1;
  --on-dark:   rgba(255,255,255,0.72);
  --on-dark-2: rgba(255,255,255,0.6);
  --mono:      'IBM Plex Mono', ui-monospace, monospace;
  --gutter:    2.5rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 15px;
  color: var(--slate);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.dark-section :focus-visible, footer :focus-visible, .cta-band :focus-visible,
.ai-section :focus-visible { outline-color: #A6D0D4; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 500;
  background: var(--slate); color: #fff; padding: 10px 16px; border-radius: 3px;
  font-size: 13px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── UTILITY ── */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter); }

.overline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.25rem;
}
.ov-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  flex-shrink: 0;
}

.geo-bg { position: relative; }
.geo-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.geo-bg > * { position: relative; z-index: 1; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.anim-1 { animation: fadeUp 0.55s cubic-bezier(.22,.68,0,1.2) 0.05s both; }
.anim-2 { animation: fadeUp 0.55s cubic-bezier(.22,.68,0,1.2) 0.15s both; }
.anim-3 { animation: fadeUp 0.55s cubic-bezier(.22,.68,0,1.2) 0.25s both; }
.anim-4 { animation: fadeUp 0.55s cubic-bezier(.22,.68,0,1.2) 0.35s both; }
.anim-fade { animation: fadeIn 0.8s ease 0.4s both; }

/* ── NAV ── */
nav.site-nav {
  background: rgba(247,248,250,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  height: 58px;
}
.nav-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--slate);
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); font-weight: 300; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.15s;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--slate); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-contact {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--surface);
  background: var(--accent);
  padding: 7px 18px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.nav-contact:hover { background: var(--accent-d); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  width: 40px; height: 36px;
  align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--slate);
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-links .nav-links-contact { display: none; }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 5rem 0 4rem;
  overflow: hidden;
  position: relative;
}
.page-hero > .wrap { position: relative; z-index: 1; }
.page-hero-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 5rem;
  align-items: end;
}
.page-hero h1 {
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--slate);
  margin-bottom: 1.5rem;
}
.page-hero h1 .accent { color: var(--accent); }
.page-hero h1 .thin { font-weight: 300; }
.page-hero-lead {
  font-size: 16px;
  font-weight: 300;
  color: var(--mid);
  line-height: 1.85;
  max-width: 540px;
}
.page-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--border);
  align-self: end;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  padding: 0.9rem 1.25rem;
  font-size: 12.5px;
}
.meta-label { color: var(--muted); font-weight: 300; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }
.meta-val { font-weight: 700; color: var(--slate); letter-spacing: -0.01em; text-align: right; }
.meta-val.accent { color: var(--accent); }

/* ── MARQUEE ── */
.marquee-strip {
  background: var(--accent);
  padding: 11px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}
.marquee-item {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  padding: 0 2.5rem;
  border-right: 1px solid rgba(255,255,255,0.25);
}

/* ── SECTIONS ── */
section { border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
.section-pad { padding: 5.5rem 0; }
.section-pad-sm { padding: 4rem 0; }

h2 {
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--slate);
}
h2 .accent { color: var(--accent); }
h2 .thin { font-weight: 300; }
h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate);
}

.section-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 4rem;
}
.section-desc {
  font-size: 15px;
  color: var(--mid);
  font-weight: 300;
  line-height: 1.85;
}

/* ── CARDS GRID ── */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.card {
  background: var(--surface);
  padding: 2rem;
  transition: background 0.15s;
}
.card:hover { background: var(--accent-lt); }
.card-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.card-title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.6rem; }
.card-body { font-size: 13.5px; font-weight: 300; color: var(--mid); line-height: 1.75; }

/* ── LIST ROWS ── */
.list-rows { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.list-row {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.18s;
  cursor: default;
}
.list-row:hover { padding-left: 6px; }
.list-row-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-lt);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 3px 9px;
  margin-bottom: 0.6rem;
}
.list-row-title { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 0.4rem; }
.list-row-body { font-size: 13.5px; font-weight: 300; color: var(--mid); line-height: 1.75; }

/* ── TAGS ── */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1rem; }
.tag {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--mid);
  font-family: var(--mono);
  transition: border-color 0.15s, color 0.15s;
}
.tag-accent { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }

/* ── DARK SECTION ── */
.dark-section { background: var(--slate); }
.dark-section .overline { color: rgba(255,255,255,0.55); }
.dark-section .ov-badge { background: rgba(255,255,255,.12); border: 1px solid #7FBAC0; color: #7FBAC0; }

/* ── 2-COL TEXT/VISUAL ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.two-col-wide { display: grid; grid-template-columns: 1.2fr 1fr; gap: 5rem; align-items: start; }

/* ── STAT ROW ── */
.stat-row { display: flex; gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-cell {
  flex: 1;
  padding: 2rem 2rem 2rem 0;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; padding-left: 2rem; padding-right: 0; }
.stat-cell:not(:first-child) { padding-left: 2rem; }
.stat-big { font-size: 42px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-bottom: 6px; }
.stat-big .u { font-size: 22px; font-weight: 300; color: var(--accent); }
.stat-lbl { font-size: 12px; color: var(--muted); font-weight: 300; }

/* ── QUOTE BLOCK ── */
.quote-block {
  border-left: 3px solid var(--accent);
  padding: 1.5rem 2rem;
  background: var(--accent-lt);
  border-radius: 0 4px 4px 0;
}
.quote-text { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.5; color: var(--slate); }
.quote-attr { font-size: 12px; color: var(--muted); font-weight: 300; margin-top: 0.6rem; font-family: var(--mono); }

/* ── DARK CARD ── */
.dark-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 2rem;
}
.dark-text { color: var(--on-dark); font-size: 14px; font-weight: 300; line-height: 1.85; }
.dark-title { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.dark-label { font-size: 10px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: #7FBAC0; margin-bottom: 0.75rem; font-family: var(--mono); }

/* ── CTA BAND ── */
.cta-band {
  background: var(--slate);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.cta-band-inner { display: flex; justify-content: space-between; align-items: center; gap: 3rem; }
.cta-band-title { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; color: #fff; }
.cta-band-title .accent { color: #7FBAC0; }
.cta-band-sub { font-size: 14px; color: var(--on-dark-2); font-weight: 300; margin-top: 0.5rem; }
.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: var(--slate);
  font-size: 14px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.15s, transform 0.12s;
  flex-shrink: 0;
}
.btn-white:hover { background: var(--accent-lt); transform: translateY(-1px); }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--slate);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 3px;
  transition: background 0.15s, transform 0.12s;
}
.btn-primary:hover { background: var(--slate-2); transform: translateY(-1px); }
.btn-secondary {
  font-size: 13px;
  font-weight: 400;
  color: var(--mid);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.btn-secondary:hover { color: var(--slate); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--slate);
  color: var(--slate);
  font-size: 13px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 3px;
  transition: background 0.15s;
}
.btn-outline:hover { background: var(--slate); color: #fff; }

/* ── TIMELINE GRID ── */
.tl-grid { display: grid; grid-template-columns: 90px 1fr; border-top: 1px solid var(--border); }
.tl-y { padding: 1.1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 400; color: var(--accent); font-family: var(--mono); }
.tl-c { padding: 1.1rem 0 1.1rem 1.25rem; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); font-size: 13px; color: var(--mid); font-weight: 300; line-height: 1.65; }
.tl-c strong { font-weight: 700; color: var(--slate); }

/* ── PORTRAIT (photo or monogram fallback) ── */
.portrait {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--slate);
  aspect-ratio: 4 / 5;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-mono {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(90px, 12vw, 150px);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: rgba(255,255,255,0.08);
  user-select: none;
}
.portrait-mono span { color: rgba(96,165,250,0.35); }

/* ── LEGAL PAGE ── */
.legal { max-width: 760px; }
.legal h2 { font-size: 22px; letter-spacing: -0.02em; margin: 2.5rem 0 0.75rem; }
.legal p, .legal li { font-size: 15px; color: var(--mid); line-height: 1.85; font-weight: 300; }
.legal p + p { margin-top: 0.75rem; }
.legal ul { margin: 0.5rem 0 0 1.25rem; }
.legal a { color: var(--accent); border-bottom: 1px solid currentColor; }
.legal strong { color: var(--slate); font-weight: 700; }

/* ── FOOTER ── */
footer { background: var(--slate); padding: 2rem 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.f-logo { font-size: 13px; font-weight: 700; letter-spacing: -0.02em; color: rgba(255,255,255,0.75); }
.f-logo span { color: #7FBAC0; font-weight: 300; }
.f-copy { font-size: 11px; color: var(--on-dark-2); font-family: var(--mono); }
.f-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.f-links a { font-size: 12px; color: var(--on-dark-2); transition: color 0.15s; font-weight: 300; }
.f-links a:hover { color: #fff; }

/* ============================================================
   HOME
   ============================================================ */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  min-height: 86vh;
}
.hero-left {
  padding: 5rem 4rem 4rem 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  border-right: 1px solid var(--border);
}
.hero-right-col { display: flex; flex-direction: column; }
.hero-right-col .portrait { flex: 1; border: none; border-radius: 0; aspect-ratio: auto; min-height: 340px; }
.hero-cred-zone { padding: 1.75rem 2rem; background: var(--slate); }
.cred-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 12.5px;
  color: var(--on-dark);
  line-height: 1.5;
  font-weight: 300;
}
.cred-item:last-child { border-bottom: none; }
.cred-bullet { color: #7FBAC0; font-size: 16px; line-height: 1; flex-shrink: 0; margin-top: 1px; }

.hero-tag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 2rem; }
.hero-tag {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 2px;
}
.hero-tag-sep { width: 1px; height: 24px; background: var(--border); }
.hero-loc {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--mono);
}
.hero h1 {
  font-size: clamp(44px, 6vw, 74px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.035em;
  color: var(--slate);
  margin-bottom: 2rem;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .thin { font-weight: 300; }
.hero-lead {
  font-size: 16px;
  font-weight: 300;
  color: var(--mid);
  line-height: 1.8;
  max-width: 580px;
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.stat { padding: 0 1.25rem; border-right: 1px solid var(--border); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: none; padding-right: 0; }
.stat-num {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--slate);
  line-height: 1;
  margin-bottom: 6px;
  white-space: nowrap;
}
.stat-num .unit { font-size: 20px; font-weight: 300; color: var(--accent); }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 300; letter-spacing: 0.02em; line-height: 1.4; }

/* services list */
.services-section { background: var(--surface); padding: 6rem 0; }
.services-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 4rem;
}
.services-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.service-row {
  background: var(--surface);
  padding: 2.25rem 2rem;
  transition: background 0.15s;
}
a.service-row:hover { background: var(--accent-lt); }
.srv-num {
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-lt);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 3px 9px;
  font-family: var(--mono);
  margin-bottom: 0.75rem;
}
.srv-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--slate); margin-bottom: 0.6rem; line-height: 1.2; }
.srv-desc { font-size: 14px; font-weight: 300; color: var(--mid); line-height: 1.75; max-width: 620px; margin-bottom: 1rem; }
.srv-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.srv-tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--mid);
  font-family: var(--mono);
  transition: border-color 0.15s, color 0.15s;
}
a.service-row:hover .srv-tag { border-color: var(--accent); color: var(--accent); }

/* highlighted projects */
.projects-section { background: var(--bg); padding: 6rem 0; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.project-cell { background: var(--surface); padding: 1.75rem 1.75rem 2rem; display: flex; flex-direction: column; gap: 6px; transition: background 0.15s; }
.project-cell:hover { background: var(--accent-lt); }
.pc-type { font-size: 10px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--mono); }
.pc-name { font-size: 16px; font-weight: 700; color: var(--slate); letter-spacing: -0.015em; line-height: 1.3; }
.pc-note { font-size: 13px; color: var(--mid); font-weight: 300; line-height: 1.65; margin-top: 2px; }
.pc-period { font-size: 10.5px; color: var(--muted); font-family: var(--mono); margin-top: auto; padding-top: 0.75rem; }
.projects-foot { margin-top: 2rem; }

/* AI block on home */
.ai-section { background: var(--slate); padding: 6rem 0; position: relative; overflow: hidden; border-bottom: none; }
.ai-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; position: relative; z-index: 1; }
.ai-section .overline { color: rgba(255,255,255,0.55); }
.ai-section .ov-badge { background: rgba(255,255,255,.12); border: 1px solid #7FBAC0; color: #7FBAC0; }
.ai-section h2 { color: #fff; }
.ai-section h2 .accent { color: #7FBAC0; }
.ai-lead { font-size: 15px; color: var(--on-dark); font-weight: 300; line-height: 1.85; margin-top: 1.5rem; }
.ai-points { display: flex; flex-direction: column; }
.ai-pt { padding: 1.6rem 0; border-top: 1px solid rgba(255,255,255,0.1); }
.ai-pt:last-child { border-bottom: 1px solid rgba(255,255,255,0.1); }
.ai-pt-n {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7FBAC0;
  background: rgba(255,255,255,.08);
  border: 1px solid #7FBAC0;
  border-radius: 2px;
  padding: 3px 9px;
  margin-bottom: 0.6rem;
}
.ai-pt-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 5px; letter-spacing: -0.01em; }
.ai-pt-text { font-size: 13.5px; font-weight: 300; color: var(--on-dark); line-height: 1.75; }
.ai-link { display: inline-flex; margin-top: 2rem; color: #A6D0D4; font-size: 13.5px; font-weight: 700; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.ai-link:hover { color: #fff; }

/* about on home */
.about-section { background: var(--surface); padding: 6rem 0; }
.about-inner { display: grid; grid-template-columns: 340px 1fr; gap: 5rem; align-items: start; }
.about-text { font-size: 15px; font-weight: 300; color: var(--mid); line-height: 1.9; margin-top: 1.25rem; }
.about-text strong { font-weight: 700; color: var(--slate); }

/* contact */
.contact-section { background: var(--bg); padding: 6.5rem 0; position: relative; overflow: hidden; }
.contact-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.contact-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 380px; gap: 6rem; align-items: center; }
.contact-title { font-size: clamp(36px, 5vw, 60px); }
.contact-detail { font-size: 14px; font-weight: 300; color: var(--mid); line-height: 2.1; margin-top: 1.5rem; }
.contact-detail a { color: var(--slate); font-weight: 700; border-bottom: 1.5px solid var(--accent); padding-bottom: 1px; transition: color 0.15s; }
.contact-detail a:hover { color: var(--accent); }
.contact-card { background: var(--slate); border-radius: 4px; padding: 2.5rem; }
.contact-card-label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark-2); font-family: var(--mono); margin-bottom: 1.25rem; }
.contact-card p { font-size: 13.5px; font-weight: 300; color: var(--on-dark); line-height: 1.8; margin-bottom: 2rem; }
.contact-card .btn-white { width: 100%; }

/* ============================================================
   RESPONSIVE
   `body` prefix raises specificity above page-level <style> rules.
   ============================================================ */
@media (max-width: 1080px) {
  body .nav-links { gap: 1.25rem; }
  body .hero-inner { grid-template-columns: 1fr 320px; }
  body .hero-left { padding-right: 2.5rem; }
  body .process-grid { grid-template-columns: repeat(3, 1fr); }
  body .process-grid .ps-arrow { display: none; }
}

@media (max-width: 960px) {
  :root { --gutter: 1.75rem; }

  /* navigation → collapsible menu */
  body .nav-toggle { display: inline-flex; }
  body .nav-contact { display: none; }
  body .nav-links {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 58px;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(17,24,39,0.08);
    padding: 0.5rem var(--gutter) 1rem;
  }
  body nav.site-nav.open .nav-links { display: flex; }
  body .nav-links li { border-bottom: 1px solid var(--border); }
  body .nav-links li:last-child { border-bottom: none; }
  body .nav-links a { display: block; padding: 0.9rem 0; font-size: 15px; }
  body .nav-links a::after { display: none; }
  body .nav-links a[aria-current="page"] { color: var(--accent); font-weight: 700; }
  body .nav-links .nav-links-contact { display: block; }

  /* two-column layouts collapse */
  body .hero-inner,
  body .page-hero-inner,
  body .services-header,
  body .section-header,
  body .ai-inner,
  body .about-inner,
  body .contact-inner,
  body .two-col,
  body .two-col-wide,
  body .bio-grid,
  body .training-inner { grid-template-columns: 1fr; gap: 2.5rem; }

  body .hero-left { border-right: none; padding: 3.5rem 0 3rem; }
  body .hero-inner { min-height: 0; }
  body .hero-right-col { margin: 0 calc(var(--gutter) * -1); }
  body .hero-right-col .portrait { min-height: 260px; max-height: 360px; }
  /* without a real photo the monogram block adds nothing on small screens */
  body .hero-right-col .portrait:not(:has(img)) { display: none; }
  body .hero-tag-sep { display: none; }

  body .about-inner .portrait,
  body .bio-grid .portrait { max-width: 320px; }

  body .projects-grid,
  body .cards-grid-3,
  body .sector-grid,
  body .ai-use-grid,
  body .light-cards,
  body .course-grid-3,
  body .skill-cols { grid-template-columns: repeat(2, 1fr); }
  body .stack-grid { grid-template-columns: repeat(2, 1fr); }

  body .case-item { grid-template-columns: 1fr; gap: 1rem; }

  body .page-hero { padding: 3.5rem 0 3rem; }
  body .page-hero-meta { align-self: stretch; }

  body .section-pad,
  body .services-section,
  body .projects-section,
  body .ai-section,
  body .about-section,
  body .training-section { padding: 4rem 0; }
  body .contact-section { padding: 4.5rem 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 1rem; }
  body { font-size: 15px; }

  body .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 1.5rem; }
  body .stat { padding: 0 1rem 0 0; border-right: none; }
  body .stat-num { font-size: 30px; }

  body .service-row { padding: 1.75rem 1.25rem; }
  body .srv-title { font-size: 19px; }

  body .projects-grid,
  body .cards-grid-3,
  body .cards-grid-2,
  body .sector-grid,
  body .ai-use-grid,
  body .light-cards,
  body .course-grid-2,
  body .course-grid-3,
  body .skill-cols,
  body .value-grid,
  body .phase-grid,
  body .platform-grid,
  body .stack-grid,
  body .process-grid,
  body .services-list { grid-template-columns: 1fr; }

  body .stat-row { flex-direction: column; }
  body .stat-cell,
  body .stat-cell:not(:first-child),
  body .stat-cell:last-child { padding: 1.25rem 0; border-right: none; border-bottom: 1px solid var(--border); }
  body .stat-cell:last-child { border-bottom: none; }

  body .tl-grid { grid-template-columns: 64px 1fr; }
  body .tl-c { padding-left: 0.9rem; }

  body .list-row { gap: 1rem; }

  body .cta-band-inner,
  body .footer-inner { flex-direction: column; align-items: flex-start; }
  body .cta-band .btn-white { width: 100%; }

  body .meta-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  body .meta-val { text-align: left; }

  body .compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body .compare-table { min-width: 560px; }

  body .hero-cred-zone { padding: 1.5rem var(--gutter); }
  body .contact-card { padding: 2rem 1.5rem; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none !important; }
}
