/* ==========================================================================
   Ira Portfolio — homepage stylesheet
   All visual styling lives here. HTML carries only markup + class names.
   ========================================================================== */

/* --- Fonts -------------------------------------------------------------- */
/* Drop the IBM Plex .woff2 files into site/fonts/ and these light up.       */
/* Until then, the system-font stack in --font-* keeps the page readable.    */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* --- Design tokens ------------------------------------------------------ */
:root {
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* --- Base palette — each colour declared ONCE, as RGB channels so it can
         be used solid via rgb(...) or tinted via rgba(..., a). ---------- */
  --white-rgb: 255, 255, 255;
  --slate-rgb: 51, 65, 73;
  --red-rgb:   139, 0, 0;
  --white: rgb(var(--white-rgb));
  --slate: rgb(var(--slate-rgb));
  --red:   rgb(var(--red-rgb));

  /* Light theme (default) — slate at four strengths */
  --bg: var(--white);
  --text: var(--slate);
  --muted: #68727a; /* solid slate-grey, 4.9:1 on white — passes WCAG AA */
  --hair: rgba(var(--slate-rgb), 0.12);
  --fill: rgba(var(--slate-rgb), 0.04);
  --hl: var(--red);
  --cta-edge: transparent;
  --mark-line: var(--slate);

  /* faint white for the footer identity line on the slate surface */
  --footer-faint: rgba(var(--white-rgb), 0.56);
}

[data-theme="dark"] {
  --bg: var(--slate);
  --text: var(--white);
  --muted: rgba(var(--white-rgb), 0.65);
  --hair: rgba(var(--white-rgb), 0.12);
  --fill: rgba(var(--white-rgb), 0.07);
  --hl: var(--white);
  --cta-edge: #a3abb0; /* one-off edge grey */
  --mark-line: var(--white);
}

/* --- Base --------------------------------------------------------------- */
* { box-sizing: border-box; }
*, *::before, *::after { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html { scroll-behavior: smooth; -moz-tab-size: 4; tab-size: 4; line-height: 1.15; }

/* Form controls: Chrome and Firefox differ most here — force inheritance */
button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  color: inherit;
  margin: 0;
}
button, select { text-transform: none; }
button, [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; appearance: button; }
button { background: none; border: 0; cursor: pointer; }
textarea { resize: vertical; }
::-moz-focus-inner { border-style: none; padding: 0; }
:-moz-focusring { outline: 1px dotted ButtonText; }

/* Consistent defaults across engines */
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
b, strong { font-weight: bolder; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
table { border-collapse: collapse; border-color: inherit; }
hr { height: 0; color: inherit; border-top-width: 1px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}
::selection { background: rgba(var(--red-rgb), 0.16); }

a { color: inherit; }
a:hover { color: inherit; }

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

/* --- Shared layout ------------------------------------------------------ */
.wrap { max-width: 1600px; margin: 0 auto; padding-left: clamp(20px, 6vw, 140px); padding-right: clamp(20px, 6vw, 140px); }
.wrap--narrow { max-width: 1440px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--hair);
  padding-top: 22px;
}

.label {
  display: inline-block;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 500;
}
[data-theme="dark"] .label {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.eyebrow {
  display: inline-block;
  color: var(--red);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 500;
}
[data-theme="dark"] .eyebrow { color: var(--white); }

.mono-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Buttons / text links */
.btn-solid {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 15px 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--cta-edge);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  transition: opacity .2s, box-shadow .2s;
}
.btn-solid:hover {
  opacity: 0.9;
  color: var(--white);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}
.link-underline {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 3px;
  margin-bottom: 35px;
  transition: color .2s, border-color .2s, transform .2s;
}
.link-underline:hover { color: var(--text); transform: translate(2px, -2px); }
.hero__actions .link-underline { align-self: center; }


/* ==========================================================================
   404 PAGE (404.html) — the system speaks in mono
   ========================================================================== */
.notfound {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(96px, 16vw, 220px) clamp(20px, 6vw, 140px) clamp(96px, 14vw, 200px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.notfound__code {
  font-family: var(--font-mono);
  font-size: clamp(72px, 16vw, 200px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--text);
}
.notfound__rule {
  width: clamp(160px, 34vw, 440px);
  height: 3px;
  background: var(--red);
  margin: clamp(28px, 4vw, 48px) 0 clamp(28px, 4vw, 44px);
  transform: translateZ(0);
}
.notfound__msg {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 40ch;
  margin: 0 0 clamp(50px, 4vw, 44px);
}

