﻿:root {
  --text-main: #1d1d1f;
  --text-sub: #424245;
  --text-muted: #86868b;
  --primary: #0066cc;
  --primary-focus: #0071e3;
  --border: #e0e0e0;
  --surface: #ffffff;
  --parchment: #f5f5f7;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --container: 1200px;
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html {
  background: #0d0a14;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: transparent;
  line-height: 1.47;
  font-size: 17px;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; }

:where(a, button):focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 2px;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 80px 0;
  scroll-margin-top: 88px;
}

.section-glass {
  margin-top: 0;
  border: none;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  padding: 80px 0;
}

.section:nth-child(even) {
  background: rgba(245, 245, 247, 0.72);
  backdrop-filter: blur(8px);
}

.section:nth-child(odd) {
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(8px);
}

.section .container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

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

.section-head-ppt {
  scroll-margin-top: 88px;
}

.section-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.section-text {
  margin: 0;
  color: var(--text-sub);
  max-width: 66ch;
  font-size: 1.06rem;
  line-height: 1.47;
}

.projects-intro { margin-bottom: 26px; }

.projects-stats {
  display: flex;
  gap: 40px;
  margin-top: 18px;
  margin-bottom: 6px;
}

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

.projects-stat strong {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(2rem, 2.8vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.projects-stat span {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.container > .grid,
.container > .roadmap,
.container > .contact-card { margin-top: 24px; }

.section-skills .grid { margin-top: 30px; }
.section-ppt .grid { margin-top: 22px; }
.section-projects .grid { margin-top: 22px; }

.section-head-ppt {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 280px);
  gap: 28px;
  align-items: end;
}

.ppt-head-copy .section-title {
  margin-bottom: 14px;
}

.ppt-section-kicker {
  margin: 0 0 14px;
  color: #6e6e73;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ppt-head-stat {
  min-height: 176px;
  padding: 18px 22px;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(245, 247, 251, 0.94) 60%, rgba(239, 242, 247, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 18px 36px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ppt-head-stat strong {
  display: block;
  font-family: "Bodoni Moda", "Cormorant Garamond", "Didot", "Baskerville", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(7.6rem, 13.4vw, 11.6rem);
  line-height: 0.74;
  letter-spacing: -0.035em;
  color: #181318;
  transform: translateX(-2px) translateY(-2px);
  text-rendering: geometricPrecision;
  font-feature-settings: "lnum", "kern", "onum";
  font-variation-settings: "opsz" 96, "wght" 500;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.section-showcase,
.section-about,
.section-skills,
.section-ppt,
.section-projects,
.section-roadmap,
.section-contact {
  content-visibility: auto;
  contain-intrinsic-size: 1px 820px;
}

/* Keep the long showcase boundary stable while Lenis is scrolling through it. */
.section-ppt,
.section-projects {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

/* Keep the short sections around the PPT boundary rendered while Lenis is moving. */
.section-about,
.section-skills {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  text-decoration: none;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1d1d1f;
}

.brand-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.brand:hover {
  color: #000;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #2d2d31;
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 10px;
  padding: 6px 2px;
}

.nav-links a:hover { color: #000; }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.menu-toggle:active {
  transform: scale(0.95);
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: #111;
  border-radius: 999px;
}

.hero {
  padding-top: 54px;
  padding-bottom: 12px;
}

.hero-copy {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero-kicker {
  margin: 0;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero h1 {
  margin: 16px auto 12px;
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  max-width: 10ch;
}

.hero-subtitle {
  margin: 0 auto;
  font-size: clamp(1.12rem, 2.1vw, 1.4rem);
  color: var(--text-sub);
  max-width: 26ch;
}

.hero-intro {
  margin: 18px auto 0;
  color: var(--text-muted);
  max-width: 44ch;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 11px 22px;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover { /* intentional no-op: Apple buttons don't lift on hover */ }

.btn:active { transform: scale(0.95); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border-color: var(--border);
  color: #1d1d1f;
}

.btn-small {
  margin-top: auto;
  width: fit-content;
  background: rgba(0, 102, 204, 0.06);
  border-color: rgba(0, 102, 204, 0.16);
  color: var(--primary);
  align-self: flex-start;
}

.ppt-card .btn-small {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(15, 23, 42, 0.08);
  color: #111214;
  background-color: #ffffff;
  forced-color-adjust: none;
  -webkit-text-fill-color: #111214;
}

.ppt-card .btn-small:hover {
  border-color: rgba(15, 23, 42, 0.14);
}

.ppt-card-featured .btn-small {
  background: rgba(255, 255, 255, 0.94);
}

.section-showcase {
  background: transparent;
  border-top: 0;
  border-bottom: 0;
  padding: 56px 0;
  margin: 0 0 10px;
}

.showcase-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(145deg, #f7f9fd, #edf3fb);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
  padding: clamp(24px, 4vw, 44px);
}

.showcase-copy {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.showcase-kicker {
  margin: 0 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
}

.showcase-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.showcase-copy p {
  margin: 0 auto 18px;
  max-width: 42ch;
  color: var(--text-sub);
}

.showcase-image {
  display: block;
  width: min(100%, 700px);
  height: auto;
  max-height: none;
  margin: 0 auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: #f3f6fb;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.grid {
  display: grid;
  gap: 18px;
}

.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.card h3 {
  margin: 0 0 12px;
  line-height: 1.3;
}

.card p {
  margin: 0;
  color: var(--text-sub);
  line-height: 1.7;
}

.project-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  gap: 10px;
  contain: layout paint;
}

.project-cover {
  width: 100%;
  height: clamp(300px, 24vw, 380px);
  max-height: 380px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
  background: #f3f6fb;
  object-fit: cover;
  object-position: top center;
}

.project-cover-hardware {
  object-position: top 45% left 20%;
}

.project-cover-diskpulse {
  object-position: top 38% left 32%;
}

.project-cover-seiya {
  object-position: top 12% center;
}

.project-cover-nutriflow {
  object-position: top 10% center;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1);
}

.card-actions {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-actions .btn-small {
  margin-top: 0;
  flex-shrink: 0;
}

.like-button {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  padding: 9px 12px;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.7);
  color: #5a5a61;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  user-select: none;
  transition:
    transform 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.like-button:hover {
  color: #2a2a2e;
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.9);
}

.like-button:active {
  transform: scale(0.95);
}

.like-button[aria-pressed="true"] {
  color: #1d1d1f;
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(245, 245, 247, 0.95);
}

.like-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.like-button__icon {
  font-size: 0.92rem;
  line-height: 1;
}

.like-button__count {
  min-width: 1ch;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.ppt-grid {
  gap: 20px;
}

.ppt-discovery {
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px);
}

.ppt-search {
  display: grid;
  gap: 8px;
}

.ppt-search-label {
  color: #5f636b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ppt-search input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  color: #17181b;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ppt-search input:focus-visible {
  border-color: rgba(0, 113, 227, 0.62);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.ppt-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ppt-category {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #555b64;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.ppt-category:hover {
  border-color: rgba(0, 113, 227, 0.28);
  color: #075d9e;
}

.ppt-category.is-active {
  border-color: #087bd3;
  background: #087bd3;
  color: #fff;
}

.ppt-category:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.18);
  outline-offset: 2px;
}

.ppt-results {
  margin: 12px 2px 0;
  color: #6e737b;
  font-size: 0.82rem;
}

.ppt-empty {
  margin: 24px 0 0;
  padding: 24px;
  border: 1px dashed rgba(15, 23, 42, 0.16);
  border-radius: 20px;
  color: #666b73;
  text-align: center;
  background: rgba(255, 255, 255, 0.62);
}

.ppt-card[hidden],
.ppt-empty[hidden] {
  display: none !important;
}

.ppt-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.ppt-toggle-btn {
  min-width: 220px;
  padding-inline: 22px;
  border-radius: 999px;
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.78);
  color: #111214;
}

.ppt-toggle-btn:hover {
  border-color: rgba(15, 23, 42, 0.12);
}

.ppt-overflow-grid {
  margin-top: 20px;
}

.ppt-overflow-grid[hidden] {
  display: none !important;
}

.ppt-overflow-grid.is-filtering {
  max-height: none;
  overflow: visible;
  contain: none;
}

.ppt-card {
  position: relative;
  justify-content: space-between;
  min-height: 280px;
  padding: 28px;
  border-radius: 28px;
  border-color: rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(247, 248, 251, 0.9) 48%, rgba(240, 243, 247, 0.92) 100%);
  background-color: #f7f8fb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 18px 40px rgba(15, 23, 42, 0.06);
  gap: 16px;
  overflow: hidden;
  forced-color-adjust: none;
}

.ppt-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.2));
  pointer-events: none;
}

.ppt-card:hover {
  border-color: rgba(15, 23, 42, 0.14);
}

.ppt-card-featured {
  grid-column: 1 / -1;
  background-color: #f7f8fb;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 251, 0.93)),
    radial-gradient(circle at right top, rgba(0, 113, 227, 0.06), transparent 36%);
}

.ppt-card-featured .ppt-card-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 420px);
  gap: 28px;
}

