/* ==========================================================================
   AMD Novak — base: design tokens, reset, shared primitives
   ========================================================================== */

:root {
  /* Colour — anthracite, warm white, one natural (oak) accent */
  --c-ink-900: #101112;
  --c-ink-800: #151617;
  --c-ink-700: #1c1d1f;
  --c-ink-600: #26282a;
  --c-paper: #f2eee6;
  --c-paper-dim: rgb(242 238 230 / 0.68);
  --c-paper-faint: rgb(242 238 230 / 0.58);
  --c-paper-nav: rgb(242 238 230 / 0.9);
  --c-line: rgb(242 238 230 / 0.14);
  --c-line-strong: rgb(242 238 230 / 0.34);
  --c-oak: #c2a477;
  --c-oak-deep: #a98a5d;

  /* Type */
  --f-serif: "Instrument Serif", "Times New Roman", serif;
  --f-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --gutter: clamp(1.25rem, 3.2vw, 3rem);
  --header-h: 5.5rem;
  --header-h-compact: 4.25rem;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --dur-fast: 220ms;
  --dur-base: 420ms;
}

@media (max-width: 959.98px) {
  :root {
    --header-h: 4.25rem;
    --header-h-compact: 4rem;
  }
}

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

html {
  color-scheme: dark;
  background: var(--c-ink-800);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h-compact);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--c-ink-800);
  color: var(--c-paper);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-menu-open {
  overflow: hidden;
}

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

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--c-oak);
  outline-offset: 4px;
  border-radius: 2px;
}

::selection {
  background: var(--c-oak);
  color: var(--c-ink-900);
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: var(--gutter);
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--c-paper);
  color: var(--c-ink-900);
  font-size: 0.875rem;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus-visible {
  transform: none;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Button
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--c-paper);
  --btn-bd: var(--c-line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}

.btn__arrow {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  transition: transform var(--dur-base) var(--ease-out);
}

.btn:hover .btn__arrow,
.btn:focus-visible .btn__arrow {
  transform: translateX(0.3rem);
}

.btn--primary {
  --btn-bg: var(--c-paper);
  --btn-fg: var(--c-ink-900);
  --btn-bd: var(--c-paper);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  --btn-bg: var(--c-oak);
  --btn-bd: var(--c-oak);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  --btn-bg: var(--c-paper);
  --btn-fg: var(--c-ink-900);
  --btn-bd: var(--c-paper);
}

/* --------------------------------------------------------------------------
   Light-surface tokens (projects and about sections)
   -------------------------------------------------------------------------- */
:root {
  --c-surface: #eee9df;
  --c-surface-deep: #e4ddd0;
  --c-ink: #151617;
  --c-ink-dim: rgb(21 22 23 / 0.68);
  --c-ink-faint: rgb(21 22 23 / 0.5);
  --c-ink-line: rgb(21 22 23 / 0.16);
  --c-oak-ink: #7d6238; /* oak, dark enough for text on the light surface */
}

/* --------------------------------------------------------------------------
   Section rhythm: every content section uses the same top / bottom padding
   -------------------------------------------------------------------------- */
:root {
  --section-pt: clamp(3.5rem, 6.5vw, 6.5rem);
  --section-pb: clamp(3rem, 5.5vw, 5.5rem);
  --container-max: 120rem;
}

/* --------------------------------------------------------------------------
   Shared text components: section label and underlined link
   -------------------------------------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-ink-dim);
}

.eyebrow::before {
  content: "";
  width: 2.75rem;
  height: 1px;
  background: var(--c-oak-ink);
}

.eyebrow--light {
  color: var(--c-paper-dim);
}

.eyebrow--light::before {
  background: var(--c-oak);
}

.link,
.more {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding-block: 0.3rem;
  color: var(--c-ink);
}

.link::after,
.more::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-out);
}

.link:hover::after,
.link:focus-visible::after,
.more:hover::after,
.more:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.more {
  font-family: var(--f-serif);
  font-size: clamp(1.4rem, 1rem + 0.9vw, 1.9rem);
  letter-spacing: -0.01em;
}

.more svg {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform var(--dur-base) var(--ease-out);
}

.more:hover svg,
.more:focus-visible svg {
  transform: translate(0.2rem, -0.2rem);
}

.more--light {
  color: var(--c-paper);
  font-size: clamp(1.4rem, 1rem + 0.9vw, 1.9rem);
}
