@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #faf9f6;
  --surface: #f1ede4;
  --ink: #16222c;
  --muted: #42505b;
  --line: #ded8cc;
  --accent: #14557b;
  --accent-strong: #0e4060;
  --accent-text: #fff;
  --glow-blue: rgba(20, 85, 123, 0.09);
  --glow-warm: rgba(196, 148, 58, 0.07);
  --emblem-bg: linear-gradient(135deg, var(--ink) 30%, color-mix(in srgb, var(--ink) 62%, var(--accent)));
  --emblem-text: var(--bg);
  --emblem-border: transparent;
  --footer-bg: var(--ink);
  --footer-text: var(--bg);
  --ease: cubic-bezier(0.22, 0.68, 0.26, 1);
  font-family: "IBM Plex Sans", "IBM Plex Sans SC", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(1050px 500px at 88% -8%, var(--glow-blue), transparent 62%),
    radial-gradient(780px 430px at -12% 24%, var(--glow-warm), transparent 58%),
    var(--bg);
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--accent-text); }
.shell { width: min(100% - 80px, 1220px); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 40; padding: 12px 16px; background: var(--accent); color: var(--accent-text); transition: top .25s var(--ease); }
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.header-inner { width: min(100% - 80px, 1220px); min-height: 88px; margin: auto; display: flex; align-items: center; }
.wordmark { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.wordmark-symbol {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  background: var(--emblem-bg);
  color: var(--emblem-text);
  border: 1px solid var(--emblem-border);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.09em;
}
.wordmark-label { font-size: 12.5px; line-height: 1.25; font-weight: 700; letter-spacing: .025em; }
.lang-switch { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; }
.lang-switch a { padding: 7px 11px; color: var(--muted); text-decoration: none; border: 1px solid transparent; transition: color .2s var(--ease); }
.lang-switch a:hover { color: var(--accent); }
.lang-switch a[aria-current="page"] { color: var(--ink); border-color: var(--line); }

/* ---------- Intro ---------- */
.intro { max-width: 900px; padding-block: 92px 64px; }
.intro-main { max-width: 900px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(44px, 5vw, 64px); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.intro-detail { margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.intro-side { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 30px; row-gap: 14px; margin-top: 36px; }
.side-heading { flex: 0 0 100%; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.intro-side a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s var(--ease);
}
.intro-side a span { display: inline-block; transition: transform .25s var(--ease); }
.intro-side a:hover { color: var(--accent); }
.intro-side a:hover span { transform: translate(3px, -3px); }

/* ---------- Content ---------- */
.content-shell { padding-bottom: 130px; }
.resume-content { max-width: 900px; margin-inline: auto; border-top: 2px solid var(--ink); padding-top: 68px; }
.resume-section { padding-bottom: 62px; margin-bottom: 62px; border-bottom: 2px solid var(--ink); }
.resume-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.section-heading { margin-bottom: 36px; }
.section-heading h2 { display: flex; align-items: center; gap: 20px; }
.section-heading h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h2 { margin: 0; font-size: clamp(30px, 3vw, 40px); font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.entry + .entry { margin-top: 48px; padding-top: 46px; border-top: 1px solid var(--line); }
.entry-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
h3 { margin-bottom: 7px; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; transition: color .25s var(--ease); }
.entry:hover h3 { color: var(--accent); }
.entry-subtitle { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.separator { padding-inline: 3px; }
.entry-meta { flex: 0 0 auto; color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.8; text-align: right; white-space: nowrap; }
.entry-points { display: grid; gap: 10px; margin: 22px 0 0; padding-left: 20px; color: var(--ink); font-size: 15px; line-height: 1.65; }
.entry-points li { padding-left: 6px; }
.entry-points li::marker { color: var(--accent); font-size: 10px; }
.tech-line { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0 0; }
.tech-line span {
  padding: 5px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.5;
}
.skills-list { margin: 0; }
.skills-list > div { display: grid; grid-template-columns: 170px 1fr; gap: 15px; padding: 19px 10px; margin-inline: -10px; border-bottom: 1px solid var(--line); border-radius: 6px; font-size: 15px; line-height: 1.5; transition: background .25s var(--ease); }
.skills-list > div:first-child { border-top: 1px solid var(--line); }
.skills-list > div:hover { background: var(--surface); }
.skills-list dt { padding-top: 3px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.skills-list dd { margin: 0; font-weight: 550; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 2px solid;
  border-image: linear-gradient(90deg, var(--accent), transparent 65%) 1;
}
.footer-inner { display: flex; align-items: center; gap: 45px; max-width: 900px; min-height: 90px; font-size: 13px; }
.footer-inner span:first-child { margin-right: auto; font-weight: 650; }
.footer-meta { color: color-mix(in srgb, var(--footer-text) 78%, transparent); font-size: 12px; }

/* ---------- Dark theme ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d141a;
    --surface: #161f27;
    --ink: #e8eff4;
    --muted: #b7c5cf;
    --line: #2a3742;
    --accent: #8fc9e8;
    --accent-strong: #c2e2f3;
    --accent-text: #0d222e;
    --glow-blue: rgba(86, 163, 207, 0.11);
    --glow-warm: rgba(205, 160, 80, 0.06);
    --emblem-bg: linear-gradient(135deg, #22303d 30%, #33506b);
    --emblem-text: #e8eff4;
    --emblem-border: var(--line);
    --footer-bg: #080e13;
    --footer-text: #e8eff4;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 950px) {
  .shell, .header-inner { width: min(100% - 48px, 1220px); }
  .intro { padding-block: 82px 60px; }
}

@media (max-width: 720px) {
  .shell, .header-inner { width: min(100% - 40px, 1220px); }
  html { scroll-padding-top: 90px; }
  .header-inner { min-height: 75px; }
  .wordmark-label { display: none; }
  .intro { padding-block: 72px 52px; }
  .intro-detail { font-size: 16px; }
  .resume-content { padding-top: 56px; }
  .content-shell { padding-bottom: 90px; }
}

@media (max-width: 510px) {
  .intro { padding-top: 64px; }
  h1 { font-size: clamp(27px, 8.2vw, 40px); }
  .entry-heading { display: block; }
  .entry-meta { margin-top: 10px; text-align: left; }
  .section-heading { margin-bottom: 30px; }
  .resume-section { padding-bottom: 50px; margin-bottom: 50px; }
  .skills-list > div { grid-template-columns: 1fr; gap: 5px; }
  .skills-list dt { padding-top: 0; }
  .footer-inner { flex-wrap: wrap; gap: 13px 24px; padding-block: 25px; }
  .footer-inner span:first-child { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Print ---------- */
@media print {
  :root { color-scheme: light; --bg: #fff; --ink: #111; --muted: #444; --line: #bbb; --accent: #111; --accent-strong: #111; }
  @page { size: letter; margin: .55in; }
  body { background: #fff; color: #111; font-size: 10pt; }
  .site-header, .site-footer, .skip-link { display: none !important; }
  .shell { width: 100%; }
  .intro { padding: 0 0 15px; }
  .intro-detail, .intro-side .side-heading { display: none; }
  h1 { font-size: 30pt; margin-bottom: 5px; }
  .intro-side { display: flex; gap: 12px; margin-top: 8px; }
  .intro-side a { margin: 0; padding: 0; border: 0; font-size: 8pt; }
  .intro-side a span { display: none; }
  .resume-content { padding-top: 12px; border-top: 1px solid #111; }
  .resume-section { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #bbb; break-inside: avoid; }
  .section-heading { margin-bottom: 10px; }
  .section-heading h2::after { display: none; }
  h2 { font-size: 15pt; }
  h3 { font-size: 10.5pt; }
  .entry:hover h3 { color: inherit; }
  .entry-subtitle, .entry-points, .skills-list > div { font-size: 9pt; }
  .entry-points { gap: 3px; margin-top: 8px; }
  .entry + .entry { margin-top: 12px; padding-top: 12px; }
  .tech-line { margin-top: 8px; gap: 5px; }
  .tech-line span { padding: 1px 7px; border-color: #bbb; background: none; color: #111; }
  .skills-list > div { padding: 5px 0; margin-inline: 0; }
  .skills-list dt { font-size: 7pt; }
}