.ppt-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(220px, 292px);
  gap: 24px;
  align-items: end;
}

.ppt-card-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ppt-card-top p {
  margin: 0;
  max-width: 34ch;
}

.ppt-kicker {
  color: #7b7b82;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ppt-card h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.18;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

.ppt-card-featured h3 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  max-width: 10ch;
}

.ppt-card code {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0f3f8;
  border: 1px solid #dfe5ee;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

.ppt-card-placeholder {
  background:
    linear-gradient(180deg, rgba(0, 113, 227, 0.04), rgba(255, 255, 255, 0.96));
}

.ppt-cover {
  margin: 0;
  align-self: end;
  justify-self: end;
  width: min(100%, 292px);
  aspect-ratio: 292 / 210;
  overflow: hidden;
}

.ppt-cover img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow:
    0 24px 44px rgba(15, 23, 42, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  object-fit: cover;
  object-position: top center;
  background: #f3f5f8;
}

.ppt-card-featured .ppt-cover {
  width: min(100%, 400px);
  aspect-ratio: 400 / 260;
}

.ppt-card-featured .ppt-cover img {
  max-height: none;
}

.tags {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.tags span {
  font-size: 0.72rem;
  color: #6e6e73;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}

.roadmap {
  margin: 0;
  padding-left: 20px;
  color: var(--text-sub);
  display: grid;
  gap: 12px;
  line-height: 1.75;
}

.contact-card a {
  color: #005bb5;
  text-decoration: none;
  word-break: break-word;
}

.contact-card a:hover { text-decoration: underline; }

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  color: #667085;
  font-size: 0.92rem;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top.show:active {
  transform: scale(0.95);
}

:root {
  --surface-soft: #f8f8fa;
  --surface-alt: #eef2f7;
  --surface-deep: #0f1720;
  --ink-strong: #111214;
  --ink-soft: #51545c;
  --line-soft: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
}

html {
  background: #0d0a14;
}

body {
  background: transparent;
}

.site-header {
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: rgba(17, 18, 20, 0.06);
}

.nav-links a {
  color: #3a3b40;
}

.section {
  padding: 78px 0;
}

.section-title {
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 3.4vw, 3.25rem);
  letter-spacing: -0.05em;
}

.section-text {
  color: var(--ink-soft);
}

.section-glass {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 80px 0;
}

.hero {
  padding-top: 56px;
  padding-bottom: 24px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy {
  text-align: left;
  max-width: none;
  margin: 0;
  padding: clamp(30px, 4vw, 48px);
  border-radius: 34px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 252, 0.94)),
    #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 22px 46px rgba(15, 23, 42, 0.05);
}

.hero-kicker {
  color: #6b7280;
  letter-spacing: 0.18em;
}

.hero h1 {
  margin: 18px 0 16px;
  max-width: 8.2em;
  font-size: clamp(3.3rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.hero-subtitle {
  margin: 0;
  max-width: 22ch;
  color: var(--ink-strong);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.35;
}

.hero-intro {
  margin: 20px 0 0;
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 30px;
}

.hero-meta {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-meta-item {
  padding: 16px 18px 15px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.hero-meta-label {
  display: block;
  margin-bottom: 8px;
  color: #7a7f87;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-meta-item strong {
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.05em;
}

.hero-aside {
  display: grid;
  gap: 16px;
}

.hero-panel {
  border-radius: 30px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  padding: 26px 24px;
}

.hero-panel-featured {
  color: #ffffff;
  background:
    linear-gradient(160deg, rgba(18, 26, 38, 0.98), rgba(28, 39, 57, 0.96)),
    #101827;
  box-shadow: 0 28px 48px rgba(15, 23, 42, 0.16);
}

.hero-panel-list {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 251, 0.94)),
    #ffffff;
}

.hero-panel-kicker {
  margin: 0 0 14px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-panel-featured .hero-panel-kicker {
  color: rgba(255, 255, 255, 0.68);
}

.hero-panel-featured h2,
.hero-panel-list h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-panel-featured p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.hero-focus-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.hero-focus-list li {
  padding: 13px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--ink-soft);
}

.hero-focus-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.section-showcase {
  padding-top: 36px;
}

.showcase-inner {
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 28px;
  border: 0;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(19, 25, 37, 0.98), rgba(33, 43, 60, 0.97)),
    #141b26;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
}

.showcase-copy {
  text-align: left;
  margin: 0;
}

.showcase-kicker {
  color: rgba(255, 255, 255, 0.62);
}

.showcase-copy h2 {
  color: #ffffff;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  letter-spacing: -0.06em;
}

.showcase-copy p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
}

.showcase-points {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.showcase-points li {
  position: relative;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.showcase-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #6fb2ff;
}

.showcase-image {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow:
    0 28px 50px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 22px;
  align-items: start;
}

.about-note {
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(248, 250, 253, 0.98), rgba(239, 243, 249, 0.94)),
    #eff3f9;
}

.about-note-kicker {
  margin: 0 0 14px;
  color: #697282;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.about-note-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  display: grid;
  gap: 10px;
}

.section-skills .card:nth-child(1) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.94));
}

.section-skills .card:nth-child(2) {
  background: linear-gradient(180deg, rgba(251, 247, 239, 0.96), rgba(247, 241, 230, 0.94));
}

.section-skills .card:nth-child(3) {
  background: linear-gradient(180deg, rgba(245, 249, 255, 0.96), rgba(236, 243, 252, 0.94));
}

.section-skills .card:nth-child(4) {
  background: linear-gradient(180deg, rgba(247, 250, 245, 0.96), rgba(240, 246, 237, 0.94));
}

.card {
  border-color: var(--line-soft);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.card h3 {
  letter-spacing: -0.03em;
}

.project-card {
  border-radius: 26px;
  padding: 20px;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 253, 0.95)),
    #ffffff;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.1);
}

.project-cover {
  border-radius: 18px;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.ppt-card,
.ppt-card-featured {
  border-radius: 30px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 251, 0.95)),
    #ffffff;
}

.ppt-card-featured {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(240, 245, 250, 0.95)),
    #ffffff;
}

.ppt-card-top h3 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.ppt-card-featured .ppt-card-top h3 {
  font-size: clamp(2.3rem, 3.8vw, 3.3rem);
}

