:root {
  color-scheme: light;
  --ink: #1e2831;
  --muted: #526171;
  --accent: #173e5c;
  --line: #d6dee5;
  --paper: #ffffff;
  --background: #eaf0f4;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: #0b2538; }
a:focus-visible { outline: 3px solid #3379ac; outline-offset: 4px; }
.resume-sheet { width: min(1000px, calc(100% - 4rem)); margin: 3rem auto; padding: 3rem 3.4rem 1.4rem; background: var(--paper); border-top: 5px solid var(--accent); box-shadow: 0 8px 34px rgb(27 48 66 / .07); }
.profile-header { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 2.3rem; align-items: start; padding-bottom: 1.8rem; }
h1 { font-size: clamp(2.6rem, 5vw, 3.5rem); line-height: 1.1; font-weight: 700; letter-spacing: -.04em; }
.role-line { color: var(--accent); font-size: 1.05rem; font-weight: 600; margin-top: .65rem; }
.role-line span, .location span, .item-detail span { margin: 0 .3rem; }
.location { color: var(--muted); font-size: .9375rem; margin-top: .5rem; }
.header-links, .contact-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.header-links { margin-top: .75rem; font-size: .9375rem; }
.header-links a { overflow-wrap: anywhere; }
.download-link { display: inline-flex; align-items: center; gap: .85rem; padding: .55rem .95rem; margin-top: 1rem; border: 1px solid var(--accent); border-radius: 3px; font-weight: 600; text-decoration: none; font-size: .9375rem; min-height: 44px; }
.download-link:hover { background: #edf3f8; }
.file-type { border-left: 1px solid #bccbd7; padding-left: .8rem; font-size: .875rem; font-weight: 400; }
.portrait { overflow: hidden; border-radius: 4px; background: #6a8196; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.section-nav { display: flex; flex-wrap: wrap; gap: .2rem 1.8rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .7rem 0; font-size: .9375rem; }
.section-nav a { text-decoration: none; padding: .25rem 0; }
.section-nav a:hover { text-decoration: underline; }
section { margin-top: 2rem; }
h2 { color: var(--accent); font-size: 1.0625rem; letter-spacing: .075em; text-transform: uppercase; line-height: 1.4; margin-bottom: 1rem; }
.summary p + p { margin-top: .6rem; }
.skills-list { margin: 0; }
.skills-list > div { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 1.2rem; padding: .4rem 0; }
dt { font-weight: 600; }
dd { margin: 0; }
.experience-item + .experience-item { margin-top: 1.5rem; }
.project-item + .project-item { margin-top: 1.5rem; }
.project-link { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; padding: .3rem 0; min-height: 44px; font-size: .9375rem; }
.file-type-label { color: var(--muted); font-size: .875rem; }
.project-actions { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: .45rem; }
.project-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; }
.coursework-heading { margin: 2rem 0 1rem; color: var(--accent); }
.coursework-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.75rem; }
.coursework-item { border-top: 1px solid var(--line); padding-top: 1rem; min-width: 0; }
.coursework-item h4 { margin: 0; font-size: 1rem; line-height: 1.5; }
.course-label { color: var(--muted); font-size: .875rem; margin: .2rem 0 .45rem; }
.code-header { padding-bottom: .5rem; }
.code-header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.2; letter-spacing: -.025em; margin-top: .6rem; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; }
.code-owner { color: var(--muted); font-size: .9375rem; margin-top: .6rem; }
.project-intro { margin-top: 1rem; }
.code-sheet main { min-width: 0; }
.source-file { border: 1px solid var(--line); margin-top: .8rem; }
.source-file summary { cursor: pointer; padding: .7rem 1rem; min-height: 44px; font-weight: 600; font-size: .9375rem; overflow-wrap: anywhere; }
.source-file summary:focus-visible { outline: 3px solid #3379ac; outline-offset: 3px; }
.source-file[open] summary { border-bottom: 1px solid var(--line); }
.code-sheet pre { max-width: 100%; margin: 0; padding: 1rem; overflow: auto; background: #f4f7fa; font-family: Consolas, 'Liberation Mono', monospace; font-size: .875rem; line-height: 1.65; tab-size: 4; }
.code-sheet .run-commands { margin: .8rem 0; border: 1px solid var(--line); }
.code-sheet code { font: inherit; }
.item-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .35rem 1.25rem; }
h3 { font-size: 1.0625rem; line-height: 1.5; font-weight: 700; }
.date { color: var(--muted); font-size: .875rem; flex-shrink: 0; }
.item-detail { color: var(--muted); margin-top: .1rem; }
ul { margin: .65rem 0 0; padding-left: 1.2rem; }
li { padding-left: .15rem; margin-top: .3rem; }
.education-item + .education-item { margin-top: 1.2rem; }
.contact-section { border-top: 1px solid var(--line); padding-top: 1.7rem; }
.contact-links { font-size: .9375rem; overflow-wrap: anywhere; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; padding-top: 2rem; color: var(--muted); font-size: .875rem; }
.site-footer a { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: .5rem; left: 1rem; padding: .65rem 1rem; background: white; transform: translateY(-160%); z-index: 5; }
.skip-link:focus { transform: none; }
@media (max-width: 800px) {
  .resume-sheet { width: calc(100% - 2rem); margin: 1rem auto; padding: 2rem 2rem 1.2rem; }
  .profile-header { grid-template-columns: minmax(0, 1fr) 120px; gap: 1.5rem; }
  .item-heading { flex-wrap: wrap; }
  .date { flex-shrink: 1; }
}
@media (max-width: 560px) {
  .coursework-grid { grid-template-columns: 1fr; gap: 1rem; }
  .resume-sheet { width: 100%; margin: 0; padding: 1.5rem 1.3rem 1.1rem; box-shadow: none; }
  .profile-header { grid-template-columns: minmax(0, 1fr) 78px; gap: .9rem; padding-bottom: 1.4rem; }
  h1 { font-size: 2.3rem; }
  .role-line { font-size: 1rem; }
  .header-links { gap: .3rem .8rem; }
  .section-nav { justify-content: space-between; gap: .2rem .65rem; }
  section { margin-top: 1.7rem; }
  .skills-list > div { grid-template-columns: 1fr; gap: .1rem; padding: .5rem 0; }
  .item-heading { display: block; }
  .date { margin-top: .15rem; }
  .contact-links { flex-direction: column; align-items: flex-start; gap: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  body { background: white; }
  .resume-sheet { width: 100%; padding: 0; margin: 0; box-shadow: none; border: 0; }
  .section-nav, .download-link, .site-footer, .skip-link { display: none; }
  section, article { break-inside: avoid; }
}
