/* ============ Tokens ============ */
:root {
  color-scheme: light;
  --paper: #F3F6F8;
  --surface: #FFFFFF;
  --raised: #FAFCFD;
  --ink: #12202A;
  --slate: #4B5D6B;
  --harbor: #12577A;
  --harbor-soft: #E3EEF4;
  --signal: #B86E00;
  --line: #D3DDE4;
  --done: #2E7D5B;
  /* diagram kinds */
  --k-user: #4B5D6B;
  --k-git: #6B4BC2;
  --k-aws: #C76A00;
  --k-k8s: #1E6FB8;
  --k-data: #2E7D5B;
  --k-sec: #B8293F;
  --sans: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --cond: "IBM Plex Sans Condensed", "Arial Narrow", "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --radius: 10px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0E1B24;
    --surface: #142531;
    --raised: #182B38;
    --ink: #E6EEF3;
    --slate: #9DB0BE;
    --harbor: #6CB8DE;
    --harbor-soft: #17384A;
    --signal: #F0A73A;
    --line: #26394A;
    --done: #5CC596;
    --k-user: #9DB0BE;
    --k-git: #A98BF0;
    --k-aws: #F0A73A;
    --k-k8s: #6CB8DE;
    --k-data: #5CC596;
    --k-sec: #F07A8C;
  }
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--harbor); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--slate); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 21;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}
body { overflow-x: hidden; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--cond); font-weight: 700; font-size: 20px;
  color: var(--ink); text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 6px;
  color: var(--slate); text-decoration: none; font-weight: 500; font-size: 15px;
}
.nav-links a:hover { color: var(--ink); background: var(--harbor-soft); }
.nav-links a[aria-current="page"] { color: var(--harbor); background: var(--harbor-soft); }

/* ============ Buttons, chips ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 8px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1.5px solid var(--harbor); color: var(--harbor); background: transparent;
  cursor: pointer; font-family: inherit;
}
.btn.primary { background: var(--harbor); color: var(--paper); }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn svg { width: 17px; height: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li {
  font-size: 14px; padding: 3px 10px; border-radius: 999px;
  background: var(--harbor-soft); color: var(--ink);
}

/* ============ Hero ============ */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-top { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.avatar {
  width: 112px; height: 112px; flex: none;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--harbor);
  background: var(--harbor);
  overflow: hidden;
  display: grid; place-items: center;
  color: var(--paper); font-family: var(--cond); font-weight: 700; font-size: 40px;
}
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--done);
  padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--done) 12%, transparent);
}
.status-pill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--done);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }
.name {
  font-family: var(--cond); font-weight: 700;
  font-size: clamp(52px, 8.5vw, 104px); line-height: 0.92; letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.role {
  font-family: var(--cond); font-weight: 500;
  font-size: clamp(21px, 2.5vw, 27px); line-height: 1.25; color: var(--harbor);
  margin: 0 0 20px;
}
.role .typed { border-right: 2px solid var(--signal); padding-right: 2px; }
.intro { max-width: 58ch; color: var(--slate); margin: 0 0 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.facts {
  margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.facts div { background: var(--surface); padding: 16px 18px; }
.facts div.wide { grid-column: 1 / -1; }
.facts dt { font-size: 13px; color: var(--slate); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 16px; line-height: 1.35; }
.facts dd a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.facts dd a:hover { color: var(--harbor); text-decoration: underline; }
.facts .big { font-family: var(--cond); font-size: 30px; font-weight: 700; color: var(--harbor); line-height: 1.1; }

/* ============ Sections ============ */
section.block { padding: 72px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
h2.title {
  font-family: var(--cond); font-weight: 700;
  font-size: clamp(30px, 4vw, 42px); line-height: 1.1; margin: 0 0 8px;
}
.lede { max-width: 66ch; color: var(--slate); margin: 0; }

/* Career pipeline */
.pipeline { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px 8px; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.stage { position: relative; padding: 30px 18px 18px 0; }
.stage::before { content: ""; position: absolute; left: 22px; right: 0; top: 10px; height: 2px; background: var(--line); }
.stage:last-child::before { display: none; }
.stage::after {
  content: ""; position: absolute; left: 22px; top: 10px; height: 2px; width: 0;
  background: var(--done); animation: fillx 0.6s ease-out forwards;
  animation-delay: calc(var(--i) * 0.6s + 0.3s);
}
.stage:last-child::after { display: none; }
.dot {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface);
  animation: pass 0.3s ease-out forwards; animation-delay: calc(var(--i) * 0.6s);
}
.stage.current .dot {
  animation: pass-current 0.3s ease-out forwards, pulse 2.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.6s), calc(var(--i) * 0.6s + 0.4s);
}
.stage strong { display: block; font-weight: 600; line-height: 1.3; }
.stage span { display: block; font-size: 14px; color: var(--slate); }
.stage .st { font-size: 13px; font-weight: 600; color: var(--done); margin-top: 2px; }
.stage.current .st { color: var(--signal); }
@keyframes fillx { to { width: calc(100% - 22px); } }
@keyframes pass { to { border-color: var(--done); background: var(--done); } }
@keyframes pass-current { to { border-color: var(--signal); background: var(--surface); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--signal) 22%, transparent); } }

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--harbor); box-shadow: 0 12px 28px -16px color-mix(in srgb, var(--harbor) 45%, transparent); }
.card-cover { aspect-ratio: 16 / 9; background: var(--raised); border-bottom: 1px solid var(--line); overflow: hidden; }
.card-cover svg { width: 100%; height: 100%; }
.card-cover .cover-img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cards.cols-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cards.cols-4 .card h3 { font-size: 22px; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-family: var(--cond); font-weight: 700; font-size: 24px; line-height: 1.2; margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--slate); font-size: 15.5px; }
.card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: center; font-size: 14px; color: var(--slate); margin-top: auto; padding-top: 6px; }
.card .go { color: var(--harbor); font-weight: 600; margin-left: auto; white-space: nowrap; }
.card .chips li { font-size: 13px; }

