:root {
  --bg: #f7f4ee;
  --bg-2: #f5f4ef;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --text: #171814;
  --muted: #5f625b;
  --muted-2: #85877f;
  --line: rgba(42, 35, 26, 0.12);
  --line-strong: rgba(42, 35, 26, 0.22);
  --primary: #26342f;
  --cyan: #73806f;
  --gold: #b68a56;
  --green: #4f7d64;
  --danger: #b44c6c;
  --shadow: 0 24px 64px rgba(42, 35, 26, 0.10);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --header-height: 76px;
  --font-sans: Inter, "HarmonyOS Sans SC", "MiSans", "Alibaba PuHuiTi 3.0", "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "HarmonyOS Sans SC", "MiSans", "Alibaba PuHuiTi 3.0", "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, rgba(182, 138, 86, 0.10), transparent 24%),
    radial-gradient(circle at 86% 10%, rgba(115, 128, 111, 0.10), transparent 30%),
    radial-gradient(circle at 56% 92%, rgba(38, 52, 47, 0.055), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 56%, #faf9f5);
  min-height: 100vh;
  overflow-x: hidden;
}

main,
.section-shell {
  max-width: 100%;
  overflow-x: clip;
}

body.menu-open { overflow: hidden; }

::selection { background: rgba(115, 128, 111, .22); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  top: -80px;
  left: 18px;
  z-index: 200;
  padding: 12px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  transition: top .2s ease;
}
.skip-link:focus { top: 14px; }

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.68;
  pointer-events: none;
}

.noise-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(42,35,26,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,35,26,.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 82%);
}

main,
.footer {
  position: relative;
  z-index: 1;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 120;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--gold));
  box-shadow: 0 0 14px rgba(115, 128, 111, .20);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7vw;
  border-bottom: 1px solid rgba(42, 35, 26, .075);
  background: rgba(247, 244, 238, .84);
  backdrop-filter: blur(20px);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(42, 35, 26, .105);
  box-shadow: 0 12px 42px rgba(42,35,26,.075);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0;
}
.brand::before {
  content: "";
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: var(--gold);
}
.brand-mark {
  display: none;
}
.brand-text {
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1;
}
.brand-text span { color: var(--gold); }

.nav { display: flex; gap: 28px; color: var(--muted); font-size: .94rem; }
.nav a { position: relative; transition: color .2s ease; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.76);
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
  transition: transform .2s ease;
}
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-panel {
  position: fixed;
  top: var(--header-height);
  left: 4vw;
  right: 4vw;
  z-index: 70;
  display: none;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.mobile-panel a {
  display: block;
  padding: 16px;
  border-radius: 16px;
  color: var(--muted);
  font-weight: 800;
}
.mobile-panel a:hover { background: rgba(115,128,111,.07); color: var(--text); }
.mobile-panel.is-open { display: block; animation: panelIn .22s ease both; }

.section-shell {
  width: min(1180px, 86vw);
  margin: 0 auto;
  padding: 92px 0;
}

.hero {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(420px, 1.02fr) minmax(480px, .98fr);
  align-items: center;
  gap: 64px;
  padding-top: 46px;
}
.hero-copy {
  min-width: 0;
}

.status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid rgba(79, 125, 100, .24);
  border-radius: 999px;
  color: #456c55;
  background: rgba(79, 125, 100, .09);
  font-size: .82rem;
  font-weight: 800;
  margin-bottom: 24px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 rgba(47,159,116,.38);
  animation: dotPulse 1.8s ease infinite;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .76rem;
  font-weight: 900;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 940px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.15vw, 5.55rem);
  line-height: 1.08;
  letter-spacing: 0;
  margin-bottom: 28px;
  text-wrap: balance;
  writing-mode: horizontal-tb;
  word-break: normal;
  overflow-wrap: break-word;
}
h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.85rem);
  line-height: 1.04;
  letter-spacing: 0;
  margin-bottom: 18px;
}
h3 {
  font-size: clamp(1.18rem, 1.8vw, 1.55rem);
  line-height: 1.24;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.hero-desc,
.glass-panel p,
.project-card p,
.work-card p,
.contact-section p,
.section-desc,
.muted {
  color: var(--muted);
  line-height: 1.78;
  font-size: 1.04rem;
}
.hero-desc { max-width: 700px; font-size: 1.1rem; }
.hero-desc[hidden] { display: none; }
.section-desc { max-width: 680px; margin-bottom: 0; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn.primary {
  background: linear-gradient(135deg, var(--primary), #4d6258);
  color: #fff;
  border: none;
  box-shadow: 0 16px 34px rgba(42, 35, 26, .15);
}
.btn.primary:hover { box-shadow: 0 18px 44px rgba(42, 35, 26, .20); }
.btn.ghost { background: rgba(255, 255, 255, .72); color: var(--text); }
.btn.ghost:hover { border-color: rgba(115,128,111,.30); background: rgba(115,128,111,.075); }
.text-btn { border-color: transparent; color: var(--primary); padding-inline: 8px; background: transparent; }

.metric-strip {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metric-strip div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.58));
  box-shadow: 0 14px 38px rgba(42,35,26,.052);
}
.metric-strip strong { display: block; font-size: .98rem; margin-bottom: 6px; }
.metric-strip span { display: block; color: var(--muted-2); font-size: .84rem; line-height: 1.35; }

.hero-visual {
  min-height: 640px;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1000px;
}

.hero-portrait-card {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 48%;
  width: min(380px, 64vw);
  padding: 16px;
  border: 1px solid rgba(42,35,26,.11);
  border-radius: 34px;
  background:
    radial-gradient(circle at 24% 18%, rgba(115,128,111,.10), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.68));
  backdrop-filter: blur(22px);
  box-shadow:
    0 28px 70px rgba(42,35,26,.13),
    0 0 0 1px rgba(115,128,111,.07) inset,
    0 0 44px rgba(115,128,111,.075);
  transform: translate(-50%, -50%) rotate(-3.5deg);
  transform-style: preserve-3d;
  animation: portraitDrift 6.2s ease-in-out infinite;
}
.hero-portrait-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(115,128,111,.42), rgba(255,255,255,.12), rgba(182,138,86,.34));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero-portrait-card::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -26px;
  height: 34px;
  border-radius: 50%;
  background: rgba(38,52,47,.12);
  filter: blur(22px);
  pointer-events: none;
}
.portrait-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  border: 1px solid rgba(42,35,26,.10);
  background: rgba(255,255,255,.68);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255,255,255,.26), transparent 28%, transparent 70%, rgba(115,128,111,.09)),
    linear-gradient(180deg, transparent 64%, rgba(42,35,26,.20));
  pointer-events: none;
}
.portrait-frame img,
.mini-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.mini-photo img { object-position: center top; }
.hero-visual .orb-stage { z-index: 1; opacity: .70; transform: translateX(22px) scale(1.05); }
.hero-visual .floating-card { z-index: 8; }
.orb-stage {
  position: relative;
  width: min(430px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  filter: drop-shadow(0 30px 70px rgba(42,35,26,.09));
}
.data-globe {
  position: relative;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 27%, rgba(255,255,255,.95), transparent 8%),
    radial-gradient(circle at 56% 36%, rgba(115,128,111,.28), transparent 18%),
    radial-gradient(circle at 50% 62%, rgba(38,52,47,.12), transparent 40%),
    linear-gradient(145deg, rgba(239, 237, 231, .96), rgba(220, 224, 216, .94));
  box-shadow:
    inset 0 0 70px rgba(255,255,255,.50),
    inset -30px -42px 70px rgba(38,52,47,.10),
    0 0 64px rgba(115,128,111,.07),
    0 0 90px rgba(182,138,86,.06);
  animation: globeFloat 5.5s ease-in-out infinite;
  overflow: hidden;
}
.globe-grid {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background:
    repeating-linear-gradient(0deg, rgba(38,52,47,.075) 0 1px, transparent 1px 19px),
    repeating-linear-gradient(90deg, rgba(38,52,47,.06) 0 1px, transparent 1px 19px);
  transform: rotate(18deg);
  opacity: .22;
  animation: gridMove 8s linear infinite;
}
.globe-highlight {
  position: absolute;
  inset: 16% auto auto 18%;
  width: 34%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  filter: blur(14px);
}
.orbit {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(38,52,47,.13);
  border-radius: 50%;
}
.orbit-1 { transform: rotateX(70deg) rotateZ(24deg); animation: spin 11s linear infinite; }
.orbit-2 { inset: 16%; transform: rotateX(62deg) rotateY(55deg); animation: spin 15s linear infinite reverse; }
.orbit-3 { inset: 2%; transform: rotateY(74deg) rotateZ(76deg); animation: spin 19s linear infinite; border-color: rgba(115,128,111,.22); }
.satellite {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(182,138,86,.24);
}
.satellite-a { top: 16%; right: 20%; animation: float 4.8s ease-in-out infinite; }
.satellite-b { bottom: 21%; left: 18%; width: 8px; height: 8px; background: var(--primary); animation: float 6s ease-in-out infinite reverse; }

