@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&family=Noto+Serif+SC:wght@300;400&display=swap");

:root {
  color-scheme: light;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-soft: #f2f3f4;
  --ink: #151617;
  --muted: #666964;
  --line: rgba(21, 22, 23, 0.12);
  --line-strong: rgba(21, 22, 23, 0.24);
  --accent: #1769ff;
  --accent-soft: #dfe9ff;
  --orange: #ff6b35;
  --violet: #7a5af8;
  --green: #136f63;
  --shadow-sm: 0 8px 24px rgba(20, 22, 26, 0.06);
  --shadow-lg: 0 28px 80px rgba(20, 22, 26, 0.12);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --content: 1160px;
  --font-body: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Manrope", "DM Sans", "PingFang SC", sans-serif;
  --font-hero-serif: "Noto Serif SC", "Songti SC", STSong, "Source Han Serif SC", "Source Han Serif CN", SimSun, Georgia, serif;
  --font-hero-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101211;
  --surface: #171a18;
  --surface-soft: #202420;
  --ink: #f4f5f2;
  --muted: #a9afa8;
  --line: rgba(244, 245, 242, 0.12);
  --line-strong: rgba(244, 245, 242, 0.26);
  --accent: #71a3ff;
  --accent-soft: #1c3157;
  --orange: #ff865d;
  --violet: #a18cfb;
  --green: #67c7b8;
  --shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 26rem),
    var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(120, 120, 110, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 120, 110, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

::selection {
  color: #0b1832;
  background: #a9c5ff;
}

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

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 50%;
  padding: 10px 16px;
  transform: translate(-50%, -160%);
  border-radius: 999px;
  color: #fff;
  background: #111;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.shell {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 18px;
  right: 0;
  left: 0;
  pointer-events: none;
}

.nav-shell {
  display: flex;
  width: min(calc(100% - 32px), 1120px);
  min-height: 62px;
  margin-inline: auto;
  padding: 8px 9px 8px 18px;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(1.3);
  pointer-events: auto;
}

.brand {
  margin-right: auto;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--accent);
}

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

