:root {
  color-scheme: dark;
  --bg: #020403;
  --panel: rgba(5, 12, 10, 0.72);
  --panel-strong: rgba(8, 16, 14, 0.9);
  --line: rgba(212, 255, 72, 0.16);
  --line-bright: rgba(212, 255, 72, 0.45);
  --accent: #c8ff32;
  --accent-soft: rgba(200, 255, 50, 0.22);
  --fg: #f4f7ef;
  --muted: rgba(244, 247, 239, 0.66);
  --edge: clamp(18px, 4vw, 72px);
  --radius: 8px;
  --topbar-height: 58px;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--fg);
  background:
    radial-gradient(circle at 18% 12%, rgba(126, 255, 66, 0.14), transparent 26vw),
    radial-gradient(circle at 78% 32%, rgba(0, 163, 118, 0.13), transparent 28vw),
    linear-gradient(180deg, #020403, #06100d 48%, #020403);
  letter-spacing: 0;

  /* 防复制与防保存：禁止文字选中和长按呼出菜单 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(200, 255, 50, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 255, 50, 0.028) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.42)),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.66));
}

img,
video {
  display: block;
  max-width: 100%;
  
  /* 防保存：阻止图片拖拽和独立交互 */
  pointer-events: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
  cursor: pointer;
}

::selection {
  color: #071007;
  background: var(--accent);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #030604;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--accent);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 80;
  transform: translateY(-150%);
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.88);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(200, 255, 50, 0.14), transparent 18vw),
    #010302;
  transition:
    opacity 520ms ease,
    visibility 520ms ease;
}

.loading-screen::before {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(200, 255, 50, 0.16);
  border-radius: 8px;
  content: "";
}

.loading-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loading-core {
  text-align: center;
}

.loading-core span {
  display: block;
  margin-bottom: 10px;
  color: rgba(244, 247, 239, 0.6);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.loading-core strong {
  color: var(--accent);
  font-size: clamp(64px, 9vw, 132px);
  line-height: 0.9;
  text-shadow: 0 0 42px rgba(200, 255, 50, 0.34);
}

.topbar {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(12px, 2vw, 28px);
  align-items: center;
  width: min(calc(100% - 32px), 1180px);
  min-height: var(--topbar-height);
  padding: 7px 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: transparent; /* Must be perfectly transparent to show full refraction */
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -1px 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: url(#chromatic-glass) brightness(1.1);
  -webkit-backdrop-filter: url(#chromatic-glass) brightness(1.1);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  overflow: hidden;
}

.topbar.is-hidden-idle {
  transform: translate(-50%, -150%);
  opacity: 0;
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(
    500px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(255, 255, 255, 1),
    transparent 40%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 10;
}

.brand-pill,
.contact-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 999px;
  white-space: nowrap;
}

.brand-pill {
  gap: 8px;
  padding: 0 15px 0 10px;
  color: #071007;
  background: var(--accent);
  box-shadow: 0 0 24px rgba(200, 255, 50, 0.34);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: var(--accent);
  background: #071007;
  font-size: 10px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 58px);
  min-width: 0;
  color: rgba(244, 247, 239, 0.76);
  font-size: 13px;
  font-weight: 700;
}

.nav-links a {
  white-space: nowrap;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
  transform: translateY(-1px);
}

.contact-pill {
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(244, 247, 239, 0.84);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
}

#site-root {
  overflow: hidden;
}

.hero-section {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: calc(var(--topbar-height) + 70px) var(--edge) 26px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), transparent 58%),
    var(--hero-poster),
    linear-gradient(135deg, #0c1511, #1c2b21);
  background-position: center;
  background-size: cover;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.hero-media.is-video-missing .hero-video {
  display: none;
}

.screen-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 36%, rgba(0, 0, 0, 0.62)),
    radial-gradient(circle at 62% 52%, transparent, rgba(0, 0, 0, 0.46) 64%);
}

.hero-copy {
  align-self: center;
  max-width: min(820px, 82vw);
  padding-bottom: 13vh;
}

.kicker,
.section-mini-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  color: var(--accent);
  font-size: clamp(64px, 10.5vw, 166px);
  font-weight: 900;
  line-height: 0.82;
  text-shadow: 0 0 38px rgba(200, 255, 50, 0.24);
}

.hero-title-secondary {
  color: var(--fg);
  font-size: clamp(46px, 7vw, 112px);
}

.signature {
  display: inline-block;
  margin: -12px 0 12px clamp(140px, 28vw, 360px);
  color: var(--accent);
  font-family: "Brush Script MT", "Snell Roundhand", cursive;
  font-size: clamp(20px, 3vw, 42px);
  transform: rotate(-6deg);
}