.floating-card {
  position: absolute;
  width: 186px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.68));
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 54px rgba(42,35,26,.09);
  transform-style: preserve-3d;
  animation: float 5.4s ease-in-out infinite;
}
.floating-card span { display: block; color: var(--muted); font-size: .76rem; margin-bottom: 7px; }
.floating-card strong { display: block; font-size: 1.25rem; margin-bottom: 4px; }
.floating-card small { color: var(--muted-2); line-height: 1.35; }
.card-a { top: 10%; left: -1%; }
.card-b { right: -2%; top: 45%; animation-delay: .7s; }
.card-c { left: 8%; bottom: 7%; animation-delay: 1.2s; }

.two-col { display: grid; grid-template-columns: .82fr 1.18fr; gap: 60px; align-items: start; }
.section-heading { margin-bottom: 32px; }

.about-section {
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  align-items: center;
}
.about-section .section-title h2 {
  font-size: clamp(2.15rem, 3.2vw, 3.25rem);
  line-height: 1.08;
  margin-bottom: 24px;
}
.profile-photo-panel {
  position: relative;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.66));
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 54px rgba(42,35,26,.09);
  overflow: hidden;
}
.profile-photo-panel::before {
  content: "";
  position: absolute;
  inset: auto -20% -70% 18%;
  height: 120px;
  background: radial-gradient(circle, rgba(115,128,111,.10), transparent 68%);
}
.mini-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 5.35;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(42,35,26,.10);
  background: rgba(255,255,255,.70);
}

.glass-panel,
.project-card,
.work-card,
.award-card,
.timeline,
.contact-inner,
.skills-grid div {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.66));
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.glass-panel { padding: 34px; border-radius: var(--radius-xl); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tag-cloud span,
.chip-row span {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(115,128,111,.065);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 760;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
  align-items: stretch;
}
.bento-grid.compact-five {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.project-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-lg);
  min-height: 330px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.compact-five .project-card {
  padding: 28px;
  min-height: 330px;
  border-radius: var(--radius-lg);
}
.compact-five .card-topline {
  gap: 12px;
  margin-bottom: 18px;
}
.compact-five .card-tag {
  max-width: 62%;
  padding: 8px 12px;
  font-size: .75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compact-five .card-year {
  font-size: .82rem;
  white-space: nowrap;
}
.compact-five .project-card h3 {
  font-size: clamp(1.35rem, 1.55vw, 1.72rem);
  line-height: 1.24;
  letter-spacing: 0;
  margin-bottom: 10px;
}
.experience-title {
  display: grid;
  gap: 7px;
}
.experience-company,
.experience-role {
  display: block;
}
.experience-company {
  font-size: .94em;
  line-height: 1.28;
}
.experience-role {
  color: rgba(42, 35, 26, .72);
  font-size: .82em;
  font-weight: 820;
  line-height: 1.35;
}
.compact-five .project-card p {
  color: rgba(42, 35, 26, .62);
  font-size: .92rem;
  line-height: 1.66;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.compact-five .chip-row {
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}
.compact-five .chip-row span {
  padding: 8px 11px;
  font-size: .8rem;
}
.project-card > * {
  position: relative;
  z-index: 2;
}
.project-card::before,
.work-card::before,
.glass-panel::before,
.skills-grid div::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(115,128,111,.11), transparent 34%);
  opacity: 0;
  transition: opacity .24s ease;
}
.project-card::before { z-index: 1; }
.project-card:hover::before,
.work-card:hover::before,
.glass-panel:hover::before,
.skills-grid div:hover::before { opacity: 1; }
.project-card:hover, .work-card:hover { border-color: rgba(115,128,111,.30); background: rgba(255,255,255,.94); }
.project-card.has-bg {
  background: rgba(38, 33, 27, .64);
}
.project-card.has-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(28, 25, 22, .90) 0%, rgba(28, 25, 22, .74) 48%, rgba(28, 25, 22, .54) 100%),
    linear-gradient(180deg, rgba(28, 25, 22, .30), rgba(28, 25, 22, .92)),
    radial-gradient(circle at 22% 18%, rgba(182, 138, 86, .22), transparent 34%),
    var(--card-bg);
  background-size: cover;
  background-position: center;
  opacity: 1;
  transform: scale(1.02);
}
.project-card.has-bg h3 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.project-card.has-bg .experience-role {
  color: rgba(255, 255, 255, .78);
}
.project-card.has-bg .card-tag,
.project-card.has-bg .chip-row span {
  background: rgba(28, 25, 22, .58);
  border-color: rgba(255, 255, 255, .24);
  color: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}