.ppt-cover {
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(247, 249, 253, 0.96), rgba(237, 242, 248, 0.92)),
    #eef3f8;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.08);
}

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

.tags span {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.75);
  color: #61656e;
}

.section-projects .grid,
.section-ppt .grid {
  gap: 20px;
}

.roadmap {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  counter-reset: roadmap;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.roadmap li {
  counter-increment: roadmap;
  min-height: 118px;
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 250, 0.95)),
    #ffffff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-weight: 500;
  color: var(--ink-strong);
}

.roadmap li::before {
  content: counter(roadmap);
  color: var(--portfolio-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.section-update .contact-card,
.section-contact .contact-card {
  border-radius: 24px;
  border-color: rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 252, 0.95)),
    #ffffff;
}

.section-contact a {
  color: var(--primary);
  text-decoration: none;
}

.section-contact a:hover {
  text-decoration: underline;
}

.site-footer {
  padding: 26px 0 36px;
  color: #7a7f87;
}

@media (max-width: 960px) {
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-2 { grid-template-columns: 1fr; }

  .hero-shell,
  .showcase-inner,
  .about-grid,
  .section-head-ppt,
  .roadmap {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 11ch;
  }

  .hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .showcase-copy {
    max-width: none;
  }

  .ppt-card-featured .ppt-card-layout {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  }
}

@media (max-width: 760px), (pointer: coarse) {
  .section-showcase,
  .section-about,
  .section-skills,
  .section-ppt,
  .section-projects,
  .section-roadmap,
  .section-contact {
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }

  .project-card,
  .ppt-card,
  .ppt-card-featured {
    contain: none;
  }

  .menu-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    right: 1rem;
    top: 64px;
    width: min(260px, calc(100% - 2rem));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    align-items: flex-start;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    width: 100%;
    padding: 10px 8px;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: rgba(0, 113, 227, 0.07);
    color: #000;
  }

  .cards-3,
  .cards-4,
  .cards-2 { grid-template-columns: 1fr; }

  .hero {
    padding-top: 34px;
    padding-bottom: 8px;
  }

  .hero-copy,
  .hero-panel {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 11vw, 4rem);
    line-height: 0.98;
    max-width: none;
  }

  .hero-subtitle,
  .hero-intro {
    max-width: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .project-cover {
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
    background: transparent;
  }

  .ppt-head-stat {
    min-height: auto;
    padding: 20px 18px 18px;
    background: #f7f8fb;
    box-shadow: none;
  }

  .ppt-head-stat strong {
    transform: none;
    text-rendering: auto;
  }

  .ppt-card,
  .ppt-card-featured {
    padding: 22px 18px 20px;
    min-height: auto;
    background: #f7f8fb;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.94),
      0 8px 18px rgba(15, 23, 42, 0.04);
  }

  .ppt-card h3,
  .ppt-card-featured h3,
  .ppt-card-top p {
    max-width: none;
  }

  .ppt-card-featured h3 {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
    line-height: 1.08;
  }

  .ppt-card-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ppt-card-featured .ppt-card-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ppt-actions {
    justify-content: stretch;
  }

  .ppt-toggle-btn {
    width: 100%;
  }

  .ppt-card .btn-small,
  .ppt-card-featured .btn-small {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #111214;
    -webkit-text-fill-color: #111214;
  }

  .card-actions {
    align-items: stretch;
  }

  .like-button {
    min-height: 42px;
  }

  .ppt-cover {
    display: none;
  }

  .tags span {
    backdrop-filter: none;
  }

  .section { padding: 54px 0; }

  .section-glass {
    padding: 48px 0;
  }

  .section-showcase { padding: 44px 0; }

  .showcase-inner {
    border-radius: 22px;
    padding: 20px 14px;
  }

  .showcase-copy h2,
  .section-title {
    letter-spacing: -0.04em;
  }

  .roadmap {
    margin-top: 22px;
  }

  .roadmap li {
    min-height: auto;
  }
}

/* Homepage redesign v2: Airtable structure + Apple restraint */
:root {
  --font-serif-ui: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Baskerville", "Times New Roman", serif;
  --page-bg: #f5f5f7;
  --page-panel: #ffffff;
  --page-panel-soft: #f8fafc;
  --page-panel-soft-2: #f3f6fb;
  --page-ink: #1d1d1f;
  --page-ink-soft: #6e6e73;
  --page-line: rgba(24, 29, 38, 0.08);
  --page-line-strong: rgba(24, 29, 38, 0.14);
  --page-shadow: 0 18px 42px rgba(16, 24, 40, 0.06);
}

html {
  background: #0d0a14;
}

body {
  font-family: var(--font-serif-ui);
  background: transparent;
  color: var(--page-ink);
}

body::before {
  opacity: 0;
}

body::after {
  opacity: 0;
}

button,
input,
select,
textarea {
  font-family: var(--font-serif-ui);
}

.container {
  width: min(100% - 2rem, 1280px);
}

.site-header {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(24, 29, 38, 0.08);
}

body {
  background: transparent;
}

body::before {
  background: transparent;
  opacity: 0;
}

body::after {
  opacity: 0;
}

.section,
.section:nth-child(even),
.section:nth-child(odd) {
  background: transparent;
  backdrop-filter: none;
}

.hero.section.container {
  background: transparent;
}

