:root {
  color-scheme: light dark;

  --background: #f4f6f8;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-muted: #f8fafc;
  --text: #172033;
  --muted: #5e687b;
  --border: #dce2ea;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --shadow: 0 24px 70px rgba(30, 41, 59, 0.12);

  font-family:
    Inter,
    "Noto Sans CJK SC",
    "Noto Sans SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0d1117;
    --surface: rgba(22, 27, 34, 0.96);
    --surface-muted: #1c2128;
    --text: #e6edf3;
    --muted: #9da7b3;
    --border: #30363d;
    --accent: #79c0ff;
    --accent-hover: #a5d6ff;
    --accent-soft: rgba(121, 192, 255, 0.12);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 48px 20px;
  background:
    radial-gradient(circle at top, var(--accent-soft), transparent 34rem),
    var(--background);
  line-height: 1.68;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.resume-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 42px 52px 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.topbar,
.resume-header,
.entry-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.topbar {
  align-items: center;
  margin-bottom: 46px;
  color: var(--muted);
  font-size: 0.92rem;
}

.home-link {
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.language-switch {
  display: flex;
  gap: 8px;
  align-items: center;
}

.language-switch strong {
  color: var(--text);
}

.resume-header h1,
.language-card h1 {
  margin: 0;
  font-size: clamp(2.9rem, 8vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.headline {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.download-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.download-button,
.primary-button {
  flex: none;
  color: #ffffff;
  background: #2563eb;
  border: 1px solid #2563eb;
}

.download-button:hover,
.primary-button:hover {
  color: #ffffff;
  background: #1d4ed8;
  text-decoration: none;
  transform: translateY(-1px);
}

.secondary-button {
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.secondary-button:hover {
  color: var(--text);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.94rem;
  font-style: normal;
}

section {
  margin-top: 44px;
}

h2 {
  margin: 0 0 22px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

p {
  margin: 8px 0 0;
}

.entry + .entry,
.project-card + .project-card {
  margin-top: 28px;
}

.entry-heading time,
.entry-subtitle,
footer {
  color: var(--muted);
}

.entry-heading time {
  flex: none;
  white-space: nowrap;
  font-size: 0.92rem;
}

.entry-subtitle {
  margin-top: 3px;
  font-size: 0.92rem;
}

ul {
  margin: 13px 0 0;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 7px;
}

.project-card {
  padding: 18px 19px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.skills-grid {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 12px 24px;
  margin: 0;
}

.skills-grid dt {
  color: var(--muted);
  font-weight: 750;
}

.skills-grid dd {
  margin: 0;
}

footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  text-align: center;
}

.landing-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.language-card {
  width: min(560px, 100%);
  padding: 54px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.landing-description {
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.06rem;
}

.language-options {
  display: flex;
  justify-content: center;
  gap: 13px;
  margin-top: 30px;
}

.landing-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 34px;
  font-size: 0.92rem;
}

@media (max-width: 680px) {
  body {
    padding: 0;
    background: var(--surface);
  }

  .resume-shell,
  .language-card {
    padding: 28px 21px 34px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .topbar {
    margin-bottom: 36px;
  }

  .resume-header,
  .entry-heading {
    flex-direction: column;
    gap: 8px;
  }

  .download-button {
    margin-top: 10px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .skills-grid dd {
    margin-bottom: 12px;
  }

  .language-options {
    flex-direction: column;
  }
}

@media print {
  :root {
    color-scheme: light;
    --background: #ffffff;
    --surface: #ffffff;
    --surface-muted: #ffffff;
    --text: #111827;
    --muted: #4b5563;
    --border: #d1d5db;
    --accent: #111827;
  }

  body {
    padding: 0;
    background: #ffffff;
    font-size: 10pt;
  }

  .resume-shell {
    width: 100%;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .topbar,
  .download-button,
  footer {
    display: none;
  }

  .resume-header h1 {
    font-size: 30pt;
  }

  section {
    margin-top: 24px;
  }

  .project-card {
    padding: 0;
    border: 0;
  }

  a {
    color: inherit;
  }

  article,
  .project-card,
  .skills-grid {
    break-inside: avoid;
  }
}
