/* ---------- Tokens ---------- */
:root {
  --amber: #F6B21B;
  --ink: #131512;
  --bone: #EEECE4;
  --stone: #D6D3C8;
  --smoke: #5C5F58;
  --ash: #A3A69D;
  --ink-rule: #2E312B;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  --step-2: clamp(1.9rem, 1.3rem + 2.2vw, 3rem);
  --step-3: clamp(2.4rem, 1.2rem + 4.6vw, 4.6rem);
  --step-4: clamp(3rem, 1rem + 8vw, 7.5rem);

  --space-section: clamp(4.5rem, 2.5rem + 8vw, 10rem);
  --gutter: clamp(1.25rem, 0.4rem + 3.2vw, 3.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

/* The display voice: Archivo at its narrowest width, heavy, capitals. */
.display {
  font-stretch: 62%;
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.wrap {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
.skills :focus-visible,
.site-footer :focus-visible { outline-color: var(--amber); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -5rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--bone);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.section-title { font-size: var(--step-4); text-wrap: balance; }

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  padding: 0 2.25rem;
  background: var(--ink);
  color: var(--bone);
  border: 2px solid var(--ink);
  font-size: var(--step-0);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover {
  background: transparent;
  color: var(--ink);
  transform: translateY(-2px);
}
.btn:active { transform: none; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: var(--amber);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav { display: flex; gap: clamp(1.25rem, 2.5vw, 2.5rem); }

.site-nav a,
.site-footer__nav a {
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease);
}
.site-nav a:hover,
.site-footer__nav a:hover { background-size: 100% 1px; }

.hero__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(1.5rem, 4vw, 3rem);
}

/* script.js sizes this so the name spans the full measure; 20vw is the no-JS fallback. */
.hero__name {
  font-size: 20vw;
  line-height: 0.8;
  white-space: nowrap;
}
.hero__name-inner { display: inline-block; }

.hero__wave {
  display: block;
  width: 100%;
  height: clamp(3.5rem, 9vw, 8rem);
  margin-top: clamp(0.75rem, 2vw, 1.5rem);
}
.hero__wave path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linejoin: round;
}

.hero__foot {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  row-gap: 1.25rem;
  align-items: end;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hero__role {
  grid-column: span 3;
  max-width: 16ch;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.3;
}

.hero__lede {
  grid-column: 5 / span 5;
  max-width: 36ch;
  font-size: var(--step-1);
  line-height: 1.3;
}

.hero .btn { grid-column: 11 / span 2; justify-self: end; }

/* Load sequence: name rises, then the signal draws left to right. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__name-inner { animation: rise 0.9s var(--ease) both; }
  .js .hero__wave { animation: draw 1.6s 0.35s var(--ease) both; }
  .js .hero__foot > * { animation: rise 0.7s 0.9s var(--ease) both; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.12em); }
  to { opacity: 1; transform: none; }
}
@keyframes draw {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- About ---------- */
.about { padding-block: var(--space-section); }

.about__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  row-gap: 3rem;
  align-items: start;
}

.about__portrait {
  grid-column: span 4;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(1) contrast(1.08);
}

.about__body { grid-column: 6 / span 7; }

.about__title { font-size: var(--step-4); }

.about__text {
  display: grid;
  gap: 1.25rem;
  max-width: 54ch;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  font-size: var(--step-1);
  line-height: 1.4;
}

.record {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  margin-top: clamp(3rem, 6vw, 5.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
}

.record__item { display: flex; flex-direction: column; }
.record__value { font-size: var(--step-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.record__label { margin-top: 0.6rem; color: var(--smoke); font-weight: 500; }

/* ---------- Experience ---------- */
.experience { padding-bottom: var(--space-section); }

.roles { margin-top: clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--ink); }

.role {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  align-items: baseline;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--ink);
  transition: background-color 0.35s var(--ease), padding 0.35s var(--ease), opacity 0.7s var(--ease), translate 0.7s var(--ease);
}

.role__name { grid-column: span 6; font-size: var(--step-3); }
.role__title { grid-column: span 2; font-weight: 600; }
.role__desc { grid-column: span 4; max-width: 36ch; color: var(--smoke); transition: color 0.35s var(--ease); }

@media (hover: hover) {
  .role:hover {
    background: var(--amber);
    padding-inline: clamp(1rem, 2vw, 2rem);
  }
  .role:hover .role__desc { color: var(--ink); }
}

/* ---------- What I do ---------- */
.skills {
  padding-block: var(--space-section);
  background: var(--ink);
  color: var(--bone);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  row-gap: 2.5rem;
  align-items: start;
}

.skills .section-title { grid-column: span 4; color: var(--amber); }

.skills__list {
  grid-column: 6 / span 7;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--gutter);
}

.skill {
  padding-block: 1.5rem 2.25rem;
  border-top: 1px solid var(--ink-rule);
}
.skill h3 {
  font-size: var(--step-2);
  transition: color 0.3s var(--ease);
}
.skill p { max-width: 32ch; margin-top: 0.75rem; color: var(--ash); }

@media (hover: hover) {
  .skill:hover h3 { color: var(--amber); }
}

/* ---------- Contact ---------- */
.contact {
  padding-block: var(--space-section) clamp(2.5rem, 5vw, 4rem);
  background: var(--amber);
}

.contact__title {
  font-size: clamp(3.75rem, 0.5rem + 15.5vw, 17rem);
  line-height: 0.82;
}

.contact__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.75rem var(--gutter);
  margin-top: clamp(2.5rem, 6vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
}
.contact__foot p { max-width: 36ch; font-size: var(--step-1); line-height: 1.3; }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2.5rem;
  background: var(--ink);
  color: var(--bone);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem 2.5rem;
}

.site-footer__legal { margin-top: 0.35rem; color: var(--ash); font-size: var(--step--1); }

.site-footer__links { display: flex; align-items: center; gap: 2rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; }

.social {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--bone);
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.social svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.social:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    translate: 0 18px;
    transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
  }
  .js .role.reveal {
    transition: opacity 0.7s var(--ease), translate 0.7s var(--ease), background-color 0.35s var(--ease), padding 0.35s var(--ease);
  }
  .js .reveal.is-visible { opacity: 1; translate: 0 0; }
}

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

/* ---------- Breakpoints ---------- */
@media (max-width: 1000px) {
  .hero__role { grid-column: 1 / -1; max-width: none; }
  .hero__lede { grid-column: span 8; }
  .hero .btn { grid-column: span 4; }

  .about__portrait { grid-column: span 5; }
  .about__body { grid-column: 1 / -1; }

  .role__name { grid-column: 1 / -1; margin-bottom: 0.9rem; }
  .role__title { grid-column: span 4; }
  .role__desc { grid-column: span 8; }

  .skills .section-title,
  .skills__list { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .site-nav a:not([href="#contact"]) { display: none; }

  /* Name stacks on two lines so it stays huge on a phone. */
  .hero__name-inner > span { display: block; }

  .hero__lede,
  .hero .btn { grid-column: 1 / -1; }
  .hero .btn,
  .contact .btn { width: 100%; justify-self: stretch; }

  .about__portrait { grid-column: span 7; }

  .role__title,
  .role__desc { grid-column: 1 / -1; }
  .role__desc { margin-top: 0.35rem; }

  .skills__list { grid-template-columns: 1fr; }

  .site-footer__links { width: 100%; justify-content: space-between; gap: 1.25rem; }
}
