/* Bauhaus-ish. Sharp lines, earthy palette, geometric accents.
   Priority: readability first, decoration second. */

:root {
  --cream:      #EFE6D2;
  --paper:      #F6EFDD;
  --ink:        #1A1A1A;
  --ink-soft:   #2A2A2A;
  --terracotta: #B9542F;
  --ochre:      #C99138;
  --olive:      #6E6B38;
  --rust:       #8A3B1E;
  --muted:      #5A4A30;

  --container:  1280px;
  --gutter:     28px;
  --nav-h:      58px;
  --head-h:     64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--terracotta);
  transition: background 0.12s ease, color 0.12s ease;
}
a:hover, a:focus-visible {
  background: var(--ink);
  color: var(--cream);
  border-bottom-color: var(--ink);
  outline: none;
}

h1, h2, h3, h4 {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(56px, 10vw, 156px); line-height: 0.88; text-transform: uppercase; }
h2 { font-size: clamp(34px, 5vw, 60px); line-height: 0.95; text-transform: uppercase; }
h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.15; }
h4 { font-size: 18px; line-height: 1.2; }

p { margin: 0 0 1em 0; }
p:last-child { margin-bottom: 0; }

/* ---------- Section base ---------- */

.section {
  padding: 0;
  position: relative;
  background: var(--cream);
}
.section-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter) 112px;
}

.section-dark      { background: var(--ink); color: var(--cream); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--cream); }
.section-dark .num { color: var(--ochre); }
.section-dark a    { color: var(--cream); border-bottom-color: var(--ochre); }
.section-dark a:hover { background: var(--ochre); color: var(--ink); }

.section-paper    { background: var(--paper); }
.section-contact  { background: var(--ink); color: var(--cream); }
.section-contact a { color: var(--cream); border-bottom-color: var(--ochre); }
.section-contact a:hover { background: var(--ochre); color: var(--ink); }

.section-lede {
  font-size: 20px;
  margin: 0 0 48px 0;
  line-height: 1.45;
}

/* ---------- Sticky section head (the stack effect) ---------- */