.section-about > .container,
.section-skills > .container,
.section-ppt > .container,
.section-projects > .container,
.section-update > .container,
.site-footer .container {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.brand,
.nav-links a {
  font-family: var(--font-serif-ui);
}

.nav-links {
  gap: 20px;
}

.nav-links a {
  color: #383b43;
}

.section {
  padding: 80px 0;
}

.section-glass {
  margin-top: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 80px 0;
}

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

.section-head-compact {
  margin-bottom: 16px;
}

.section-title {
  margin: 0 0 14px;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Cormorant Garamond", "Bodoni Moda", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 3.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: #171318;
  text-wrap: balance;
}

.section-text {
  max-width: 60ch;
  color: var(--page-ink-soft);
  font-size: 1.03rem;
  line-height: 1.8;
}

.hero {
  padding-top: 34px;
  padding-bottom: 24px;
}

.hero-mosaic {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

.hero-card {
  border: 1px solid var(--page-line);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    var(--page-panel);
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.05);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.hero-card-intro {
  grid-column: 1 / -1;
  min-height: 0;
  justify-content: stretch;
  gap: 0;
  padding: 10px;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    linear-gradient(180deg, rgba(245, 248, 252, 0.08), rgba(238, 244, 250, 0.03));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 4px 12px rgba(125, 145, 178, 0.018);
}

.hero-card-project {
  grid-column: 1 / 2;
  grid-row: 2;
  display: grid;
  background:
    linear-gradient(180deg, rgba(247, 249, 253, 0.98), rgba(238, 243, 249, 0.96)),
    var(--page-panel-soft-2);
  grid-template-columns: minmax(0, 0.7fr) minmax(280px, 1fr);
  align-items: start;
  column-gap: 24px;
  min-height: 0;
}

.hero-card-project .hero-card-kicker,
.hero-card-project .hero-card-subtitle,
.hero-card-project h2,
.hero-card-project p:not(.hero-card-kicker):not(.hero-card-subtitle),
.hero-card-project .hero-card-link {
  grid-column: 1;
}

.hero-card-stats {
  grid-column: 2 / 3;
  grid-row: 2;
  align-self: start;
  justify-content: flex-start;
  min-height: auto;
  gap: 18px;
}

.hero-kicker,
.hero-card-kicker,
.hero-stat-label {
  margin: 0;
  color: #727988;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.btn {
  font-family: var(--font-serif-ui);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(24, 29, 38, 0.12);
  color: #1d1d1f;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(24, 29, 38, 0.1);
  color: #3f4652;
}

.btn:hover,
.btn:focus-visible {
  transform: none;
  box-shadow: none;
}

.btn:hover {
  background: rgba(246, 248, 252, 0.98);
  border-color: rgba(0, 102, 204, 0.18);
  color: #153d6f;
}

.btn:active {
  transform: none;
  background: rgba(239, 244, 250, 0.98);
  border-color: rgba(0, 102, 204, 0.22);
  color: #12365f;
}

.btn:focus-visible {
  outline: 0;
  border-color: rgba(0, 102, 204, 0.32);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

.btn-small {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(24, 29, 38, 0.12);
  color: #1d1d1f;
  box-shadow: none;
}

.hero-card h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Cormorant Garamond", "Bodoni Moda", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 500;
  font-size: clamp(1.65rem, 2.1vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #181318;
}

.hero-card p {
  margin: 0;
  color: var(--page-ink-soft);
}

.hero-card-image {
  width: 100%;
  max-height: 178px;
  object-fit: cover;
  object-position: top center;
  border-radius: 24px;
  border: 1px solid rgba(24, 29, 38, 0.08);
  background: #f5f7fb;
  box-shadow: 0 14px 26px rgba(16, 24, 40, 0.06);
}

.hero-card-link {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

.hero-focus-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--page-ink-soft);
  display: grid;
  gap: 10px;
}

.hero-focus-list li {
  margin: 0;
}

.hero-stat-card {
  justify-content: flex-end;
  min-height: 142px;
}

.hero-stat-card strong {
  font-family: var(--font-serif-ui);
  font-size: clamp(1.9rem, 2.6vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-intro-visual {
  position: relative;
  width: 100%;
  border-radius: 30px;
  overflow: hidden;
}

.hero-intro-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 30px;
  margin: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 1px rgba(255, 255, 255, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.42);
}

.hero-image-link {
  position: absolute;
  left: 4.3%;
  width: 91.4%;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-serif-ui);
  font-size: 0.92rem;
  line-height: 1;
  color: rgba(41, 48, 60, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.28)),
    linear-gradient(180deg, rgba(246, 249, 253, 0.26), rgba(238, 243, 249, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18),
    0 5px 12px rgba(130, 145, 175, 0.03);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  z-index: 2;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.hero-image-link-projects {
  top: 80.2%;
  height: 5.75%;
}

.hero-image-link-ppt {
  top: 87.75%;
  height: 5.75%;
}

.hero-image-link:hover,
.hero-image-link:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(250, 252, 255, 0.42)),
    linear-gradient(180deg, rgba(246, 249, 253, 0.34), rgba(238, 243, 249, 0.22));
  border-color: rgba(203, 222, 249, 0.58);
  color: #153d6f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22),
    0 6px 14px rgba(0, 102, 204, 0.04);
}

.hero-image-link:active {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.56), rgba(239, 244, 250, 0.34)),
    linear-gradient(180deg, rgba(242, 247, 252, 0.24), rgba(235, 241, 248, 0.16));
  border-color: rgba(194, 214, 243, 0.5);
  color: #12365f;
}

.hero-image-link:focus-visible {
  outline: 0;
}

.hero-card-project .hero-card-image {
  grid-column: 2;
  grid-row: 1 / span 5;
  max-height: none;
  height: auto;
  object-fit: contain;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 126px;
  padding: 18px 18px 16px;
  border-radius: 24px;
  border: 1px solid rgba(24, 29, 38, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 251, 0.92)),
    #ffffff;
  gap: 8px;
}

.hero-stat-item strong {
  font-family: var(--font-serif-ui);
  font-size: clamp(2.7rem, 4vw, 3.8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.hero-stat-title,
.hero-stat-subtitle {
  margin: 0;
}

.hero-stat-title {
  color: #1d1d1f;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.hero-stat-subtitle {
  color: #6e7481;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card-subtitle {
  color: #66707d;
  font-size: 0.92rem;
}

.section-showcase {
  display: none;
}

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

.about-card {
  border-radius: 24px;
  border-color: var(--page-line);
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 252, 0.96)),
    var(--page-panel);
}

.about-card-main {
  background:
    linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(237, 242, 248, 0.96)),
    var(--page-panel-soft-2);
}

.about-card:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(250, 243, 228, 0.94)),
    var(--page-panel);
}

.about-card:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(245, 252, 248, 0.96), rgba(232, 245, 238, 0.92)),
    var(--page-panel);
}

.about-card h3 {
  margin: 0 0 12px;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Cormorant Garamond", "Bodoni Moda", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: #181318;
}

.about-card p {
  margin: 0;
  color: var(--page-ink-soft);
}

.section-skills .grid {
  margin-top: 24px;
  gap: 18px;
}

.section-skills .card {
  min-height: 180px;
  border-radius: 24px;
  border-color: var(--page-line);
  padding: 28px 24px;
  box-shadow: none;
}

.section-skills .card h3 {
  font-size: 1.45rem;
  line-height: 1.15;
}

.section-skills .card p {
  color: var(--page-ink-soft);
  font-size: 1rem;
}

.section-ppt .grid,
.section-projects .grid {
  gap: 18px;
}

.ppt-head-stat {
  min-height: 148px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.94)),
    var(--page-panel);
  box-shadow: none;
}

.ppt-head-stat strong {
  font-family: "Bodoni Moda", "Cormorant Garamond", "Didot", "Baskerville", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(5.2rem, 10vw, 8rem);
  line-height: 0.74;
  letter-spacing: -0.03em;
  transform: none;
  font-variation-settings: "opsz" 96, "wght" 500;
}

.project-card,
.ppt-card,
.ppt-card-featured {
  border-radius: 26px;
  border-color: var(--page-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    var(--page-panel);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.05);
  padding: 22px;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.ppt-card:hover {
  border-color: rgba(15, 23, 42, 0.14);
}

.project-poster-grid {
  gap: 20px;
}

.project-card {
  padding: 24px;
  gap: 18px;
}

.project-poster {
  margin: 0;
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(24, 29, 38, 0.08);
  background:
    linear-gradient(180deg, rgba(250, 251, 253, 0.98), rgba(242, 245, 249, 0.95)),
    #f7f9fc;
}

.project-cover {
  display: block;
  width: 100%;
  height: clamp(290px, 24vw, 390px);
  max-height: 390px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: cover;
  object-position: top center;
}

.project-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.project-card h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  line-height: 1.08;
}

.project-card p {
  margin: 0;
  color: #4e5562;
  font-size: 1rem;
  line-height: 1.72;
}

.project-card .tags {
  margin-top: 2px;
}

.project-card .btn-small {
  align-self: flex-start;
}

.project-cover,
.ppt-cover {
  border-radius: 18px;
}

.ppt-card-top h3,
.project-card h3 {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Cormorant Garamond", "Bodoni Moda", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 500;
  letter-spacing: -0.014em;
  color: #181318;
}

.tags span {
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--page-line);
  color: #666d7b;
}

.section-projects .container {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(251, 251, 253, 0.88);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.05);
  padding: 46px clamp(24px, 4vw, 44px) 44px;
  backdrop-filter: blur(10px);
}

.section-update {
  padding-top: 16px;
}

.section-update .contact-card {
  border-radius: 24px;
  border-color: var(--page-line);
  padding: 22px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    var(--page-panel);
}

.site-footer {
  padding: 42px 0 34px;
}

.site-footer .container {
  border-top: 1px solid rgba(24, 29, 38, 0.08);
  padding-top: 18px;
  display: grid;
  gap: 10px;
}