/* Experience */
.jobs { list-style: none; margin: 0; padding: 0; }
.job { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.when { font-weight: 600; color: var(--harbor); line-height: 1.4; }
.when span { display: block; font-weight: 400; color: var(--slate); font-size: 15px; }
.job h3 { font-family: var(--cond); font-weight: 700; font-size: 23px; margin: 0; line-height: 1.2; }
.job .org { color: var(--slate); margin: 2px 0 10px; }
.job ul { margin: 0; padding-left: 20px; }
.job li { margin: 0 0 7px; max-width: 72ch; }

/* Skills */
.skills { margin: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.skills dt, .skills dd { padding: 14px 0; border-top: 1px solid var(--line); margin: 0; }
.skills dt { font-weight: 600; padding-right: 20px; }
.skills dd { color: var(--slate); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; margin-top: 8px; }
.contact-item {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; text-decoration: none; color: var(--ink);
  transition: border-color 0.2s ease;
}
a.contact-item:hover { border-color: var(--harbor); text-decoration: none; }
.contact-item .ic { width: 40px; height: 40px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--harbor-soft); color: var(--harbor); }
.contact-item .ic svg { width: 20px; height: 20px; }
.contact-item small { display: block; color: var(--slate); font-size: 13px; }
.contact-item strong { display: block; font-weight: 600; overflow-wrap: anywhere; }

footer.site-footer { padding: 72px 0 48px; color: var(--slate); font-size: 14px; }
footer.site-footer .wrap { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ============ Project page ============ */
.crumbs { font-size: 14px; color: var(--slate); padding-top: 28px; }
.crumbs a { color: var(--slate); }
.p-hero { padding: 18px 0 8px; }
.p-hero h1 { font-family: var(--cond); font-weight: 700; font-size: clamp(36px, 5.5vw, 60px); line-height: 1.04; margin: 0 0 14px; max-width: 22ch; }
.p-hero .lede { font-size: 18px; margin-bottom: 20px; }
.p-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; color: var(--slate); margin: 0 0 22px; }
.p-meta b { color: var(--ink); font-weight: 600; }
.notice {
  border-left: 3px solid var(--signal); background: color-mix(in srgb, var(--signal) 9%, transparent);
  padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 15px; margin: 0 0 8px; max-width: 72ch;
}
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 28px; margin: 0 0 12px; max-width: 64ch; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 9px; width: 9px; height: 9px; border-radius: 2px;
  background: var(--harbor); transform: rotate(45deg);
}
.ticks.cols { columns: 2 340px; column-gap: 48px; }
.ticks.cols li { break-inside: avoid; }
.lessons { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.lesson { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.lesson h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; line-height: 1.35; }
.lesson p { margin: 0; font-size: 15px; color: var(--slate); }
.lesson p + p { margin-top: 6px; }
.lesson .fix { color: var(--ink); }

/* Repo tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab {
  font-family: var(--mono); font-size: 14.5px; font-weight: 500;
  padding: 10px 14px; border: 0; background: none; color: var(--slate); cursor: pointer;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--harbor); border-bottom-color: var(--harbor); }
.repo-panel[hidden] { display: none; }
.repo-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.repo-head h3 { font-family: var(--cond); font-weight: 700; font-size: 28px; margin: 0; line-height: 1.15; }
.repo-head p { margin: 4px 0 0; color: var(--slate); max-width: 70ch; }
.repo-diagram { margin-bottom: 26px; }
.repo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.inside h4 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.inside ul { margin: 0 0 18px; padding-left: 18px; font-size: 15.5px; }
.inside li { margin-bottom: 6px; }
.inside code, .lesson code, .ticks code { font-family: var(--mono); font-size: 0.9em; background: var(--harbor-soft); padding: 1px 5px; border-radius: 4px; }
.flow-steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 18px; font-size: 15px; }
.flow-steps li { counter-increment: step; position: relative; padding-left: 32px; margin-bottom: 8px; }
.flow-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--harbor); color: var(--paper);
}

/* Diagram */
.diagram-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.diagram-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--raised); font-size: 14px; color: var(--slate);
}
.diagram-bar .live { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--done); }
.diagram-bar .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.6s ease-in-out infinite; }
.diagram-bar .live.paused { color: var(--slate); }
.diagram-bar .live.paused::before { animation: none; }
.dbtns { display: flex; gap: 6px; }
.dbtn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 6px; padding: 5px 10px;
}
.dbtn:hover { border-color: var(--harbor); color: var(--harbor); }
.diagram-scroll { overflow-x: auto; }
.diagram-svg { display: block; width: 100%; height: auto; touch-action: pan-x pan-y; }
@media (max-width: 720px) {
  .diagram-scroll .diagram-svg { min-width: 780px; }
  .diagram-card .diagram-bar::after { content: "Swipe sideways to see all of it"; flex-basis: 100%; font-size: 13px; }
}
.diagram-svg .zone rect { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 6 5; }
.diagram-svg .zone text { fill: var(--slate); font: 600 12px var(--sans); }
.diagram-svg .edge { stroke: color-mix(in srgb, var(--slate) 55%, transparent); stroke-width: 1.6; fill: none; }
.diagram-svg .edge.dashed { stroke-dasharray: 5 5; }
.diagram-svg .edge-label { fill: var(--slate); font: 11px var(--sans); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.diagram-svg .packet { r: 4.5; }
.diagram-svg .node { cursor: grab; touch-action: none; }
.diagram-svg .node.dragging { cursor: grabbing; }
.diagram-svg .node rect.box { fill: var(--surface); stroke-width: 1.6; }
.diagram-svg .node rect.bar { stroke: none; }
.diagram-svg .node .lbl { fill: var(--ink); font: 600 13.5px var(--sans); }
.diagram-svg .node .sub { fill: var(--slate); font: 11.5px var(--sans); }
.diagram-svg .node:hover rect.box, .diagram-svg .node:focus-visible rect.box { stroke-width: 2.6; }
.diagram-svg .node:focus { outline: none; }
.k-user { --k: var(--k-user); }
.k-git  { --k: var(--k-git); }
.k-aws  { --k: var(--k-aws); }
.k-k8s  { --k: var(--k-k8s); }
.k-data { --k: var(--k-data); }
.k-sec  { --k: var(--k-sec); }
.diagram-svg .node rect.box { stroke: var(--k); }
.diagram-svg .node rect.bar, .diagram-svg .packet { fill: var(--k); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--slate); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--k); display: inline-block; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.shot { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: var(--raised); cursor: zoom-in; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.shot figcaption { padding: 10px 14px 12px; font-size: 14.5px; }
.shot figcaption b { display: block; font-weight: 600; }
.shot figcaption span { color: var(--slate); font-size: 14px; }
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh;
}
.lightbox::backdrop { background: rgb(8 14 20 / 0.82); }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 8px; }
.lightbox p { color: #E6EEF3; text-align: center; margin: 10px 0 0; font-size: 15px; }
.lightbox form { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; }
.lightbox .close { font: 600 15px var(--sans); border: 0; border-radius: 8px; padding: 8px 14px; background: #E6EEF3; color: #12202A; cursor: pointer; }

.next-project {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
}
.next-project small { display: block; color: var(--slate); }
.next-project strong { font-family: var(--cond); font-size: 22px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero-grid, .two-col, .repo-grid { grid-template-columns: 1fr; gap: 32px; }
  .stages { grid-template-columns: 1fr; }
  .stage { padding: 0 0 22px 36px; }
  .stage::before { left: 10px; top: 24px; bottom: 0; right: auto; width: 2px; height: auto; }
  .stage::after { left: 10px; top: 24px; width: 2px; height: 0; animation-name: filly; }
  @keyframes filly { to { height: calc(100% - 24px); } }
  .job { grid-template-columns: 1fr; gap: 6px; }
  .skills { grid-template-columns: 1fr; }
  .skills dd { border-top: 0; padding-top: 0; }
}
@media (max-width: 560px) {
  .nav-links a { padding: 8px 8px; font-size: 14.5px; }
  .nav-links li:has(a[data-nav="experience"]) { display: none; }
  .brand span { display: none; }
  .hero-top { flex-direction: column; align-items: flex-start; }
  .facts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Resume viewer */
.resume-frame { width: 100%; height: min(82vh, 1100px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: block; }
.resume-mobile { display: none; }
@media (max-width: 720px) {
  .resume-frame { display: none; }
  .resume-mobile { display: block; }
}

/* ============ Logos ============ */
.card-cover.logo-cover { display: grid; place-items: center; background: #FFFFFF; padding: 22px; }
.card-cover.logo-cover img { width: 100%; height: 100%; max-width: 78%; max-height: 62%; object-fit: contain; }
.p-logo { height: 72px; width: auto; max-width: 280px; object-fit: contain; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 6px 0 16px; }

/* ============ Skills ============ */
.tone-aws   { --t: var(--k-aws); }
.tone-azure { --t: #0078D4; }
.tone-git   { --t: var(--k-git); }
.tone-k8s   { --t: var(--k-k8s); }
.tone-data  { --t: var(--k-data); }
.tone-sec   { --t: var(--k-sec); }
.tone-user  { --t: var(--k-user); }
@media (prefers-color-scheme: dark) { .tone-azure { --t: #4CA6F5; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.filter {
  font: 500 14px var(--sans); cursor: pointer;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--slate);
}
.filter:hover { color: var(--ink); border-color: var(--harbor); }
.filter[aria-pressed="true"] { background: var(--harbor); border-color: var(--harbor); color: var(--paper); }

.skill-group { padding-top: 44px; }
.skill-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 16px; }
.skill-head h2 { font-family: var(--cond); font-weight: 700; font-size: 26px; margin: 0; line-height: 1.2; }
.skill-head span { font-size: 14px; color: var(--slate); }

.skill-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 12px;
}
.skill {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  height: 128px; padding: 14px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.skill:hover { transform: translateY(-3px); border-color: var(--t); box-shadow: 0 10px 22px -16px var(--t); }
.skill-icon {
  width: 54px; height: 54px; flex: none; border-radius: 13px;
  display: grid; place-items: center;
  background: #FFFFFF; box-shadow: inset 0 0 0 1px #E2E8EE;
}
.skill-icon img { width: 30px; height: 30px; object-fit: contain; }
.skill-icon .mono {
  font: 700 15px var(--cond); letter-spacing: 0.01em; color: var(--t);
  max-width: 48px; text-align: center; line-height: 1.05;
}
.licon { width: 28px; height: 28px; background: var(--t); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.skill.is-generic .skill-icon,
.skill:has(.mono) .skill-icon { background: color-mix(in srgb, var(--t) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 30%, transparent); }
.skill-name {
  font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--ink);
  min-height: 2.5em; display: flex; align-items: center;
}
.skill-strip { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); }
.skill-strip .skill { height: 116px; }
@media (max-width: 560px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-right: -24px; padding-right: 24px; }
  .filter { flex: none; }
  .skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .skill { height: 112px; padding: 10px 6px; }
  .skill-icon { width: 46px; height: 46px; }
  .skill-icon img { width: 26px; height: 26px; }
  .skill-name { font-size: 12.5px; }
}
