/* ==========================================================================
   Theme Name: Salem Industrial
   Theme URI: https://example.com/salem-industrial
   Author: Abdulrahman Salem
   Author URI: https://example.com
   Description: WordPress classic theme for the single-page Arabic (RTL) portfolio "Abdulrahman Salem - Industrial Digital Systems / B2B". A 1:1 conversion of the delivered HTML/CSS/JS front-end: same DOM, same classes, same stylesheet, same animations. Landing one-pager is rendered from template parts, and all editable copy is exposed through the Customizer with the original text as the default value, so a fresh install is visually identical to the source project.
   Version: 1.0.0
   Requires at least: 6.2
   Tested up to: 6.8
   Requires PHP: 7.4
   License: GNU General Public License v2 or later
   License URI: https://www.gnu.org/licenses/gpl-2.0.html
   Text Domain: salem-industrial
   Tags: rtl-language-support, one-column, custom-colors, custom-logo, featured-images, translation-ready, blog, portfolio

   ORIGINAL SOURCE STYLESHEET
   ------------------------------------------------------------------------
   Everything below the closing comment of this block is styles.css copied
   VERBATIM (byte-for-byte) from the delivered source project. No selector,
   value, custom property, pseudo-element, keyframe or breakpoint was
   altered. WordPress-specific additions live in assets/css/wp-compat.css,
   which is enqueued AFTER this file so it can never change this cascade.
   ========================================================================== */
/* ==========================================================================
   Abdulrahman Salem — Industrial Digital Systems
   Design tokens
   ========================================================================== */
:root {
  /* colour */
  --bg: #0f0e0c;
  --bg-soft: #171512;
  --ink: #ece7dd;
  --ink-dim: #9b948a;
  --line: rgba(236, 231, 221, 0.12);
  --gold: #b9975b;

  /* motion */
  --motion-fast: 0.35s;
  --motion-medium: 0.7s;
  --motion-slow: 1.2s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* shape */
  --radius-pill: 100px;
  --hairline: 1px;

  /* metrics */
  --pad: clamp(20px, 6vw, 96px);
  --header-h: 80px;
  --anchor-offset: 100px;

  /* type */
  --font-ar: "Cairo", "IBM Plex Sans Arabic", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Cairo", sans-serif;
  --font-en: "Space Grotesk", ui-monospace, monospace;
}

/* ==========================================================================
   Reset + base
   ========================================================================== */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  /* `clip` keeps the overflow guard without creating a scroll container */
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: auto;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::selection { background: var(--gold); color: var(--bg); }

/* Keyboard focus — visible, consistent, never clipped by a parent overflow */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-ar);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-250%);
  transition: transform var(--motion-fast) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* Placeholder affordances: kept in the visual system, but honestly inert */
[aria-disabled="true"] { cursor: default; }

/* ==========================================================================
   Overlays: grain / progress / cursor
   ========================================================================== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 70; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); }

/* Custom cursor is shown ONLY when script.js has actually wired it, so the
   dot can never be left frozen on screen by a breakpoint mismatch. */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  display: none;
  align-items: center;
  justify-content: center;
  mix-blend-mode: difference;
  transition: width var(--motion-fast) var(--ease),
              height var(--motion-fast) var(--ease),
              background var(--motion-fast) var(--ease),
              mix-blend-mode var(--motion-fast) var(--ease);
}
.has-cursor .cursor { display: flex; }
.cursor .cursor-label {
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--bg);
  opacity: 0;
  text-transform: uppercase;
}
.cursor.is-hover {
  width: 64px;
  height: 64px;
  background: var(--gold);
  mix-blend-mode: normal;
}
.cursor.is-hover .cursor-label { opacity: 1; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px var(--pad);
  transition: padding var(--motion-medium) var(--ease),
              background var(--motion-medium) var(--ease),
              border-color var(--motion-medium) var(--ease);
}
.site-header.scrolled {
  padding: 12px var(--pad);
  background: rgba(15, 14, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--hairline) solid var(--line);
}
.brand {
  font-family: var(--font-ar);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-ar);
  font-size: 14px;
  color: var(--ink-dim);
}
.nav a { transition: color var(--motion-fast) var(--ease); }
.nav a:hover { color: var(--ink); }
.nav-cta {
  color: var(--bg);
  background: var(--ink);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.nav-cta:hover { background: var(--gold); color: var(--bg); }

/* 44px hit area, 32px visual bar */
.menu-btn {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-inline-end: -6px;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-btn span {
  position: absolute;
  left: 6px;
  width: 32px;
  height: 2px;
  background: var(--ink);
  transition: transform var(--motion-fast) var(--ease),
              top var(--motion-fast) var(--ease);
}
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn.open span:first-child { top: 21px; transform: rotate(45deg); }
.menu-btn.open span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: var(--bg-soft);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  padding-top: calc(var(--header-h) + 40px);
  gap: 8px;
  /* the overlay swallows gestures so the page behind cannot scroll */
  overscroll-behavior: contain;
  touch-action: none;
  transition: transform var(--motion-medium) var(--ease),
              opacity var(--motion-medium) var(--ease),
              visibility 0s linear var(--motion-medium);
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform var(--motion-medium) var(--ease),
              opacity var(--motion-medium) var(--ease),
              visibility 0s;
}
/* The display size belongs to the navigation entries only. The contact row
   below keeps its own, much smaller metrics. */
.mobile-menu nav a {
  display: block;
  font-family: var(--font-ar);
  font-size: clamp(30px, 8vw, 52px);
  font-weight: 800;
  line-height: 1.3;
  padding: 6px 0;
  border-bottom: var(--hairline) solid var(--line);
  transition: color var(--motion-fast) var(--ease);
}
.mobile-menu nav a:hover { color: var(--gold); }
.mobile-contact {
  margin-top: 24px;
  color: var(--ink-dim);
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.12em;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
/* Each contact is a real link with a tap target of its own. */
.mobile-contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color var(--motion-fast) var(--ease);
}
.mobile-contact-link:hover { color: var(--gold); }

/* ==========================================================================
   Sections
   ========================================================================== */
main { position: relative; z-index: 1; }

.section,
.hero,
#contact {
  scroll-margin-top: var(--anchor-offset);
}