.hero-description,
.body-copy {
  max-width: 640px;
  margin: 0;
  color: rgba(244, 247, 239, 0.84);
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 650;
  line-height: 1.55;
}

.hero-carousel-wrap {
  align-self: end;
  min-width: 0;
}

.hero-carousel {
  display: grid;
  grid-auto-columns: clamp(160px, 18vw, 242px);
  grid-auto-flow: column;
  gap: clamp(14px, 2vw, 24px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px var(--edge) 16px 0;
  cursor: grab;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.hero-carousel::-webkit-scrollbar,
.nav-links::-webkit-scrollbar {
  display: none;
}

.hero-carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.carousel-card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #111;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.38);
  scroll-snap-align: start;
  transition:
    transform 220ms ease,
    border-color 220ms ease;
}

.carousel-card:hover,
.carousel-card:focus-visible {
  border-color: var(--line-bright);
  transform: translateY(-8px) rotate(-1deg);
  outline: none;
}

.carousel-card:nth-child(even):hover {
  transform: translateY(-8px) rotate(1deg);
}

.carousel-card-image,
.work-card-image,
.portrait-image,
.dialog-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-card-caption {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 2px;
  padding: 30px 12px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(20, 20, 20, 0.85) 100%);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.carousel-card-caption strong,
.carousel-card-caption span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.carousel-card-caption strong {
  font-size: 14px;
}

.carousel-card-caption span {
  color: var(--muted);
  font-size: 12px;
}

.panel-section,
.works-section,
.contact-section {
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
}

.panel-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.35fr);
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(84px, 12vh, 148px) 0;
}

.portrait-card,
.media-box {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(30, 30, 30, 0.25);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -1px 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: url(#liquid-glass-filter) blur(40px) saturate(200%) brightness(110%);
  -webkit-backdrop-filter: url(#liquid-glass-filter) blur(40px) saturate(200%) brightness(110%);
  position: relative;
}

.portrait-card::before, .media-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(255, 255, 255, 0.18),
    transparent 50%
  );
  pointer-events: none;
  z-index: 10;
}

.portrait-card::after, .media-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(
    400px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(255, 255, 255, 0.9),
    transparent 40%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 11;
}

.portrait-card {
  height: clamp(380px, 50vw, 560px);
  margin: 0;
}

.profile-content {
  align-self: center;
  min-width: 0;
}

.profile-content h2,
.section-heading h2,
.contact-section h2,
.dialog-header h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 0.95;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.info-item,
.stat-item,
.timeline-item,
.awards-column,
.work-card,
.project-dialog {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 30, 30, 0.25);
  box-shadow:
    0 16px 40px 0 rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -1px 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: url(#liquid-glass-filter) blur(40px) saturate(200%) brightness(110%);
  -webkit-backdrop-filter: url(#liquid-glass-filter) blur(40px) saturate(200%) brightness(110%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Dynamic Glare & Highlight */
.info-item::before, .stat-item::before, .timeline-item::before, .work-card::before, .project-dialog::before, .awards-column::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    150px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(255, 255, 255, 0.15),
    transparent 50%
  );
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.info-item::after, .stat-item::after, .timeline-item::after, .work-card::after, .project-dialog::after, .awards-column::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(
    75px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(255, 255, 255, 0.9),
    transparent 40%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 11;
  transition: opacity 0.3s ease;
}

.info-item:hover,
.stat-item:hover,
.timeline-item:hover,
.awards-column:hover {
  transform: scale(1.03) translateY(-2px);
  background: rgba(45, 45, 45, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 24px 60px 0 rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    inset 0 -1px 1px rgba(255, 255, 255, 0.1);
}

.info-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  border-radius: var(--radius);
  padding: 16px;
}

.info-item span,
.stat-item span,
.timeline-period {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.info-item strong {
  overflow-wrap: anywhere;
  color: rgba(244, 247, 239, 0.9);
  font-size: 14px;
}

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

.stat-item {
  border-radius: var(--radius);
  padding: 18px;
}

.stat-item strong {
  display: block;
  color: var(--accent);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
}

.tag-row,
.dialog-meta,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row {
  margin-top: 18px;
}

.tag,
.dialog-meta span,
.contact-links a,
.contact-link-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(244, 247, 239, 0.9);
  background: rgba(30, 30, 30, 0.35);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: url(#liquid-glass-filter) blur(12px) saturate(160%);
  -webkit-backdrop-filter: url(#liquid-glass-filter) blur(12px) saturate(160%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-link-btn {
  cursor: pointer;
}

.contact-link-btn:hover {
  transform: scale(1.08) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(50, 50, 50, 0.45);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.experience-section,
.awards-section {
  width: min(calc(100% - 32px), 1380px);
  grid-template-columns: 0.6fr 1.8fr;
}

.section-heading {
  align-self: start;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 30px);
  padding-top: 34px;
}

.timeline::before {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line-bright), transparent);
}

.timeline-item {
  position: relative;
  border-radius: var(--radius);
  padding: 22px;
}

.timeline-dot {
  position: absolute;
  top: -22px;
  left: 18px;
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 18px rgba(200, 255, 50, 0.7);
}

.timeline-item h3 {
  margin: 12px 0 8px;
  font-size: clamp(22px, 2.5vw, 34px);
  white-space: nowrap;
}

.work-card h3 {
  margin: 0 0 12px 0;
  font-size: clamp(19px, 2.33vw, 28px);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.timeline-item strong {
  color: var(--accent);
  font-size: 13px;
}

.timeline-item p:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.work-card p {
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.4;
  margin: 0;
}

.experience-section .section-heading h2,
.awards-section .section-heading h2 {
  font-size: clamp(31px, 4.5vw, 64px);
  white-space: nowrap;
}

.awards-carousel-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  padding-top: 0;
}

.awards-carousel-wrap::before {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line-bright), transparent);
  pointer-events: none;
}

