/* ============================================================
   Owente Kellen — Portfolio
   base.css — reset, design tokens, typography, base elements
   ============================================================ */

:root {
  /* ---- Color tokens ------------------------------------------------- */
  --ink: #15130f;            /* primary near-black, warm */
  --ink-soft: #3a352c;       /* body copy on paper */
  --ink-2: #0e0d0b;          /* deepest ink, dark section backgrounds */
  --paper: #f7f2e7;          /* warm off-white, primary background */
  --paper-raised: #fdfbf5;   /* card surface, slightly lighter than paper */
  --paper-dim: #efe8d8;      /* recessed surface / subtle fill */
  --paper-on-ink: #f3ede0;   /* paper-toned text on dark backgrounds */
  --stone: #746c5c;          /* warm secondary gray, captions on paper */
  --stone-on-ink: #b7ae98;   /* secondary text on dark backgrounds */
  --rule: #ded3b8;           /* hairline divider on paper */
  --rule-on-ink: #3a372c;    /* hairline divider on ink */
  --bronze: #a6792e;         /* accent fill (buttons, icons, borders) */
  --bronze-dark: #7e5a20;    /* accent text on paper — meets contrast */
  --bronze-light: #cda45f;   /* accent on dark backgrounds */
  --bronze-wash: rgba(166, 121, 46, 0.1);

  /* ---- Type ----------------------------------------------------------- */
  --font-display: "Newsreader", "Iowan Old Style", "Georgia", serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* ---- Layout ----------------------------------------------------------- */
  --container: 1180px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --nav-height: 84px;

  /* ---- Motion ----------------------------------------------------------- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 220ms;
  --dur-med: 480ms;
  --dur-slow: 900ms;
}

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

* {
  margin: 0;
}

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

body {
  min-height: 100svh;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul {
  list-style: none;
  padding: 0;
}

input,
button {
  accent-color: var(--bronze);
}

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

/* ---- Base type ----------------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--paper);
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.eyebrow--on-ink {
  color: var(--bronze-light);
}

/* ---- Focus & accessibility ------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--bronze-dark);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 1rem;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* ---- Shared layout helpers ------------------------------------------------ */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
  scroll-margin-top: var(--nav-height);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.85rem);
  margin-top: 0.75rem;
}

.section-head p {
  margin-top: 1.1rem;
  color: var(--stone);
  font-size: 1.05rem;
  max-width: 52ch;
}

.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
}

/* ---- Reveal-on-scroll (JS toggles .is-visible) ---------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