.section-head-link {
  display: block;
  border-bottom: 3px solid var(--ink);
  background: var(--cream);
  text-decoration: none;
  color: inherit;
  border-top: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.section-head-link:hover { background: var(--paper); color: inherit; border-bottom-color: var(--ink); }
.section-head-link:hover .num { color: var(--terracotta); }

.section-dark     .section-head-link { background: var(--ink); }
.section-dark     .section-head-link:hover { background: #242424; }
.section-paper    .section-head-link { background: var(--paper); }
.section-paper    .section-head-link:hover { background: #EDE4CE; }
.section-contact  .section-head-link { background: var(--ink); }
.section-contact  .section-head-link:hover { background: #242424; }

/* Accumulate heading bars at the top as the user scrolls */
.stack .section-head-link {
  position: sticky;
  top: calc(var(--nav-h) + (var(--i) - 1) * var(--head-h));
  z-index: calc(40 + var(--i));
}
.stack { position: relative; z-index: auto; }
.stack .section-inner { position: relative; z-index: 1; isolation: isolate; }

.section-head {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: baseline; gap: 24px;
  min-height: var(--head-h);
}
.num {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  color: var(--terracotta);
  letter-spacing: 0.02em;
}
.section-head h2 { font-size: clamp(22px, 2.6vw, 32px); }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 3px solid var(--ink);
  min-height: var(--nav-h);
}
.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px var(--gutter);
}
.nav nav { display: flex; gap: 24px; flex-wrap: wrap; }
.nav nav a {
  font-weight: 700; text-transform: uppercase;
  font-size: 13px; letter-spacing: 0.1em;
  border-bottom: none;
  padding: 4px 0;
}
.nav nav a:hover, .nav nav a:focus-visible {
  background: transparent;
  color: var(--terracotta);
  border-bottom: 2px solid var(--terracotta);
}

.mark {
  display: flex; gap: 8px; align-items: center;
  border-bottom: none;
  font-family: 'Archivo Black', sans-serif;
  letter-spacing: 0.08em;
}
.mark:hover { background: transparent; color: var(--ink); }
.mark-circle, .mark-tri { display: block; width: 16px; height: 16px; }
.mark-circle { background: var(--terracotta); border-radius: 50%; }
.mark-tri {
  width: 0; height: 0; background: transparent;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 16px solid var(--olive);
}
.mark-text { font-size: 14px; margin-left: 4px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
  background: var(--cream);
  z-index: 1;
}
.hero .section-inner {
  padding-top: 80px;
  padding-bottom: 96px;
  position: relative;
  z-index: 1;
}
.hero-grid {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-shape { position: absolute; }
.shape-terracotta {
  top: 10%; right: 4%;
  width: 220px; height: 220px;
  background: var(--terracotta);
  border-radius: 50%;
}
.shape-black {
  bottom: 0; right: 0;
  width: 0; height: 0;
  border-left: 120px solid transparent;
  border-bottom: 180px solid var(--ink);
}

.eyebrow {
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 700; margin: 0 0 24px 0;
  color: var(--rust);
}
.role-line {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(14px, 1.4vw, 18px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 24px 0 24px 0;
  color: var(--ink);
  max-width: none;
}
.lede {
  font-size: clamp(17px, 1.5vw, 21px);
  max-width: none;
  line-height: 1.55;
  background: rgba(239, 230, 210, 0.88);
  padding: 4px 0;
  margin-bottom: 0;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
  font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 600;
}
.hero-meta > span { flex: 0 1 auto; }

/* ---------- About ---------- */

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: stretch;
}
.prose p {
  font-size: 18px;
  max-width: 62ch;
  color: var(--ink-soft);
}

.fact-stack {
  border-left: 3px solid var(--ink);
  padding-left: 24px;
  display: flex; flex-direction: column; gap: 22px;
  align-self: stretch;
}
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact-label {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--rust); font-weight: 700;
}
.fact-value { font-size: 16px; font-weight: 500; line-height: 1.45; }

.personal-block {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 3px solid var(--ink);
}
.personal-block h3 {
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.personal-block p {
  font-size: 18px;
  color: var(--ink-soft);
}

/* ---------- Stats (magazine spread: huge numeral | context) ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0;
  row-gap: 0;
  border-top: 1px solid rgba(239, 230, 210, 0.18);
  isolation: isolate;
}
.stat {
  position: relative;
  padding: 40px 44px 40px 0;
  border-bottom: 1px solid rgba(239, 230, 210, 0.18);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 28px;
  align-items: center;
}
.stat:nth-child(even) { padding-left: 44px; border-left: 1px solid rgba(239, 230, 210, 0.18); }
.stat::before {
  content: '';
  position: absolute;
  left: 0; top: 44px;
  width: 4px; height: 40px;
  background: currentColor;
}
.stat:nth-child(even)::before { left: 44px; }
.stat-label {
  position: absolute;
  top: 18px; left: 22px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(239, 230, 210, 0.45);
  font-family: 'Inter', sans-serif;
}
.stat:nth-child(even) .stat-label { left: 66px; }
.stat-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(56px, 6.5vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: currentColor;
  padding-left: 22px;
}
.stat-text {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--cream);
}

.stat:nth-child(1) { color: var(--terracotta); }
.stat:nth-child(2) { color: var(--ochre); }
.stat:nth-child(3) { color: #A8A248; }
.stat:nth-child(4) { color: #E27A4A; }
.stat:nth-child(5) { color: var(--terracotta); }
.stat:nth-child(6) { color: var(--ochre); }
.stat:nth-child(7) { color: #A8A248; }
.stat:nth-child(8) { color: #E27A4A; }

/* ---------- Roles ---------- */

.role {
  padding: 44px 0;
  border-top: 2px solid var(--ink);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 44px;
}
.role:first-of-type { border-top: none; padding-top: 0; }
.role-meta { display: flex; flex-direction: column; gap: 10px; }
.role-date {
  display: inline-block; align-self: flex-start;
  background: var(--ink); color: var(--cream);
  padding: 6px 12px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
}
.role-place {
  font-size: 14px;
  color: var(--rust);
  font-weight: 600;
  line-height: 1.4;
}
.role-body h3 { margin-bottom: 16px; }
.role-points { margin: 0; padding: 0 0 0 20px; }
.role-points li {
  margin-bottom: 10px;
  max-width: 72ch;
  color: var(--ink-soft);
}

.role-group-lede {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 68ch;
  margin: 0 0 28px 0;
}
.sub-role {
  padding: 22px 0 22px 24px;
  border-left: 3px solid var(--terracotta);
  margin-bottom: 18px;
}
.sub-role:last-child { margin-bottom: 0; }
.sub-role-date {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700; color: var(--rust);
  margin-bottom: 6px;
}
.sub-role h4 {
  margin-bottom: 12px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.sub-role .role-points li { font-size: 16px; }

/* ---------- Skills (horizontal rows, no grid cage) ---------- */

.skills-grid {
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--ink);
}
.skill-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px 60px 1fr 1.4fr;
  align-items: center;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 2px solid var(--ink);
  transition: padding-left 0.25s ease, background 0.25s ease;
}
.skill-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--ink);
  transition: width 0.25s ease;
  z-index: 0;
}
.skill-card:hover {
  padding-left: 20px;
  background: var(--paper);
}
.skill-card:hover::before { width: 6px; }