.project-card.has-bg .card-year,
.project-card.has-bg p {
  color: rgba(255, 255, 255, .86);
  text-shadow: 0 2px 14px rgba(0,0,0,.42);
}
.project-card h3,
.project-card p,
.work-card h3,
.work-card p {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.project-card.large {
  grid-row: auto;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(115,128,111,.10);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 900;
}
.card-year { color: var(--muted-2); font-size: .82rem; font-weight: 800; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
  align-items: stretch;
}
.work-grid.layout-five {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.work-grid.layout-five .work-card {
  grid-column: span 2;
  min-height: 310px;
}
.work-grid.layout-five .work-card:nth-child(4) {
  grid-column: 2 / span 2;
}
.work-grid.layout-five .work-card:nth-child(5) {
  grid-column: 4 / span 2;
}
.work-card {
  position: relative;
  min-height: 330px;
  height: 100%;
  padding: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.work-grid.layout-five .work-index {
  font-size: 3.35rem;
  min-height: 3rem;
}
.work-grid.layout-five .work-kicker {
  min-height: auto;
  font-size: .66rem;
  line-height: 1.35;
}
.work-grid.layout-five .work-card h3 {
  min-height: auto;
  font-size: clamp(1.16rem, 1.35vw, 1.52rem);
  line-height: 1.28;
}
.work-grid.layout-five .work-card p:not(.work-kicker) {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .9rem;
  line-height: 1.68;
}
.work-card.feature { grid-row: auto; min-height: 330px; }
.work-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -35% -30%;
  height: 190px;
  background: radial-gradient(circle, rgba(115,128,111,.10), transparent 68%);
}
.work-index {
  color: rgba(42,35,26,.15);
  font-size: 4rem;
  font-weight: 950;
  line-height: .9;
  letter-spacing: 0;
  min-height: 3.6rem;
}
.work-kicker {
  color: var(--primary) !important;
  font-size: .78rem !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
  line-height: 1.45 !important;
  min-height: 2.3em;
  margin-bottom: 0;
}
.work-card h3 {
  min-height: 3.1em;
  margin-bottom: 0;
}
.work-card p:not(.work-kicker) {
  margin-bottom: 0;
}
.card-link {
  color: var(--primary);
  font-weight: 900;
  position: relative;
  z-index: 2;
  margin-top: auto;
}

.awards-photo-wall {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 590px;
  padding: 10px 64px 34px;
  overflow: hidden;
}
.life-coverflow {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 590px;
  padding: 10px 64px 34px;
  overflow: hidden;
}
.life-coverflow::before,
.life-coverflow::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 120px;
  pointer-events: none;
}
.life-coverflow::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.life-coverflow::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}
.awards-photo-wall::before,
.awards-photo-wall::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 120px;
  pointer-events: none;
}
.awards-photo-wall::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.awards-photo-wall::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}
.awards-wall-track {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 540px;
  padding: 42px max(16px, calc(50% - 195px)) 54px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.life-wall-track {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 540px;
  padding: 42px max(16px, calc(50% - 195px)) 54px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.life-wall-track::-webkit-scrollbar { display: none; }
.awards-wall-track::-webkit-scrollbar { display: none; }
.award-nav {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(42,35,26,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.70);
  color: rgba(42,35,26,.76);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(80,70,55,.13);
  font-size: 2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.award-nav:hover {
  background: rgba(255,255,255,.92);
  border-color: rgba(185,144,92,.28);
  color: var(--primary);
  transform: translateY(-50%) scale(1.04);
}
.award-nav-prev { left: 18px; }
.award-nav-next { right: 18px; }
.award-photo-card {
  position: relative;
  flex: 0 0 clamp(260px, 30vw, 390px);
  aspect-ratio: 3.5 / 5;
  margin-inline: 0;
  padding: 22px;
  border: 1px solid rgba(42,35,26,.09);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-end;
  cursor: pointer;
  scroll-snap-align: center;
  box-shadow: 0 20px 60px rgba(80,70,55,.13);
  opacity: .48;
  filter: saturate(.72) contrast(.94);
  transform: scale(.88);
  transform-origin: center;
  transition: transform .34s ease, opacity .28s ease, filter .28s ease, border-color .25s ease, box-shadow .25s ease;
}
.award-photo-card.wall-card-0,
.award-photo-card.wall-card-1,
.award-photo-card.wall-card-2,
.award-photo-card.wall-card-3,
.award-photo-card.wall-card-4 { --wall-r: 0deg; }
.award-photo-card.is-near {
  opacity: .72;
  filter: saturate(.86) contrast(.98);
  transform: scale(.94);
}
.award-photo-card.is-active {
  opacity: 1;
  filter: saturate(1.02) contrast(1.05);
  z-index: 4;
  transform: scale(1);
  border-color: rgba(185,144,92,.34);
  box-shadow:
    0 34px 90px rgba(80,70,55,.22),
    0 0 0 1px rgba(255,255,255,.35) inset;
}
.award-photo-card.is-far {
  opacity: .24;
  filter: saturate(.54) contrast(.9);
  transform: scale(.82);
}
.award-photo-media,
.award-photo-shade {
  position: absolute;
  inset: 0;
}
.award-photo-media img,
.award-photo-placeholder {
  width: 100%;
  height: 100%;
}
.award-photo-media img {
  display: block;
  object-fit: cover;
  filter: saturate(.88) contrast(1.02);
  transition: transform .5s ease, filter .3s ease;
}
.award-photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.34), transparent 28%, transparent 72%, rgba(0,0,0,.24));
  opacity: calc(var(--cover-distance, 1) * .32);
  pointer-events: none;
  z-index: 2;
}
.award-photo-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.28), transparent 38%),
    radial-gradient(circle at 78% 18%, rgba(185,144,92,.14), transparent 31%),
    linear-gradient(145deg, #fbfaf5, #ded8ca);
}
.award-photo-placeholder span {
  color: rgba(42, 35, 26, .14);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 950;
  line-height: .88;
}
.award-photo-placeholder strong {
  color: rgba(42, 35, 26, .64);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  line-height: 1.08;
  max-width: 8ch;
}
.award-photo-shade {
  background:
    linear-gradient(180deg, rgba(24,21,17,0) 0%, rgba(24,21,17,.08) 32%, rgba(24,21,17,.76) 100%),
    linear-gradient(90deg, rgba(24,21,17,.16), transparent 34%, transparent 66%, rgba(24,21,17,.10)),
    radial-gradient(circle at 76% 18%, rgba(255,255,255,.18), transparent 26%);
  opacity: .92;
  transition: opacity .3s ease;
}
.award-photo-card.is-active .award-photo-shade {
  opacity: .96;
}
.award-photo-card::before {
  content: "";
  position: absolute;
  inset: auto -22% -34% -22%;
  height: 150px;
  background: radial-gradient(circle, rgba(182,138,86,.13), transparent 68%);
  pointer-events: none;
}
.award-photo-card > * { position: relative; z-index: 1; }
.award-photo-card:hover {
  border-color: rgba(185, 144, 92, .36);
  box-shadow: 0 30px 78px rgba(80, 70, 55, .18);
}
.award-photo-card.is-active .award-photo-media img,
.award-photo-card:hover .award-photo-media img {
  transform: scale(1.035);
  filter: saturate(1.02) contrast(1.06);
}
.award-photo-card:hover .award-photo-shade { opacity: 1; }
.award-photo-index {
  position: absolute;
  top: 18px;
  right: 20px;
  color: rgba(255,255,255,.58);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-shadow: 0 2px 12px rgba(0,0,0,.32);
}
.award-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,.72);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.award-topline span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
}
.award-photo-card h3,
.award-photo-card p {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.38);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.award-photo-card h3 {
  max-width: 14ch;
  font-size: clamp(1.25rem, 2.1vw, 1.78rem);
  line-height: 1.14;
  margin-bottom: 2px;
  opacity: .78;
  transition: opacity .25s ease, transform .25s ease;
}
.award-photo-card.is-active h3,
.award-photo-card:hover h3 { opacity: 1; }
.award-photo-card p {
  color: rgba(255,255,255,.82);
  font-size: .84rem;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: max-height .28s ease, opacity .25s ease, transform .25s ease;
}
.award-photo-card:not(.is-active) .award-topline span,
.award-photo-card:not(.is-active) .chip-row,
.award-photo-card:not(.is-active) p {
  pointer-events: none;
}
.award-photo-card.is-active p,
.award-photo-card:hover p {
  max-height: 5.2em;
  opacity: 1;
  transform: translateY(0);
}
.award-photo-card .chip-row span {
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.13);
  color: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  font-size: .72rem;
}
.award-photo-card .chip-row {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .28s ease, opacity .25s ease;
}
.award-photo-card.is-active .chip-row,
.award-photo-card:hover .chip-row {
  max-height: 72px;
  opacity: 1;
}

