/* pnkjsng.com — hand-written, no build step. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter Display"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-display-500.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #fbfbfa;
  --surface: #f3f2ef;
  --line: #e8e7e3;
  --ink: #111110;
  --text: #3b3a37;
  --muted: #6a6964;
  --accent: #2a46d6;
  --nav-bg: rgba(251, 251, 250, 0.82);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter Display", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --page: 1040px;
  --label-col: 200px;
  --measure: 640px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0c;
  --surface: #171716;
  --line: #252523;
  --ink: #f0f0ee;
  --text: #c2c1bc;
  --muted: #8f8e88;
  --accent: #a3b3ff;
  --nav-bg: rgba(13, 13, 12, 0.8);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0c;
    --surface: #171716;
    --line: #252523;
    --ink: #f0f0ee;
    --text: #c2c1bc;
    --muted: #8f8e88;
    --accent: #a3b3ff;
    --nav-bg: rgba(13, 13, 12, 0.8);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "calt", "kern", "liga", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--bg); }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

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

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
}
.skip:focus { top: 12px; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav__right { display: flex; align-items: center; gap: 4px; }

.nav__links { display: flex; align-items: center; gap: 2px; margin-right: 8px; }
.nav__links a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="true"] { color: var(--ink); }

.theme {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.theme:hover { color: var(--ink); background: var(--surface); }
.theme svg { width: 16px; height: 16px; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: none; }
  :root:not([data-theme="light"]) .theme .moon { display: block; }
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(56px, 11vw, 128px) clamp(48px, 8vw, 88px); }

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.eyebrow .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.hero h1 {
  max-width: 19ch;
  margin-top: 22px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.25rem, 1.2rem + 4.6vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.038em;
  text-wrap: balance;
}
.hero h1 .soft { color: var(--muted); }

.lede {
  max-width: 60ch;
  margin-top: clamp(22px, 3vw, 32px);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  text-wrap: pretty;
}
.lede strong { color: var(--ink); font-weight: 500; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(28px, 4vw, 40px); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--surface); }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--ink); opacity: 0.88; }
.btn .arrow { color: var(--muted); transition: transform 0.2s ease, color 0.15s ease; }
.btn:hover .arrow { transform: translate(2px, -2px); color: var(--ink); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}
.stat { padding: clamp(22px, 3vw, 32px) clamp(16px, 3vw, 32px) clamp(22px, 3vw, 32px) 0; }
.stat + .stat { padding-left: clamp(16px, 3vw, 32px); border-left: 1px solid var(--line); }
.stat__value {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-feature-settings: "tnum", "cv11";
}
.stat__value small { font-size: 0.5em; letter-spacing: -0.01em; color: var(--muted); margin-left: 2px; }
.stat__label { max-width: 26ch; margin-top: 8px; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }

/* ---------- Sections ---------- */

.section {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(56px, 8vw, 96px);
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: 0; }

.section__label {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.section__label .num { color: var(--muted); font-weight: 400; font-feature-settings: "tnum"; }

.section__body { min-width: 0; max-width: var(--measure); }

/* ---------- Experience ---------- */

.role + .role { margin-top: clamp(40px, 5vw, 56px); padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--line); }

.role__head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; }
.role__title { color: var(--ink); font-size: 1.125rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; }
.role__when { color: var(--muted); font-size: 0.875rem; font-feature-settings: "tnum", "cv11"; white-space: nowrap; }
.role__org { margin-top: 2px; color: var(--muted); font-size: 0.9375rem; }
.role__org b { color: var(--text); font-weight: 500; }

.points { margin-top: 18px; display: grid; gap: 12px; }
.points li { position: relative; padding-left: 20px; text-wrap: pretty; }
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 8px;
  height: 1px;
  background: var(--muted);
}
.points strong { color: var(--ink); font-weight: 500; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.tags li {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.6;
}

/* ---------- Project ---------- */

.project__title { color: var(--ink); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; }
.project__sub { margin-top: 2px; color: var(--muted); font-size: 0.9375rem; }
.project p.desc { margin-top: 14px; text-wrap: pretty; }

.more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(32px, 4vw, 44px);
  padding: 16px 0;
  border-block: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: padding 0.2s ease;
}
.more span:first-child small { display: block; color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.more .arrow { color: var(--muted); transition: transform 0.2s ease, color 0.15s ease; }
.more:hover .arrow { transform: translate(3px, -3px); color: var(--ink); }

/* ---------- Skills ---------- */

.skills { display: grid; }
.skills > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 4px 24px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}
.skills > div:first-child { padding-top: 0; border-top: 0; }
.skills > div:last-child { padding-bottom: 0; }
.skills dt { color: var(--ink); font-weight: 500; font-size: 0.9375rem; }
.skills dd { font-size: 0.9375rem; text-wrap: pretty; }

/* ---------- Simple lists (recognition, education) ---------- */

.rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  flex-wrap: wrap;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.rows li:first-child { padding-top: 0; border-top: 0; }
.rows li:last-child { padding-bottom: 0; }
.rows .what { color: var(--ink); font-weight: 500; font-size: 0.9375rem; }
.rows .what small { display: block; color: var(--muted); font-weight: 400; font-size: 0.875rem; }
.rows .where { color: var(--muted); font-size: 0.875rem; font-feature-settings: "tnum", "cv11"; }

/* ---------- Contact ---------- */

.contact__lead { max-width: 44ch; font-size: 1.0625rem; text-wrap: pretty; }
.contact__mail {
  display: inline-block;
  margin-top: 20px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.75rem, 1rem + 3.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 6px;
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
}
.contact__mail:hover { color: var(--accent); }

.socials { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 32px; }
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.socials a:hover { color: var(--ink); }
.socials .arrow { color: var(--muted); transition: transform 0.2s ease, color 0.15s ease; }
.socials a:hover .arrow { transform: translate(2px, -2px); color: var(--ink); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); }
.footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-block: 28px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.footer a:hover { color: var(--ink); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(10px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
  .rise:nth-child(2) { animation-delay: 0.06s; }
  .rise:nth-child(3) { animation-delay: 0.12s; }
  .rise:nth-child(4) { animation-delay: 0.18s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .section { grid-template-columns: 1fr; row-gap: 28px; }
  .section__label { position: static; }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stat { display: grid; grid-template-columns: 112px 1fr; align-items: baseline; gap: 16px; padding: 18px 0; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .stat__label { margin-top: 0; max-width: none; }
  .skills > div { grid-template-columns: 1fr; }
  .role__head { flex-direction: column; gap: 2px; }
  .btn { height: 44px; }
}

/* ---------- 404 ---------- */

.lost { min-height: calc(100vh - 64px - 80px); min-height: calc(100dvh - 64px - 80px); display: grid; align-content: center; padding-block: 64px; }
.lost h1 { color: var(--ink); font-family: var(--display); font-weight: 500; font-size: clamp(2.25rem, 1.2rem + 4.6vw, 4rem); line-height: 1.05; letter-spacing: -0.038em; margin-top: 16px; }
.lost p { margin-top: 20px; max-width: 46ch; }
.lost .actions { margin-top: 32px; }

/* ---------- Print ---------- */

@media print {
  .nav, .theme, .actions, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding-block: 20px; break-inside: avoid; }
  .rise { opacity: 1 !important; transform: none !important; animation: none !important; }
}