.awards-grid {
  display: grid;
  grid-auto-columns: calc((100% - 3 * clamp(16px, 3vw, 30px)) / 4);
  grid-auto-flow: column;
  gap: clamp(16px, 3vw, 30px);
  padding: 36px 0 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
}

.awards-grid::-webkit-scrollbar {
  display: none;
}

.awards-grid.is-dragging {
  cursor: grabbing;
}

.awards-progress-wrap {
  width: 25%;
  margin: 24px auto 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  margin-top: 24px;
  position: relative;
  overflow: visible;
  cursor: pointer;
}

.awards-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(18, 18, 18, 0.45);
  backdrop-filter: url(#chromatic-glass) blur(60px) saturate(220%) brightness(110%);
  -webkit-backdrop-filter: url(#chromatic-glass) blur(60px) saturate(220%) brightness(110%);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -1px 1px rgba(255, 255, 255, 0.1);
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s;
  touch-action: none;
}

.awards-progress-thumb:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.awards-progress-thumb.is-active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.3);
  border-color: rgba(255, 255, 255, 0.7);
}

.awards-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius);
  text-align: left;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: visible;
}

.awards-column:hover {
  transform: scale(1.03) translateY(-2px);
  background: rgba(45, 45, 45, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 24px 60px 0 rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    inset 0 -1px 1px rgba(255, 255, 255, 0.1);
}

.awards-column-heading {
  margin: 0;
  color: var(--accent);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
}

.awards-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.awards-list li {
  color: rgba(244, 247, 239, 0.85);
  font-size: clamp(13px, 1.2vw, 15px);
  line-height: 1.6;
}

.works-section {
  padding: clamp(72px, 10vh, 120px) 0;
}

.works-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  padding-top: 34px;
}

.works-grid::before {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line-bright), transparent);
  pointer-events: none;
}

.work-card {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}

.work-card:hover {
  transform: scale(1.03) translateY(-4px);
  background: rgba(45, 45, 45, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 24px 60px 0 rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    inset 0 -1px 1px rgba(255, 255, 255, 0.1);
}

.work-card-overlay {
  position: absolute;
  inset: auto 0 0;
  height: 65%;
  background: linear-gradient(0deg, rgba(10, 10, 10, 0.85) 0%, rgba(10, 10, 10, 0.4) 50%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}

.work-card-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 10;
}

.work-index {
  display: block;
  color: var(--accent);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
}

.contact-section {
  min-height: 72vh;
  padding: clamp(90px, 14vh, 160px) 0;
}

.email-link {
  display: inline-block;
  margin: 30px 0 20px;
  color: var(--accent);
  font-size: clamp(28px, 5vw, 68px);
  font-weight: 900;
  line-height: 1;
}

.cursor-glow {
  position: fixed;
  top: -210px;
  left: -210px;
  z-index: 5;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(200, 255, 50, 0.12), transparent 62%);
  mix-blend-mode: screen;
  transition: transform 80ms linear;
}

.scroll-rail {
  position: fixed;
  top: 0;
  right: 5px;
  z-index: 45;
  width: 3px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.08);
}

