/* ==========================================================================
   GLOBAL STYLES — RESTYLE PASS (extracted from itsabdullahqureshi.com)
   --------------------------------------------------------------------------
   Tokens (color / type / space) are derived from the original Framer site's
   compiled CSS. Dark teal theme: near-black teal background, off-white text,
   cyan + teal-blue accents. Fonts are self-hosted (public/fonts/), Inter for
   body and Poppins for display/headings.

   Organized by token system first, then base elements, then component classes
   so each block maps back to the markup.
   ========================================================================== */

/* ---- Self-hosted fonts -------------------------------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900; /* variable */
  font-display: swap;
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/poppins-700.woff2") format("woff2");
}

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Color — referenced palette from the live site */
  --color-bg: #00151b; /* page background (dark teal-black) */
  --color-surface: #081214; /* slightly raised panels/cards */
  --color-text: #f2f2f2; /* primary text */
  --color-muted: #cccccc; /* secondary / supporting text */
  --color-accent: #48c8ec; /* bright cyan — primary accent */
  --color-accent-deep: #1f5c7a; /* teal-blue — secondary accent */
  --color-border: rgba(242, 242, 242, 0.12); /* subtle dividers */
  --color-border-strong: rgba(242, 242, 242, 0.22);

  /* Typography */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", "Inter", system-ui, sans-serif;

  /* Type scale (px values from the original) */
  --fs-10: 0.625rem;
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-36: 2.25rem;
  --fs-48: 3rem;

  /* Line heights */
  --lh-tight: 1.2;
  --lh-snug: 1.4;
  --lh-normal: 1.5;
  --lh-loose: 1.75;

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;

  /* Layout */
  --maxw: 1200px; /* wide content */
  --maxw-text: var(--maxw); /* content spans the full container width */
  --gap: var(--space-3);
  --section-gap: var(--space-6);
  --radius: 14px;
}

/* ---- Reset / base ------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: var(--lh-loose);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Sticky footer: keep the footer at the bottom on short pages (e.g. contact)
     instead of leaving empty background below it. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

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

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

/* ---- Headings (Poppins display) ---------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--color-text);
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-2);
  font-weight: 600;
}

h1 {
  font-size: var(--fs-48);
  font-weight: 700;
  letter-spacing: -1.5px;
}

h2 {
  font-size: var(--fs-36);
  font-weight: 700;
  letter-spacing: -1px;
}

h3 {
  font-size: var(--fs-28);
  letter-spacing: -0.5px;
}

h4 {
  font-size: var(--fs-20);
  letter-spacing: -0.3px;
}

h5,
h6 {
  font-size: var(--fs-16);
  letter-spacing: -0.2px;
}

p {
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
}

ul,
ol {
  color: var(--color-muted);
}

/* ---- Links -------------------------------------------------------------- */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--color-text);
}

strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ---- Layout containers -------------------------------------------------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  /* Vertical only — using the `margin` shorthand here would reset the
     left/right `auto` from `.container` and break horizontal centering. */
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
}

/* ---- Header / Nav ------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 21, 27, 0.8);
  backdrop-filter: saturate(140%) blur(10px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.site-logo {
  display: inline-flex;
  align-items: center;
}

.site-logo img {
  height: 34px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  position: relative;
  padding-bottom: 3px;
  color: var(--color-muted);
  font-size: var(--fs-16);
}

.site-nav a:hover {
  color: var(--color-accent);
}

/* Active page — accent colour + underline */
.site-nav a[aria-current="page"] {
  color: var(--color-accent);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: var(--section-gap);
}

.site-footer .container {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: var(--space-1);
}

.footer-social a {
  color: var(--color-muted);
}

.footer-social a:hover {
  color: var(--color-accent);
}

/* ---- CTA block (reused across pages) ----------------------------------- */
.cta-block {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--space-4);
  /* Fills its .container wrapper, so it aligns with all other content and
     keeps side padding on narrow viewports instead of bleeding to the edge. */
  margin: var(--section-gap) 0;
}

