:root {
  --bg: #f8f5ef;
  --bg-soft: #fbfaf7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.78);
  --surface-glass: rgba(255, 255, 255, 0.78);
  --text: #161616;
  --heading: #0f1115;
  --muted: #6f6b63;
  --muted-2: #9a948a;
  --muted-strong: #5d574e;
  --line: rgba(28, 25, 21, 0.08);
  --line-strong: rgba(28, 25, 21, 0.14);
  --accent: #b89b5e;
  --accent-dark: #8f743f;
  --accent-soft: rgba(184, 155, 94, 0.13);
  --button-dark: #171717;
  --button-dark-hover: #000000;
  --shadow-soft: 0 24px 70px rgba(30, 24, 18, 0.08);
  --shadow-hover: 0 32px 90px rgba(30, 24, 18, 0.13);
  --shadow: var(--shadow-soft);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-editorial: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-arabic: "Noto Naskh Arabic", "Geeza Pro", "Al Bayan", "Times New Roman", serif;
  --font-display-cn: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "PingFang SC", serif;
  --radius-xl: 32px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 18px;
  --max-width: 1180px;
  --content-padding: 48px;
  --header-height: 68px;
  --transition: 260ms ease;
  --font-main: var(--font-sans);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(184, 155, 94, 0.12), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(120, 113, 108, 0.1), transparent 26%),
    linear-gradient(180deg, #fbfaf7 0%, #f8f5ef 52%, #ffffff 100%);
}

body.intro-active {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

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

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

button {
  border: 0;
  background: none;
  cursor: pointer;
}

code {
  padding: 0.16rem 0.4rem;
  border-radius: 999px;
  background: rgba(28, 25, 21, 0.06);
  color: var(--heading);
}

h1,
h2,
h3 {
  color: var(--heading);
}

p {
  color: var(--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;
}

.page-shell {
  overflow-x: clip;
}

.section {
  padding: 96px 24px;
  scroll-margin-top: 110px;
}

.section-compact {
  padding-top: 0;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(184, 155, 94, 0.14), transparent 36%),
    linear-gradient(180deg, #fbfaf7 0%, #f8f5ef 100%);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.intro-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-grain,
.intro-orb,
.reveal-circle,
.intro-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-grain {
  background-image:
    linear-gradient(rgba(23, 23, 23, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.025) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, black 22%, transparent 82%);
  opacity: 0.34;
}

.intro-orb {
  inset: 50% auto auto 50%;
  width: min(56vw, 640px);
  height: min(56vw, 640px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 155, 94, 0.16), rgba(184, 155, 94, 0.06) 40%, transparent 72%);
  transform: translate(-50%, -50%);
  filter: blur(16px);
}

.intro-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 20px;
  max-width: 820px;
  text-align: center;
}

.intro-kicker {
  margin: 0;
  color: var(--accent-dark);
  font-family: var(--font-editorial);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intro-title {
  margin: 0;
  color: #111111;
  font-size: clamp(42px, 7vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.intro-title-cn {
  font-weight: 800;
}

.intro-title-divider {
  display: inline-block;
  margin: 0 0.1em;
  color: rgba(184, 155, 94, 0.94);
  font-weight: 400;
}

.intro-title-en {
  font-family: var(--font-editorial);
  font-weight: 600;
}

.intro-title-ar {
  font-family: var(--font-arabic);
  font-weight: 600;
  direction: rtl;
  unicode-bidi: isolate;
}

.intro-subtitle {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-editorial);
  font-size: clamp(1rem, 2vw, 1.14rem);
  letter-spacing: 0.01em;
}

.intro-enter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 212px;
  margin-top: 8px;
  padding: 16px 26px;
  border: none;
  border-radius: 999px;
  background: #171717;
  color: #ffffff;
  box-shadow: 0 20px 60px rgba(23, 23, 23, 0.18);
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), opacity var(--transition);
}

.intro-enter:hover,
.intro-enter:focus-visible {
  background: #000000;
  transform: translateY(-2px);
  box-shadow: 0 24px 68px rgba(23, 23, 23, 0.22);
}

.intro-enter:disabled {
  cursor: default;
}

.intro-enter.is-pressed {
  transform: scale(0.98);
}

.intro-enter-en {
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-editorial);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.reveal-circle {
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(184, 155, 94, 0.34);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 155, 94, 0.16), transparent 72%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.45);
}

