/* =========================================================================
   Sean McAlinden — Premium Technical Minimal (v2)
   Space Grotesk (display) · Inter (body) · JetBrains Mono (labels)
   Light, modern, minimal. Monochrome with a single azure "spark".
   ========================================================================= */

:root {
  --bg: #ffffff;
  --bg-2: #fafbfc;
  --ink: #0c0e14;
  --ink-2: #444b57;
  --muted: #878d99;
  --line: #edeef1;
  --line-2: #e2e4e9;

  --accent: #1f7aec;
  --accent-strong: #155fc2;
  --accent-tint: #eaf3fe;
  --grad: linear-gradient(120deg, #1f7aec, #19c0e6);
  --ring: rgba(31, 122, 236, 0.45);
  --warn: #b45309;

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1080px;
  --measure: 40rem;
  --pad: 28px;
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv05", "cv08", "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--accent);
}

::selection {
  background: var(--accent-tint);
  color: var(--accent-strong);
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 100;
  text-decoration: none;
  font-weight: 500;
}
.skip-link:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Top bar ---------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}
.brand__logo {
  display: block;
  border-radius: 50%;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav a {
  position: relative;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transition: width 0.2s ease;
}
.nav a:hover {
  color: var(--ink);
}
.nav a:hover::after {
  width: 100%;
}

/* ---------- Shared labels --------------------------------------------- */

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.label::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

/* ---------- Hero ------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(76px, 12vw, 168px) 0 clamp(48px, 7vw, 96px);
}
.hero::before {
  content: "";
  position: absolute;
  top: -28%;
  right: -12%;
  width: min(70vw, 760px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at center,
    rgba(31, 122, 236, 0.18),
    rgba(25, 192, 230, 0.12) 42%,
    transparent 70%
  );
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}
.hero .wrap {
  position: relative;
  z-index: 1;
}
.hero__eyebrow {
  margin: 0 0 22px;
}
.hero__title {
  margin: 0 0 0.15em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 18ch;
}
.hero__punchline {
  margin: 0 0 0.65em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.6vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.hero__standfirst {
  margin: 0;
  font-size: clamp(1.12rem, 1.9vw, 1.34rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52ch;
}
.hero__actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Caution callout (the wit) --------------------------------- */

.caution {
  margin-top: 40px;
  max-width: 54ch;
  padding: 16px 18px;
  border: 1px solid #f0e2c4;
  background: #fffaf0;
  border-radius: 12px;
  display: grid;
  gap: 6px;
}
.caution__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warn);
}
.caution__label::before {
  content: "\26A0";
  font-size: 0.95rem;
}
.caution__body {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- Buttons --------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  box-shadow: 0 1px 2px rgba(12, 14, 20, 0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(12, 14, 20, 0.16);
  background: #000;
}
.button--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-2);
  box-shadow: none;
}
.button--ghost:hover {
  background: var(--bg-2);
  border-color: var(--ink);
  box-shadow: none;
  transform: translateY(-1px);
}

/* ---------- Sections -------------------------------------------------- */

.section {
  padding: clamp(48px, 7vw, 92px) 0;
}
.section--alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.section__link {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.15s ease;
}
.section__link:hover {
  color: var(--accent);
}

/* ---------- Focus-area nav (pills) ------------------------------------ */

.area-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.area-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink-2);
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.area-nav a:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--bg-2);
}
.area-nav a.is-current {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

/* ---------- Entry list (home + writing + areas) ----------------------- */

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: entry;
}
.entry {
  counter-increment: entry;
  border-top: 1px solid var(--line);
}
.entry__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 28px;
  align-items: baseline;
  padding: 26px 18px;
  margin: 0 -18px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: background 0.18s ease;
}
.entry__link:hover {
  background: var(--bg-2);
}
.entry__num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}
.entry__num::before {
  content: counter(entry, decimal-leading-zero);
}
.entry__main {
  min-width: 0;
}
.entry__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.entry__cat {
  color: var(--accent);
}
.entry__date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.entry__title {
  margin: 0 0 0.3em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.15s ease;
}
.entry__link:hover .entry__title {
  color: var(--accent);
}
.entry__standfirst {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 60ch;
}
.entry__arrow {
  align-self: center;
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease;
}
.entry__link:hover .entry__arrow {
  transform: translateX(5px);
  color: var(--accent);
}