.skill-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(56px, 6vw, 88px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  position: relative; z-index: 1;
}
.skill-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  color: var(--terracotta);
  position: relative; z-index: 1;
}
.skill-icon svg { width: 100%; height: 100%; display: block; }
.skill-card h3 {
  line-height: 1.15;
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  position: relative; z-index: 1;
}
.skill-card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  position: relative; z-index: 1;
}

.skill-card:nth-child(1) .skill-num, .skill-card:nth-child(1) .skill-icon { color: var(--terracotta); }
.skill-card:nth-child(2) .skill-num, .skill-card:nth-child(2) .skill-icon { color: var(--ochre); }
.skill-card:nth-child(3) .skill-num, .skill-card:nth-child(3) .skill-icon { color: var(--olive); }
.skill-card:nth-child(4) .skill-num, .skill-card:nth-child(4) .skill-icon { color: var(--rust); }
.skill-card:nth-child(5) .skill-num, .skill-card:nth-child(5) .skill-icon { color: var(--terracotta); }
.skill-card:nth-child(6) .skill-num, .skill-card:nth-child(6) .skill-icon { color: var(--ochre); }
.skill-card:nth-child(7) .skill-num, .skill-card:nth-child(7) .skill-icon { color: var(--olive); }
.skill-card:nth-child(8) .skill-num, .skill-card:nth-child(8) .skill-icon { color: var(--rust); }

/* ---------- Reach ---------- */

.reach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}
.reach-col h3 {
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--ink);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tag-list li {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 6px 12px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em;
}

.lang-list { list-style: none; padding: 0; margin: 0; width: 100%; }
.lang-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 2px solid rgba(26,26,26,0.12);
  font-weight: 600;
}
.lang-list li:last-child { border-bottom: none; }
.dots { display: inline-flex; gap: 6px; }
.dots .d {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink);
}
.dots .d.off { background: rgba(26,26,26,0.2); }

/* ---------- Contact ---------- */

.section-contact .section-inner { padding-top: 48px; padding-bottom: 96px; }
.contact-list {
  list-style: none; padding: 0; margin: 0;
  width: 100%;
}
.contact-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 2px solid rgba(239,230,210,0.22);
  align-items: baseline;
}
.contact-list li:last-child { border-bottom: none; }
.contact-label {
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ochre); font-weight: 700;
}
.contact-link {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.1;
  color: var(--cream);
  word-break: break-word;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--ochre);
}
.contact-link:hover, .contact-link:focus-visible {
  background: var(--ochre);
  color: var(--ink);
  border-bottom-color: var(--ochre);
}

/* ---------- Foot ---------- */

.foot { background: var(--cream); border-top: 3px solid var(--ink); }
.foot-bars { display: flex; width: 100%; }
.foot-bar { height: 18px; flex: 1 1 0; min-width: 0; }
.foot-terracotta { background: var(--terracotta); }
.foot-ochre { background: var(--ochre); }
.foot-black { background: var(--ink); }
.foot-text {
  display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 12px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px var(--gutter);
  font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 600;
}