.award-photo-card {
  padding: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  justify-content: stretch;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82)),
    var(--panel);
}
.award-photo-card::after,
.award-photo-shade {
  display: none;
}
.award-photo-card > * {
  position: relative;
}
.award-photo-media {
  position: relative;
  inset: auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 9px 9px 0 0;
  background:
    radial-gradient(circle at 50% 22%, rgba(185,144,92,.12), transparent 44%),
    linear-gradient(145deg, rgba(250,249,245,.96), rgba(237,235,228,.9));
}
.award-photo-media img {
  width: 100%;
  height: 100%;
  display: block;
  filter: saturate(.96) contrast(1.02);
}
.awards-photo-wall .award-photo-media img {
  object-fit: contain;
  padding: 18px;
  background: rgba(255,255,255,.86);
}
.life-coverflow .award-photo-media img {
  object-fit: cover;
  padding: 0;
  background: transparent;
}
.award-photo-card.is-active .award-photo-media img,
.award-photo-card:hover .award-photo-media img {
  transform: none;
  filter: saturate(1.02) contrast(1.04);
}
.award-photo-index {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(42,35,26,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: rgba(42,35,26,.42);
  text-shadow: none;
  backdrop-filter: blur(14px);
}
.award-card-caption {
  z-index: 3;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 166px;
  padding: 18px 20px 20px;
  border-top: 1px solid rgba(42,35,26,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,249,245,.92));
  box-shadow: 0 -14px 34px rgba(42,35,26,.07);
}
.award-card-caption .award-topline {
  gap: 10px;
}
.award-card-caption .award-topline span {
  border-color: rgba(42,35,26,.08);
  background: rgba(115,128,111,.09);
  color: rgba(42,35,26,.72);
  backdrop-filter: none;
}
.award-card-caption .award-topline strong {
  color: rgba(42,35,26,.54);
}
.award-card-caption h3,
.award-card-caption p {
  max-width: none;
  color: var(--text);
  text-shadow: none;
}
.award-card-caption h3 {
  font-size: clamp(1.08rem, 1.45vw, 1.42rem);
  line-height: 1.24;
  margin: 0;
  opacity: .88;
}
.award-photo-card.is-active .award-card-caption h3,
.award-photo-card:hover .award-card-caption h3 {
  opacity: 1;
}
.award-card-caption p {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.58;
}
.award-card-caption .chip-row span {
  border-color: rgba(42,35,26,.12);
  background: rgba(255,255,255,.64);
  color: rgba(42,35,26,.62);
  backdrop-filter: none;
}
.life-card-caption {
  min-height: 128px;
  padding: 16px 18px 18px;
}

