@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/JetBrainsMono.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #fdfdfd;
  --ink: #17171a;
  --ink-soft: #6f6f76;
  --ink-faint: #a3a3ab;
  --hairline: #e6e6ea;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 6vw;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-id {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.site-id-en {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.nav-links a {
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
}

/* ---------- layout ---------- */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 6vw;
}

.hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
}

.meta-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-bottom: 24px;
}

.hero-name {
  font-size: clamp(88px, 18vw, 168px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  margin-bottom: 36px;
}

.hero-tagline {
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 2;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 40px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  border-top: 1px solid var(--hairline);
  padding-top: 20px;
}

.scroll-cue {
  align-self: flex-start;
  margin-top: 72px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}

.scroll-cue:hover {
  color: var(--ink);
}

/* ---------- sections ---------- */

.section {
  padding: 140px 0 40px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-top: 1px solid var(--ink);
  padding-top: 20px;
  margin-bottom: 64px;
}

.section-index {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.section-head h2 {
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.section-label {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

/* ---------- entries ---------- */

.entry {
  margin-bottom: 72px;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.entry-head h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.entry-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.entry-org {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin: 6px 0 20px;
}

.entry-list {
  list-style: none;
}

.entry-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  color: #3c3c42;
  font-size: 15px;
}

.entry-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--hairline);
  padding-top: 48px;
  margin-top: 64px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-num {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-cap {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

/* ---------- skills ---------- */

.skills {
  display: grid;
  gap: 0;
}

.skill-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}

.skill-row:last-child {
  border-bottom: none;
}

.skill-row dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding-top: 4px;
}

.skill-row dd {
  font-size: 15px;
  color: #3c3c42;
}

/* ---------- contact ---------- */

.section-contact {
  padding-bottom: 160px;
}

.contact-lead {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.7;
  margin-bottom: 40px;
}

.contact-mail {
  display: inline-block;
  font-size: clamp(20px, 3.6vw, 34px);
  font-weight: 800;
  letter-spacing: -0.04em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  transition: opacity 0.25s var(--ease);
}

.contact-mail:hover {
  opacity: 0.55;
}

.contact-phone {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 6vw 40px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ---------- reveal ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  .nav-links {
    gap: 18px;
    font-size: 11px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-name {
    margin-bottom: 28px;
  }

  .section {
    padding: 96px 0 24px;
  }

  .section-head {
    margin-bottom: 44px;
  }

  .section-label {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 20px;
    padding-top: 36px;
    margin-top: 48px;
  }

  .skill-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 0;
  }

  .entry-head {
    flex-direction: column;
    gap: 4px;
  }
}
