/* ---------------------------------------------------------------
   Craft floor.

   Everything below is byte-identical in every page that gets it
   right, so it ships here rather than being re-typed from the
   rules each time. Replace the :root values with the page's own
   palette; do not delete the rules that consume them.
   --------------------------------------------------------------- */

:root {
  /* Swiss International Style palette - Deep blue accent, clean neutrals */
  --ink: #1a1a1a;
  --ink-muted: #6b7280;
  --bg: #ffffff;
  --surface: #f9fafb;
  --rule: #e5e7eb;
  --accent: #1e6fd9;
  --accent-ink: #ffffff;

  /* Under 80 rendered characters. ch is the width of a 0 and most
     letters are narrower, so 75ch measures nearer 95. */
  --measure: 60ch;

  scrollbar-color: var(--rule) transparent;
  caret-color: var(--accent);
  color-scheme: light dark;
}

/* The same seven properties, for readers whose OS is set to dark.
   Replace these alongside the light ones — a page that restyles
   :root and leaves this block holding the placeholder greys has a
   dark mode that belongs to a different design.

   Darken by desaturating and lifting, not by inverting: --bg wants a
   near-black carrying a little of the accent's hue, --ink a soft
   off-white rather than #fff, and --accent usually needs lightening
   to stay legible, since a colour tuned against white rarely clears
   4.5:1 against black. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f4f6;
    --ink-muted: #9ca3af;
    --bg: #111827;
    --surface: #1f2937;
    --rule: #374151;
    --accent: #60a5fa;
    --accent-ink: #111827;
  }
}

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

/* Prevent any overflowing element from widening the document past the
   viewport. Without this a single oversized heading or image at a
   narrow viewport stretches the scroll width, which makes every
   paragraph on the page measure as flush to the viewport edge. */
html {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* The surfaces you did not draw, which otherwise ship with browser
   defaults belonging to no design system. */
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

/* Put on any cell holding a figure, so columns of numbers line up. */
.num {
  font-variant-numeric: tabular-nums;
}

/* 44px is the smallest reliably tappable target. Anything the reader
   presses needs it; a link inside a paragraph does not, which is why
   this is not on `a`. */
button,
[role="button"],
summary,
input[type="checkbox"],
input[type="radio"] {
  min-height: 44px;
}

button {
  min-width: 44px;
}

/* A document is one column, so the only thing that reliably breaks it
   is content that cannot shrink: a wide table, a long URL, a code
   block. These make the narrow viewport survivable without needing a
   layout per breakpoint. */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

pre {
  overflow-x: auto;
}

table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

@media (max-width: 480px) {
  body {
    /* Thumbs cover the edges; text should not start underneath them. */
    padding-inline: 1rem;
  }
}

/* Motion only for readers who have not asked the OS to stop it. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-nav {
    display: none;
  }

  .resume {
    max-width: none;
    padding: 0;
  }

  section {
    page-break-inside: avoid;
  }

  .position,
  .degree,
  .project {
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .contact-info a::after {
    content: " (" attr(href) ")";
    font-size: 0.75rem;
    color: #6b7280;
  }
}

/* ---------------------------------------------------------------
   Resume styles - Swiss International Style
   --------------------------------------------------------------- */

.site-nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 3rem 0;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  justify-content: flex-end;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9375rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.site-nav a:hover {
  border-bottom-color: var(--accent);
}

.site-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.resume {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem;
}

.resume-header {
  margin-bottom: 3.5rem;
}

.name {
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.title {
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 1.5rem 0;
}

.contact-info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-info li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.contact-info .icon {
  color: var(--accent);
  flex-shrink: 0;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-info span {
  color: var(--ink-muted);
}

section {
  margin-bottom: 3rem;
}

section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

.position,
.degree {
  margin-bottom: 2rem;
}

.position:last-child,
.degree:last-child {
  margin-bottom: 0;
}

.position-header,
.degree-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 0.75rem;
}

.position-info,
.degree-info {
  flex: 1;
}

.job-title,
.degree-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.25rem 0;
}

.company,
.school {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin: 0;
}

.dates {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin: 0;
  white-space: nowrap;
  text-align: right;
}

.achievements {
  list-style: none;
  margin: 0;
  padding: 0;
}

.achievements li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
}

.achievements li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.achievements li:last-child {
  margin-bottom: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category {
  margin: 0;
}

.category-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem 0;
}

.skill-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags li {
  margin: 0;
  padding: 0.375rem 0.875rem;
  background: rgba(30, 111, 217, 0.08);
  color: var(--accent);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.project {
  margin: 0;
}

.project-name {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-name .icon {
  color: var(--accent);
  flex-shrink: 0;
}

.project-name a {
  color: var(--accent);
  text-decoration: none;
}

.project-name a:hover {
  text-decoration: underline;
}

.project-description {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .site-nav {
    padding: 1rem 1.5rem 0;
  }

  .site-nav ul {
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.875rem;
  }

  .resume {
    padding: 2rem 1.5rem;
  }

  .resume-header {
    margin-bottom: 2.5rem;
  }

  .title {
    font-size: 1.125rem;
  }

  .contact-info {
    flex-direction: column;
    gap: 0.75rem;
  }

  section {
    margin-bottom: 2.5rem;
  }

  section h2 {
    font-size: 1.25rem;
  }

  .position-header,
  .degree-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .dates {
    text-align: left;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .site-nav {
    padding: 1rem;
  }

  .site-nav ul {
    gap: 0.75rem;
    font-size: 0.8125rem;
  }

  .resume {
    padding: 1.5rem 1rem;
  }

  .job-title,
  .degree-name {
    font-size: 1rem;
  }
}
@media (max-width: 480px) {
  /* --impeccable-mobile-pad */
  body { padding-inline: max(1rem, 16px); }
  .container, [class*="container"], section, header, footer, nav, main, article {
    padding-inline: max(1rem, 16px);
  }
}
/* --impeccable-measure */
p, li, dt, dd, blockquote, figcaption, td, th { max-width: min(75ch, 100%); }
