:root {
  --bg: #f6efe4;
  --bg-strong: #f1e2cf;
  --surface: rgba(255, 251, 246, 0.74);
  --surface-strong: rgba(255, 249, 243, 0.94);
  --surface-deep: rgba(255, 247, 238, 0.86);
  --text: #2f261f;
  --muted: #6f6459;
  --accent: #cf6d46;
  --accent-2: #edae59;
  --accent-3: #7aaea0;
  --line: rgba(94, 70, 53, 0.12);
  --line-strong: rgba(94, 70, 53, 0.2);
  --shadow: 0 24px 80px rgba(123, 92, 59, 0.12);
  --shadow-soft: 0 18px 40px rgba(123, 92, 59, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1220px;
}

body.theme-alt {
  --bg: #edf3eb;
  --bg-strong: #dfebea;
  --surface: rgba(248, 255, 251, 0.74);
  --surface-strong: rgba(249, 255, 252, 0.94);
  --surface-deep: rgba(241, 253, 248, 0.88);
  --text: #21332a;
  --muted: #5b7366;
  --accent: #3d9078;
  --accent-2: #e29353;
  --accent-3: #90aee7;
  --line: rgba(47, 85, 68, 0.12);
  --line-strong: rgba(47, 85, 68, 0.22);
  --shadow: 0 24px 80px rgba(64, 116, 94, 0.12);
  --shadow-soft: 0 18px 40px rgba(64, 116, 94, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(237, 174, 89, 0.22), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(122, 174, 160, 0.2), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, #fbf8f3 100%);
  color: var(--text);
  transition: background 360ms ease, color 240ms ease;
}

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

button {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 88%);
  pointer-events: none;
  z-index: 0;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.48;
  pointer-events: none;
  z-index: 0;
}

.ambient-a {
  top: 8%;
  left: -8%;
  width: 360px;
  height: 360px;
  background: rgba(237, 174, 89, 0.38);
}

.ambient-b {
  right: -6%;
  top: 32%;
  width: 280px;
  height: 280px;
  background: rgba(122, 174, 160, 0.34);
}

.site-header,
main,
.command-palette,
.project-detail-drawer {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.55);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  position: sticky;
  top: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fffaf4;
}

.site-nav,
.header-actions {
  display: inline-flex;
  gap: 18px;
  align-items: center;
}