/* ---------- Page header (writing / about / areas) --------------------- */

.page-head {
  padding: clamp(56px, 9vw, 120px) 0 clamp(28px, 4vw, 48px);
}
.page-head__eyebrow {
  margin: 0 0 22px;
}
.page-head__title {
  margin: 0 0 0.3em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.page-head__lead {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 50ch;
}

/* ---------- Article --------------------------------------------------- */

.article {
  padding: clamp(44px, 7vw, 84px) var(--pad) clamp(56px, 8vw, 104px);
}
.article__header {
  max-width: var(--measure);
  margin-inline: auto;
}
.article__eyebrow {
  margin: 0 0 18px;
}
.article__title {
  margin: 0 0 0.35em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.article__standfirst {
  margin: 0 0 26px;
  font-size: clamp(1.18rem, 2.1vw, 1.42rem);
  line-height: 1.5;
  color: var(--ink-2);
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.article__meta time {
  font-variant-numeric: tabular-nums;
}

/* ---------- Prose (rich text) ----------------------------------------- */

.prose {
  max-width: var(--measure);
  margin-inline: auto;
  margin-top: 40px;
  font-family: var(--font-sans);
  font-size: 1.14rem;
  line-height: 1.78;
  color: var(--ink-2);
}
.prose > :first-child {
  margin-top: 0;
}
.prose p {
  margin: 0 0 1.4em;
}
.prose h2 {
  margin: 2em 0 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.prose h3 {
  margin: 1.7em 0 0.4em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--ink);
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover {
  color: var(--accent-strong);
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.prose blockquote {
  margin: 1.8em 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.3em;
}
.prose li {
  margin: 0.45em 0;
}
.prose li::marker {
  color: var(--muted);
}
.prose img {
  display: block;
  border-radius: var(--radius);
  margin: 1.9em 0;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.6em 0;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 0.12em 0.42em;
  border-radius: 6px;
}
.prose pre {
  margin: 1.9em 0;
  padding: 20px 22px;
  background: #0c0e14;
  color: #e7e9ee;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.92rem;
  line-height: 1.65;
}
.prose pre code {
  font-family: var(--font-mono);
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.94em;
  color: inherit;
}

.article__back {
  max-width: var(--measure);
  margin: 52px auto 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.article__back a {
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.15s ease;
}
.article__back a:hover {
  color: var(--accent);
}
.article__back a::before {
  content: "\2190  ";
}

/* ---------- Footer ---------------------------------------------------- */

.site-footer {
  margin-top: clamp(64px, 10vw, 120px);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.site-footer__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 56px var(--pad) 40px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px 32px;
}
.site-footer__brand {
  display: grid;
  gap: 14px;
  align-content: start;
}
.site-footer .brand__name {
  font-size: 1.05rem;
}
.site-footer__tag {
  margin: 0;
  max-width: 30ch;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.site-footer__col {
  display: grid;
  gap: 11px;
  align-content: start;
}
.site-footer__h {
  margin: 0 0 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.site-footer__col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-footer__col a:hover {
  color: var(--accent);
}
.site-footer__legal {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

/* ---------- Responsive ------------------------------------------------- */

@media (max-width: 760px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --pad: 20px;
  }
  .nav {
    gap: 20px;
  }
  .entry__link {
    grid-template-columns: auto 1fr;
    gap: 4px 16px;
    padding: 22px 14px;
    margin: 0 -14px;
  }
  .entry__arrow {
    display: none;
  }
  .section__head {
    align-items: baseline;
  }
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none !important;
  }
}
