/*
Theme Name: Shahzad Sadiq
Theme URI: https://shahzadsadiq.com/
Author: Shahzad Sadiq
Author URI: https://shahzadsadiq.com/
Description: A lightweight black-and-white personal theme for Shahzad Sadiq's resume, portfolio and blog.
Version: 1.7.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: shahzad
*/

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(assets/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url(assets/fonts/manrope-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url(assets/fonts/manrope-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url(assets/fonts/manrope-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url(assets/fonts/manrope-latin-700-normal.woff2) format("woff2"); }

:root {
  --ink: #0a0a0a;
  --ink-2: #161616;
  --paper: #f6f5f1;
  --white: #ffffff;
  --grey: #8a8a86;
  --grey-2: #c9c8c2;
  /* Colour tokens. Default = black base; html[data-mode="white"] = white base. */
  --bg: #0a0a0a;
  --band: #141414;             /* alternate section tone */
  --fg: #f6f5f1;
  --soft: #bdbdb8;
  --muted: #8f8f8a;
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(10, 10, 10, .88);
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1240px;
  --gut: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  transition: background .4s var(--ease), color .4s var(--ease);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid currentColor; outline-offset: 3px;
}
::selection { background: var(--fg); color: var(--bg); }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 999; background: var(--white); color: var(--ink); padding: 10px 16px; width: auto; height: auto; clip: auto; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.serif { font-family: var(--serif); font-weight: 400; }
.italic { font-style: italic; }
.eyebrow {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--muted);
}
html[data-mode="white"] {
  --bg: #ffffff;
  --band: #ffffff;
  --fg: #0a0a0a;
  --soft: #4a4a47;
  --muted: #7d7d79;
  --line: rgba(10, 10, 10, .13);
  --glass: rgba(255, 255, 255, .92);
  color-scheme: light;
}
html { color-scheme: dark; }
.dark { background: var(--band); color: var(--fg); }
.site-footer { background: var(--band); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
  border-bottom: 1px solid transparent;
  color: var(--fg);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header.is-scrolled { background: var(--glass); color: var(--fg); border-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; align-items: baseline; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.brand-mark { font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1; }
.brand-name { font-size: 13px; letter-spacing: .24em; text-transform: uppercase; }
.nav { margin-left: auto; margin-right: 34px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; }
.nav a { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.nav a:hover::after, .nav .current a::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 10px; margin-right: -10px; }
.menu-toggle span { display: block; width: 26px; height: 1.5px; background: currentColor; margin: 6px 0; transition: transform .3s var(--ease), opacity .3s; }
@media (max-width: 860px) {
  .menu-toggle { display: block; position: relative; z-index: 60; }
  .nav { position: fixed; inset: 0; background: var(--fg); color: var(--bg); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s; }
  .nav ul { flex-direction: column; align-items: center; gap: 22px; }
  .nav a { font-family: var(--serif); font-size: 44px; letter-spacing: 0; text-transform: none; font-weight: 400; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { opacity: 1; visibility: visible; }
  body.menu-open .site-header { color: var(--bg); background: transparent; border-color: transparent; }
  body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px; border: 1px solid currentColor; border-radius: 999px;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700;
  transition: background .3s var(--ease), color .3s var(--ease);
  cursor: pointer; background: transparent; color: inherit; font-family: var(--sans);
}
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-solid:hover { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }
.link-arrow { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.link-arrow:hover .arrow { transform: translateX(4px); }
.link-arrow .arrow { transition: transform .3s var(--ease); }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; position: relative; display: flex; align-items: center; padding: 130px 0 48px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(40px, 5vw, 80px); align-items: center; width: 100%; }

/* Portrait: arch mask (a nod to the jeweller's window), offset hairline frame, rotating badge */
.hero-photo { position: relative; margin: 0; justify-self: end; width: min(100%, 440px, calc((100svh - 300px) * .8)); min-width: 260px; aspect-ratio: 4 / 5; }
.hero-photo .arch { position: absolute; inset: 0; overflow: hidden; border-radius: 999px 999px 6px 6px; background: var(--band); z-index: 1; }
.hero-photo .arch img { width: 100%; height: 100%; object-fit: cover; object-position: 46% 12%; filter: grayscale(1) contrast(1.1) brightness(1.02); transform: scale(1.06); transition: transform 1.6s var(--ease), filter .9s var(--ease); }
.hero-photo:hover .arch img { transform: scale(1.01); filter: grayscale(0) contrast(1); }
.hero-photo .arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,10,10,.45)); pointer-events: none; }
.arch-line { position: absolute; inset: 0; transform: translate(18px, -18px); border: 1px solid var(--fg); border-radius: 999px 999px 6px 6px; opacity: .55; z-index: 0; transition: transform .9s var(--ease); }
.hero-photo:hover .arch-line { transform: translate(10px, -10px); }
.hero-photo figcaption { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 2; text-align: center; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #f6f5f1; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 12.5vw, 196px); line-height: .86; letter-spacing: -.02em; margin: 18px 0 30px; }
.hero-title em { font-style: italic; }
.hero-lead { font-size: clamp(17px, 1.5vw, 20px); max-width: 560px; color: var(--soft); margin: 0 0 36px; }
.hero-lead em { font-family: var(--serif); font-size: 1.2em; color: var(--fg); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hero-meta .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fg); margin-right: 10px; animation: pulse 2.2s infinite; vertical-align: middle; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
@media (max-width: 900px) {
  .hero { padding-top: 120px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { order: -1; justify-self: start; width: min(72vw, 300px); min-width: 0; margin: 10px 0 0 4px; }
}

/* ---------- Marquee ---------- */

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section-head { display: grid; grid-template-columns: 180px 1fr; gap: 40px; margin-bottom: clamp(44px, 6vw, 80px); align-items: start; }
.section-num { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; padding-top: 14px; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.4vw, 96px); line-height: .95; letter-spacing: -.015em; margin: 0; }
.section-title em { font-style: italic; color: var(--muted); }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 14px; } .section-num { padding-top: 0; } }

/* Intro / story */
.story { display: grid; grid-template-columns: 180px 1fr 1fr; gap: 40px; }
.story-quote { font-family: var(--serif); font-size: clamp(28px, 3.2vw, 44px); line-height: 1.15; margin: 0; grid-column: 2 / 3; }
.story-body { grid-column: 3 / 4; color: var(--soft); }
.story-body p:first-child { margin-top: 0; }
@media (max-width: 960px) { .story { grid-template-columns: 1fr; } .story-quote, .story-body { grid-column: auto; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin-top: clamp(56px, 7vw, 90px); }
.stat { padding: 30px 24px 0 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5vw, 72px); line-height: 1; }
.stat span { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(3) { border-left: 0; padding-left: 0; } .stat { padding-bottom: 24px; } }

/* Services */
.services { border-top: 1px solid var(--line); }
.service { display: grid; grid-template-columns: 180px 1.1fr 1fr; gap: 40px; padding: 34px 0; border-bottom: 1px solid var(--line); align-items: baseline; transition: padding .4s var(--ease); }
.service:hover { padding-left: 14px; }
.service-no { font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.service h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05; margin: 0; }
.service p { margin: 0; color: var(--soft); font-size: 16px; }
@media (max-width: 860px) { .service { grid-template-columns: 1fr; gap: 10px; } .service:hover { padding-left: 0; } }

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(18px, 2.4vw, 32px); }
.work { grid-column: span 6; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; }
.work:nth-child(3n+1) { grid-column: span 7; }
.work:nth-child(3n+2) { grid-column: span 5; margin-top: clamp(40px, 8vw, 120px); }
.work:nth-child(3n) { grid-column: 3 / span 8; }
.work-media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: #1e1e1e; }
.work-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .6s var(--ease), transform .9s var(--ease); }
.work:hover .work-media img, .work:focus-visible .work-media img { filter: grayscale(0); transform: scale(1.035); }
.work-play { position: absolute; right: 18px; bottom: 18px; width: 64px; height: 64px; border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center; transform: scale(.85); transition: transform .4s var(--ease); }
.work:hover .work-play { transform: scale(1); }
.work-info { display: flex; justify-content: space-between; gap: 20px; padding-top: 16px; align-items: baseline; }
.work-info h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 32px); margin: 0; line-height: 1.1; }
.work-info span { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) {
  .work, .work:nth-child(3n+1), .work:nth-child(3n+2), .work:nth-child(3n) { grid-column: 1 / -1; margin-top: 0; }
  .work-info { flex-direction: column; gap: 4px; }
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5,5,5,.94); display: none; align-items: center; justify-content: center; padding: var(--gut); }
.lightbox.open { display: flex; }
.lightbox-frame { width: 100%; max-width: 1100px; aspect-ratio: 16 / 9; background: #000; }
.lightbox-frame iframe { width: 100%; height: 100%; border: 0; }
.lightbox-close { position: absolute; top: 20px; right: 24px; background: none; border: 0; color: var(--paper); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; font-family: var(--sans); font-weight: 700; padding: 10px; }

/* Roles (now) */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.role { padding: 34px 30px 10px 0; }
.role + .role { border-left: 1px solid var(--line); padding-left: 30px; }
.role h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 10px 0 10px; }
.role p { color: var(--soft); margin: 0; font-size: 15.5px; }
@media (max-width: 860px) { .roles { grid-template-columns: 1fr; } .role + .role { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }

/* Posts list */
.post-list { border-top: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 180px 1fr 220px; gap: 40px; padding: 36px 0; border-bottom: 1px solid var(--line); align-items: center; }
.post-row .date { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.post-row h3, .post-row h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 42px); line-height: 1.08; margin: 0 0 8px; transition: transform .4s var(--ease); }
.post-row:hover h3, .post-row:hover h2 { transform: translateX(8px); }
.post-row p { margin: 0; color: var(--soft); font-size: 15.5px; max-width: 640px; }
.post-row .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.post-row .thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .5s var(--ease); }
.post-row:hover .thumb img { filter: grayscale(0); }
@media (max-width: 860px) { .post-row { grid-template-columns: 1fr; gap: 12px; } .post-row .thumb { order: -1; } }

