/* Neribo Resume Template
   Edit the colours here. Everything else follows. */
:root {
  --ink: #1c2421;
  --muted: #59635d;
  --paper: #ffffff;
  --rule: #d3d9d5;
  --accent: #0a6a3b;
  --accent-dark: #075330;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 15rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

.page {
  max-width: 62rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: 1.75rem;
  padding-bottom: 2.5rem;
}

.headshot {
  width: 9.5rem;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  /* Photo layer first. If images/headshot.jpg is ever missing, the gradient shows instead. */
  background:
    url("../images/headshot.jpg") center 20% / cover no-repeat,
    linear-gradient(160deg, #b9c9bf 0%, #7f9a8a 55%, #4d6b5a 100%);
}

.name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.5rem, 9vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

.job-title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.4vw, 1.65rem);
  color: var(--accent);
  margin: 0.6rem 0 0;
}

.rule {
  height: 4px;
  width: 100%;
  max-width: 28rem;
  background: var(--accent);
  margin: 1.5rem 0;
  transform-origin: left center;
  animation: draw 0.9s cubic-bezier(.2,.7,.2,1) 0.15s both;
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.summary {
  max-width: 40rem;
  font-size: 1.1rem;
  margin: 0;
}

.hero-links {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1rem 1.5rem;
  margin: 1.75rem 0 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.8rem 1.4rem;
  border-radius: 2px;
  min-height: 44px;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.text-link { font-weight: 500; }

/* ---------- Sections ---------- */
.block {
  border-top: 2px solid var(--ink);
  padding: 1.5rem 0 2.5rem;
  display: grid;
  gap: 1.25rem;
}

.block h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}

.entry {
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}
.entry:first-of-type { border-top: 0; padding-top: 0; }

.dates {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.entry h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0;
}
.org { margin: 0.1rem 0 0.6rem; color: var(--muted); }
.note { margin: 0; max-width: 40rem; }

.entry ul { margin: 0; padding-left: 1.15rem; max-width: 42rem; }
.entry li { margin-bottom: 0.4rem; }
.entry li::marker { color: var(--accent); }

/* Button row */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

/* Skills: a ruled list, not a wall of pills */
.skills {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1.5rem;
}
.skills li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }

/* Contact */
.contact { margin: 0 0 1.75rem; max-width: 34rem; }
.contact > div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.contact dt { color: var(--muted); }
.contact dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer p { margin: 0; }

/* ---------- Wider screens ---------- */
@media (min-width: 720px) {
  .skills { grid-template-columns: repeat(4, 1fr); }
  .entry { grid-template-columns: 10rem 1fr; gap: 1.5rem; }
  .entry:first-of-type { padding-top: 0; }
}

@media (min-width: 900px) {
  .page { padding: 4rem 2rem 3rem; }

  .hero {
    grid-template-columns: var(--gutter) 1fr;
    gap: 0 2.5rem;
    align-items: start;
  }
  .headshot { width: 100%; }

  .block {
    grid-template-columns: var(--gutter) 1fr;
    gap: 0 2.5rem;
    padding-top: 1.75rem;
  }
  .block h2 { font-size: 1.65rem; }
}

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rule { animation: none; }
}

@media print {
  .hero-links, .btn, .skip, 
  .page { padding: 0; }
  .block { break-inside: avoid; }
}