.resume-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.timeline { padding: 30px; border-radius: var(--radius-lg); }
.timeline-item { position: relative; padding: 0 0 30px 28px; border-left: 1px solid var(--line); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(115,128,111,.18);
}
.timeline-item span { color: var(--primary); font-size: .76rem; text-transform: uppercase; font-weight: 900; letter-spacing: .13em; }
.timeline-item p { color: var(--muted); line-height: 1.7; margin-bottom: 0; }

.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skills-grid div { position: relative; overflow: hidden; padding: 24px; border-radius: 24px; min-height: 160px; }
.skills-grid strong { position: relative; z-index: 1; display: block; font-size: 1.06rem; margin-bottom: 12px; }
.skills-grid span { position: relative; z-index: 1; color: var(--muted); line-height: 1.62; font-size: .94rem; }

.life-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.life-coverflow + .life-grid {
  display: none;
}
.life-grid .life-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.62));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.life-grid .life-photo,
.life-grid .life-photo-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.38)),
    linear-gradient(145deg, rgba(248,247,243,.96), rgba(229,229,221,.84));
}
.life-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.life-grid .life-photo::after,
.life-grid .life-photo-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(42,35,26,.24));
}
.life-grid .life-photo-placeholder {
  display: grid;
  place-items: end start;
  padding: 18px;
}
.life-photo-placeholder::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 14px;
  border: 1px solid rgba(42, 35, 26, .12);
  background:
    linear-gradient(180deg, transparent 0 54%, rgba(115,128,111,.13) 54% 55%, transparent 55%),
    linear-gradient(132deg, transparent 0 58%, rgba(115,128,111,.12) 58% 59%, transparent 59%),
    linear-gradient(28deg, transparent 0 66%, rgba(42,35,26,.10) 66% 67%, transparent 67%),
    linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,.18));
}
.life-grid .life-photo-placeholder::after {
  background:
    linear-gradient(180deg, transparent 62%, rgba(42,35,26,.18)),
    linear-gradient(0deg, rgba(255,255,255,.18), transparent 38%);
}
.life-photo-placeholder span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(42,35,26,.12);
  background: rgba(255,255,255,.62);
  color: rgba(42,35,26,.44);
  font-size: .82rem;
  font-weight: 900;
}
.life-card h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}
.life-card p {
  color: var(--muted);
  line-height: 1.68;
  font-size: .94rem;
  margin-bottom: 0;
}