.site-nav {
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.ghost-button,
.primary-button,
.secondary-button,
.skill-filter,
.command-link,
.project-tab {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.ghost-button,
.secondary-button,
.skill-filter,
.command-link,
.project-tab {
  padding: 12px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.primary-button {
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fffefb;
  box-shadow: 0 16px 30px rgba(207, 109, 70, 0.25);
}

.secondary-button {
  padding: 14px 22px;
}

.ghost-button:hover,
.primary-button:hover,
.secondary-button:hover,
.skill-filter:hover,
.command-link:hover,
.project-tab:hover {
  transform: translateY(-2px);
}

main {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 56px 0 80px;
}

section {
  margin-top: 44px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  min-height: 78vh;
}

.hero-copy,
.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.section-kicker,
.card-label,
.timeline-date,
.timeline-badge {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.eyebrow,
.section-kicker,
.card-label,
.timeline-date {
  color: var(--muted);
}

h1,
h2,
h3 {
  font-family: "Noto Sans SC", "Manrope", sans-serif;
  margin: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(3.8rem, 8vw, 6.8rem);
  margin-top: 12px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
  font-size: 1.35rem;
}

.hero-subtitle {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: clamp(1.2rem, 2vw, 1.72rem);
  font-weight: 600;
}

.hero-description,
.summary-card p,
.timeline-card li,
.section-heading p,
.spotlight-points p,
.cta-card p,
.project-summary,
.project-highlights p,
.drawer-body p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-description {
  max-width: 760px;
  margin-top: 18px;
  font-size: 1rem;
}

.hero-actions,
.cta-actions,
.skill-toolbar,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.metric-card,
.glass-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.metric-card {
  border-radius: var(--radius-lg);
  padding: 22px 20px;
}

.metric-value {
  display: block;
  font-size: 2.3rem;
  font-weight: 800;
}

.metric-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.glass-card {
  border-radius: var(--radius-xl);
}

.profile-card,
.hero-console,
.summary-card,
.timeline-card,
.spotlight-card,
.cta-card,
.project-spotlight,
.skill-card,
.command-dialog,
.drawer-panel {
  padding: 28px;
}

.snapshot-list {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.hero-console {
  margin-top: 18px;
  background: linear-gradient(180deg, var(--surface-deep), rgba(255, 250, 244, 0.6));
}

.console-header {
  display: flex;
  gap: 8px;
}

.console-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(140, 114, 96, 0.3);
}

.console-body {
  margin-top: 16px;
  font-size: 0.96rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 20px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag-cloud span,
.project-tags span,
.skill-points span,
.project-highlight-item span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
}

.section-heading {
  max-width: 740px;
  margin-bottom: 24px;
}

.projects-section {
  scroll-margin-top: 120px;
}

.project-stage {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: start;
}

.project-list {
  display: grid;
  gap: 14px;
}

.project-tab {
  text-align: left;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.5);
}

.project-tab strong,
.project-tab span {
  display: block;
}

.project-tab span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

.project-tab.is-active {
  background: linear-gradient(135deg, rgba(207, 109, 70, 0.16), rgba(237, 174, 89, 0.18));
  border-color: rgba(207, 109, 70, 0.32);
}

.project-spotlight {
  display: grid;
  gap: 24px;
}

.project-browser {
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.52);
}

.project-browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.project-browser-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(140, 114, 96, 0.3);
}

.browser-url {
  margin-left: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.92rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-preview {
  min-height: 460px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(237, 174, 89, 0.18), transparent 30%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(248, 238, 228, 0.76));
}

.project-preview-frame {
  width: 100%;
  min-height: 520px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.project-preview-note {
  display: grid;
  place-items: center;
  min-height: 120px;
  text-align: center;
  color: var(--muted);
}

.project-preview-note p {
  max-width: 520px;
  margin: 0;
  line-height: 1.8;
}

.preview-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  height: 100%;
}

.preview-panel,
.preview-side,
.preview-chip,
.preview-stat {
  border: 1px solid rgba(110, 86, 67, 0.12);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.preview-panel,
.preview-side {
  border-radius: 22px;
  padding: 18px;
}

.preview-hero-title {
  font-size: 1.3rem;
  font-weight: 800;
}

.preview-lines {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.preview-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(207, 109, 70, 0.28), rgba(122, 174, 160, 0.18));
}

.preview-line.short {
  width: 58%;
}

.preview-chip-wrap,
.preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.preview-chip,
.preview-stat {
  padding: 12px 14px;
  border-radius: 16px;
}

.preview-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.preview-card {
  height: 66px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(110, 86, 67, 0.12);
}

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

.project-status,
.skill-level {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.project-tags,
.skill-points,
.project-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.project-highlight-item {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
}

.project-highlight-item h4 {
  margin: 12px 0 0;
  font-size: 1rem;
}

.timeline {
  display: grid;
  gap: 22px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: start;
}

.timeline-meta {
  padding-top: 12px;
}

.timeline-badge {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  color: var(--text);
}

.timeline-card ul {
  margin: 18px 0 0;
  padding-left: 22px;
}

.featured .timeline-card {
  background: linear-gradient(180deg, var(--surface-strong), rgba(255, 248, 239, 0.72));
}

.skills-section {
  scroll-margin-top: 120px;
}

.skill-filter.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fffefb;
  border-color: transparent;
}

.skills-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.skill-card {
  transition: transform 220ms ease, opacity 220ms ease, border-color 220ms ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(207, 109, 70, 0.28);
}

.skill-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.skill-category {
  color: var(--muted);
  font-size: 0.9rem;
}

.spotlight-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

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

.honor-card {
  padding: 22px;
  font-size: 1.02rem;
  font-weight: 700;
}

.copy-feedback {
  min-height: 24px;
  margin-top: 14px;
}

.command-palette,
.project-detail-drawer {
  position: fixed;
  inset: 0;
}

.command-palette[hidden],
.project-detail-drawer[hidden] {
  display: none !important;
}

.command-backdrop,
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 28, 22, 0.28);
  backdrop-filter: blur(6px);
}

.command-dialog {
  position: relative;
  width: min(92vw, 620px);
  margin: 12vh auto 0;
  background: var(--surface-strong);
}

.command-head,
.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.command-links {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.command-link {
  text-align: left;
  border-radius: 18px;
}

.project-detail-drawer {
  display: flex;
  justify-content: flex-end;
}

.drawer-panel {
  position: relative;
  width: min(520px, 100%);
  height: 100%;
  border-radius: 28px 0 0 28px;
  background: var(--surface-strong);
}

.drawer-body {
  margin-top: 24px;
  display: grid;
  gap: 20px;
}

.drawer-section {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
}

.drawer-section ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

body.palette-open,
body.drawer-open {
  overflow: hidden;
}

@media (max-width: 1080px) {
  .hero,
  .summary-grid,
  .spotlight-points,
  .honor-grid,
  .skills-grid,
  .timeline-item,
  .project-stage,
  .project-highlights,
  .preview-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .timeline-meta {
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .site-header {
    padding: 14px 18px;
    border-radius: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-nav,
  .header-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .site-nav {
    gap: 14px;
    font-size: 0.94rem;
  }

  main {
    padding-top: 34px;
  }

  h1 {
    font-size: 3.2rem;
  }
}

@media (max-width: 760px) {
  .profile-card,
  .hero-console,
  .summary-card,
  .timeline-card,
  .spotlight-card,
  .cta-card,
  .project-spotlight,
  .skill-card,
  .command-dialog,
  .drawer-panel {
    padding: 22px;
  }

  .project-preview {
    padding: 18px;
  }

  .drawer-panel {
    border-radius: 24px 24px 0 0;
    width: 100%;
    align-self: flex-end;
    height: auto;
    max-height: 84vh;
    overflow: auto;
  }
}
