:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5b635f;
  --paper: #fbfaf5;
  --warm: #f0e6d2;
  --line: #d8d0c2;
  --forest: #204c3a;
  --blue: #244b6a;
  --brick: #9a4f3f;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(28, 35, 30, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 54px);
  border-bottom: 1px solid rgba(23, 33, 28, 0.1);
  background: rgba(251, 250, 245, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-avatar {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(28, 35, 30, 0.18);
  object-fit: cover;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a,
footer a {
  text-decoration: none;
}

nav a:hover,
footer a:hover,
.work-grid a:hover,
figcaption a:hover {
  color: var(--brick);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 112px);
  padding: clamp(42px, 7vw, 92px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(115deg, rgba(240, 230, 210, 0.88), rgba(251, 250, 245, 0.92) 52%),
    linear-gradient(25deg, rgba(32, 76, 58, 0.12), rgba(36, 75, 106, 0.16));
}

.intro {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brick);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.06;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.lead {
  max-width: 690px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.signal-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(32, 76, 58, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 760;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid rgba(23, 33, 28, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.button.primary {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
}

.button:hover {
  transform: translateY(-1px);
}

.resume-visual {
  margin: 0;
  justify-self: center;
  width: min(100%, 420px);
}

.resume-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.resume-open:focus-visible {
  outline: 3px solid rgba(32, 76, 58, 0.42);
  outline-offset: 5px;
}

.resume-open img {
  display: block;
  width: 100%;
  aspect-ratio: 17 / 22;
  object-fit: cover;
  object-position: top center;
  border: 1px solid rgba(23, 33, 28, 0.16);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

figcaption a {
  color: var(--forest);
  font-weight: 800;
  text-decoration: none;
}

.summary,
.skill-band,
.experience,
.work-band {
  padding: clamp(44px, 7vw, 96px) clamp(20px, 5vw, 72px);
}

.summary {
  background: var(--white);
}

.summary p {
  max-width: 740px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.skills article,
.timeline article,
.work-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.skill-band {
  background: #eef3ee;
}

.section-heading {
  max-width: 850px;
  margin-bottom: clamp(24px, 5vw, 44px);
}

.skills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.skills article {
  min-height: 190px;
  padding: 24px;
}

.skills p,
.timeline p,
.work-grid p {
  margin: 0;
  color: var(--muted);
}

.experience {
  background: var(--paper);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline article {
  display: grid;
  grid-template-columns: minmax(210px, 0.35fr) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 42px);
  padding: 24px;
}

.role,
.date {
  font-size: 0.92rem;
}

.role {
  color: var(--brick);
  font-weight: 800;
}

.date {
  color: var(--muted);
}

.work-band {
  background: #f4efe5;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.work-grid article {
  min-height: 210px;
  padding: 24px;
}

.work-grid p + p {
  margin-top: 12px;
}

.work-grid a {
  color: var(--forest);
  font-weight: 800;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(20px, 5vw, 72px);
  border-top: 1px solid rgba(23, 33, 28, 0.12);
  color: var(--muted);
}

footer p {
  margin: 0;
}

footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.resume-dialog {
  width: min(1120px, calc(100vw - 32px));
  height: min(900px, calc(100vh - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 30px 90px rgba(15, 23, 18, 0.28);
}

.resume-dialog[open] {
  display: grid;
  grid-template-rows: auto 1fr;
}

.resume-dialog::backdrop {
  background: rgba(23, 33, 28, 0.62);
}

.resume-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.resume-dialog-bar h2 {
  font-size: 1rem;
}

.resume-dialog-bar div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resume-dialog-bar a,
.resume-dialog-bar button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(23, 33, 28, 0.18);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 760;
  text-decoration: none;
}

.resume-dialog-bar button {
  cursor: pointer;
}

.resume-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--white);
}

@media (max-width: 980px) {
  .intro-band,
  .summary {
    grid-template-columns: 1fr;
  }

  .intro-band {
    min-height: auto;
  }

  .resume-visual {
    width: min(100%, 520px);
  }

  .skills,
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .skills,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .timeline article {
    grid-template-columns: 1fr;
  }

  .intro-band {
    gap: 14px;
    padding-top: 22px;
    padding-bottom: 20px;
  }

  .lead {
    margin-top: 16px;
    font-size: 1rem;
  }

  .actions {
    margin-top: 20px;
  }

  .signal-row {
    margin-top: 14px;
  }

  .resume-visual {
    justify-self: start;
    width: min(100%, 132px);
  }

  .resume-dialog {
    width: calc(100vw - 18px);
    height: calc(100vh - 18px);
  }

  .resume-dialog-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  figcaption {
    text-align: left;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
}
