:root {
  color-scheme: light;
  --ink: #14243e;
  --muted: #455873;
  --line: #d5deed;
  --paper: #f5f7fc;
  --navy: #111e37;
  --blue: #1757bd;
  --teal: #086f69;
  --rust: #a93224;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

* { box-sizing: border-box; }
html { scroll-padding-block-start: 28px; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--blue); text-underline-offset: .2em; }
a:focus-visible { outline: 3px solid #ad6419; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.14; }
h1, h2 { letter-spacing: -.04em; }
h1 { font-size: clamp(2.55rem, 5.4vw, 4.5rem); }
h2 { font-size: clamp(1.95rem, 4vw, 2.8rem); }
h3 { font-size: 1.24rem; }
p { color: var(--muted); }

.shell { width: min(1170px, calc(100% - 48px)); margin-inline: auto; }
.site-header, footer { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 18px; }
.brand { font-size: 1.08rem; font-weight: 850; }
.site-header a { color: var(--ink); text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .9rem; font-weight: 700; }
nav a { padding-block: 5px; }

.skip { position: absolute; top: 8px; left: 12px; z-index: 2; transform: translateY(-150%); padding: 10px 14px; background: white; }
.skip:focus { transform: none; }

.hero { background: var(--navy); color: #fff; border-block-end: 5px solid #197ab6; }
.hero-inner { display: grid; grid-template-columns: 1.14fr 1fr; align-items: center; gap: clamp(24px, 5vw, 74px); padding-block: clamp(46px, 7vw, 98px); }
.hero img { display: block; width: 100%; height: auto; border: 1px solid #536784; border-radius: 12px; }
.role { margin-bottom: 15px; color: #a1dfdc; font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.intro { max-width: 49ch; margin-top: 19px; color: #d7e3f6; font-size: 1.07rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #91a8c9; border-radius: 5px; padding: 10px 15px; color: white; font-size: .9rem; font-weight: 750; text-decoration: none; }
.button:hover { background: #283a57; }
.primary { border-color: #2569d0; background: var(--blue); }
.primary:hover { background: #2165cf; }

.section { padding-block: clamp(42px, 7vw, 78px); }
.section-description { max-width: 72ch; margin-top: 11px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 27px; }
.card { display: flex; min-width: 0; flex-direction: column; gap: 11px; padding: 22px; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 9px; background: #fff; box-shadow: 0 3px 12px #14243e08; }
.card:first-child { border-top-color: var(--teal); }
#work .card:nth-child(3) { border-top-color: var(--rust); }
.category { color: var(--teal); font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.card .stack { font-size: .78rem; font-weight: 720; }
.card-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 7px; font-size: .86rem; font-weight: 750; }
.lab { background: #eaf3f6; border-block: 1px solid #d4e3e9; }
.lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lab .card { border-top-color: var(--teal); }

.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; margin: 23px 0 18px; padding: 0; list-style: none; }
.project-list li { display: grid; gap: 4px; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); }
.project-list a, .all, footer a { font-weight: 750; }
.toolbox { background: var(--navy); color: white; }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 22px 0 0; }
.tools div { border-inline-start: 4px solid #52bfb5; padding: 5px 12px; }
.tools dt { font-weight: 750; }
.tools dd { margin: 3px 0 0; color: #d7e3f6; }
footer { color: var(--muted); font-size: .88rem; }

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .shell { width: calc(100% - 36px); }
  .hero-inner, .grid, .tools, .project-list { grid-template-columns: minmax(0, 1fr); }
  .hero img { max-height: 260px; object-fit: cover; }
  .site-header nav { width: 100%; gap: 4px 16px; }
}