.scroll-rail span {
  display: block;
  width: 100%;
  height: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(200, 255, 50, 0.8);
}

.project-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1000px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius);
  padding: 0;
  color: var(--fg);
  background: rgba(20, 20, 20, 0.45);
}

.project-dialog[open] {
  animation: dialogScaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

.project-dialog[open]::backdrop {
  animation: dialogFadeIn 0.3s ease forwards;
}

@keyframes dialogScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes dialogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.project-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: url(#liquid-glass-filter) blur(12px);
  -webkit-backdrop-filter: url(#liquid-glass-filter) blur(12px);
}

.dialog-close {
  position: sticky;
  top: 14px;
  left: calc(100% - 58px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 14px 14px 0 auto;
  border-radius: 999px;
  color: #071007;
  background: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.dialog-body {
  padding: 0 clamp(18px, 4vw, 46px) clamp(26px, 4vw, 46px);
}

.dialog-header {
  max-width: 720px;
}

.dialog-meta {
  margin: 22px 0 28px;
}

.dialog-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.dialog-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: #111;
  display: block;
}

.qr-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(380px, calc(100vw - 40px));
  overflow: visible;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  padding: 0;
  color: var(--fg);
  background: transparent;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -1px 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: url(#chromatic-glass) brightness(1.1);
  -webkit-backdrop-filter: url(#chromatic-glass) brightness(1.1);
}

.qr-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: url(#liquid-glass-filter) blur(12px);
  -webkit-backdrop-filter: url(#liquid-glass-filter) blur(12px);
}

.qr-dialog .dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  margin: 0;
}

.qr-dialog-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 48px 32px 36px;
}

.qr-dialog-title {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.qr-dialog-image {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid rgba(200, 255, 50, 0.2);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent),
    #0a0f0c;
  padding: 12px;
}

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

.reveal.is-visible,
body:not(.is-loaded) .hero-section {
  transform: translateY(0);
  opacity: 1;
}

.noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 90;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.9);
}

.is-missing-media {
  background:
    radial-gradient(circle at 30% 20%, rgba(200, 255, 50, 0.18), transparent 32%),
    linear-gradient(135deg, #111, #18221a);
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto auto;
  }

  .nav-links {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px 8px 6px;
  }

  .contact-pill {
    justify-self: end;
  }

  .hero-section {
    padding-top: 132px;
  }

  .panel-section,
  .experience-section {
    grid-template-columns: 1fr;
  }

  .timeline,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .awards-grid {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    overflow-x: hidden;
  }

  .awards-progress-wrap {
    display: none;
  }

  /* .timeline::before intentionally kept to show green line on top */

  .timeline-dot {
    display: none;
  }
}

@media (max-width: 640px) {
  .contact-section h2 {
    font-size: clamp(24px, 7vw, 36px);
    white-space: nowrap;
  }
  .topbar {
    top: 10px;
    width: calc(100% - 20px);
    border-radius: 18px;
  }

  .brand-pill,
  .contact-pill {
    min-height: 36px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-title {
    font-size: clamp(54px, 17vw, 90px);
  }

  .hero-title-secondary {
    font-size: clamp(42px, 13vw, 68px);
  }

  .signature {
    margin-left: 34vw;
  }

  .hero-carousel {
    grid-auto-columns: 42vw;
  }

  .info-grid,
  .stats-grid,
  .dialog-gallery {
    grid-template-columns: 1fr;
  }

  .portrait-card {
    height: 420px;
  }

  .work-card {
    min-height: 310px;
  }

  .cursor-glow {
    display: none;
  }
}

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

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

/* Safari fallback for SVG filters */
body.is-safari .info-item,
body.is-safari .stat-item,
body.is-safari .timeline-item,
body.is-safari .awards-column,
body.is-safari .work-card,
body.is-safari .project-dialog,
body.is-safari .portrait-card,
body.is-safari .media-box,
body.is-safari .qr-dialog,
body.is-safari .topbar,
body.is-safari .carousel-card-caption,
body.is-safari .awards-progress-thumb {
  backdrop-filter: blur(20px) saturate(180%) brightness(110%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(110%) !important;
}
body.is-safari .project-dialog::backdrop,
body.is-safari .qr-dialog::backdrop {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* Indicator styles */
.carousel-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(40, 40, 40, 0.6);
  border-radius: 999px;
  margin-top: 18px;
  width: max-content;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.3s ease, background 0.3s ease;
}
.indicator-dot.is-active {
  width: 24px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(200, 255, 50, 0.5);
}
