/* oneil.xyz — editorial landing page
   Type is deliberately system-native: no webfont request, no FOUT, no
   third-party origin. To swap in a webfont later, change --font-serif
   and --font-sans below and add the <link> in index.html. */

:root {
  --font-serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* light — warm paper */
  --bg:        #fbfaf7;
  --bg-sunk:   #f3f1ec;
  --ink:       #171614;
  --ink-soft:  #4a4741;
  --ink-mute:  #716c63;
  --rule:      #e2ded5;
  --accent:    #9b5f13;
  --accent-dim:#b07a20;

  --measure: 39rem;
  --step: clamp(1rem, 0.7rem + 1.4vw, 1.125rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0e0e10;
    --bg-sunk:   #17171a;
    --ink:       #eae7e1;
    --ink-soft:  #b3aea5;
    --ink-mute:  #868178;
    --rule:      #26262a;
    --accent:    #e0a94e;
    --accent-dim:#a97f38;
  }
}

:root[data-theme="dark"] {
  --bg:        #0e0e10;
  --bg-sunk:   #17171a;
  --ink:       #eae7e1;
  --ink-soft:  #b3aea5;
  --ink-mute:  #868178;
  --rule:      #26262a;
  --accent:    #e0a94e;
  --accent-dim:#a97f38;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font: 600 0.85rem/1 var(--font-sans);
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* ── masthead ─────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 0;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
}

.toggle {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-mute);
  border-radius: 50%;
  transition: color 0.15s ease;
}
.toggle:hover { color: var(--accent); }

.toggle-face {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(to right, currentColor 0 50%, transparent 50% 100%);
}

/* ── intro ────────────────────────────────────────── */

.intro { padding: 5.5rem 0 0; }

h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 0 0 1.75rem;
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1.02rem + 1.05vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -0.008em;
  color: var(--ink);
  margin: 0 0 1.1rem;
  text-wrap: pretty;
}

.lede-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.1875rem);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 2.25rem;
  text-wrap: pretty;
}

.bio {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.75;
  margin: 0;
  max-width: 34rem;
  text-wrap: pretty;
}

/* ── section heading ──────────────────────────────── */

.section-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin: 6rem 0 0;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

/* ── projects ─────────────────────────────────────── */

.project {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.project h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.28rem + 1vw, 1.75rem);
  letter-spacing: -0.014em;
  line-height: 1.2;
  margin: 0;
}

.project h3 a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.28s cubic-bezier(0.2, 0.7, 0.3, 1), color 0.18s ease;
}
.project h3 a:hover,
.project h3 a:focus-visible {
  color: var(--accent);
  background-size: 100% 1px;
}

.repo {
  margin: 1.1rem 0 0;
}

.repo a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.18s ease;
}
.repo a:hover,
.repo a:focus-visible { color: var(--accent); }

.repo a span {
  display: inline-block;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.repo a:hover span,
.repo a:focus-visible span { transform: translate(2px, -2px); }

.lang {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-mute);
}

.tagline {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 0.85rem;
  text-wrap: pretty;
}

.detail {
  font-size: 0.9375rem;
  line-height: 1.72;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  background: var(--bg-sunk);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.tag-wip {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: transparent;
}

/* an unfinished project reads quieter until it ships */
.is-wip .tagline,
.is-wip .detail { color: var(--ink-mute); }
.is-wip .project-head { opacity: 0.92; }

/* ── footer ───────────────────────────────────────── */

footer { padding: 4rem 0 0; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.links a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.links a:hover,
.links a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.colophon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-mute);
  margin: 0;
}

/* ── responsive ───────────────────────────────────── */

@media (max-width: 32rem) {
  .intro { padding-top: 3.5rem; }
  .section-heading { margin-top: 4.5rem; }
  .project { padding: 2.25rem 0; }
  .project-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .toggle, .skip { display: none; }
  body { background: #fff; color: #000; }
}