.footer-contact {
  margin: 0;
  color: #717887;
  font-size: 0.95rem;
}

.footer-contact span {
  display: inline-block;
  margin-right: 10px;
  color: #4d5563;
  font-weight: 700;
}

.footer-contact a {
  color: #4d5563;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* Project section: final conflict-free poster card rules */
.section-projects .project-poster-grid {
  gap: 28px;
}

.section-projects .project-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(248, 250, 252, 0.965)),
    var(--page-panel, #ffffff);
  border: 1px solid rgba(24, 29, 38, 0.08);
  border-radius: 26px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.05);
  transform: none;
}

.section-projects .project-card:hover {
  transform: none;
  border-color: rgba(24, 29, 38, 0.12);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.06);
}

.section-projects .project-poster {
  margin: 0;
  padding: 18px;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(24, 29, 38, 0.08);
  background:
    linear-gradient(180deg, rgba(250, 251, 253, 0.98), rgba(242, 245, 249, 0.95)),
    #f7f9fc;
}

.section-projects .project-cover,
.section-projects .project-cover-hardware,
.section-projects .project-cover-diskpulse,
.section-projects .project-cover-seiya,
.section-projects .project-cover-nutriflow,
.section-projects .project-cover-relax-block-puzzle,
.section-projects .project-cover-star-ring {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  object-fit: contain;
  object-position: center top;
}

.section-projects .project-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  flex: 1 1 auto;
}

.section-projects .project-card h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  line-height: 1.08;
}

.section-projects .project-card p {
  margin: 0;
  color: #4e5562;
  font-size: 1rem;
  line-height: 1.72;
}

.section-projects .project-card .tags {
  margin-top: 2px;
}