.cta-block strong {
  font-family: var(--font-display);
  font-size: var(--fs-20);
}

/* ---- Project / work cards ---------------------------------------------- */
.work-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.work-card {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.work-card:hover {
  border-color: var(--color-accent-deep);
  transform: translateY(-2px);
}

.work-card h4 {
  color: var(--color-text);
}

/* Equal-height cards (grid stretches them) with the CTA pinned to the bottom,
   so every card's link lines up regardless of content length. */
.work-grid .work-card {
  display: flex;
  flex-direction: column;
}

.work-grid .work-card > :last-child {
  margin-top: auto;
  padding-top: var(--space-2);
}

/* ---- Case study meta table --------------------------------------------- */
.case-meta {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.5rem 1.5rem;
  margin: var(--space-4) 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.case-meta dt {
  font-weight: 600;
  color: var(--color-text);
}

.case-meta dd {
  margin: 0;
  color: var(--color-muted);
}

/* ---- Image gallery ------------------------------------------------------ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
  gap: var(--gap);
}

.gallery img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* ---- Divider used on home page ----------------------------------------- */
.divider {
  text-align: center;
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
  color: var(--color-accent-deep);
  letter-spacing: 0.3em;
}

/* ==========================================================================
   PAGE CONTENT — readable measure, media treatment, hero
   --------------------------------------------------------------------------
   Long-form prose is constrained to a comfortable reading column while grids
   and galleries keep the full container width. Targets semantic elements so
   no per-page classes are needed (markup stays 1:1 with the original).
   ========================================================================== */

/* ---- Readable measure for prose --------------------------------------- */
main .section.container > h1,
main .section.container > h2,
main .section.container > h3,
main .section.container > h4,
main .section.container > h5,
main .section.container > p,
main .section.container > ul,
main .section.container > ol,
main .section.container > dl,
main .section.container > .work-card {
  max-width: var(--maxw-text);
  /* Left-pinned so the text column shares ONE left edge with the header,
     footer, grids, and media — not centered within the wider container. */
  margin-left: 0;
  margin-right: auto;
}

/* Vertical rhythm between case-study sub-sections */
main .section.container > h2,
main .section.container > h3 {
  margin-top: var(--space-5);
}

main .section.container > h1:first-child,
main .section.container > h2:first-child,
main .section.container > h3:first-child {
  margin-top: 0;
}

/* ---- Media (images & video) — a touch wider than the text column ------ */
main .section.container > img,
main .section.container > video {
  display: block;
  width: auto;
  max-width: 100%;
  /* Keep tall/portrait screenshots from dominating the page. */
  max-height: 640px;
  margin: var(--space-4) auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* ---- Lists ------------------------------------------------------------- */
main .section.container ul,
main .section.container ol {
  padding-left: 1.25rem;
}

main .section.container li {
  margin-bottom: 0.4rem;
}

/* ---- Hero (home page) -------------------------------------------------- */
.hero {
  text-align: center;
  padding-top: var(--space-6);
  padding-bottom: var(--space-4);
}

/* Hero is the one intentionally-centered block — re-center its children.
   Selector specificity must beat `main .section.container > h2` (0,2,2),
   which left-pins content; hence the full `main .section.container.hero`. */
main .section.container.hero > * {
  margin-left: auto;
  margin-right: auto;
}

.hero h1 {
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  letter-spacing: 0;
  margin: var(--space-2) auto;
}

.hero h2 {
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.hero > p:first-child {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 500;
}

/* ---- Work cards: inner media + "Read More" CTA ------------------------ */
.work-card img {
  border-radius: calc(var(--radius) - 6px);
  margin-bottom: var(--space-2);
  width: 100%;
}

.work-card span {
  display: inline-block;
  margin-top: var(--space-1);
  color: var(--color-accent);
  font-weight: 600;
}

/* Meta nested inside a card shouldn't double up the surface + border */
.work-card .case-meta {
  border: none;
  background: none;
  padding: 0;
  margin: var(--space-2) 0 0;
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

/* Intro is centered (like the hero) — re-center children the left-pinned
   content rule would otherwise push left. */
.contact-intro {
  text-align: center;
}

.contact-intro > * {
  margin-left: auto;
  margin-right: auto;
}

.contact-eyebrow {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-20);
  margin-bottom: var(--space-2);
}

.contact-intro h1 {
  max-width: 800px;
  font-size: var(--fs-36);
  letter-spacing: -0.5px;
}

/* Two-column: email details + message form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-5);
  align-items: start;
}

.contact-label {
  color: var(--color-muted);
  margin-bottom: var(--space-1);
}

.contact-details a {
  color: var(--color-accent);
  word-break: break-word;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-16);
  padding: 1rem 1.25rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--color-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-form button {
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-18);
  padding: 1rem;
  cursor: pointer;
  transition: filter 0.18s ease;
}

.contact-form button:hover {
  filter: brightness(1.08);
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.contact-status {
  margin: 0;
  min-height: 1.4em;
  font-size: var(--fs-14);
}

.contact-status.is-success {
  color: var(--color-accent);
}

.contact-status.is-error {
  color: #ff6b6b;
}

/* Calendly section */
.contact-chat {
  text-align: center;
}

.contact-chat > p {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  max-width: none;
  margin: 0 auto var(--space-4);
}

.calendly-inline-widget {
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
}

/* Visually-hidden labels for accessibility */
.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;
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

/* Intro: heading on the left, image on the right (about + development) */
.about-hero,
.dev-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}

.about-hero-text h1 {
  margin-bottom: var(--space-3);
}

.about-hero-text h2 {
  color: var(--color-muted);
  font-weight: 500;
  margin: 0;
}

.dev-hero-text h2 {
  margin: 0;
}

.about-hero-media,
.dev-hero-media {
  position: relative;
}

.about-hero-media img,
.dev-hero-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* Offset accent frame peeking out behind the image */
.about-hero-media::before,
.dev-hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(16px, 16px);
  border: 1px solid var(--color-accent-deep);
  border-radius: var(--radius);
  z-index: 0;
}

/* Section heading accent marker */
.about-page h3::before,
.dev-page h3::before,
.case-study .section.container > h3::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-bottom: var(--space-2);
  background: var(--color-accent);
  border-radius: 2px;
}

/* Eyebrow / kicker labels (development + case-study pages) */
.dev-eyebrow,
.case-eyebrow {
  margin-bottom: var(--space-2);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-14);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The hero eyebrow is an h3 — drop the section marker bar for it */
.dev-page h3.dev-eyebrow::before {
  display: none;
}

/* Contributions list with accent markers */
main .section.container ul.dev-list {
  list-style: none;
  padding-left: 0;
}

main .section.container ul.dev-list li {
  position: relative;
  padding-left: var(--space-3);
}

.dev-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* Project meta cards in a responsive grid */
.dev-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--gap);
}