.contact-section { padding-bottom: 112px; }
.contact-inner {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: 40px;
  padding: 72px min(7vw, 90px);
}
.contact-inner::after {
  content: "";
  position: absolute;
  inset: -40% 10% auto 10%;
  height: 260px;
  background: radial-gradient(circle, rgba(115,128,111,.11), transparent 62%);
}
.contact-inner > * { position: relative; z-index: 1; }
.center-actions { justify-content: center; }
.footer { text-align: center; color: var(--muted-2); padding: 0 0 44px; font-size: .92rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 150;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(38,52,47,.94);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 18px 60px rgba(0,0,0,.34);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

body[data-theme="dark"] {
  --bg: #060814;
  --bg-2: #090d1d;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #f7f9ff;
  --muted: #a8b0c7;
  --muted-2: #6f7892;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --primary: #7c5cff;
  --cyan: #24d6ff;
  --gold: #ffcf6b;
  --green: #66f2b5;
  --danger: #ff6b9d;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  background:
    radial-gradient(circle at 10% 14%, rgba(124, 92, 255, 0.34), transparent 25%),
    radial-gradient(circle at 86% 12%, rgba(36, 214, 255, 0.22), transparent 27%),
    radial-gradient(circle at 50% 88%, rgba(255, 207, 107, 0.10), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 58%, #050611);
}

body[data-theme="dark"] ::selection { background: rgba(36, 214, 255, .32); color: #fff; }
body[data-theme="dark"] #particle-canvas { opacity: .68; }
body[data-theme="dark"] .noise-layer {
  opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
}
body[data-theme="dark"] .scroll-progress span {
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--gold));
  box-shadow: 0 0 18px rgba(36, 214, 255, .75);
}
body[data-theme="dark"] .site-header {
  border-bottom-color: rgba(255, 255, 255, .08);
  background: rgba(6, 8, 20, .66);
}
body[data-theme="dark"] .site-header.is-scrolled {
  background: rgba(6, 8, 20, .86);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 12px 50px rgba(0,0,0,.24);
}
body[data-theme="dark"] .brand::before { background: var(--cyan); }
body[data-theme="dark"] .brand-text span { color: var(--cyan); }
body[data-theme="dark"] .nav a::after { background: linear-gradient(90deg, var(--primary), var(--cyan)); }
body[data-theme="dark"] .menu-btn { background: rgba(255,255,255,.06); }
body[data-theme="dark"] .mobile-panel {
  background: rgba(9, 13, 29, .94);
}
body[data-theme="dark"] .mobile-panel a:hover { background: rgba(255,255,255,.06); }
body[data-theme="dark"] .status-pill {
  border-color: rgba(102, 242, 181, .28);
  color: #ccffe9;
  background: rgba(102, 242, 181, .08);
}
body[data-theme="dark"] .pulse-dot {
  box-shadow: 0 0 0 rgba(102,242,181,.6);
}
body[data-theme="dark"] .btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 16px 44px rgba(124, 92, 255, .34);
}
body[data-theme="dark"] .btn.primary:hover { box-shadow: 0 18px 54px rgba(36, 214, 255, .32); }
body[data-theme="dark"] .btn.ghost { background: rgba(255, 255, 255, .06); }
body[data-theme="dark"] .btn.ghost:hover {
  border-color: rgba(36,214,255,.38);
  background: rgba(36,214,255,.09);
}
body[data-theme="dark"] .text-btn { color: var(--cyan); }
body[data-theme="dark"] .metric-strip div {
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.052));
}
body[data-theme="dark"] .metric-strip strong {
  color: rgba(255,255,255,.96);
}
body[data-theme="dark"] .metric-strip span {
  color: rgba(226,237,255,.70);
}
body[data-theme="dark"] .hero-portrait-card {
  border-color: rgba(255,255,255,.20);
  background:
    radial-gradient(circle at 24% 18%, rgba(36,214,255,.22), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.055));
  box-shadow:
    0 34px 90px rgba(0,0,0,.58),
    0 0 0 1px rgba(124,92,255,.10) inset,
    0 0 70px rgba(36,214,255,.16);
}
body[data-theme="dark"] .hero-portrait-card::before {
  background: linear-gradient(140deg, rgba(36,214,255,.8), rgba(124,92,255,.1), rgba(255,207,107,.55));
}
body[data-theme="dark"] .hero-portrait-card::after { background: rgba(36,214,255,.28); }
body[data-theme="dark"] .portrait-frame {
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
}
body[data-theme="dark"] .portrait-frame::after {
  background:
    linear-gradient(115deg, rgba(255,255,255,.18), transparent 28%, transparent 70%, rgba(36,214,255,.18)),
    linear-gradient(180deg, transparent 58%, rgba(6,8,20,.72));
}
body[data-theme="dark"] .orb-stage { filter: drop-shadow(0 35px 90px rgba(36,214,255,.2)); }
body[data-theme="dark"] .data-globe {
  background:
    radial-gradient(circle at 33% 27%, rgba(255,255,255,.95), transparent 8%),
    radial-gradient(circle at 56% 36%, rgba(36,214,255,.72), transparent 18%),
    radial-gradient(circle at 50% 62%, rgba(124,92,255,.70), transparent 40%),
    linear-gradient(145deg, rgba(13, 20, 47, .96), rgba(3, 5, 15, .96));
  box-shadow:
    inset 0 0 70px rgba(255,255,255,.10),
    inset -30px -42px 70px rgba(0,0,0,.38),
    0 0 80px rgba(124,92,255,.25),
    0 0 130px rgba(36,214,255,.15);
}
body[data-theme="dark"] .globe-grid {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.14) 0 1px, transparent 1px 19px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 19px);
}
body[data-theme="dark"] .orbit { border-color: rgba(255,255,255,.24); }
body[data-theme="dark"] .orbit-3 { border-color: rgba(36,214,255,.28); }
body[data-theme="dark"] .satellite { box-shadow: 0 0 24px rgba(255,207,107,.8); }
body[data-theme="dark"] .satellite-b { background: var(--cyan); }
body[data-theme="dark"] .floating-card {
  border-color: rgba(170, 218, 238, .28);
  background:
    linear-gradient(145deg, rgba(206, 237, 248, .24), rgba(42, 87, 112, .14) 48%, rgba(7, 18, 34, .34)),
    rgba(20, 42, 62, .34);
  box-shadow: 0 18px 54px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.18);
}
body[data-theme="dark"] .floating-card span {
  color: rgba(234, 244, 255, .76);
  font-weight: 780;
}
body[data-theme="dark"] .floating-card strong {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.26);
}
body[data-theme="dark"] .floating-card small {
  color: rgba(226, 237, 255, .68);
}
body[data-theme="dark"] .profile-photo-panel,
body[data-theme="dark"] .glass-panel,
body[data-theme="dark"] .project-card,
body[data-theme="dark"] .work-card,
body[data-theme="dark"] .timeline,
body[data-theme="dark"] .life-grid .life-card,
body[data-theme="dark"] .contact-inner,
body[data-theme="dark"] .skills-grid div {
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.043));
  box-shadow: var(--shadow);
}
body[data-theme="dark"] .life-photo,
body[data-theme="dark"] .life-photo-placeholder {
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025)),
    linear-gradient(145deg, rgba(16, 27, 46, .96), rgba(5, 8, 18, .9));
}
body[data-theme="dark"] .life-photo-placeholder::before {
  border-color: rgba(255,255,255,.14);
  background:
    linear-gradient(180deg, transparent 0 54%, rgba(36,214,255,.18) 54% 55%, transparent 55%),
    linear-gradient(132deg, transparent 0 58%, rgba(255,207,107,.18) 58% 59%, transparent 59%),
    linear-gradient(28deg, transparent 0 66%, rgba(255,255,255,.13) 66% 67%, transparent 67%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
}
body[data-theme="dark"] .life-photo-placeholder::after {
  background:
    linear-gradient(180deg, transparent 62%, rgba(5,8,18,.34)),
    linear-gradient(0deg, rgba(255,255,255,.05), transparent 38%);
}
body[data-theme="dark"] .life-photo-placeholder span {
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.62);
}
body[data-theme="dark"] .profile-photo-panel::before { background: radial-gradient(circle, rgba(36,214,255,.25), transparent 68%); }
body[data-theme="dark"] .mini-photo {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
}
body[data-theme="dark"] .tag-cloud span,
body[data-theme="dark"] .chip-row span {
  background: rgba(255,255,255,.07);
}
body[data-theme="dark"] .project-card::before,
body[data-theme="dark"] .work-card::before,
body[data-theme="dark"] .glass-panel::before,
body[data-theme="dark"] .skills-grid div::before {
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(36,214,255,.18), transparent 34%);
}
body[data-theme="dark"] .project-card:hover,
body[data-theme="dark"] .work-card:hover {
  border-color: rgba(36,214,255,.42);
  background: rgba(255,255,255,.105);
}
body[data-theme="dark"] .award-photo-card {
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 28px 72px rgba(0,0,0,.34);
}
body[data-theme="dark"] .life-coverflow::before,
body[data-theme="dark"] .awards-photo-wall::before {
  background: linear-gradient(90deg, var(--bg), transparent);
}
body[data-theme="dark"] .life-coverflow::after,
body[data-theme="dark"] .awards-photo-wall::after {
  background: linear-gradient(270deg, var(--bg), transparent);
}
body[data-theme="dark"] .award-nav {
  border-color: rgba(255,255,255,.16);
  background: rgba(8,14,26,.58);
  color: rgba(247,249,255,.76);
  box-shadow: 0 18px 48px rgba(0,0,0,.32);
}
body[data-theme="dark"] .award-nav:hover {
  border-color: rgba(36,214,255,.38);
  background: rgba(16,27,46,.78);
  color: #fff;
}
body[data-theme="dark"] .award-photo-card:hover {
  border-color: rgba(36,214,255,.44);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .30), 0 0 40px rgba(36,214,255,.10);
}
body[data-theme="dark"] .award-photo-card.is-active {
  border-color: rgba(36,214,255,.46);
  box-shadow: 0 34px 90px rgba(0,0,0,.38), 0 0 58px rgba(36,214,255,.13);
}
body[data-theme="dark"] .award-photo-placeholder {
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), transparent 36%),
    radial-gradient(circle at 76% 22%, rgba(36,214,255,.18), transparent 30%),
    linear-gradient(145deg, rgba(16, 27, 46, .94), rgba(5, 8, 18, .94));
}
body[data-theme="dark"] .award-photo-placeholder span {
  color: rgba(255,255,255,.18);
}
body[data-theme="dark"] .award-photo-placeholder strong {
  color: rgba(247,249,255,.78);
}
body[data-theme="dark"] .award-photo-shade {
  background:
    linear-gradient(180deg, rgba(4,7,16,0) 0%, rgba(4,7,16,.12) 30%, rgba(4,7,16,.82) 100%),
    linear-gradient(90deg, rgba(4,7,16,.18), transparent 34%, transparent 66%, rgba(4,7,16,.12)),
    radial-gradient(circle at 76% 18%, rgba(36,214,255,.16), transparent 26%);
}
body[data-theme="dark"] .award-topline span {
  background: rgba(36,214,255,.12);
  color: var(--cyan);
}
body[data-theme="dark"] .award-photo-card::before {
  background: radial-gradient(circle, rgba(124,92,255,.24), transparent 68%);
}
body[data-theme="dark"] .award-photo-card {
  background:
    linear-gradient(180deg, rgba(16,27,46,.92), rgba(8,14,26,.9)),
    var(--panel);
}
body[data-theme="dark"] .award-photo-media {
  background:
    radial-gradient(circle at 50% 22%, rgba(36,214,255,.16), transparent 44%),
    linear-gradient(145deg, rgba(16,27,46,.96), rgba(5,8,18,.92));
}
body[data-theme="dark"] .awards-photo-wall .award-photo-media img {
  background: rgba(255,255,255,.92);
}
body[data-theme="dark"] .award-photo-index {
  border-color: rgba(255,255,255,.14);
  background: rgba(8,14,26,.62);
  color: rgba(247,249,255,.58);
}
body[data-theme="dark"] .award-card-caption {
  border-top-color: rgba(255,255,255,.10);
  background:
    linear-gradient(180deg, rgba(12,19,34,.96), rgba(7,11,24,.94));
  box-shadow: 0 -16px 34px rgba(0,0,0,.24);
}
body[data-theme="dark"] .award-card-caption .award-topline span,
body[data-theme="dark"] .award-card-caption .chip-row span {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: rgba(247,249,255,.78);
}
body[data-theme="dark"] .award-card-caption .award-topline strong,
body[data-theme="dark"] .award-card-caption p {
  color: rgba(226,237,255,.70);
}
body[data-theme="dark"] .award-card-caption h3 {
  color: rgba(247,249,255,.96);
}
body[data-theme="dark"] .project-card.has-bg { background: rgba(5, 7, 18, .64); }
body[data-theme="dark"] .project-card.has-bg::after {
  background-image:
    linear-gradient(90deg, rgba(5, 7, 18, .92) 0%, rgba(5, 7, 18, .76) 48%, rgba(5, 7, 18, .56) 100%),
    linear-gradient(180deg, rgba(5, 7, 18, .36), rgba(5, 7, 18, .92)),
    radial-gradient(circle at 22% 18%, rgba(36, 214, 255, .28), transparent 34%),
    var(--card-bg);
}
body[data-theme="dark"] .project-card.has-bg .card-tag,
body[data-theme="dark"] .project-card.has-bg .chip-row span {
  background: rgba(6, 8, 20, .52);
  border-color: rgba(255, 255, 255, .2);
  color: rgba(247, 249, 255, .88);
}
body[data-theme="dark"] .project-card.has-bg .card-year,
body[data-theme="dark"] .project-card.has-bg p {
  color: rgba(255, 255, 255, .86);
}
body[data-theme="dark"] .experience-role {
  color: rgba(247, 249, 255, .68);
}
body[data-theme="dark"] .compact-five .project-card p {
  color: rgba(247, 249, 255, .64);
}
body[data-theme="dark"] .card-tag {
  background: rgba(36,214,255,.12);
  color: var(--cyan);
}
body[data-theme="dark"] .work-card::after { background: radial-gradient(circle, rgba(124,92,255,.28), transparent 68%); }
body[data-theme="dark"] .work-index { color: rgba(255,255,255,.22); }
body[data-theme="dark"] .work-kicker,
body[data-theme="dark"] .card-link,
body[data-theme="dark"] .timeline-item span {
  color: var(--cyan) !important;
}
body[data-theme="dark"] .timeline-item::before {
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(36,214,255,.78);
}
body[data-theme="dark"] .contact-inner::after { background: radial-gradient(circle, rgba(36,214,255,.24), transparent 62%); }
body[data-theme="dark"] .toast {
  background: rgba(255,255,255,.92);
  color: #060814;
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .10s; }
.delay-2 { transition-delay: .20s; }