.intro-overlay.is-leaving .intro-content {
  animation: intro-content-out 820ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-overlay.is-leaving .intro-orb {
  animation: intro-orb-fade 1s ease forwards;
}

.intro-overlay.is-leaving .reveal-circle {
  animation: reveal-ring 1.05s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-particle {
  position: absolute;
  left: var(--origin-x, 50%);
  top: var(--origin-y, 50%);
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: var(--particle-color, rgba(184, 155, 94, 0.65));
  opacity: 0.95;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px rgba(184, 155, 94, 0.14);
  animation: particle-burst 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay);
}

.site-header,
.hero-copy,
.profile-card {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

body.intro-active .site-header,
body.intro-active .hero-copy,
body.intro-active .profile-card {
  opacity: 0;
  transform: translateY(24px);
}

body.intro-active .site-header {
  transform: translateY(-18px);
}

body.intro-leaving .site-header {
  animation: fade-down-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.56s both;
}

body.intro-leaving .hero-copy {
  animation: fade-up-reveal 0.82s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

body.intro-leaving .profile-card {
  animation: fade-up-reveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.82s both;
}

body.intro-done .site-header,
body.intro-done .hero-copy,
body.intro-done .profile-card {
  opacity: 1;
  transform: none;
}

.container,
.header-shell,
.footer-shell {
  width: min(var(--max-width), calc(100vw - var(--content-padding)));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 18px;
  z-index: 100;
  padding: 0 24px;
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
  padding: 8px 12px 8px 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(28, 25, 21, 0.08);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(30, 24, 18, 0.06);
  backdrop-filter: blur(20px);
}

.brand {
  flex-shrink: 0;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--heading);
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 520;
  transition: color var(--transition), background-color var(--transition), transform var(--transition);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: #171717;
  background: rgba(184, 155, 94, 0.12);
  transform: translateY(-1px);
}

.site-nav a.is-active {
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px var(--line);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 999px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.hero {
  padding-top: 86px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(320px, 0.42fr);
  gap: 44px;
  align-items: center;
}

.hero-layout > * {
  min-width: 0;
}

.hero-copy {
  min-width: 0;
}

.hero-kicker,
.section-tag,
.eyebrow-label,
.card-label,
.journey-meta,
.log-index,
.future-index {
  margin: 0;
  color: var(--accent-dark);
  font-family: var(--font-editorial);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-title-shell {
  margin: 16px 0 18px;
  width: 100%;
  max-width: 820px;
}

.hero-title-media {
  display: none;
  width: 100%;
  max-width: 100%;
}

.hero-title-art {
  width: 100%;
  height: auto;
  filter: saturate(0.66) contrast(1.05) brightness(0.96) drop-shadow(0 18px 34px rgba(30, 24, 18, 0.04));
}

.hero-title-shell.has-art .hero-title-media {
  display: block;
}

.hero-title-shell.has-art .hero-name {
  display: none;
}

.hero-name {
  margin: 16px 0 18px;
  font-size: clamp(2.75rem, 4.8vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.hero-name .name-chinese {
  font-weight: 800;
}

.hero-name .name-divider {
  display: inline-block;
  margin: 0 0.08em;
  color: var(--accent-dark);
  font-weight: 400;
}

.hero-name .name-latin {
  font-family: var(--font-editorial);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hero-name .name-arabic {
  font-family: var(--font-arabic);
  font-weight: 600;
  letter-spacing: normal;
  direction: rtl;
  unicode-bidi: isolate;
  font-size: 0.94em;
}

.hero-statement {
  margin: 0;
  max-width: 13ch;
  color: var(--heading);
  font-family: var(--font-display-cn);
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
}

.hero-statement span {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 620;
  letter-spacing: -0.03em;
}

.hero-meta,
.hero-intro,
.section-summary,
.about-card p,
.about-mini-card p,
.card-description,
.build-log-card p,
.journey-card p,
.experience-card p,
.future-intro p,
.future-card p,
.cta-copy p {
  margin: 0;
  color: var(--muted);
}

.hero-meta {
  margin-top: 18px;
  font-family: var(--font-editorial);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.hero-intro {
  max-width: 64ch;
  margin-top: 16px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.hero-actions,
.profile-links,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
}

.button:hover,
.button:focus-visible,
.mini-button:hover,
.mini-button:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #ffffff;
  background: var(--button-dark);
  box-shadow: 0 16px 36px rgba(23, 23, 23, 0.16);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--button-dark-hover);
  box-shadow: 0 22px 48px rgba(23, 23, 23, 0.22);
}

.button-secondary,
.mini-button {
  color: #171717;
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--line);
  box-shadow: 0 12px 28px rgba(30, 24, 18, 0.05);
}

.button-secondary:hover,
.button-secondary:focus-visible,
.mini-button:hover,
.mini-button:focus-visible {
  background: #ffffff;
  border-color: rgba(184, 155, 94, 0.28);
  box-shadow: 0 18px 34px rgba(30, 24, 18, 0.09);
}

.button-arrow {
  display: inline-block;
  transition: transform var(--transition);
}

.button:hover .button-arrow,
.button:focus-visible .button-arrow,
.mini-button:hover .button-arrow,
.mini-button:focus-visible .button-arrow,
.text-link:hover .button-arrow,
.text-link:focus-visible .button-arrow {
  transform: translateX(4px);
}

.interactive-card,
.future-intro,
.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.interactive-card {
  isolation: isolate;
  transform-style: preserve-3d;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background-color var(--transition);
}

.interactive-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(184, 155, 94, 0.16), transparent 38%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  z-index: 0;
}

.interactive-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color var(--transition);
}

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

.interactive-card:hover,
.interactive-card:focus-within {
  box-shadow: var(--shadow-hover);
  border-color: rgba(184, 155, 94, 0.26);
}

.interactive-card:hover::before,
.interactive-card:focus-within::before,
.interactive-card.is-hovered::before {
  opacity: 1;
}

.interactive-card:hover::after,
.interactive-card:focus-within::after {
  border-color: rgba(184, 155, 94, 0.18);
}

.interactive-card:hover:not(.tilt-card),
.interactive-card:focus-within:not(.tilt-card) {
  transform: translateY(-6px);
}

.profile-card,
.about-card,
.project-card,
.build-log-card,
.journey-card,
.experience-card,
.skill-card,
.future-card,
.contact-card,
.future-intro {
  padding: 28px;
}

.profile-card {
  min-height: 420px;
}

.profile-glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 155, 94, 0.2), rgba(120, 113, 108, 0.08) 48%, transparent 72%);
  filter: blur(18px);
  z-index: 0;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(184, 155, 94, 0.18), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(184, 155, 94, 0.18);
  box-shadow: inset 0 0 0 1px rgba(184, 155, 94, 0.08);
}