/* CTA */
.cta { text-align: center; }
.cta .section-title { font-size: clamp(56px, 10vw, 160px); line-height: .9; margin: 22px 0 40px; }
.cta .hero-actions { justify-content: center; }

/* ---------- Page hero ---------- */
.page-hero { padding: 170px 0 70px; }
.page-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(60px, 11vw, 170px); line-height: .88; letter-spacing: -.02em; margin: 18px 0 0; }
.page-hero h1 em { font-style: italic; color: var(--muted); }
.page-hero p.lead { max-width: 620px; margin: 30px 0 0; color: var(--soft); font-size: 19px; }
.page-hero .hero-actions { margin-top: 34px; }

/* ---------- Resume ---------- */
.cv-block { display: grid; grid-template-columns: 180px 1fr; gap: 40px; padding: clamp(56px, 7vw, 90px) 0; border-top: 1px solid var(--line); }
.cv-block:first-child { border-top: 0; }
.cv-block > h2 { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; margin: 8px 0 0; font-weight: 700; }
.cv-item { display: grid; grid-template-columns: 170px 1fr; gap: 30px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.cv-item:first-child { padding-top: 0; }
.cv-item:last-child { border-bottom: 0; }
.cv-when { font-size: 13px; letter-spacing: .08em; color: var(--muted); padding-top: 8px; }
.cv-item h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.5vw, 34px); line-height: 1.1; margin: 0; }
.cv-item .org { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin: 6px 0 10px; }
.cv-item p { margin: 0; color: var(--soft); font-size: 16px; }
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.skill-group { padding: 0 0 26px; }
.skill-group h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
@media (max-width: 760px) {
  .cv-block { grid-template-columns: 1fr; gap: 24px; }
  .cv-item { grid-template-columns: 1fr; gap: 6px; }
  .cv-when { padding-top: 0; }
  .skills { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 110px); }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.contact-list small { display: block; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.contact-list a, .contact-list span { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; word-break: break-word; }
.contact-list a:hover { font-style: italic; }
.socials { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; }
.socials a { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid transparent; }
.socials a:hover { border-color: currentColor; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { margin-bottom: 26px; }
.field label { display: block; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; border: 0; border-bottom: 1px solid var(--fg); background: transparent; padding: 12px 0; font: inherit; font-size: 18px; color: var(--fg); border-radius: 0;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%), linear-gradient(135deg, var(--fg) 50%, transparent 50%); background-position: calc(100% - 12px) 22px, calc(100% - 6px) 22px; background-size: 6px 6px; background-repeat: no-repeat; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-width: 2px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 18px 22px; margin-bottom: 30px; border: 1px solid var(--fg); }
.notice.ok { background: var(--fg); color: var(--bg); }

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Single post / page content ---------- */
.article-head { padding: 170px 0 60px; }
.article-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 7vw, 104px); line-height: .96; letter-spacing: -.015em; margin: 20px 0 26px; max-width: 1050px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.article-cover { margin: 0 auto; max-width: var(--wrap); padding: 0 var(--gut); }
.article-cover img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; filter: grayscale(1); }
.prose { max-width: 720px; margin: 0 auto; padding: 70px var(--gut) 40px; font-size: 19px; line-height: 1.75; color: var(--fg); }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.1; margin: 1.6em 0 .5em; }
.prose h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 1.4em 0 .4em; }
.prose a { border-bottom: 1px solid currentColor; }
.prose blockquote { margin: 1.6em 0; padding: 0 0 0 26px; border-left: 2px solid var(--fg); font-family: var(--serif); font-size: 30px; line-height: 1.25; font-style: italic; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .4em; }
.prose img { margin: 2em 0; }
.prose figure { margin: 2em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose .sign { font-family: var(--serif); font-size: 30px; font-style: italic; margin-top: 2em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.prose > p:first-of-type::first-letter { font-family: var(--serif); float: left; font-size: 4.6em; line-height: .82; padding: 6px 12px 0 0; }
.post-nav { max-width: 720px; margin: 0 auto; padding: 30px var(--gut) 100px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); }
.post-nav a { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.post-nav small { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.post-nav .next { text-align: right; margin-left: auto; }

.pagination { display: flex; gap: 10px; justify-content: center; padding-top: 50px; }
.pagination .page-numbers { min-width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; font-size: 14px; }
.pagination .current { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- Footer ---------- */
.site-footer { padding: 90px 0 36px; }
.footer-big { font-family: var(--serif); font-size: clamp(48px, 9vw, 140px); line-height: .9; letter-spacing: -.02em; margin: 0 0 50px; }
.footer-big a:hover { font-style: italic; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-grid a:hover { color: var(--fg); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; font-size: 12px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* 404 */
.notfound { min-height: 100vh; display: flex; align-items: center; }

/* ---------- Colour mode switch ---------- */
.header-tools { display: flex; align-items: center; gap: 22px; }
.mode-switch { display: inline-flex; align-items: center; border: 1px solid currentColor; border-radius: 999px; padding: 3px; gap: 2px; color: inherit; }
.mode-switch button { appearance: none; border: 0; background: transparent; color: inherit; font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; cursor: pointer; line-height: 1; transition: background .3s var(--ease), color .3s var(--ease); }
.mode-switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
body.menu-open .mode-switch button[aria-pressed="true"] { background: var(--bg); color: var(--fg); }
@media (max-width: 860px) { .header-tools { gap: 6px; } .mode-switch { position: relative; z-index: 60; } .mode-switch button { padding: 6px 9px; letter-spacing: .08em; } }
.article-cover { background: linear-gradient(var(--band) 50%, transparent 50%) !important; }
@media (max-width: 480px) { .brand { gap: 7px; } .brand-name { font-size: 11px; letter-spacing: .14em; } .brand-mark { font-size: 26px; } }
@media (max-width: 340px) { .brand-name { display: none; } }

/* White mode: faint alternating bands */
html[data-mode="white"] .section.dark,
html[data-mode="white"] .site-footer { background: #f5f5f3; }
html[data-mode="white"] .hero.dark,
html[data-mode="white"] .page-hero.dark,
html[data-mode="white"] .article-head.dark { background: #ffffff; }
html[data-mode="white"] .article-cover { background: none !important; }

/* Day / night icon switch */
.mode-switch button { display: inline-grid; place-items: center; width: 34px; height: 28px; padding: 0; letter-spacing: 0; }
.mode-switch button svg { display: block; }
@media (max-width: 860px) { .mode-switch button { width: 32px; height: 26px; padding: 0; } }

/* Roles: four cards */
@media (min-width: 1101px) { .roles { grid-template-columns: repeat(4, 1fr); } }
.role p a { border-bottom: 1px solid currentColor; }
@media (max-width: 1100px) and (min-width: 861px) {
  .roles { grid-template-columns: repeat(2, 1fr); }
  .role:nth-child(3) { border-left: 0; padding-left: 0; }
  .role:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.cv-item p a { border-bottom: 1px solid currentColor; }
.cv-item p a:hover { font-style: italic; }

/* Mobile fixes */
.footer-big { overflow-wrap: anywhere; }
@media (max-width: 600px) { .footer-big { font-size: clamp(26px, 8.4vw, 48px); } }

@media (max-width: 600px) {
  .brand-name { font-size: 10.5px; letter-spacing: .12em; }
  .hero { min-height: 0; padding: 104px 0 40px; }
  .hero-grid { gap: 26px; }
  .hero-photo { width: min(62vw, 240px); margin-top: 18px; }
  .arch-line { transform: translate(12px, -12px); }
  .hero-photo figcaption { font-size: 9.5px; letter-spacing: .18em; bottom: 12px; }
  .hero-title { font-size: clamp(56px, 18vw, 84px); margin: 12px 0 20px; }
  .hero-actions .btn { padding: 14px 22px; }
  .hero-meta { margin-top: 36px; gap: 10px; font-size: 11px; flex-direction: column; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .page-hero { padding: 120px 0 48px; }
  .article-head { padding: 120px 0 44px; }
  .stat { padding-right: 12px; }
  .stat + .stat { padding-left: 14px; }
  .stat b { font-size: 46px; }
  .prose { font-size: 18px; padding-top: 44px; }
  .cta .section-title { font-size: clamp(44px, 13vw, 64px); }
}

/* Mobile menu layering */
@media (max-width: 860px) {
  .nav { margin: 0; z-index: 55; }
  .brand, .header-tools { position: relative; z-index: 60; }
}

/* Dropdown list colours */
.field select { color-scheme: dark; }
.field select option { background-color: #141414; color: #f6f5f1; font-family: var(--sans); font-size: 16px; }
.field select option:checked { background-color: #f6f5f1; color: #0a0a0a; }
html[data-mode="white"] .field select { color-scheme: light; }
html[data-mode="white"] .field select option { background-color: #ffffff; color: #0a0a0a; }
html[data-mode="white"] .field select option:checked { background-color: #0a0a0a; color: #ffffff; }

/* SS monogram */
.brand { align-items: center; gap: 12px; }
.brand-logo { height: 30px; width: auto; display: block; flex: none; }
.brand-logo-i { fill: var(--muted); transition: fill .3s var(--ease); }
.brand:hover .brand-logo-i { fill: currentColor; }
@media (max-width: 600px) { .brand-logo { height: 26px; } .brand { gap: 9px; } }

/* Stat captions */
.stat span { display: block; line-height: 1.5; margin-top: 6px; }

/* Footer email on one line */
.footer-big { white-space: nowrap; overflow-wrap: normal; font-size: clamp(24px, 8.6vw, 120px); }
@media (max-width: 600px) { .footer-big { font-size: clamp(22px, 8.2vw, 48px); } }

/* Hero bottom row: line, buttons left, availability right (under the photo) */
.hero-meta { display: none; }
.hero-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.hero-bottom .hero-actions { margin: 0; }
.hero-available { margin: 0; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; }
.hero-available .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fg); margin-right: 10px; animation: pulse 2.2s infinite; }
@media (max-width: 600px) { .hero-bottom { margin-top: 30px; padding-top: 24px; } .hero-available { font-size: 11px; } }

/* Outbound company links */
.cv-item .org a, .role h3 a { border-bottom: 1px solid var(--line); transition: border-color .3s var(--ease); }
.cv-item .org a:hover, .role h3 a:hover { border-color: currentColor; }