@keyframes spin { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes globeFloat { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(2deg); } }
@keyframes gridMove { from { transform: rotate(18deg) translateX(0); } to { transform: rotate(18deg) translateX(32px); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes portraitDrift { 0%,100% { transform: translate(-50%, -50%) rotate(-3.5deg); } 50% { transform: translate(-50%, calc(-50% - 12px)) rotate(-1.5deg); } }
@keyframes dotPulse { 0% { box-shadow: 0 0 0 0 rgba(47,159,116,.34); } 70% { box-shadow: 0 0 0 10px rgba(47,159,116,0); } 100% { box-shadow: 0 0 0 0 rgba(47,159,116,0); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1060px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 76px; }
  .hero-visual { min-height: 560px; }
  .hero-portrait-card { width: min(360px, 58vw); }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .bento-grid.compact-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work-grid.layout-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-grid.layout-five .work-card,
  .work-grid.layout-five .work-card:nth-child(4),
  .work-grid.layout-five .work-card:nth-child(5) {
    grid-column: auto;
  }
  .about-section .section-title {
    max-width: 520px;
  }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card.feature { grid-row: auto; min-height: 330px; grid-column: auto; }
}

@media (max-width: 820px) {
  .site-header { padding: 0 5vw; }
  .nav { display: none; }
  .menu-btn { display: inline-block; }
  .section-shell { width: min(90vw, 1180px); padding: 76px 0; }
  .bento-grid, .work-grid, .awards-grid, .skills-grid, .life-grid, .metric-strip { grid-template-columns: 1fr; }
  .bento-grid.compact-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-grid.layout-five { grid-template-columns: 1fr; }
  .awards-photo-wall {
    width: 100%;
    margin-left: 0;
    min-height: 540px;
  }
  .life-coverflow {
    min-height: 540px;
  }
  .awards-photo-wall::before,
  .awards-photo-wall::after,
  .life-coverflow::before,
  .life-coverflow::after { width: 54px; }
  .award-nav {
    width: 40px;
    height: 40px;
    font-size: 1.65rem;
  }
  .award-nav-prev { left: 18px; }
  .award-nav-next { right: 18px; }
  .awards-wall-track,
  .life-wall-track {
    height: 500px;
    padding-inline: 13vw;
    scroll-padding-inline: 13vw;
  }
  .award-photo-card {
    flex-basis: min(74vw, 390px) !important;
    aspect-ratio: 4 / 5 !important;
    transform: scale(.86);
  }
  .award-photo-card.is-near { transform: scale(.9); }
  .award-photo-card.is-active { transform: scale(1); }
  .project-card.large, .work-card.feature { min-height: auto; grid-column: auto; }
  .hero-visual { min-height: 540px; }
  .hero-portrait-card { top: 50%; width: min(330px, 68vw); }
  .hero-visual .orb-stage { transform: translateX(16px) scale(.96); opacity: .58; }
  .floating-card { width: 166px; padding: 14px; }
  .card-a { top: 8%; left: -3%; }
  .card-b { right: -3%; top: 45%; }
  .card-c { left: 6%; bottom: 5%; }
}

@media (max-width: 560px) {
  :root { --header-height: 68px; }
  .brand-text { display: inline; font-size: .98rem; }
  .section-shell { width: min(92vw, 1180px); padding: 66px 0; }
  h1 { font-size: clamp(2.6rem, 13vw, 4.05rem); line-height: 1.1; }
  .status-pill { font-size: .74rem; line-height: 1.35; align-items: flex-start; }
  .hero-actions, .resume-actions { width: 100%; }
  .btn { flex: 1; min-width: 0; padding-inline: 16px; }
  .text-btn { flex-basis: 100%; }
  .hero-visual { min-height: 490px; }
  .hero-portrait-card { width: min(292px, 78vw); padding: 10px; border-radius: 28px; }
  .portrait-frame { border-radius: 22px; }
  .orb-stage { width: min(330px, 78vw); }
  .about-section .section-title h2 { font-size: clamp(2rem, 10vw, 2.75rem); }
  .profile-photo-panel { padding: 12px; border-radius: 24px; }
  .mini-photo { border-radius: 18px; }
  .bento-grid.compact-five { grid-template-columns: 1fr; }
  .award-photo-card {
    flex-basis: 82vw;
    padding: 0;
  }
  .award-photo-card p {
    -webkit-line-clamp: 2;
    max-height: 5.2em;
    opacity: 1;
    transform: none;
  }
  .award-photo-card .chip-row {
    max-height: 72px;
    opacity: 1;
  }
  .floating-card { width: 142px; }
  .floating-card small { display: none; }
  .card-a { left: -4%; }
  .card-b { right: -4%; }
  .contact-inner { padding: 56px 20px; border-radius: 30px; }
}

@media (max-width: 420px) {
  .about-section .section-title {
    max-width: 100%;
  }
}

/* Layout stability guard: keeps preview/editor drafts inside the normal page flow. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

main,
.section-shell,
.hero,
.hero-copy,
.hero-visual,
.bento-grid,
.work-grid,
.awards-photo-wall,
.life-coverflow,
.awards-wall-track,
.life-wall-track {
  box-sizing: border-box;
  max-width: 100%;
}

.section-shell {
  width: min(1180px, 86vw);
  margin-inline: auto;
}

.hero {
  grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr);
  overflow: visible;
}

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

.hero h1 {
  overflow-wrap: anywhere;
}

.bento-grid,
.bento-grid.compact-five {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: stretch;
}

.project-card {
  min-width: 0;
  min-height: 330px;
}

.project-card p {
  overflow-wrap: anywhere;
}

.work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: stretch;
}

.work-grid.layout-five {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.work-grid.layout-five .work-card {
  grid-column: span 2;
}

.work-grid.layout-five .work-card:nth-child(4) {
  grid-column: 2 / span 2;
}

.work-grid.layout-five .work-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.work-card {
  min-width: 0;
  min-height: 360px;
}

.work-card h3 {
  min-height: 0;
  overflow-wrap: anywhere;
}

.work-card p:not(.work-kicker) {
  overflow-wrap: anywhere;
}

.awards-photo-wall,
.life-coverflow {
  width: 100%;
  min-height: 560px;
  padding: 10px 60px 34px;
  overflow: hidden;
}

.awards-wall-track,
.life-wall-track {
  width: 100%;
  height: 520px;
  padding: 36px max(16px, calc(50% - 190px)) 46px;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
}

.award-photo-card {
  flex: 0 0 clamp(280px, 31vw, 380px);
  max-width: 380px;
  min-width: 0;
  aspect-ratio: 3.6 / 5;
  transform: scale(.88);
}

.award-photo-card.is-near {
  transform: scale(.94);
}

.award-photo-card.is-active {
  transform: scale(1);
}

.award-photo-card.is-far {
  transform: scale(.82);
}

.award-card-caption {
  min-width: 0;
}

.award-card-caption h3,
.award-card-caption p,
.life-card-caption h3,
.life-card-caption p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 1240px) {
  .section-shell {
    width: min(90vw, 1180px);
  }

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

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

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

  .work-grid.layout-five .work-card,
  .work-grid.layout-five .work-card:nth-child(4),
  .work-grid.layout-five .work-card:nth-child(5) {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  .section-shell {
    width: min(92vw, 1180px);
  }

  .bento-grid,
  .bento-grid.compact-five,
  .work-grid,
  .work-grid.layout-five,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .project-card,
  .work-card {
    min-height: auto;
  }

  .awards-photo-wall,
  .life-coverflow {
    min-height: 520px;
    padding-inline: 42px;
  }

  .awards-wall-track,
  .life-wall-track {
    height: 500px;
    padding-inline: 12vw;
    scroll-padding-inline: 12vw;
  }

  .award-photo-card {
    flex-basis: min(76vw, 380px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  #particle-canvas { display: none; }
}
