:root {
  color: #182622;
  background: #f4f1e9;
  font-family: 'Aptos', 'Segoe UI', system-ui, sans-serif;
  --ink: #182622;
  --muted: #545e55;
  --line: #d8d7c8;
  --paper: #fbf9f2;
  --forest: #225946;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--forest); outline-offset: 5px; }
.shell { width: min(1180px, calc(100% - 2 * clamp(16px, 5vw, 68px))); margin-inline: auto; }
.header { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.signature { display: inline-flex; align-items: center; gap: 10px; font-weight: 660; text-decoration: none; }
.signature span { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #92a092; border-radius: 50%; color: var(--forest); font-size: .73rem; }
.header-identity { display: grid; gap: 4px; min-width: 0; }
.header-email { margin-left: 41px; color: var(--forest); font-size: .88rem; overflow-wrap: anywhere; text-underline-offset: .2em; }
.header nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: .95rem; }
.header nav a { text-decoration: none; padding: 6px 0; }
.header nav a:hover, .footer a:hover { text-decoration: underline; }
.header nav a[aria-current] { color: var(--forest); font-weight: 650; }
.hero { padding: clamp(43px, 7vw, 94px) 0 clamp(28px, 5vw, 49px); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
h1 { font-size: clamp(3rem, 7.1vw, 6.15rem); letter-spacing: -.065em; line-height: 1.03; }
.hero p { margin-top: 15px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.28rem); line-height: 1.5; }
.work, .about { scroll-margin-top: 18px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(13px, 2vw, 24px); }
.project { display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.cover { margin: 0; aspect-ratio: 45 / 28; background: #0e2330; overflow: hidden; }
.astronomy .cover { background: #171526; }
.topography .cover { background: #0a2928; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: clamp(15px, 2.3vw, 25px); }
.category { color: var(--forest); font-size: .88rem; font-weight: 650; }
.project-body h3 { margin-top: 6px; font-size: clamp(1.65rem, 2.9vw, 2.5rem); letter-spacing: -.045em; }
.summary { margin: 9px 0 17px; color: var(--muted); line-height: 1.53; }
.project-link { display: inline-block; margin-top: auto; padding: 8px 12px; border: 1px solid #a9b4a5; border-radius: 6px; font-size: .92rem; color: var(--forest); font-weight: 650; text-decoration: none; }
.project-link:hover { color: #fff; background: var(--forest); border-color: var(--forest); }
.release { margin-top: 9px; color: var(--muted); font-size: .85rem; }
.release[hidden] { display: none; }
.about { display: grid; grid-template-columns: minmax(100px, .4fr) minmax(0, 1fr); gap: 16px 24px; margin: clamp(35px, 6vw, 70px) 0 0; padding: 28px 0; border-top: 1px solid var(--line); }
.about h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -.045em; }
.about p { max-width: 63ch; color: var(--muted); line-height: 1.65; }
.about p + p { margin-top: 12px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 11px; }
.profile-links a { color: var(--forest); text-underline-offset: .2em; }
.footer { border-top: 1px solid var(--line); padding-block: 19px 30px; font-size: .85rem; color: var(--muted); }
.footer a { text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cv-main { padding-block: clamp(24px, 5vw, 56px); }
.cv-paper { max-width: 850px; margin-inline: auto; padding: clamp(20px, 5vw, 55px); background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.cv-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: start; }
.cv-heading h1 { font-size: clamp(2.65rem, 6.6vw, 4.85rem); }
.cv-title { font-size: 1.18rem; font-weight: 650; margin: 7px 0 4px; }
.cv-email { color: var(--forest); overflow-wrap: anywhere; text-underline-offset: .2em; }
.cv-download { margin-top: 14px; }
.cv-portrait { display: block; width: clamp(86px, 18vw, 149px); height: auto; background: #f8f5ee; border: 1px solid var(--line); opacity: .82; }
.pdf-link { display: inline-block; padding: 10px 14px; color: #fff; background: var(--forest); border-radius: 6px; text-decoration: none; font-size: .92rem; font-weight: 650; }
.pdf-link:hover { background: #193f33; }
.cv-section { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 16px; }
.cv-section h2 { font-size: 1.56rem; letter-spacing: -.025em; margin-bottom: 10px; }
.cv-section > p, .cv-role li, .cv-skills dd, .cv-education dd { color: var(--muted); line-height: 1.52; }
.cv-clients { margin-top: 9px; }
.cv-role + .cv-role { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.cv-role-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.cv-role-heading h3 { font-family: inherit; font-size: 1.05rem; font-weight: 675; }
.cv-organization { color: var(--forest); font-size: .93rem; margin-top: 3px; }
.cv-period { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.cv-role ul { margin: 8px 0 0; padding-left: 1.2rem; }
.cv-role li + li { margin-top: 4px; }
.cv-skills, .cv-education { margin: 0; display: grid; gap: 8px; }
.cv-skills > div { display: grid; grid-template-columns: minmax(120px, .32fr) minmax(0, 1fr); gap: 5px 12px; }
.cv-skills dt, .cv-education dt { font-weight: 650; }
.cv-skills dd, .cv-education dd { margin: 0; }
.cv-education > div { display: grid; gap: 2px; }
@media (max-width: 720px) {
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cover { max-height: 320px; }
  .about { grid-template-columns: 1fr; gap: 7px; }
}
@media (max-width: 540px) {
  .header { align-items: flex-start; flex-direction: column; gap: 11px; padding-block: 15px; }
  .header-email { margin-left: 0; }
  .header nav { flex-wrap: wrap; }
  .cv-skills > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media print {
  @page { margin: 14mm; }
  :root, .cv-paper { background: #fff; color: #111; }
  body > .header, body > .footer, .cv-download { display: none; }
  .cv-main, .cv-paper { width: auto; max-width: none; padding: 0; border: 0; }
  .cv-role, .cv-education > div, .cv-skills > div { break-inside: avoid; }
  .cv-section h2 { break-after: avoid; }
}
