/* SPDX-License-Identifier: LicenseRef-Proprietary
 * Copyright (c) 2026 Shen Nan. All rights reserved.
 */

:root {
  --page-bg: #10181c;
  --page-bg-soft: #172328;
  --panel-bg: rgba(13, 20, 23, 0.86);
  --panel-strong: #111b1f;
  --panel-border: rgba(180, 196, 176, 0.16);
  --text: #edf0de;
  --muted: #a6b2a5;
  --muted-strong: #c5cfbe;
  --link: #9ad3c8;
  --accent: #f2c47c;
  --rule: rgba(196, 214, 197, 0.12);
  --shadow: 0 36px 120px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(154, 211, 200, 0.16) 0%, transparent 32%),
    radial-gradient(circle at top right, rgba(242, 196, 124, 0.16) 0%, transparent 30%),
    linear-gradient(180deg, var(--page-bg-soft) 0%, var(--page-bg) 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: transparent;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.deferred-image:not([src]) {
  background: rgba(255, 255, 255, 0.025);
}

.page-shell {
  min-height: 100vh;
  padding: 48px 20px 88px;
}

.profile-card {
  position: relative;
  overflow: hidden;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 40px 34px 48px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 196, 124, 0.52), transparent);
}

.markdown-body {
  line-height: 1.72;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: var(--text);
  line-height: 1.25;
}

.markdown-body p {
  margin: 14px 0;
  color: var(--muted);
}

.markdown-body strong {
  color: var(--text);
}

.markdown-body table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.markdown-body th,
.markdown-body td {
  padding: 12px;
  border: 1px solid var(--rule);
  vertical-align: top;
  background: rgba(255, 255, 255, 0.02);
}

.markdown-body th {
  background: rgba(255, 255, 255, 0.05);
}

.markdown-body [align="center"],
.markdown-body p:has(img),
.markdown-body div:has(img) {
  text-align: center;
}

.markdown-body code {
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.92em;
}

.hero {
  position: relative;
  padding: 0 0 30px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

.hero-eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
}

.hero-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  text-align: left;
}

.hero-deck {
  max-width: 48rem;
  margin: 18px 0 24px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-typing {
  margin: 0 0 20px;
  text-align: left;
}

.hero-typing img {
  display: block;
  max-width: min(540px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.typing-fallback {
  display: inline-block;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.5;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}

.hero-links a,
.hero-links img {
  transition: transform 180ms ease, opacity 180ms ease;
}

.hero-links a:hover,
.hero-links img:hover {
  transform: translateY(-2px);
  opacity: 0.96;
}

.content-section {
  position: relative;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.content-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 700;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: var(--panel-strong);
  background: linear-gradient(135deg, var(--accent), #f3d9a0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.section-icon svg {
  width: 1rem;
  height: 1rem;
}

.section-about p {
  max-width: 52rem;
  color: var(--muted-strong);
  font-size: 1.02rem;
}

.section-tech p {
  max-width: none;
}

.section-tech p strong {
  display: inline-block;
  margin: 18px 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  margin: 0.2rem 0.12rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  line-height: 1;
}

.content-section:not(.section-about) {
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.section-stats table img {
  border-radius: 18px;
}

@media (max-width: 720px) {
  .page-shell {
    padding: 16px 12px 32px;
  }

  .profile-card {
    padding: 22px 16px 28px;
    border-radius: 18px;
  }

  .hero {
    padding-bottom: 24px;
    margin-bottom: 24px;
  }

  .hero-links {
    gap: 10px;
  }

  .markdown-body table,
  .markdown-body tbody,
  .markdown-body tr,
  .markdown-body td {
    display: block;
  }

  .markdown-body tr {
    margin-bottom: 12px;
  }

  .section-heading {
    align-items: flex-start;
  }
}