.nav-link {
  position: relative;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-button,
.language-select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.icon-button {
  display: grid;
  width: 44px;
  padding: 0;
  place-items: center;
}

.icon-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.language-select {
  padding: 0 30px 0 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.menu-toggle {
  display: none;
}

main {
  overflow: clip;
}

.hero {
  display: grid;
  min-height: 100svh;
  padding-top: 138px;
  padding-bottom: 80px;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 72px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 20px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 13%, transparent);
  content: "";
}

.hero h1,
.page-hero h1 {
  max-width: 840px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8vw, 7.8rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}

.hero-role {
  margin: 28px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.hero-intro,
.page-intro {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.hero-actions,
.section-actions {
  display: flex;
  margin-top: 34px;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 19px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(15, 17, 18, 0.18);
}

[data-theme="dark"] .button-primary {
  color: #101211;
  background: #f4f5f2;
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
}

.button-text {
  min-height: 42px;
  padding-inline: 0;
  color: var(--accent);
}

.arrow {
  font-size: 1.15em;
  transition: transform 180ms ease;
}

a:hover .arrow,
button:hover .arrow {
  transform: translateX(4px);
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.portrait-card {
  position: absolute;
  z-index: 2;
  top: 48px;
  right: 24px;
  display: flex;
  width: min(100%, 390px);
  aspect-ratio: 0.82;
  padding: 28px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 75%, #9cc5ff), #e5efff 58%, #ffb391);
  box-shadow: var(--shadow-lg);
  transform: rotate(3deg);
}

.portrait-card::before,
.portrait-card::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.portrait-card::before {
  right: -30%;
  bottom: -18%;
  width: 105%;
  aspect-ratio: 1;
  background: rgba(13, 28, 58, 0.2);
  box-shadow: inset 0 0 0 32px rgba(255, 255, 255, 0.15);
}

.portrait-card::after {
  top: 30%;
  left: 23%;
  width: 54%;
  aspect-ratio: 0.78;
  border-radius: 45% 45% 28% 28%;
  background: #14181e;
  box-shadow: 0 -34px 0 -14px #d7a170;
}

.portrait-card > * {
  position: relative;
  z-index: 2;
}

.portrait-index,
.portrait-caption {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.portrait-caption {
  max-width: 180px;
  align-self: flex-end;
  text-align: right;
}

.orbit-note {
  position: absolute;
  z-index: 3;
  bottom: 40px;
  left: 0;
  width: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transform: rotate(-5deg);
}

.orbit-note strong,
.orbit-note span {
  display: block;
}

.orbit-note strong {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.04em;
}

.orbit-note span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding-block: 118px;
  border-top: 1px solid var(--line);
}

.section-soft {
  background: color-mix(in srgb, var(--surface-soft) 60%, transparent);
}

.section-heading {
  display: grid;
  margin-bottom: 48px;
  align-items: end;
  grid-template-columns: 1fr minmax(280px, 0.65fr);
  gap: 32px;
}

.section-heading h2,
.content-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
}

.story-card,
.facts-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.story-card {
  padding: clamp(30px, 5vw, 58px);
}

.story-card .big-copy {
  max-width: 760px;
  margin: 0 0 42px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.2;
}

.story-footer {
  display: flex;
  padding-top: 24px;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.facts-card {
  padding: 28px;
}

.facts-list {
  display: grid;
  margin: 0;
  gap: 0;
}

.fact-row {
  display: grid;
  padding: 18px 0;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.fact-row:last-child {
  border-bottom: 0;
}

.fact-row dt {
  color: var(--muted);
  font-size: 13px;
}

.fact-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card,
.project-card,
.post-card,
.repo-card {
  position: relative;
  display: flex;
  min-height: 320px;
  padding: 28px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.product-card:hover,
.project-card:hover,
.post-card:hover,
.repo-card:hover,
.album-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.product-card::before {
  position: absolute;
  top: -60px;
  right: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--card-accent, var(--accent));
  content: "";
  opacity: 0.16;
  filter: blur(2px);
}

.product-card[data-accent="orange"] {
  --card-accent: var(--orange);
}

.product-card[data-accent="violet"] {
  --card-accent: var(--violet);
}

.card-kicker,
.card-meta,
.post-meta,
.repo-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-card h3,
.project-card h3,
.post-card h2,
.post-card h3,
.repo-card h3,
.album-card h2,
.album-card h3 {
  margin: 26px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.product-card p,
.project-card p,
.post-card p,
.repo-card p {
  margin: 0;
  color: var(--muted);
}

.card-footer {
  display: flex;
  margin-top: auto;
  padding-top: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  font-weight: 700;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.project-card {
  min-height: 360px;
  grid-column: span 6;
}

.project-card:nth-child(3n) {
  min-height: 260px;
  grid-column: span 12;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-pill,
.tag,
.filter-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
}

.status-pill {
  padding: 5px 10px;
}

.tag-list {
  display: flex;
  margin-top: 22px;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  padding: 5px 9px;
  color: var(--muted);
}

.project-metric {
  margin-top: auto;
  padding-top: 30px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.subscribe-panel {
  display: grid;
  padding: clamp(30px, 6vw, 72px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  background: #131516;
  grid-template-columns: 1fr minmax(320px, 0.7fr);
  align-items: end;
  gap: 52px;
}

.subscribe-panel h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.subscribe-panel p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
}

.subscribe-form {
  display: flex;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.subscribe-form input {
  width: 100%;
  min-width: 0;
  padding: 0 15px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.subscribe-form input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.subscribe-form button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #111;
  background: #fff;
  font-weight: 800;
}

.page-hero {
  padding-top: 190px;
  padding-bottom: 92px;
}

.page-hero h1 {
  max-width: 1000px;
  font-size: clamp(3.7rem, 9vw, 8.5rem);
}

.page-hero .page-intro {
  margin-top: 30px;
}

.page-hero-meta {
  display: flex;
  margin-top: 42px;
  flex-wrap: wrap;
  gap: 10px;
}

.page-hero-meta span {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
}

.featured-post {
  display: grid;
  min-height: 420px;
  padding: clamp(30px, 5vw, 60px);
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 12%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 24rem),
    var(--surface);
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}

.featured-post h2 {
  margin: 12px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1;
}

.featured-post p {
  margin: 0;
  color: var(--muted);
}

.featured-post-visual {
  position: relative;
  min-height: 270px;
}

.featured-post-visual::before,
.featured-post-visual::after {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  content: "";
}

.featured-post-visual::before {
  inset: 20px 20px 0 50px;
  transform: rotate(6deg);
}

.featured-post-visual::after {
  inset: 0 40px 28px 15px;
  background:
    linear-gradient(145deg, var(--accent-soft), transparent),
    var(--surface);
  box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  min-height: 290px;
}

.post-card h2,
.post-card h3 {
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
}

.post-meta {
  display: flex;
  gap: 14px;
}

.blog-tools {
  display: grid;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  grid-template-columns: 1fr auto;
  gap: 18px;
}

.search-field {
  display: flex;
  min-height: 50px;
  padding: 0 16px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  padding: 9px 13px;
  color: var(--muted);
}

.filter-button[aria-pressed="true"],
.filter-button:hover {
  color: var(--surface);
  background: var(--ink);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.album-card {
  display: grid;
  min-height: 520px;
  padding: 0;
  grid-column: span 6;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.album-card:first-child {
  grid-column: span 12;
  grid-template-columns: 1.25fr 0.75fr;
}

.album-cover {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  background: var(--surface-soft);
}

.album-copy {
  display: flex;
  padding: 30px;
  flex-direction: column;
}

.album-copy h2,
.album-copy h3 {
  margin-top: 40px;
}

.album-copy p {
  color: var(--muted);
}

.album-copy .card-footer {
  margin-top: auto;
}

.photo-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.photo-tile {
  position: relative;
  min-height: 320px;
  padding: 0;
  grid-column: span 6;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.photo-tile[data-ratio="portrait"] {
  min-height: 580px;
  grid-column: span 4;
}

.photo-tile[data-ratio="square"] {
  min-height: 390px;
  grid-column: span 4;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.photo-tile:hover img {
  transform: scale(1.035);
}

.photo-caption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  padding: 12px 14px;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  color: #fff;
  background: rgba(12, 14, 16, 0.52);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.photo-tile:hover .photo-caption,
.photo-tile:focus-visible .photo-caption {
  opacity: 1;
  transform: translateY(0);
}

.photo-caption strong,
.photo-caption span {
  display: block;
}

.photo-caption span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.lightbox {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: none;
  padding: 28px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(5, 6, 7, 0.92);
  backdrop-filter: blur(18px);
}

.lightbox[open] {
  display: flex;
}

.lightbox img {
  max-width: min(1100px, 88vw);
  max-height: 78vh;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  place-items: center;
}

.lightbox-info {
  position: absolute;
  bottom: 24px;
  left: 50%;
  text-align: center;
  transform: translateX(-50%);
}

.github-hero-grid {
  display: grid;
  align-items: end;
  grid-template-columns: 1fr minmax(360px, 0.85fr);
  gap: 44px;
}

.terminal-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: #d8f8e9;
  background: #0d1210;
  box-shadow: var(--shadow-lg);
}

.terminal-top {
  display: flex;
  padding: 13px 16px;
  gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-top i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3e5149;
}

.terminal-body {
  padding: 26px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.9;
}

.terminal-body .prompt {
  color: #65d7a4;
}

.terminal-body .dim {
  color: #71847a;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  letter-spacing: -0.07em;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.language-chart {
  display: grid;
  margin-top: 24px;
  gap: 12px;
}

.language-bar {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.language-bar span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--color);
}

.language-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.language-legend span {
  color: var(--muted);
  font-size: 12px;
}

.language-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--color);
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.repo-card {
  min-height: 280px;
}

.repo-card h3 {
  margin-top: 18px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.repo-card .repo-stats {
  display: flex;
  margin-top: auto;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.repo-language::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-row {
  display: grid;
  padding: 23px 0;
  grid-template-columns: 90px 1fr auto;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.timeline-row time,
.timeline-row span {
  color: var(--muted);
  font-size: 13px;
}

.timeline-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-shell {
  width: min(calc(100% - 40px), 760px);
  margin-inline: auto;
}

.article-header {
  padding-top: 180px;
  padding-bottom: 58px;
}

.article-header h1 {
  margin: 16px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.article-cover {
  width: min(calc(100% - 40px), 1160px);
  height: min(62vw, 700px);
  margin: 0 auto 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 75% 22%, color-mix(in srgb, var(--orange) 65%, transparent), transparent 17rem),
    radial-gradient(circle at 22% 70%, color-mix(in srgb, var(--accent) 70%, transparent), transparent 23rem),
    var(--surface);
}

.article-body {
  padding-bottom: 110px;
}

.article-body h2 {
  margin: 2.2em 0 0.65em;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.05em;
  line-height: 1.15;
}

.article-body p,
.article-body li {
  color: color-mix(in srgb, var(--ink) 80%, var(--muted));
  font-size: 1.08rem;
  line-height: 1.85;
}

.article-body blockquote {
  margin: 36px 0;
  padding: 28px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
}

.site-footer {
  padding: 72px 0 32px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, 0.6fr);
  gap: 48px;
}

.footer-brand {
  max-width: 380px;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.05em;
}

.footer-brand p,
.footer-column a,
.footer-contact-trigger {
  color: var(--muted);
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-column strong {
  margin-bottom: 4px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-contact-trigger {
  width: fit-content;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.footer-column a:hover,
.footer-contact-trigger:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  margin-top: 60px;
  padding-top: 24px;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer-github-link {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.footer-github-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  transform: translateY(-2px);
}

.contact-dialog {
  width: min(calc(100% - 28px), 620px);
  max-height: min(92vh, 920px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 72%, #fff);
  border-radius: 28px;
  color: var(--ink);
  background: var(--surface-soft);
  box-shadow: 0 32px 100px rgb(0 0 0 / 0.36);
}

.contact-dialog::backdrop {
  background: rgb(12 14 18 / 0.78);
  backdrop-filter: blur(6px);
}

.contact-dialog-shell {
  display: grid;
  max-height: min(92vh, 920px);
  padding: clamp(22px, 4vw, 34px);
  overflow-y: auto;
  gap: 22px;
}

.contact-dialog-header {
  display: grid;
  min-height: 44px;
  align-items: center;
  grid-template-columns: 44px 1fr 44px;
  gap: 12px;
}

.contact-dialog-header h2 {
  margin: 0;
  grid-column: 2;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 2.45rem);
  letter-spacing: -0.05em;
  text-align: center;
}

.contact-dialog-close {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.contact-dialog-close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.contact-qr-frame {
  display: grid;
  min-height: 260px;
  padding: clamp(12px, 2.4vw, 18px);
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.contact-qr-image {
  display: block;
  width: 100%;
  max-height: 61vh;
  object-fit: contain;
}

.contact-qr-fallback {
  margin: 60px 18px;
  color: #666;
  text-align: center;
}

.contact-dialog-meta {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.2rem);
  text-align: center;
}

.contact-copy-button {
  min-height: 54px;
  padding: 12px 20px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: var(--accent);
  font-size: 16px;
  font-weight: 750;
  cursor: pointer;
}

.contact-copy-button:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .contact-dialog {
    width: calc(100% - 20px);
    border-radius: 22px;
  }

  .contact-dialog-shell {
    padding: 18px;
    gap: 16px;
  }

  .contact-qr-frame {
    border-radius: 16px;
  }
}

.toast {
  position: fixed;
  z-index: 600;
  right: 22px;
  bottom: 22px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  padding: 50px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
}

/* Home page: close structural match to the reference site's centered, scroll-led layout. */
.home-page {
  background: var(--bg);
}

.home-header {
  position: fixed;
  z-index: 120;
  inset: 0;
  height: 0;
  pointer-events: none;
}

.home-nav-wrap {
  position: absolute;
  top: 16px;
  left: 16px;
  pointer-events: auto;
}

.home-nav {
  display: flex;
  min-height: 52px;
  padding: 6px;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(1.25);
}

.home-nav .nav-link {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 13px;
}

.home-language {
  display: flex;
  height: 36px;
  padding-inline: 9px 6px;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.home-language select {
  max-width: 76px;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.home-theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: #6dd8ef;
  background: #153445;
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
}

.home-github-link {
  position: absolute;
  top: 16px;
  right: 72px;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
  backdrop-filter: blur(18px) saturate(1.25);
}

.home-menu-toggle {
  display: none;
}

.home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  padding: 132px 20px 84px;
  overflow: hidden;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 68% 28%, rgb(250 183 124 / 68%), transparent 38%),
    linear-gradient(160deg, #d7e0ec 0%, #b6c7de 52%, #8299b8 100%);
}

.home-water-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  contain: strict;
  background: transparent;
}

.home-hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  max-width: 760px;
  width: 100%;
  align-items: center;
  flex-direction: column;
}

.home-status {
  display: inline-flex;
  margin-bottom: 58px;
  min-height: 42px;
  padding: 9px 20px;
  align-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.home-avatar {
  position: relative;
  display: grid;
  width: 168px;
  height: 168px;
  padding: 0;
  margin-bottom: 66px;
  overflow: hidden;
  border: 5px solid var(--surface);
  border-radius: 50%;
  background: #dce4e5;
  box-shadow: 0 20px 48px rgba(28, 26, 22, 0.18);
  cursor: zoom-in;
  place-items: center;
  touch-action: manipulation;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.home-avatar:hover {
  box-shadow: 0 24px 58px rgba(28, 26, 22, 0.23);
  transform: scale(1.035);
}

.home-avatar:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 68%, #fff);
  outline-offset: 5px;
}

.home-avatar::after {
  content: none;
}

.home-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-avatar-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--ink);
  background: transparent;
}

.home-avatar-dialog[open] {
  display: grid;
  place-items: center;
}

.home-avatar-dialog::backdrop {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
}

.home-avatar-dialog-shell {
  position: relative;
  width: min(320px, calc(100vw - 48px), calc(100dvh - 48px));
  aspect-ratio: 1;
  opacity: 0;
  transform: scale(0.48);
  transition: opacity 240ms ease, transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-avatar-dialog.is-visible .home-avatar-dialog-shell {
  opacity: 1;
  transform: scale(1);
}

.home-avatar-expanded {
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 6px solid var(--surface);
  border-radius: 50%;
  background: #dce4e5;
  box-shadow: 0 34px 90px rgba(28, 26, 22, 0.28);
  cursor: zoom-out;
}

.home-avatar-expanded img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-avatar-expanded:focus-visible,
.home-avatar-dialog-close:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, #fff);
  outline-offset: 5px;
}

.home-avatar-dialog-close {
  position: absolute;
  z-index: 2;
  top: 5px;
  right: 5px;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 17, 17, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.home-avatar-dialog-close:hover {
  background: rgba(17, 17, 17, 0.9);
}

.home-hero h1 {
  max-width: 100%;
  margin: 0;
  font-family: var(--font-hero-serif);
  font-size: clamp(3.8rem, 6vw, 5.35rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.08;
  white-space: nowrap;
}

.home-role {
  margin: 58px 0 32px;
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
  font-family: var(--font-hero-sans);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.home-intro {
  max-width: 620px;
  margin: 0;
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
  font-family: var(--font-hero-sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.72;
  text-align: center;
  white-space: pre-line;
}

.home-more {
  display: inline-flex;
  min-height: 56px;
  margin-top: 60px;
  padding: 0 28px;
  align-items: center;
  gap: 16px;
  border-radius: 999px;
  color: var(--surface);
  background: var(--ink);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-more [aria-hidden="true"] {
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.home-more:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.home-scroll-note {
  position: absolute;
  z-index: 3;
  bottom: 18px;
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
  transform: translateX(-50%);
}

.home-scroll-note i {
  position: relative;
  width: 1px;
  height: 28px;
  overflow: hidden;
  background: var(--line-strong);
}

.home-scroll-note i::after {
  position: absolute;
  top: -50%;
  left: 0;
  width: 1px;
  height: 50%;
  background: var(--ink);
  animation: scroll-line 1.8s ease-in-out infinite;
  content: "";
}

@keyframes scroll-line {
  0% { transform: translateY(0); }
  100% { transform: translateY(300%); }
}

.home-section {
  min-height: 88svh;
  display: flex;
  align-items: center;
}

.home-section > .shell {
  width: min(calc(100% - 40px), 1120px);
}

.home-section-heading {
  display: grid;
  margin-bottom: 42px;
  align-items: start;
  grid-template-columns: 68px 1fr;
  gap: 24px;
}

.home-section-index {
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  place-items: center;
}

.home-section-heading .eyebrow {
  margin-bottom: 9px;
}

.home-section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.home-section-heading p:last-child {
  max-width: 580px;
  margin: 15px 0 0;
  color: var(--muted);
}

.about-section {
  padding-block: clamp(96px, 10vw, 150px);
}

.about-section-heading {
  max-width: 820px;
  margin: 0 auto clamp(46px, 6vw, 68px);
  text-align: center;
}

.about-section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.about-section-heading p {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--font-hero-sans);
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  letter-spacing: 0.01em;
}

.about-section .about-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.72fr);
  gap: 20px;
}

.about-main,
.about-side {
  display: grid;
  min-width: 0;
  gap: 20px;
}

.about-section .story-card,
.career-card,
.about-section .facts-card,
.hobbies-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.about-section .story-card {
  min-height: 300px;
  padding: clamp(32px, 4vw, 46px);
}

.about-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.about-story-copy {
  max-width: 690px;
  margin-top: clamp(42px, 5vw, 58px);
}

.about-story-copy p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-hero-sans);
  font-size: clamp(1.18rem, 1.6vw, 1.375rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.5;
}

.about-story-copy p + p {
  margin-top: 14px;
}

.career-card,
.about-section .facts-card,
.hobbies-card {
  padding: clamp(28px, 3vw, 36px);
}

.about-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.about-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft);
}

.career-card .career-line {
  margin-top: 22px;
}

.about-section .facts-list {
  margin-top: 18px;
}

.about-section .fact-row {
  padding: 19px 0;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
}

.about-section .fact-row dt {
  font-family: var(--font-hero-sans);
  font-size: 13px;
}

.about-section .fact-row dd {
  font-family: var(--font-hero-sans);
  font-size: 15px;
  font-weight: 600;
}

.about-section .interest-cloud {
  margin-top: 30px;
  gap: 10px;
}

.about-section .interest-cloud span {
  padding: 9px 13px;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: var(--font-hero-sans);
  font-size: 13px;
  font-weight: 500;
}

.career-line {
  display: grid;
  margin-top: 36px;
  border-top: 1px solid var(--line);
}

.career-line > div {
  display: grid;
  padding: 18px 0;
  grid-template-columns: 100px 1fr 1.6fr;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.career-line time,
.career-line span {
  color: var(--muted);
  font-size: 12px;
}

.career-line strong {
  font-size: 14px;
}

.interest-cloud {
  display: flex;
  margin-top: 22px;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-cloud span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.portal-card {
  position: relative;
  display: flex;
  min-height: 410px;
  padding: 30px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.portal-card::before {
  position: absolute;
  right: -55px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--portal-accent, var(--accent));
  content: "";
  opacity: 0.16;
}

.portal-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
}

.portal-card > * {
  position: relative;
  z-index: 1;
}

.portal-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.portal-card h3 {
  margin: 52px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.06em;
}

.portal-card p {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
}

.portal-card b {
  margin-top: auto;
  font-size: 13px;
}

.portal-photo { --portal-accent: var(--orange); }
.portal-code { --portal-accent: var(--green); }

@media (max-width: 900px) {
  .home-nav-wrap {
    top: 10px;
    left: 10px;
  }

  .home-menu-toggle {
    display: grid;
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .home-nav {
    position: absolute;
    top: 54px;
    left: 0;
    display: none;
    width: min(290px, calc(100vw - 20px));
    padding: 9px;
    align-items: stretch;
    flex-direction: column;
    border-radius: 18px;
  }

  .home-nav.is-open {
    display: flex;
  }

  .home-language {
    border-top: 1px solid var(--line);
    margin-top: 5px;
    padding-top: 9px;
  }

  .home-section {
    min-height: auto;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-card {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .home-theme-toggle {
    top: 10px;
    right: 10px;
  }

  .home-github-link {
    top: 10px;
    right: 66px;
  }

  .home-hero {
    min-height: 100svh;
    padding-inline: 22px;
  }

  .home-avatar {
    width: 136px;
    height: 136px;
    margin-bottom: 38px;
  }

  .home-status {
    min-height: 38px;
    margin-bottom: 34px;
    padding: 8px 17px;
    font-size: 13px;
  }

  .home-role {
    margin: 34px 0 20px;
  }

  .home-more {
    min-height: 52px;
    margin-top: 38px;
    padding-inline: 24px;
  }

  .home-hero h1 {
    font-size: clamp(3rem, 12vw, 4rem);
  }

  .home-section > .shell {
    width: calc(100% - 28px);
  }

  .home-section-heading {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .home-section-index {
    width: 40px;
    height: 40px;
  }

  .career-line > div {
    grid-template-columns: 76px 1fr;
  }

  .career-line span {
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .nav-shell {
    border-radius: 28px;
  }

  .menu-toggle {
    display: grid;
  }

  .primary-nav {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
  }

  .language-select {
    display: none;
  }

  .hero,
  .section-heading,
  .about-grid,
  .subscribe-panel,
  .featured-post,
  .github-hero-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
  }

  .hero-visual {
    min-height: 480px;
  }

  .portrait-card {
    right: 8%;
    left: 15%;
    width: auto;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card:nth-child(3n) {
    grid-column: span 12;
  }

  .album-card,
  .album-card:first-child {
    min-height: 0;
    grid-column: span 12;
    grid-template-columns: 1fr;
  }

  .album-card:first-child .album-cover {
    min-height: 430px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .shell,
  .article-shell {
    width: min(calc(100% - 28px), var(--content));
  }

  .site-header {
    top: 10px;
  }

  .nav-shell {
    width: calc(100% - 20px);
    min-height: 56px;
    padding: 6px 7px 6px 14px;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .hero {
    min-height: auto;
    padding-top: 136px;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 20vw, 5.5rem);
  }

  .hero-visual {
    min-height: 410px;
  }

  .portrait-card {
    inset: 20px 5% auto 14%;
  }

  .orbit-note {
    bottom: 2px;
  }

  .section {
    padding-block: 82px;
  }

  .section-heading {
    margin-bottom: 32px;
    gap: 18px;
  }

  .story-footer {
    flex-direction: column;
    gap: 8px;
  }

  .post-grid,
  .repo-grid {
    grid-template-columns: 1fr;
  }

  .blog-tools {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .photo-tile,
  .photo-tile[data-ratio="portrait"],
  .photo-tile[data-ratio="square"] {
    min-height: 390px;
    grid-column: auto;
  }

  .photo-caption {
    opacity: 1;
    transform: none;
  }

  .subscribe-panel {
    gap: 34px;
  }

  .subscribe-form {
    border-radius: 18px;
    flex-direction: column;
  }

  .subscribe-form input {
    min-height: 46px;
  }

  .stat-grid,
  .language-legend {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-row {
    grid-template-columns: 60px 1fr;
  }

  .timeline-row span {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .about-section .about-grid {
    grid-template-columns: 1fr;
  }

  .about-section-heading {
    margin-bottom: 48px;
  }

  .about-section .story-card {
    min-height: auto;
  }

  .about-story-copy {
    margin-top: 54px;
  }
}

@media (max-width: 640px) {
  .about-section {
    padding-block: 88px;
  }

  .about-section-heading {
    margin-bottom: 38px;
  }

  .about-section-heading h2 {
    font-size: 3rem;
  }

  .about-section-heading p {
    max-width: 290px;
    margin: 18px auto 0;
    line-height: 1.65;
  }

  .about-section .about-grid,
  .about-main,
  .about-side {
    gap: 14px;
  }

  .about-section .story-card,
  .career-card,
  .about-section .facts-card,
  .hobbies-card {
    padding: 28px 24px;
    border-radius: 26px;
  }

  .about-story-copy {
    margin-top: 46px;
  }

  .career-card .career-line {
    margin-top: 20px;
  }

  .career-card .career-line > div {
    grid-template-columns: 72px 1fr;
    gap: 8px 14px;
  }

  .career-card .career-line span {
    grid-column: 2;
  }

  .about-section .fact-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