/* Featured pull-quotes — make the memorable lines land */
.pull-quote {
  max-width: var(--maxw-text);
  margin: var(--space-3) 0 0;
  padding: var(--space-1) 0 var(--space-1) var(--space-3);
  border-left: 3px solid var(--color-accent);
  font-family: var(--font-display);
  font-size: var(--fs-24);
  line-height: var(--lh-snug);
  color: var(--color-text);
}

.pull-quote em {
  font-style: italic;
}

/* Philosophy quote sits on a surface card to stand apart */
.about-philosophy .pull-quote {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-size: var(--fs-28);
}

/* Downtime gallery — even tiles, gentle hover */
.about-gallery {
  max-width: var(--maxw-text);
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.about-gallery img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease;
}

.about-gallery img:hover {
  transform: scale(1.02);
}

.about-note {
  max-width: var(--maxw-text);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: var(--fs-14);
}

/* ==========================================================================
   RESUME PAGE
   ========================================================================== */
.resume-eyebrow {
  margin-bottom: var(--space-2);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-14);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resume-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-3);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-display);
  font-weight: 600;
  transition: filter 0.18s ease;
}

.resume-download:hover {
  color: var(--color-bg);
  filter: brightness(1.08);
}

.resume-viewer {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.resume-doc {
  display: block;
  width: 100%;
  height: 85vh;
  min-height: 560px;
  border: 0;
}

.resume-note {
  margin-top: var(--space-3);
  color: var(--color-muted);
  font-size: var(--fs-14);
}

/* ==========================================================================
   DESIGN CASE STUDIES
   ========================================================================== */
.case-hero h2 {
  color: var(--color-muted);
  font-weight: 500;
}

.case-cover {
  margin-top: var(--space-3);
}

/* Research insight cards */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
  margin: var(--space-4) 0;
}