.section {
  padding: clamp(80px, 12vh, 160px) var(--pad);
  border-top: var(--hairline) solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  /* The kicker detaches from the title below it, so the title reads as the
     head of the content that follows rather than as part of the label. */
  margin-bottom: clamp(44px, 7vh, 88px);
}
.label {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
}
.label-ar { font-family: var(--font-ar); font-size: 12px; color: var(--ink-dim); }

.section-title,
.big-statement,
.contact-title,
.hero-title,
.about-text h2,
.cap-name,
.j-title {
  font-family: var(--font-ar);
}

.section-title {
  font-size: clamp(34px, 5.5vw, 72px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: clamp(32px, 6vh, 80px);
}
.section-title em,
.big-statement em,
.contact-title em,
.hero-title em { font-style: normal; color: var(--gold); }

/* Masking wrapper used by the line-reveal animation. The padding/negative
   margin pair gives Arabic descenders room without changing the rhythm. */
.st-line,
.hero-title .line {
  overflow: hidden;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.st-line > span { display: block; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(24px, 3vw, 56px);
  align-items: center;
  align-content: center;
  padding: clamp(100px, 9vw, 132px) var(--pad) clamp(48px, 6vw, 76px);
}

.hero-meta-top {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.hero-title {
  grid-column: 1;
  font-size: clamp(32px, 5.3vw, 112px);
  font-weight: 900;
  line-height: 1.18;
  margin: 0;
}
.hero-title .line { display: block; }
.hero-title .word { display: inline-block; }

/* Height-driven so the portrait never letterboxes or overflows the fold. */
.hero-portrait {
  position: relative;
  grid-column: 2;
  grid-row: 2 / 5;
  justify-self: end;
}
/* The tags overlap the photograph. The veil keeps them legible whatever
   picture is chosen — the same way the project cards veil their thumbnail —
   and the halo on the text is the second line of defence. */
.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(15, 14, 12, 0.94) 0%,
    rgba(15, 14, 12, 0.9) 48%,
    rgba(15, 14, 12, 0) 70%
  );
}
.hero-portrait img {
  position: relative;
  z-index: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(58vh, 580px);
}
.hero-tags {
  position: absolute;
  bottom: 6%;
  inset-inline-start: -10%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  text-shadow: 0 0 10px rgba(15, 14, 12, 0.95), 0 1px 3px rgba(15, 14, 12, 0.9);
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-sub {
  grid-column: 1;
  max-width: 560px;
  color: var(--ink-dim);
  font-size: clamp(15px, 1.4vw, 18px);
}
.hero-ctas {
  grid-column: 1;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 15px;
  border: var(--hairline) solid var(--line);
  transition: background var(--motion-fast) var(--ease),
              color var(--motion-fast) var(--ease),
              border-color var(--motion-fast) var(--ease);
}
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Outer corner, clear of the CTA column. */
.hero-scroll {
  position: absolute;
  bottom: 24px;
  inset-inline-end: var(--pad);
  /* An instruction to the visitor, so it reads in the page's own language
     and with Arabic metrics — no tracking, no uppercase. */
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-scroll i {
  width: var(--hairline);
  height: 36px;
  background: var(--ink-dim);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; }
  50% { transform: scaleY(1); }
}

/* ==========================================================================
   Positioning
   ========================================================================== */
.big-statement {
  font-size: clamp(32px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.4;
  max-width: 16ch;
}
.positioning-body {
  max-width: 620px;
  color: var(--ink-dim);
  margin-top: 28px;
  font-size: clamp(15px, 1.3vw, 18px);
}
.index-list { margin-top: 56px; border-top: var(--hairline) solid var(--line); }
.index-list li {
  display: flex;
  gap: 18px;
  padding: 16px 0;
  border-bottom: var(--hairline) solid var(--line);
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.index-list li span { color: var(--gold); }

/* ==========================================================================
   Work
   ========================================================================== */
.project {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 4vw;
  align-items: center;
  padding: clamp(40px, 8vh, 100px) 0;
  border-top: var(--hairline) solid var(--line);
}
.project:first-of-type { border-top: 0; }
.project-num { font-family: var(--font-en); color: var(--gold); font-size: 13px; letter-spacing: 0.3em; }
.project-name {
  font-family: var(--font-en);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 10px 0 6px;
}
.project-meta { color: var(--ink-dim); font-size: 14px; }
.project-scope { margin-top: 14px; font-size: 14px; color: var(--ink); }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
  border-bottom: var(--hairline) solid transparent;
  transition: color var(--motion-fast) var(--ease),
              border-color var(--motion-fast) var(--ease);
}
.project-link[aria-disabled="true"] { color: var(--ink-dim); }
/* A project with no case study to open is a plain line of text. */
.project-link.is-inert {
  color: var(--ink-dim);
  cursor: default;
}
.project-link i { font-style: normal; display: inline-block; }
.project-visual { overflow: hidden; }
.p-visual {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 2.5vw, 32px);
  border: var(--hairline) solid var(--line);
  background: var(--bg-soft);
  transition: transform var(--motion-slow) var(--ease);
}
.project:hover .p-visual { transform: scale(1.035); }
.p-visual span {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: 0.06em;
  line-height: 1;
}
.p-visual small {
  font-family: var(--font-en);
  color: var(--ink-dim);
  letter-spacing: 0.3em;
  font-size: 11px;
  text-transform: uppercase;
  margin-top: 10px;
}
.p-visual-1 { background: linear-gradient(160deg, #1b1813, #0f0e0c 60%); border-color: rgba(185, 151, 91, 0.35); }
.p-visual-1 span { color: var(--gold); }
.p-visual-2 { background: linear-gradient(200deg, #20201d, #0f0e0c 55%); }
.p-visual-2 span { color: var(--ink); }
.p-visual-3 { background: linear-gradient(140deg, #14161a, #0f0e0c 60%); border-color: rgba(236, 231, 221, 0.2); }
.p-visual-3 span { color: var(--ink-dim); }

/* ==========================================================================
   Capabilities
   ========================================================================== */
.cap-list { border-top: var(--hairline) solid var(--line); }
.cap-item {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 24px;
  padding: 28px 0;
  border-bottom: var(--hairline) solid var(--line);
}
/* Zero-reflow hover response: an accent bar instead of a padding shift. */
.cap-item::before,
.journal-item::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--motion-medium) var(--ease);
}
.cap-item:hover::before,
.journal-item:hover::before { transform: scaleY(1); }
.cap-num {
  font-family: var(--font-en);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.25em;
  grid-row: 1 / 3;
  align-self: center;
}
.cap-name {
  /* placed explicitly: auto-placement would give the wide track to the
     small Latin label instead of the display-size name */
  grid-column: 2;
  grid-row: 1;
  font-size: clamp(26px, 3.5vw, 46px);
  font-weight: 800;
  line-height: 1.3;
  transition: color var(--motion-fast) var(--ease);
}
.cap-item:hover .cap-name { color: var(--gold); }
.cap-en {
  grid-column: 3;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-dim);
  align-self: center;
  grid-row: 1;
}
.cap-desc {
  grid-column: 2;
  color: var(--ink-dim);
  font-size: 14px;
  max-width: 480px;
  margin-top: 10px;
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 5vw;
  align-items: center;
}
.about-portrait img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border: var(--hairline) solid var(--line);
}
.about-text h2 {
  font-size: clamp(32px, 4.5vw, 58px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 22px;
}
.about-text p { color: var(--ink-dim); max-width: 520px; }
.about-facts { margin-top: 32px; }
.about-facts li {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: var(--hairline) solid var(--line);
  font-size: 14px;
  color: var(--ink-dim);
}
.about-facts li span {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--gold);
  min-width: 64px;
}

/* ==========================================================================
   Journal
   ========================================================================== */
.journal-list { border-top: var(--hairline) solid var(--line); }
.journal-item {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr auto auto;
  gap: 20px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: var(--hairline) solid var(--line);
}
.j-num { font-family: var(--font-en); font-size: 11px; color: var(--gold); letter-spacing: 0.25em; }
.j-title {
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 700;
  transition: color var(--motion-fast) var(--ease);
}
.j-cat {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.j-date { font-family: var(--font-en); font-size: 12px; color: var(--ink-dim); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  text-align: center;
  padding: clamp(100px, 16vh, 200px) var(--pad);
  border-top: var(--hairline) solid var(--line);
}
/* The kicker detaches from the title here too, the way it does in the
   sections that carry a .section-head. */
.contact > .label {
  display: inline-block;
  margin-bottom: clamp(18px, 2.5vh, 34px);
}
.contact-title {
  font-size: clamp(42px, 8vw, 110px);
  font-weight: 900;
  line-height: 1.3;
  margin: 0 0 20px;
}
.contact-sub { color: var(--ink-dim); max-width: 520px; margin: 0 auto 36px; }
.contact-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  border-top: var(--hairline) solid var(--line);
  padding: clamp(40px, 8vh, 80px) var(--pad);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}
.footer-name { font-family: var(--font-ar); font-size: 20px; font-weight: 800; }
.footer-desc,
.footer-copy {
  font-family: var(--font-en);
  color: var(--ink-dim);
  text-transform: uppercase;
}
.footer-desc { font-size: 11px; letter-spacing: 0.3em; }
.footer-nav {
  display: flex;
  gap: 0;
  font-family: var(--font-ar);
  font-size: 13px;
  color: var(--ink-dim);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  transition: color var(--motion-fast) var(--ease);
}
.footer-nav a:hover { color: var(--gold); }
.footer-copy { font-size: 11px; margin-top: 14px; letter-spacing: 0.15em; }

/* ==========================================================================
   Responsive — breakpoints follow real layout needs
   ========================================================================== */

/* Single-column hero + collapsed nav: the point where two columns stop working. */
@media (max-width: 900px) {
  :root {
    --header-h: 84px;
    --anchor-offset: 92px;
  }

  /* Locking scroll while the overlay is open must not reflow the page: the
     gutter is reserved only for as long as the lock is in effect. */
  html.menu-open {
    overflow-y: hidden;
    scrollbar-gutter: stable;
  }

  .nav { display: none; }
  .menu-btn { display: block; }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: calc(var(--header-h) + 36px);
    align-content: start;
  }
  .hero-title,
  .hero-sub,
  .hero-ctas { grid-column: 1; }
  .hero-portrait {
    grid-column: 1;
    grid-row: auto;
    order: -1;
    justify-self: center;
    max-width: 300px;
    margin-inline: auto;
  }
  .hero-portrait img { max-height: min(36vh, 330px); }
  .hero-tags,
  .hero-scroll { display: none; }
  .hero-title { font-size: clamp(26px, 8.45vw, 78px); }
  .hero-sub { max-width: 620px; }

  .project { grid-template-columns: 1fr; gap: 24px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-portrait img { max-width: 360px; margin-inline: auto; }

  .cap-item { grid-template-columns: 40px 1fr; }
  .cap-en { display: none; }

  .journal-item { grid-template-columns: 36px 1fr auto; }
  .j-cat { display: none; }

  /* No-JS: the toggle cannot work, so the overlay degrades to a plain
     in-flow navigation block rather than disappearing entirely. */
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .mobile-menu {
    position: static;
    inset: auto;
    z-index: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: var(--bg-soft);
    padding-bottom: 32px;
  }
}

/* Tight phones: reclaim vertical space and stop the meta row from crowding. */
@media (max-width: 620px) {
  .hero { gap: 18px; padding-bottom: clamp(40px, 8vw, 56px); }
  .hero-portrait { max-width: 240px; }
  .hero-portrait img { max-height: min(36vh, 300px); }
  .hero-meta-top {
    justify-content: flex-start;
    font-size: 10px;
    letter-spacing: 0.2em;
  }
  .hero-ctas .btn { flex: 1 1 auto; }

  .section-head { margin-bottom: clamp(24px, 4vh, 40px); }
  .big-statement { max-width: 20ch; }
  .cap-item { column-gap: 16px; padding: 24px 0; }
  .journal-item { gap: 14px; padding: 20px 0; }
  .contact-ctas .btn { width: 100%; }
  .footer-nav a { padding-inline: 7px; }
}

@media (max-width: 380px) {
  .cap-item { grid-template-columns: 32px 1fr; column-gap: 12px; }
  .journal-item { grid-template-columns: 28px 1fr auto; gap: 10px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-scroll i { animation: none; }
}