.section-projects .card-actions {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-projects .project-card .btn-small {
  margin-top: 0;
  align-self: flex-start;
}

/* Final background exposure pass */
.section-about > .container,
.section-skills > .container,
.section-ppt > .container,
.section-projects > .container,
.section-update > .container {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.site-footer .container {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.like-button {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(24, 29, 38, 0.12);
  color: #555d69;
  box-shadow: none;
  transform: none;
}

.like-button:hover,
.like-button:focus-visible {
  background: rgba(246, 248, 252, 0.98);
  border-color: rgba(0, 102, 204, 0.18);
  color: #153d6f;
  transform: none;
  box-shadow: none;
}

.like-button:active {
  background: rgba(239, 244, 250, 0.98);
  border-color: rgba(0, 102, 204, 0.22);
  color: #12365f;
  transform: none;
}

.like-button[aria-pressed="true"] {
  color: #173a69;
  border-color: rgba(0, 102, 204, 0.2);
  background: rgba(241, 246, 252, 0.98);
  box-shadow: none;
}

.like-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

.ppt-card .btn-small,
.ppt-card-featured .btn-small,
.project-card .btn-small {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 29, 38, 0.12);
  color: #1d1d1f;
  box-shadow: none;
}

.ppt-card .btn-small:hover,
.ppt-card-featured .btn-small:hover,
.project-card .btn-small:hover {
  background: rgba(246, 248, 252, 0.98);
  border-color: rgba(0, 102, 204, 0.18);
  color: #153d6f;
  box-shadow: none;
}

.ppt-card .btn-small:active,
.ppt-card-featured .btn-small:active,
.project-card .btn-small:active {
  background: rgba(239, 244, 250, 0.98);
  border-color: rgba(0, 102, 204, 0.22);
  color: #12365f;
}

@media (max-width: 1100px) {
  .hero-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card-intro,
  .hero-card-project {
    grid-column: span 2;
  }

  .hero-card-project {
    grid-row: auto;
  }

  .hero-card-image {
    max-height: 200px;
  }

  .hero-intro-image {
    max-height: 280px;
    object-fit: cover;
  }

  .about-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px), (pointer: coarse) {
  .container {
    width: min(100% - 1rem, 1280px);
  }

  .section {
    padding: 36px 0;
  }

  .section-title {
    font-size: clamp(1.9rem, 9vw, 2.7rem);
    line-height: 1.1;
  }

  .hero-card-stats {
    padding-top: 18px;
  }

  .hero-mosaic {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-card,
  .hero-card-intro,
  .hero-card-project {
    grid-column: auto;
    min-height: auto;
    padding: 22px 18px;
    border-radius: 24px;
  }

  .hero-card-project {
    display: flex;
  }

  .hero-card-image,
  .hero-intro-image {
    max-height: none;
  }

  .hero-card-intro h1 {
    max-width: none;
    font-size: clamp(1.9rem, 8vw, 2.65rem);
  }

  .hero-card-link {
    width: 100%;
  }

  .hero-stats-row {
    grid-template-columns: 1fr;
  }

  .hero-stat-item {
    min-height: auto;
  }

  .about-cards,
  .cards-4,
  .cards-3,
  .cards-2 {
    grid-template-columns: 1fr;
  }

  .section-skills .card,
  .about-card,
  .project-card,
  .ppt-card,
  .ppt-card-featured {
    padding: 22px 18px;
  }

  .project-cover {
    height: auto;
    max-height: none;
  }

  .ppt-head-stat {
    min-height: 120px;
  }

  .site-footer {
    padding-top: 28px;
  }
}

/* ── Optimize: performance & rendering efficiency ── */

/* Content visibility for header & footer (off-screen when scrolled) */
.site-header,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 68px;
}

/* Will-change hints for animated elements — hint at GPU layer */
.hero-card,
.hero-card-intro,
.hero-card-project,
.hero-card-stats {
  will-change: transform, opacity;
}

/* Low-risk portfolio polish: hierarchy, restraint, and touch clarity */
:root {
  --portfolio-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --portfolio-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Cormorant Garamond", "Bodoni Moda", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --portfolio-ink: #18232d;
  --portfolio-muted: #586976;
  --portfolio-line: rgba(24, 50, 67, 0.12);
  --portfolio-line-strong: rgba(24, 50, 67, 0.2);
  --portfolio-accent: #0b6f9f;
  --portfolio-accent-strong: #07577e;
}

body,
button,
input,
select,
textarea,
.brand,
.nav-links a,
.btn {
  font-family: var(--portfolio-font);
}

body {
  color: var(--portfolio-ink);
}

.section-title,
.hero-card h2,
.about-card h3,
.ppt-card-top h3,
.project-card h3 {
  font-family: var(--portfolio-display);
}

.section-text,
.hero-card p,
.about-card p,
.project-card p {
  color: var(--portfolio-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-card,
.project-card,
.ppt-card,
.ppt-card-featured,
.section-projects .project-card {
  border-color: var(--portfolio-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: none;
}

.hero-card-project {
  background: #edf3f6;
}

.hero-card-intro {
  background: rgba(255, 255, 255, 0.58);
}

.hero-intro-visual,
.hero-intro-image,
.hero-card-image,
.project-poster,
.section-projects .project-poster,
.project-cover,
.ppt-cover,
.section-projects .project-cover {
  border-radius: 12px;
  box-shadow: none;
}

.hero-stat-item,
.about-card,
.section-skills .card,
.ppt-head-stat {
  border-radius: 14px;
  box-shadow: none;
}

.hero-image-link {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(24, 50, 67, 0.14);
  box-shadow: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-image-link:hover,
.hero-image-link:focus-visible {
  background: #ffffff;
  border-color: rgba(11, 111, 159, 0.42);
  color: var(--portfolio-accent-strong);
  box-shadow: none;
}

.hero-image-link-projects {
  background: var(--portfolio-accent);
  border-color: var(--portfolio-accent);
  color: #ffffff;
}

.hero-image-link-projects:hover,
.hero-image-link-projects:focus-visible {
  background: var(--portfolio-accent-strong);
  border-color: var(--portfolio-accent-strong);
  color: #ffffff;
}

.hero-card-link,
.btn-primary {
  background: var(--portfolio-accent);
  border-color: var(--portfolio-accent);
  color: #ffffff;
}

.hero-card-link:hover,
.hero-card-link:focus-visible,
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--portfolio-accent-strong);
  border-color: var(--portfolio-accent-strong);
  color: #ffffff;
}

.ppt-discovery {
  margin-bottom: 22px;
  padding: 14px 0;
  border: solid var(--portfolio-line);
  border-width: 1px 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.ppt-search input {
  min-height: 44px;
  border-radius: 10px;
  background: #ffffff;
}

.ppt-category {
  min-height: 40px;
}

.ppt-category.is-active {
  border-color: var(--portfolio-accent);
  background: var(--portfolio-accent);
}

.project-card:hover,
.section-projects .project-card:hover,
.ppt-card:hover {
  transform: translateY(-2px);
  border-color: var(--portfolio-line-strong);
  box-shadow: 0 4px 8px rgba(24, 50, 67, 0.06);
}

.tags span {
  background: #f3f7f9;
  backdrop-filter: none;
}

.like-button,
.comment-button {
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 760px), (pointer: coarse) {
  .hero-card,
  .hero-card-intro,
  .hero-card-project,
  .project-card,
  .ppt-card,
  .ppt-card-featured {
    border-radius: 16px;
  }

  .ppt-discovery {
    padding-block: 12px;
  }

  .ppt-categories {
    margin-top: 10px;
  }

  .ppt-category {
    min-height: 44px;
  }

  .card-actions {
    align-items: center;
  }
}

@media (hover: none) {
  .project-card:hover,
  .section-projects .project-card:hover,
  .ppt-card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ── PPT grid: when filtering, collapse featured card to regular card
      appearance so all filtered cards form a uniform two-column flow. ── */
.ppt-grid.is-filtering .ppt-card-featured {
  grid-column: auto;
}

.ppt-grid.is-filtering .ppt-card-featured .ppt-card-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(220px, 292px);
  gap: 24px;
}

.ppt-grid.is-filtering .ppt-card-featured h3,
.ppt-grid.is-filtering .ppt-card-featured .ppt-card-top h3 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  max-width: 14ch;
}

.ppt-grid.is-filtering .ppt-card-featured .ppt-cover {
  width: min(100%, 292px);
}

.ppt-grid.is-filtering .ppt-card-featured .ppt-cover img {
  max-height: 210px;
}

/* ── Audit fix: contrast & variable unification ── */

/* Contrast & variable unification — override hardcoded muted colors */
.ppt-section-kicker,
.ppt-kicker,
.hero-kicker,
.hero-card-kicker,
.showcase-kicker,
.hero-panel-kicker,
.hero-card-subtitle,
.hero-stat-subtitle {
  color: var(--portfolio-muted) !important;
}

.ppt-search-label,
.ppt-results {
  color: var(--portfolio-muted);
}

.tags span {
  color: var(--portfolio-muted);
}

.hero-meta-label {
  color: var(--portfolio-muted);
}

.site-footer p,
.footer-contact {
  color: var(--portfolio-muted);
}

.footer-contact span,
.footer-contact a {
  color: var(--portfolio-ink);
}

.about-note-kicker,
.ppt-empty,
.hero-stat-title {
  color: var(--portfolio-muted);
}

.section-showcase .showcase-kicker {
  color: rgba(255, 255, 255, 0.65);
}

/* ── Distill: stripped to essence, reduced complexity ── */

/* Refined, cleaner color — keep depth, lose the heavy hand */
:root {
  --portfolio-accent: #0b6f9f;
  --portfolio-accent-strong: #07577e;
  --portfolio-ink: #141e28;
  --portfolio-muted: #4f5f6c;
}

/* Clean section titles — remove excess weight */
.section-title {
  font-weight: 650;
  letter-spacing: -0.025em;
}

/* Hero heading — confident but not shouty */
.hero h1 {
  font-weight: 700;
  letter-spacing: -0.04em;
}

/* Hero stat numbers — let the number speak, no decoration */
.ppt-head-stat strong {
  color: var(--portfolio-ink);
  text-shadow: none;
  font-weight: 500;
}

/* Navigation — clean, minimal */
.nav-links a {
  font-weight: 500;
  letter-spacing: normal;
  padding: 6px 2px;
}

/* Cards — flat with a whisper of depth */
.project-card {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* Hero cards — flat, clean backgrounds */
.hero-card-project {
  background: #edf3f6;
}

.hero-card-stats {
  background: #ffffff;
}

.hero-card-intro {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: none;
}

/* Buttons — purposeful but not heavy */
.btn-primary {
  font-weight: 500;
  letter-spacing: normal;
  padding: 11px 22px;
}

.btn-small {
  font-weight: 500;
  padding: 10px 16px;
}

.ppt-card .btn-small {
  font-weight: 500;
  padding: 10px 16px;
}

/* PPT cards — flat, minimal */
.ppt-card {
  border-width: 1px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 8px 24px rgba(15, 23, 42, 0.05);
}

.ppt-card-featured {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 12px 32px rgba(15, 23, 42, 0.06);
}

.ppt-card h3 {
  font-weight: 550;
  letter-spacing: -0.025em;
}

/* Category filter — clean, minimal */
.ppt-category {
  font-weight: 500;
  font-size: 0.86rem;
  min-height: 40px;
}

.ppt-category.is-active {
  font-weight: 600;
  box-shadow: none;
}

/* Toggle button — simple */
.ppt-toggle-btn {
  font-weight: 500;
  font-size: 0.92rem;
  padding: 12px 24px;
}

/* Like button — clean */
.like-button {
  font-weight: 500;
  padding: 9px 12px;
}

.like-button[aria-pressed="true"] {
  color: #b03a2e;
  border-color: rgba(176, 58, 46, 0.2);
  background: rgba(176, 58, 46, 0.04);
}

.like-button[aria-pressed="true"] .like-button__icon {
  color: #b03a2e;
}

/* Showcase — reduce decoration */
.showcase-inner {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

/* Focus — clear but not aggressive */
:where(a, button):focus-visible {
  outline: 2px solid var(--portfolio-accent);
  outline-offset: 2px;
}

/* Tags — simple */
.tags span {
  font-weight: 500;
  font-size: 0.72rem;
  padding: 6px 10px;
}

/* ── Animate: purposeful entrance & micro-interactions ── */

/* Hero entrance: cards fade + rise on load */
.hero-card {
  animation: 1s cubic-bezier(0.22, 1, 0.36, 1) 1 backwards hero-fade-up !important;
  animation-duration: 1s !important;
}
.hero-card-intro {
  animation-delay: 0.1s !important;
  animation-duration: 1s !important;
}
.hero-card-project {
  animation-delay: 0.35s !important;
  animation-duration: 1s !important;
}
.hero-card-stats {
  animation-delay: 0.6s !important;
  animation-duration: 1s !important;
}

@keyframes hero-fade-up {
  0%   { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Like button: pulse on click */
.like-button .like-button__icon.is-pulsing {
  animation: 0.35s cubic-bezier(0.22, 1, 0.36, 1) like-pulse !important;
}

@keyframes like-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.6); }
  100% { transform: scale(1); }
}

/* Card hover transition refinement */
.project-card,
.ppt-card,
.ppt-card-featured {
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@media (hover: none) {
  .project-card,
  .ppt-card,
  .ppt-card-featured {
    transition: none !important;
  }
}

/* ── Delight: subtle moments of joy ── */

/* Section title decorative accent bar */
.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--portfolio-accent);
  margin-top: 12px;
}

.section-head-compact .section-title::after {
  width: 36px;
  height: 2px;
  margin-top: 8px;
}

/* PPT card border accent on hover */
.ppt-card:hover {
  border-color: rgba(11, 111, 159, 0.2);
}

.ppt-card-featured:hover {
  border-color: rgba(11, 111, 159, 0.25);
}

/* Back to top — smooth appearance with icon */
.back-to-top {
  transition:
    background-color 0.25s ease;
}

/* Visibility changes happen while Lenis is scrolling; keep them out of the scroll frame. */
.back-to-top,
.back-to-top.show {
  transform: none;
}

.back-to-top:hover {
  background: var(--portfolio-accent-strong);
  transform: translateY(-2px);
}

.back-to-top.show:active {
  transform: scale(0.92);
}

/* Like button extra micro-bounce */
.like-button:not(:disabled):active {
  transform: scale(0.92);
}

@keyframes like-pop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3); }
  60%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.like-button[aria-pressed="true"] .like-button__icon {
  animation: like-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Footer heart delight */
.site-footer .footer-heart {
  display: inline-block;
  color: #c0392b;
  animation: heart-beat 2s ease-in-out infinite;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.2); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.15); }
  60%      { transform: scale(1); }
}

