/* Radixel – shared styles */

@font-face {
  font-family: 'Space Grotesk';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/space-grotesk-300.woff') format('woff');
}
@font-face {
  font-family: 'Space Grotesk';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/space-grotesk-400.woff') format('woff');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-400.woff') format('woff');
}

:root {
  --ink: #101418;          /* Root Ink */
  --ink-2: #161B21;        /* raised surface */
  --line: #262D35;         /* hairlines */
  --white: #EDEDED;        /* Signal White */
  --grey: #9AA3AD;         /* Circuit Grey */
  --orange: #FF5A36;       /* Pixel Orange */
  --paper: #F2EFE8;        /* Paper */
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scrollbar-gutter: stable; }  /* no sideways jump when a page gets a scrollbar */
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--white); text-decoration-color: var(--orange); text-underline-offset: 3px; }
a:hover { color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
::selection { background: var(--orange); color: var(--ink); }

/* ---------- header / nav ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px clamp(16px, 4vw, 40px);
}
.site-header .home { display: block; width: 52px; }
.nav { display: flex; gap: clamp(14px, 3vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
  color: var(--grey); text-decoration: none; text-transform: lowercase;
  display: inline-flex; align-items: center; gap: 8px;
}
.nav a::before { content: ''; width: 6px; height: 6px; background: transparent; }
.nav a:hover { color: var(--white); }

/* language switch */
.lang { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; }
.lang a { color: var(--grey); text-decoration: none; padding: 4px 2px; }
.lang a:hover { color: var(--white); }
.lang a[aria-current="true"] { color: var(--white); border-bottom: 2px solid var(--orange); }
.lang span { color: var(--line); }
.site-header nav[aria-label="Main"] { margin-left: auto; }
@media (max-width: 560px) {
  .site-header { flex-wrap: wrap; row-gap: 20px; }
  .site-header .lang { order: 2; margin-left: auto; }
  .site-header nav[aria-label="Main"] { order: 3; width: 100%; }
  .nav { width: 100%; justify-content: space-between; gap: 8px; }
  .nav a { font-size: 12px; letter-spacing: 0.04em; gap: 6px; }
  .nav a::before { display: none; }
  .nav a[aria-current="page"]::before { display: inline-block; }
}
.nav a[aria-current="page"] { color: var(--white); }
.nav a[aria-current="page"]::before { background: var(--orange); }

/* ---------- layout ---------- */
main { flex: 1; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
/* every page uses the same 960px column, so content never jumps between pages;
   text-heavy pages only limit the line length inside that column */
.narrow { max-width: 680px; }
.wrap.narrow { max-width: 960px; }
.wrap.narrow > * { max-width: 680px; }
section { margin: 0 0 72px; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey); margin: 0 0 16px;
}
.eyebrow::before { content: '// '; color: var(--orange); }
h1 {
  font-weight: 300; font-size: clamp(36px, 7vw, 64px); line-height: 1.1;
  letter-spacing: 0.04em; margin: 48px 0 24px;
}
h2 { font-weight: 300; font-size: clamp(24px, 4vw, 32px); line-height: 1.25; letter-spacing: 0.03em; margin: 0 0 16px; }
h3 { font-weight: 400; font-size: 18px; margin: 0 0 8px; }
p { margin: 0 0 16px; }
.h3 { font-weight: 400; font-size: 18px; line-height: inherit; letter-spacing: normal; margin: 0 0 8px; }  /* h2 that looks like h3 */

/* skip link: hidden until focused with the keyboard */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--orange); color: var(--ink); text-decoration: none;
  font-family: var(--mono); font-size: 14px; padding: 10px 16px;
}
.skip-link:focus { top: 16px; color: var(--ink); }
main:focus { outline: none; }
.lead { font-size: clamp(19px, 2.4vw, 22px); font-weight: 300; color: var(--white); max-width: 36em; }
.muted { color: var(--grey); }
.mono { font-family: var(--mono); font-size: 0.9em; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; }
.tags li {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--grey); border: 1px solid var(--line); padding: 2px 10px;
}

a.mail { color: var(--white); text-decoration: underline; text-decoration-color: var(--orange);
         text-decoration-thickness: 2px; text-underline-offset: 6px; overflow-wrap: anywhere; }
a.mail:hover { color: var(--orange); }

.placeholder {
  font-family: var(--mono); color: var(--orange);
  border: 1px dashed var(--orange); padding: 0 6px;
}

/* ---------- footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px clamp(16px, 4vw, 40px);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--grey);
}
.site-footer a { color: var(--grey); text-decoration: none; }
.site-footer a:hover { color: var(--white); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 561px) {
  .site-header .lang { margin-left: clamp(16px, 2.5vw, 32px); padding-left: clamp(16px, 2.5vw, 32px); border-left: 1px solid var(--line); }
}
