/* ryankalagin.com: header, footer and interface type shared by every page.
   Loaded after style.css. Uses the same colours. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-left));
  --max: 72rem;
}

/* ---------- interface text in a clean sans ---------- */

.site-head, .site-foot, .eyebrow, .path-top, .button, .more-link, .meta, .status, .kicker,
.specs dt, figcaption, .writing time, .writing-group > h3, .more h2, .built, .links, .skip {
  font-family: var(--sans);
  font-feature-settings: "cv11", "ss01";
}
.built, .meta, figcaption, .writing time { font-size: 0.86rem; letter-spacing: 0.005em; }
.links { font-size: 0.9rem; }
.writing-group > h3, .more h2 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
}
.button { font-size: 0.95rem; font-weight: 560; letter-spacing: 0.005em; border-radius: 999px; padding: 0.72rem 1.3rem 0.74rem; }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.head-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand .mark {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  color: var(--soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.site-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--wash) 85%, transparent); }
.site-nav a[aria-current] { color: var(--ink); background: var(--wash); }

.menu-btn {
  display: none;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 500 0.88rem/1 var(--sans);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}
.menu-btn .bars { position: relative; width: 14px; height: 10px; }
.menu-btn .bars::before, .menu-btn .bars::after, .menu-btn .bars i {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.menu-btn .bars::before { top: 0; }
.menu-btn .bars i { top: 4.25px; }
.menu-btn .bars::after { top: 8.5px; }
.site-head.open .menu-btn .bars::before { top: 4.25px; transform: rotate(45deg); }
.site-head.open .menu-btn .bars i { opacity: 0; }
.site-head.open .menu-btn .bars::after { top: 4.25px; transform: rotate(-45deg); }

/* phones: one tidy line with a menu button, links open as a panel */
@media (max-width: 47.99em) {
  .js .menu-btn { display: inline-flex; }
  .js .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .55);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .js .site-head.open .site-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease; }
  .js .site-head.open { background: var(--paper); }
  .js .site-nav a {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ink);
    padding: 0.85rem 0.25rem;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav a:last-child { border-bottom: 0; }
  .js .site-nav a[aria-current] { background: none; color: var(--accent); }
  html:not(.js) .head-in { height: auto; flex-wrap: wrap; padding-top: 0.7rem; padding-bottom: 0.7rem; }
  html:not(.js) .site-nav { flex-wrap: wrap; }
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 8vw, 5rem);
  padding: 2.5rem 0 max(2.5rem, env(safe-area-inset-bottom));
  color: var(--soft);
  font-size: 0.9rem;
}
.foot-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
}
@media (min-width: 48em) {
  .foot-in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.foot-id p { margin: 0.6rem 0 0; }
.foot-links, .foot-contact { display: flex; flex-direction: column; gap: 0.5rem; }
.foot-links a, .foot-contact a { color: var(--soft); text-decoration: none; width: fit-content; }
.foot-links a:hover, .foot-contact a:hover { color: var(--ink); }
.foot-small {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding: 0 var(--gutter);
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--soft) 80%, transparent);
}

/* section labels used on the homepage and project pages */
.eyebrow { font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .site-nav, .site-nav a, .menu-btn .bars::before, .menu-btn .bars::after, .menu-btn .bars i { transition: none !important; }
}
@media print {
  .site-head { position: static; }
  .site-nav, .menu-btn, .site-foot nav { display: none; }
}

/* ---------- reading font ----------
   Inter for every piece of text, not just the interface (November 2026).
   Inter reads lighter and larger than the serif it replaced, so the body
   size comes down a touch and the headings gain weight. The :root prefix
   lets these win over the same selectors in making.css and home.css. */

:root { --serif: var(--sans); }
body { font-feature-settings: "cv11", "ss01"; font-size: 1rem; line-height: 1.65; }
@media (min-width: 48em) { body { font-size: 1.0625rem; } }

:root .dek { font-style: normal; font-size: clamp(1.1rem, 2.3vw, 1.2rem); }
:root .hero h1 { font-weight: 640; letter-spacing: -0.04em; }
:root .hero .role { font-weight: 560; }
:root .article-head h1 { font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; }
:root .feature .feature-head h2, :root .block > h2, :root .home .block > h2,
:root .about-text h2, :root .contact-card h2 { font-weight: 640; letter-spacing: -0.025em; }
:root .prose h2 { font-weight: 640; letter-spacing: -0.015em; }
:root .prose h3, :root .features h3, :root .writing-group > h3 { font-weight: 620; }
:root .project h3, :root .make h3, :root .path strong { font-weight: 620; letter-spacing: -0.012em; }
:root .writing a, :root .feature-read a { font-weight: 580; }
:root .prose strong { font-weight: 650; }