/* ---------- Reveal on entry ---------- */

.hero {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.hero.is-in { opacity: 1; transform: none; }

.stack .section-inner {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.stack.is-in .section-inner { opacity: 1; transform: none; }

.is-in .stat,
.is-in .skill-card,
.is-in .role,
.is-in .reach-col,
.is-in .contact-list li {
  animation: rise 0.7s cubic-bezier(.2,.7,.2,1) both;
}
.is-in .stat:nth-child(1),        .is-in .skill-card:nth-child(1), .is-in .reach-col:nth-child(1), .is-in .contact-list li:nth-child(1) { animation-delay: 0.05s; }
.is-in .stat:nth-child(2),        .is-in .skill-card:nth-child(2), .is-in .reach-col:nth-child(2), .is-in .contact-list li:nth-child(2) { animation-delay: 0.12s; }
.is-in .stat:nth-child(3),        .is-in .skill-card:nth-child(3), .is-in .reach-col:nth-child(3) { animation-delay: 0.2s; }
.is-in .stat:nth-child(4),        .is-in .skill-card:nth-child(4) { animation-delay: 0.28s; }
.is-in .stat:nth-child(5) { animation-delay: 0.36s; }
.is-in .stat:nth-child(6) { animation-delay: 0.44s; }
.is-in .stat:nth-child(7) { animation-delay: 0.52s; }
.is-in .stat:nth-child(8) { animation-delay: 0.6s; }
.is-in .skill-card:nth-child(5) { animation-delay: 0.36s; }
.is-in .skill-card:nth-child(6) { animation-delay: 0.44s; }
.is-in .skill-card:nth-child(7) { animation-delay: 0.52s; }
.is-in .skill-card:nth-child(8) { animation-delay: 0.6s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .skill-card { grid-template-columns: 80px 48px 1fr 1.2fr; gap: 22px; }
  .reach-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 820px) {
  :root { --gutter: 18px; --head-h: 56px; }
  .section-inner { padding: 32px var(--gutter) 80px; }
  .hero .section-inner { padding-top: 56px; padding-bottom: 72px; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .role { grid-template-columns: 1fr; gap: 16px; }
  .reach-grid { grid-template-columns: 1fr; gap: 32px; }
  .skill-card {
    grid-template-columns: 80px 1fr;
    grid-template-areas: "num title" "num desc";
    row-gap: 10px; column-gap: 20px;
    padding: 24px 0;
  }
  .skill-card .skill-num { grid-area: num; align-self: start; }
  .skill-card h3 { grid-area: title; }
  .skill-card p { grid-area: desc; }
  .skill-card .skill-icon { display: none; }
  .nav nav a:nth-child(4) { display: none; }
  .shape-terracotta { width: 140px; height: 140px; top: auto; bottom: 8%; right: 4%; }
  .shape-black { border-left-width: 70px; border-bottom-width: 110px; }
  .contact-list li { grid-template-columns: 110px 1fr; gap: 16px; padding: 22px 0; }
  .hero-meta { justify-content: flex-start; }
}

@media (max-width: 520px) {
  :root { --gutter: 14px; --head-h: 52px; }
  body { font-size: 16px; }
  .section-inner { padding: 24px var(--gutter) 60px; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat, .stat:nth-child(even) { padding: 32px 0 32px 22px; border-left: none; }
  .stat:nth-child(even)::before { left: 0; }
  .stat:nth-child(even) .stat-label { left: 22px; }
  .nav nav a:nth-child(3) { display: none; }
  .lede { max-width: 100%; }
  .shape-terracotta, .shape-black { opacity: 0.85; }
  .contact-list li { grid-template-columns: 1fr; gap: 6px; }
  .dots .d { width: 8px; height: 8px; }
  .hero-meta { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a { transition: none; }
  .hero, .stack .section-inner { opacity: 1; transform: none; transition: none; }
  .is-in .stat, .is-in .skill-card, .is-in .role, .is-in .reach-col, .is-in .contact-list li {
    animation: none;
  }
}