.profile-avatar img,
.profile-avatar-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.profile-avatar img {
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--transition);
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  color: #5f4820;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: opacity var(--transition), transform var(--transition);
}

.profile-avatar.has-image img {
  opacity: 1;
}

.profile-avatar.has-image .profile-avatar-fallback {
  opacity: 0;
  transform: scale(0.96);
}

.profile-heading h3,
.about-mini-card h3,
.project-card h3,
.build-log-card h3,
.journey-card h3,
.experience-card h3,
.skill-card h3,
.future-card h3,
.contact-card h3,
.cta-copy h3 {
  margin: 10px 0 0;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.profile-heading h3 {
  font-size: 1.55rem;
}

.profile-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.card-subtitle {
  font-family: var(--font-editorial);
  letter-spacing: 0.01em;
}

.profile-pills,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-pills {
  margin-top: 22px;
}

.profile-pills span,
.pill-list span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid rgba(184, 155, 94, 0.18);
}

.profile-pills span,
.pill-list span {
  background: rgba(184, 155, 94, 0.1);
  color: #6f5725;
}

.profile-note {
  max-width: 32ch;
  margin-top: 22px;
}

.profile-links {
  margin-top: 26px;
}

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

.highlight-card {
  padding: 20px 22px;
}

.highlight-value {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.highlight-title {
  margin: 6px 0 0;
  font-size: 0.98rem;
  color: var(--heading);
}

.highlight-note {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-heading {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

.workflow-card {
  display: grid;
  gap: 14px;
}

.about-layout,
.experience-grid,
.skills-grid,
.future-layout {
  display: grid;
  gap: 20px;
}

.about-layout {
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
}

.about-card {
  display: grid;
  gap: 16px;
}

.about-emphasis {
  color: var(--text) !important;
  font-weight: 600;
}

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

.about-mini-card {
  padding: 22px;
}

.about-mini-card h3 {
  font-size: 1.05rem;
}

.about-mini-card p {
  margin-top: 8px;
}

.projects-featured,
.projects-grid,
.build-log-grid,
.contact-grid {
  display: grid;
  gap: 20px;
}

.projects-featured {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

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

.project-card,
.build-log-card,
.journey-card,
.experience-card,
.skill-card,
.future-card,
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card-featured {
  min-height: 340px;
  padding: 30px;
}

.card-top,
.journey-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-index {
  color: var(--muted-2);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.card-subtitle {
  margin: 0;
  color: var(--muted);
}

.card-description {
  flex: 1 1 auto;
}

.status-live {
  color: #6f5725;
  background: rgba(184, 155, 94, 0.1);
}

.status-deployed {
  color: #ffffff;
  background: #171717;
}

.status-asset {
  color: #7a6030;
  background: rgba(184, 155, 94, 0.14);
}

.status-prototype {
  color: #826735;
  background: rgba(184, 155, 94, 0.14);
}

.status-lab {
  color: #8b6f3b;
  background: rgba(184, 155, 94, 0.08);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: var(--accent-dark);
  font-weight: 600;
  transition: transform var(--transition), color var(--transition);
}

.button.is-disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 9400;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.project-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(248, 245, 239, 0.72);
  backdrop-filter: blur(18px);
}

.project-modal__panel {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 48px));
  max-height: min(88vh, 940px);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(184, 155, 94, 0.2);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 40px 100px rgba(30, 24, 18, 0.18);
  opacity: 0;
  transform: scale(0.96);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.project-modal.is-open .project-modal__panel {
  opacity: 1;
  transform: scale(1);
}

.project-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--heading);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 14px 28px rgba(30, 24, 18, 0.08);
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.project-modal__close:hover,
.project-modal__close:focus-visible {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(30, 24, 18, 0.12);
}

.project-modal__close span {
  font-size: 1.4rem;
  line-height: 1;
}

.project-modal__content {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.9fr);
  gap: 30px;
  align-items: start;
  padding: 36px;
  max-height: min(88vh, 940px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.project-modal__info,
.project-modal__gallery {
  display: grid;
  align-content: start;
  gap: 22px;
}

.project-modal__info h2,
.project-modal__section h3 {
  margin: 0;
  color: var(--heading);
}

.project-modal__info h2 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.project-modal__subtitle {
  margin: -12px 0 0;
  color: var(--muted);
  font-family: var(--font-editorial);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.project-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-modal__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(184, 155, 94, 0.18);
  background: rgba(184, 155, 94, 0.1);
  color: #6f5725;
  font-size: 0.9rem;
}

.project-modal__lead {
  margin: 0;
  color: var(--muted);
}

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

.project-modal__section-head {
  display: grid;
  gap: 6px;
}

.project-modal__section h3 {
  font-size: 1.16rem;
}

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

.project-feature-item,
.project-build-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.project-feature-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(28, 25, 21, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 30px rgba(30, 24, 18, 0.05);
}

.project-feature-item__icon,
.project-build-item__check {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-top: 1px;
}

.project-feature-item__icon {
  color: #6f5725;
  background: rgba(184, 155, 94, 0.12);
  font-size: 0.82rem;
}

.project-build-item__check {
  color: #ffffff;
  background: #171717;
  font-size: 0.76rem;
}

.project-feature-item p,
.project-build-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.project-feature-item--stacked {
  display: grid;
  gap: 8px;
}

.project-feature-item--stacked h4,
.project-idea-card h4 {
  margin: 0;
  color: var(--heading);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

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

.project-modal__idea-grid,
.project-reflection-list {
  display: grid;
  gap: 12px;
}

.project-modal__idea-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-idea-card,
.project-reflection-card,
.project-archive-card {
  border-radius: 22px;
  border: 1px solid rgba(28, 25, 21, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(30, 24, 18, 0.06);
}

.project-idea-card,
.project-reflection-card {
  padding: 18px 18px 16px;
}

.project-idea-list {
  margin: 10px 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.project-idea-list li + li {
  margin-top: 8px;
}

.project-reflection-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.project-modal__tool-pills {
  gap: 10px;
}

.project-modal__note {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(184, 155, 94, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 245, 239, 0.82) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.project-modal__note p {
  margin: 0;
}

.project-modal__note p + p {
  margin-top: 8px;
}

.project-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.project-action {
  min-width: 0;
}

.project-action--disabled {
  cursor: not-allowed;
}

.project-modal__link-note {
  margin: -8px 0 0;
  color: var(--muted-2);
  font-size: 0.9rem;
  line-height: 1.6;
}

.project-gallery__stage {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 12px;
  align-items: center;
}

.project-gallery__nav {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--heading);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(30, 24, 18, 0.08);
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.project-gallery__nav:hover,
.project-gallery__nav:focus-visible {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(30, 24, 18, 0.12);
}

.project-gallery__figure {
  margin: 0;
  min-height: 520px;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(28, 25, 21, 0.08);
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(30, 24, 18, 0.08);
}

.project-gallery__figure.is-empty {
  min-height: 320px;
}

.project-gallery__figure img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: contain;
}

.project-gallery__empty {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 220px;
  padding: 28px 22px;
  border-radius: 18px;
  border: 1px dashed rgba(184, 155, 94, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 245, 239, 0.9) 100%);
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.project-gallery__caption {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-editorial);
  font-size: 0.98rem;
  text-align: center;
}

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

.project-gallery__thumbs--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-gallery__thumbs--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-gallery__thumb {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(28, 25, 21, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 24px rgba(30, 24, 18, 0.05);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-gallery__thumb:hover,
.project-gallery__thumb:focus-visible {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 28px rgba(30, 24, 18, 0.08);
}

.project-gallery__thumb.is-active {
  border-color: rgba(184, 155, 94, 0.34);
  box-shadow: 0 18px 36px rgba(30, 24, 18, 0.1), 0 0 0 1px rgba(184, 155, 94, 0.18);
}

.project-gallery__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.project-gallery__thumb.is-missing {
  opacity: 0.46;
  box-shadow: none;
}

.project-gallery__thumb.is-missing img {
  filter: grayscale(1);
}

.project-gallery__note {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(184, 155, 94, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  box-shadow: 0 14px 28px rgba(30, 24, 18, 0.05);
}

.pill-live {
  color: #ffffff !important;
  background: #171717 !important;
  border-color: rgba(23, 23, 23, 0.14) !important;
}

.project-archive-card {
  padding: 26px;
  align-self: stretch;
  border-color: rgba(184, 155, 94, 0.24);
  background:
    radial-gradient(circle at top right, rgba(184, 155, 94, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 245, 239, 0.9) 100%);
}

.project-archive-card__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.project-archive-card__head h3 {
  margin: 6px 0 0;
  color: var(--heading);
  font-size: 1.32rem;
  letter-spacing: -0.03em;
}

.project-archive-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #6f5725;
  background: rgba(184, 155, 94, 0.14);
  border: 1px solid rgba(184, 155, 94, 0.18);
  font-size: 1.2rem;
}

.project-archive-card p {
  margin: 0;
  color: var(--muted);
}

.project-archive-card p + p {
  margin-top: 12px;
}

.project-archive-card__quote {
  color: var(--heading) !important;
  font-family: var(--font-editorial);
  font-size: 1.04rem;
  letter-spacing: 0.01em;
}

.project-archive-card__tags {
  margin-top: 18px;
}

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

.project-state-card {
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(28, 25, 21, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 30px rgba(30, 24, 18, 0.05);
}

.project-state-card h4,
.workflow-card h3 {
  margin: 0;
  color: var(--heading);
}

.project-state-card h4 {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.project-state-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.build-log-card h3,
.journey-card h3,
.experience-card h3,
.skill-card h3,
.future-card h3,
.contact-card h3,
.cta-copy h3 {
  font-size: 1.28rem;
}

.journey-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.journey-grid::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, rgba(184, 155, 94, 0.22), rgba(184, 155, 94, 0.04));
  transform: translateX(-50%);
}

.journey-card {
  position: relative;
}

.journey-card:nth-child(even) {
  margin-top: 40px;
}

.journey-card::after {
  content: "";
  position: absolute;
  top: 34px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
  box-shadow: 0 0 0 6px rgba(184, 155, 94, 0.08);
}

.journey-card:nth-child(odd)::after {
  right: -29px;
}

.journey-card:nth-child(even)::after {
  left: -29px;
}

.journey-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(184, 155, 94, 0.1);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.experience-grid,
.skills-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.future-layout {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
}

.future-intro {
  padding: 30px;
  display: grid;
  gap: 16px;
}

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

.future-index {
  display: inline-flex;
}

.cta-panel {
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 245, 239, 0.92) 100%);
}

.cta-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.cta-copy {
  display: grid;
  gap: 12px;
}

.contact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-card {
  min-height: 140px;
}

.site-footer {
  padding: 12px 24px 48px;
}

.footer-shell {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.footer-shell p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #171717;
  box-shadow: 0 18px 40px rgba(23, 23, 23, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), box-shadow var(--transition);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #000000;
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(23, 23, 23, 0.24);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.js .reveal-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@keyframes intro-content-out {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
}

@keyframes intro-orb-fade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes reveal-ring {
  0% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(0.45);
  }

  65% {
    opacity: 0.42;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(74);
  }
}

@keyframes particle-burst {
  15% {
    opacity: 0.9;
  }

  100% {
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0);
    opacity: 0;
  }
}

@keyframes fade-down-reveal {
  0% {
    opacity: 0;
    transform: translateY(-18px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up-reveal {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .project-modal__content {
    grid-template-columns: 1fr;
  }

  .project-gallery__figure {
    min-height: 420px;
  }

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

  .hero-layout,
  .about-layout,
  .future-layout,
  .cta-top {
    grid-template-columns: 1fr;
  }

  .intro-title {
    max-width: 10ch;
  }

  .projects-grid,
  .build-log-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-grid::before {
    left: 18px;
    transform: none;
  }

  .journey-grid {
    grid-template-columns: 1fr;
    padding-left: 38px;
  }

  .journey-card:nth-child(even) {
    margin-top: 0;
  }

  .journey-card::after,
  .journey-card:nth-child(odd)::after,
  .journey-card:nth-child(even)::after {
    left: -25px;
    right: auto;
  }
}

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

  .project-modal__idea-grid {
    grid-template-columns: 1fr;
  }

  .project-state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-title-shell.has-art .hero-title-media {
    display: none;
  }

  .hero-title-shell.has-art .hero-name {
    display: block;
  }

  .site-header {
    top: 12px;
  }

  .section {
    padding: 80px 24px;
  }

  .hero {
    padding-top: 72px;
  }

  .intro-content {
    gap: 18px;
  }

  .intro-title {
    max-width: 9ch;
  }

  .hero-layout,
  .projects-featured,
  .projects-grid,
  .build-log-grid,
  .experience-grid,
  .skills-grid,
  .workflow-grid,
  .future-grid,
  .contact-grid,
  .about-side,
  .highlights-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    min-height: auto;
  }

  .hero-statement {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .project-modal {
    padding: 12px;
  }

  .project-modal__panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 24px;
  }

  .project-modal__content {
    gap: 24px;
    padding: 24px 20px 20px;
    max-height: calc(100vh - 24px);
  }

  .project-modal__close {
    top: 16px;
    right: 16px;
  }

  .project-gallery__stage {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .project-gallery__nav {
    width: 44px;
    height: 44px;
  }

  .project-gallery__figure {
    min-height: 320px;
    padding: 14px;
  }

  .project-gallery__thumbs {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(124px, 1fr);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
  }

  .project-gallery__thumbs--triple {
    grid-template-columns: none;
  }

  .project-modal__link-note {
    font-size: 0.88rem;
  }

  .site-header {
    padding: 0 20px;
  }

  .intro-overlay {
    padding: 20px;
  }

  .intro-title {
    font-size: clamp(38px, 12vw, 68px);
    max-width: 8ch;
  }

  .intro-kicker {
    font-size: 0.74rem;
    letter-spacing: 0.14em;
  }

  .intro-subtitle {
    max-width: 24rem;
  }

  .intro-enter {
    width: min(100%, 280px);
  }

  .header-shell {
    position: relative;
    min-height: 62px;
    padding: 8px 10px 8px 16px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    gap: 6px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(30, 24, 18, 0.08);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  }

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

  .site-nav a {
    min-height: 44px;
    padding: 0 14px;
  }

  .nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero-name {
    font-size: clamp(2.3rem, 11vw, 3.2rem);
  }

  .hero-statement {
    font-size: clamp(1.5rem, 7vw, 2rem);
    max-width: 11ch;
  }

  .button,
  .mini-button {
    width: 100%;
  }

  .profile-links,
  .cta-actions {
    width: 100%;
  }

  .profile-head {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --content-padding: 40px;
  }

  .project-modal__meta {
    gap: 8px;
  }

  .project-state-grid {
    grid-template-columns: 1fr;
  }

  .project-modal__actions .button {
    width: 100%;
  }

  .project-modal__actions .project-action {
    width: 100%;
    justify-content: center;
  }

  .intro-title {
    max-width: 7ch;
  }

  .intro-title-divider {
    margin: 0 0.06em;
  }

  .section {
    padding: 64px 20px;
  }

  .hero {
    padding-top: 60px;
  }

  .profile-card,
  .about-card,
  .project-card,
  .build-log-card,
  .journey-card,
  .experience-card,
  .skill-card,
  .future-intro,
  .future-card,
  .contact-card,
  .cta-panel,
  .highlight-card {
    padding: 22px;
  }

  .profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 24px;
  }

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

  .build-log-grid,
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .journey-grid {
    padding-left: 30px;
  }

  .journey-grid::before {
    left: 13px;
  }

  .journey-card::after,
  .journey-card:nth-child(odd)::after,
  .journey-card:nth-child(even)::after {
    left: -20px;
  }

  .back-to-top {
    right: 18px;
    bottom: 18px;
  }
}

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

  body.intro-active {
    overflow: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal-section {
    opacity: 1;
    transform: none;
  }
}
