/* ==========================================================================
   Global margin reset — overrides Oat @layer base margins
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
figure,
figcaption,
ul,
ol,
dl,
dd,
pre,
hr {
  margin: 0;
}

/* ==========================================================================
   Layout hierarchy: body → .main → .container
   ========================================================================== */

body {
  padding: 24px;
  background: linear-gradient(to bottom, #f6f6f6, #fafafa);
  min-height: 100vh;
}

.main {
  background-color: var(--bg-light);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-small);
  padding: 0 var(--main-pad);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  flex-direction: column;
}

.content {
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
}

.content-container {
  display: flex;
  flex-direction: column;
  gap: 42px;
  padding: 40px 0 32px 0;
}

/* ==========================================================================
   Responsive overrides
   ========================================================================== */

/* Tablet: 810–1199px */
@media (max-width: 1199px) {
  :root {
    --container-max: 760px;
    /* stacked and full width — a wide banner reads better than a tall block */
    --photo-aspect: 3;
  }
}

/* Mobile: 390–809px */
@media (max-width: 809px) {
  :root {
    --container-max: 540px;
    --container-pad: 8px;
    --main-pad: 8px;
    /* narrow: a 3:1 banner would be only ~100px tall and the face tiny */
    --photo-aspect: 1.8;
  }

  body {
    padding: 16px;
  }
}

/* ==========================================================================
   Typography — Crimson Pro headings (all Bold 700)
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 700;
}

h1 {
  font-size: var(--text-h1);
  line-height: 1.375; /* 44px */
}

h2 {
  font-size: var(--text-h2);
  line-height: 1.5; /* 42px */
}

h3 {
  font-size: var(--text-h3);
  line-height: 1.5; /* 36px */
}

h4 {
  font-size: var(--text-h4);
  line-height: 1.5; /* 30px */
}

h5 {
  font-size: var(--text-h5);
  line-height: 1.4; /* 28px */
}

h6 {
  font-size: var(--text-h6);
  line-height: 1.333; /* 24px */
}

/* ==========================================================================
   Typography — Crimson Pro body + small
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--text-regular);
  line-height: 1.333; /* 24px */
  font-weight: 400;
}

small {
  font-size: var(--text-small);
  line-height: 1.5; /* 21px */
}

/* Label — dark pill with monospace text */
.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.286; /* 18px — matches kode-sub */
  font-weight: 400;
  color: var(--text-light);
  background-color: var(--bg-dark);
  padding: 4px 12px;
  border-radius: 4px;
  min-width: 40px;
  width: fit-content;
}

/* Grouped labels — horizontal stack */
.label-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Typography — Kode Mono (code + utility classes)
   ========================================================================== */

code {
  font-family: var(--font-mono);
  font-size: 70%;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-dark-active);
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
  padding: 0.2em 0.6em;
}

pre {
  background-color: var(--bg-dark);
  color: var(--text-light);
  border-radius: 4px;
  padding: 12px 8px;
  overflow-x: auto;
}

pre code {
  font-size: 12px;
  font-weight: 400;
  color: inherit;
  background-color: transparent;
  border-radius: 0;
  padding: 0;
}

.label-mono {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kode-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.286; /* 18px */
  font-weight: 400;
}

.kode-body {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.333; /* 24px */
  font-weight: 400;
}

.kode-h2 {
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1.4; /* 28px */
  font-weight: 700;
}

/* ==========================================================================
   Component overrides
   ========================================================================== */

.card {
  border-width: 2px;
  box-shadow: none;
}

/* Links — Content (underline by default, linen on hover) */
a {
  color: var(--text-dark-active);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

a:hover {
  color: var(--linen);
  text-underline-offset: 2px;
}

/* Nav Links — no underline default, underline + linen on hover */
.nav-link {
  text-decoration: none;
  transition: none;
}

.nav-link:hover {
  color: var(--linen);
  text-decoration: underline;
}