/* Nav link subtle underline slide on hover */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--portfolio-accent);
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Skip-to-content link — visually hidden until focused */
.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--portfolio-accent);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: top 0.25s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--portfolio-accent);
  outline-offset: 2px;
}

/* ── Critique: UX polish — feedback, hierarchy, resilience ── */

/* Loading skeleton for async content areas */
.skeleton {
  background: linear-gradient(90deg, #f0f2f5 25%, #e4e7ec 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Like button error state — subtle shake */
.like-button.is-error {
  animation: error-shake 0.4s ease;
  border-color: rgba(176, 58, 46, 0.3) !important;
}

@keyframes error-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}

/* Ensure async-loading areas have minimum height to prevent layout shift */
.ppt-grid,
.project-grid,
.comments-container {
  min-height: 100px;
}

/* Comment loading state */
.comments-container.is-loading::after {
  content: "加载评论中…";
  display: block;
  padding: 24px;
  text-align: center;
  color: var(--portfolio-muted);
  font-size: 0.92rem;
}

/* Empty states for all dynamic areas */
.ppt-empty,
.comments-empty {
  padding: 32px 24px;
  text-align: center;
  color: var(--portfolio-muted);
  border: 1px dashed var(--portfolio-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

/* Tag hover lift */
.tags span {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tags span:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.16);
}

/* Category button micro interactions */
.ppt-category {
  transition:
    transform 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.ppt-category:hover {
  transform: translateY(-1px);
}

.ppt-category:active {
  transform: scale(0.96);
}

/* Smooth section reveal enhancement */
.reveal.is-visible .section-title::after {
  animation: title-bar-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards;
}

@keyframes title-bar-in {
  0%   { width: 0; opacity: 0; }
  100% { width: 48px; opacity: 1; }
}

.reveal.is-visible .section-head-compact .section-title::after {
  animation: title-bar-in-compact 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards;
}

@keyframes title-bar-in-compact {
  0%   { width: 0; opacity: 0; }
  100% { width: 36px; opacity: 1; }
}

/* ── Background toggle button ── */
.bg-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--portfolio-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.bg-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--portfolio-line-strong);
}

.bg-toggle-btn:active {
  transform: scale(0.92);
}

/* ── WebGL background canvas (managed by bg-manager.js) ── */
#pageBgContainer canvas {
  display: block;
}

/* ── React Bits: <GradientText /> (ported to CSS) ── */

/* GradientText — exact port from react-bits <GradientText /> .text-content
   Credits: DavidHDev — https://github.com/DavidHDev/react-bits */
.section-title {
  display: inline-block;
  position: relative;
  z-index: 2;
}

/* Fallback: browsers without background-clip: text support see a normal colored title.
   Supporting browsers get the animated gradient text. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .section-title {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(
      to right,
      #5227FF, #FF9FFC, #B497CF, #5227FF
    );
    background-size: 300% 100%;
    background-repeat: repeat;
    animation: gradient-yoyo 10s ease-in-out infinite !important;
    animation-duration: 10s !important;
  }
}

@keyframes gradient-yoyo {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ── Colorize: strategic palette expansion ── */

/* Warm secondary accent for contrast & energy */
:root {
  --portfolio-warm: #c97d4b;
  --portfolio-warm-soft: rgba(201, 125, 75, 0.08);
  --portfolio-warm-line: rgba(201, 125, 75, 0.2);
  --portfolio-cool-tint: rgba(11, 111, 159, 0.04);
}

/* Warm accent applied sparingly */
.hero-card-link,
.btn-primary {
  background: var(--portfolio-accent);
  border-color: var(--portfolio-accent);
}

.hero-card-link:hover,
.hero-card-link:focus-visible,
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--portfolio-accent-strong);
  border-color: var(--portfolio-accent-strong);
}

.hero-image-link-projects {
  background: var(--portfolio-accent);
  border-color: var(--portfolio-accent);
}

.hero-image-link-projects:hover,
.hero-image-link-projects:focus-visible {
  background: var(--portfolio-accent-strong);
  border-color: var(--portfolio-accent-strong);
}

/* Warm touch on like button active state */
.like-button[aria-pressed="true"] {
  color: var(--portfolio-warm);
  border-color: var(--portfolio-warm-line);
  background: var(--portfolio-warm-soft);
}

.like-button[aria-pressed="true"] .like-button__icon {
  color: var(--portfolio-warm);
}

/* Warm tag for featured/highlight items */
.tags span.is-hot {
  background: var(--portfolio-warm-soft);
  border-color: var(--portfolio-warm-line);
  color: var(--portfolio-warm);
}

/* Color-coded PPT category active states */
.ppt-category[data-ppt-category="design"].is-active {
  background: #7b5ea7;
  border-color: #7b5ea7;
}

.ppt-category[data-ppt-category="dev"].is-active {
  background: var(--portfolio-accent);
  border-color: var(--portfolio-accent);
}

.ppt-category[data-ppt-category="ai"].is-active {
  background: #2d8a6e;
  border-color: #2d8a6e;
}

.ppt-category[data-ppt-category="tool"].is-active {
  background: var(--portfolio-warm);
  border-color: var(--portfolio-warm);
}

/* ── Typeset: refined typographic hierarchy ── */

/* Modular type scale */
:root {
  --scale-ratio: 1.25;
}