.insight-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius);
}

.insight-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--color-border);
}

.insight-stat {
  margin: 0;
  padding: var(--space-3) var(--space-3) var(--space-1);
  font-family: var(--font-display);
  font-size: var(--fs-18);
  line-height: var(--lh-snug);
  color: var(--color-text);
}

.insight-detail {
  margin: 0;
  padding: 0 var(--space-3) var(--space-3);
  font-size: var(--fs-14);
  color: var(--color-muted);
}

/* Usability findings rendered as stat callouts (not headings) */
.stat-callout {
  margin: var(--space-3) 0;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.stat-callout-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 600;
  color: var(--color-text);
}

.stat-callout-detail {
  margin: var(--space-1) 0 0;
  color: var(--color-muted);
}

/* Testimonial */
.testimonial {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.testimonial blockquote {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--fs-24);
  line-height: var(--lh-snug);
  color: var(--color-text);
}

.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-muted);
  font-size: var(--fs-14);
}

.testimonial figcaption img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial figcaption strong {
  color: var(--color-text);
}

/* Slide-deck / prototype links styled as outlined buttons */
.deck-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-3);
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-14);
  transition: background 0.18s ease, color 0.18s ease;
}

.deck-link:hover {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ==========================================================================
   FLOATING SCROLL-TO-TOP BUTTON
   ========================================================================== */
.scroll-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-accent);
  cursor: pointer;
  /* Hidden until the user scrolls past the halfway point */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease,
    border-color 0.2s ease, background 0.2s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  border-color: var(--color-accent);
  background: var(--color-bg);
}

/* ==========================================================================
   RESPONSIVE — mobile / small screens
   ========================================================================== */
@media (max-width: 640px) {
  h1 {
    font-size: var(--fs-36);
    letter-spacing: -0.5px;
  }

  h2 {
    font-size: var(--fs-28);
    letter-spacing: -0.5px;
  }

  h3 {
    font-size: var(--fs-24);
    letter-spacing: -0.3px;
  }

  .section {
    margin-top: var(--space-5);
    margin-bottom: var(--space-5);
  }

  .container {
    padding: 0 1.25rem;
  }

  /* Header: keep logo + nav tidy when they wrap */
  .site-header .container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    row-gap: 0.5rem;
  }

  .site-nav {
    gap: 1rem;
  }

  /* Stack the two-column blocks */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .about-hero,
  .dev-hero {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .about-hero-media::before,
  .dev-hero-media::before {
    transform: translate(10px, 10px);
  }

  .about-gallery {
    grid-template-columns: 1fr;
  }

  .contact-intro h1 {
    font-size: var(--fs-28);
  }

  /* Stack the case-study / dev meta tables */
  .case-meta {
    grid-template-columns: 1fr;
    gap: 0;
    padding: var(--space-3);
  }

  .case-meta dt {
    margin-top: var(--space-2);
  }

  .case-meta dt:first-child {
    margin-top: 0;
  }

  /* Media should never exceed the screen */
  main .section.container > img,
  main .section.container > video {
    margin: var(--space-3) 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  a,
  .work-card {
    transition: none;
  }
}