.section-title {
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.project-card h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Use serif display sparingly — section titles only, not card titles */
.section-title {
  font-family: var(--portfolio-display);
  font-weight: 600;
}

.hero h1 {
  font-family: var(--portfolio-display);
  font-weight: 600;
}

/* Card titles — serif for softness, moderate weight */
.about-card h3,
.ppt-card-top h3,
.project-card h3 {
  font-family: var(--portfolio-display);
  font-weight: 550;
}

/* Better body reading experience */
body {
  line-height: 1.55;
  font-size: 17px;
}

.section-text {
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 68ch;
}

/* Improved paragraph width for cards */
.hero-card p,
.about-card p,
.project-card p,
.ppt-card-top p {
  max-width: 50ch;
  line-height: 1.6;
}

/* Code typography */
code,
.ppt-card code {
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
  letter-spacing: -0.01em;
}

/* Better link readability */
.contact-card a {
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-card a:hover {
  border-bottom-color: var(--portfolio-accent);
}

/* ── Layout: refined spacing & visual rhythm ── */

/* Consistent section rhythm */
.section {
  padding: 88px 0;
  scroll-margin-top: 92px;
}

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

.section-title {
  margin: 0 0 22px;
}

/* Hero layout polish */
.hero {
  position: relative;
  padding-top: 62px;
  padding-bottom: 18px;
}

.hero-mosaic {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 24px;
}

.hero-card {
  border-radius: 24px;
}

.hero-card-intro {
  grid-column: 1 / -1;
}

/* Better card padding */
.card {
  padding: 26px;
  border-radius: 18px;
}

.project-card {
  padding: 24px;
  gap: 12px;
}

.ppt-card {
  padding: 32px;
  border-radius: 32px;
}

.ppt-card-featured {
  border-radius: 32px;
}

/* Grid gap refinement */
.grid {
  gap: 20px;
}

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

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

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

/* PPT grid spacing */
.ppt-grid {
  gap: 22px;
}

.ppt-overflow-grid {
  margin-top: 22px;
}

/* Showcase section */
.section-showcase {
  padding: 64px 0;
}

.showcase-inner {
  padding: clamp(28px, 5vw, 52px);
  border-radius: 32px;
}

/* Footer breathing room */
.site-footer {
  padding: 36px 0 48px;
}

/* Better button spacing */
.hero-actions {
  margin-top: 32px;
  gap: 14px;
}

/* Nav alignment */
.nav {
  min-height: 72px;
}

/* Desktop PillNav and frosted surfaces */
@media (min-width: 761px) {
  .site-header {
    top: 12px;
    background: transparent;
    border: 0;
    pointer-events: none;
  }

  .nav {
    width: max-content;
    max-width: calc(100% - 32px);
    min-height: 48px;
    gap: 8px;
    padding: 0;
    pointer-events: auto;
  }

  .brand {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      0 10px 30px rgba(31, 42, 55, 0.1);
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
  }

  .brand {
    justify-content: center;
    animation: pill-logo-in 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .brand-avatar {
    width: 30px;
    height: 30px;
    will-change: transform;
  }

  /* Fallback when JS is unavailable */
  .brand:hover .brand-avatar {
    transform: rotate(360deg);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .nav-links {
    gap: 2px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      0 10px 30px rgba(31, 42, 55, 0.1);
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
    transform-origin: left center;
    animation: pill-nav-reveal 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .nav-links li {
    display: flex;
  }

  .nav-links :is(a, button) {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    isolation: isolate;
    overflow: hidden;
    padding: 10px 16px;
    border-radius: 999px;
  }

  .nav-links .pill-nav-item {
    width: auto;
    min-height: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* ── Hover circle — dynamic size via JS / defaults if JS unavailable ── */
  .nav-links :is(a, button) .hover-circle {
    /* default values match the old ::before 92×92 circle (JS overrides these) */
    --circle-size: 92px;
    --circle-bottom: -46px;
    --circle-origin: 50% 100%;
    position: absolute;
    left: 50%;
    bottom: var(--circle-bottom);
    width: var(--circle-size);
    height: var(--circle-size);
    border-radius: 50%;
    background: rgba(11, 111, 159, 0.94);
    transform: translateX(-50%) scale(0);
    transform-origin: var(--circle-origin);
    transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    pointer-events: none;
    will-change: transform;
  }

  .nav-links :is(a, button).is-pill-hovered .hover-circle,
  .nav-links :is(a, button):hover .hover-circle,
  .nav-links :is(a, button):focus-visible .hover-circle {
    transform: translateX(-50%) scale(1.2);
    transition-duration: 300ms;
  }

  /* ── Active section dot (scroll-spy) ── */
  .nav-links a::after {
    display: none;
  }

  .nav-links a.is-active::after {
    content: "";
    display: block;
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(11, 111, 159, 0.94);
    z-index: 2;
    pointer-events: none;
  }

  .pill-label-stack {
    position: relative;
    z-index: 1;
    display: grid;
    line-height: 1;
  }

  .pill-label {
    grid-area: 1 / 1;
    line-height: 1;
    transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  .pill-label-hover {
    color: #fff;
    opacity: 0;
    transform: translateY(calc(var(--pill-h, 38px) + 100px));
    transition:
      transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 200ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
  }

  .nav-links :is(a, button).is-pill-hovered .pill-label:not(.pill-label-hover),
  .nav-links :is(a, button):hover .pill-label:not(.pill-label-hover),
  .nav-links :is(a, button):focus-visible .pill-label:not(.pill-label-hover) {
    transform: translateY(calc(-1 * (var(--pill-h, 38px) + 8px)));
    transition-duration: 300ms;
  }

  .nav-links :is(a, button).is-pill-hovered .pill-label-hover,
  .nav-links :is(a, button):hover .pill-label-hover,
  .nav-links :is(a, button):focus-visible .pill-label-hover {
    opacity: 1;
    transform: translateY(0);
    transition-duration: 300ms;
  }

  .section-head-ppt {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card,
  .about-card,
  .section-skills .card,
  .ppt-card,
  .section-projects .project-card {
    border-color: rgba(255, 255, 255, 0.64) !important;
    background: rgba(255, 255, 255, 0.72) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.78),
      0 14px 40px rgba(31, 42, 55, 0.1) !important;
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
  }

  .hero-card p,
  .about-card p,
  .section-skills .card p,
  .ppt-card-top p,
  .section-projects .project-card p {
    color: #314552;
  }
}

@keyframes pill-logo-in {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pill-nav-reveal {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0 round 999px);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 999px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .hero-card,
  .hero-card-intro,
  .hero-card-project,
  .hero-card-stats,
  .like-button .like-button__icon.is-pulsing,
  .section-title {
    animation: none !important;
  }

  .btn:hover,
  .btn:active,
  .project-card:hover,
  .ppt-card:hover,
  .ppt-card-featured:hover {
    transform: none !important;
  }
}

@media (min-width: 761px) and (prefers-reduced-motion: reduce) {
  .brand,
  .nav-links {
    animation: none !important;
  }

  .brand-avatar,
  .nav-links a::before,
  .pill-label {
    transition: none !important;
  }
}

/* ── Hero stat items: blend with parent card background ── */
.hero-card-stats .hero-stat-item {
  background: transparent;
  border-color: rgba(24, 29, 38, 0.04);
}

@keyframes shiny-text-sweep {
  0% {
    background-position: 150% center;
  }
  55%,
  100% {
    background-position: -50% center;
  }
}

@media (min-width: 761px) {
  @supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .about-card :is(h3, p),
    .section-skills .card :is(h3, p) {
      background-image: linear-gradient(
        120deg,
        var(--shine-base) 0%,
        var(--shine-base) 35%,
        rgba(255, 255, 255, 0.98) 50%,
        var(--shine-base) 65%,
        var(--shine-base) 100%
      );
      background-position: 150% center;
      background-size: 200% auto;
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: shiny-text-sweep 6s linear var(--shine-delay, 0s) infinite;
    }

    .about-card h3,
    .section-skills .card h3 {
      --shine-base: #181318;
    }

    .about-card p,
    .section-skills .card p {
      --shine-base: #314552;
    }

    .about-card:nth-child(1) {
      --shine-delay: 0s;
    }

    .about-card:nth-child(2) {
      --shine-delay: 0.45s;
    }

    .about-card:nth-child(3) {
      --shine-delay: 0.9s;
    }

    .section-skills .card:nth-child(1) {
      --shine-delay: 1.35s;
    }

    .section-skills .card:nth-child(2) {
      --shine-delay: 1.8s;
    }

    .section-skills .card:nth-child(3) {
      --shine-delay: 2.25s;
    }

    .section-skills .card:nth-child(4) {
      --shine-delay: 2.7s;
    }
  }
}
