:root {
  color-scheme: dark;
  --bg: #08090b;
  --panel: #121419;
  --panel-soft: #171a20;
  --text: #f4f4f6;
  --muted: #a6a8b2;
  --faint: #666a76;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #ffcf1a;
  --accent-2: #9d9cff;
  --shadow: rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 26px clamp(20px, 6vw, 80px);
  background: rgba(8, 9, 11, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
}

.brand-mark {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.brand-mark::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--accent-2);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 54px);
  font-size: 14px;
  color: #d7d8de;
}

.nav a,
.section-heading a,
.footer a {
  transition: color 180ms ease;
}

.nav a:hover,
.section-heading a:hover,
.footer a:hover {
  color: var(--accent);
}

.theme-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 82px;
  height: 40px;
  padding: 0 12px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.2fr);
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
  padding: 110px clamp(20px, 7vw, 96px) 54px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(8, 9, 11, 0), var(--bg));
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
}

.intro {
  margin: 0 0 14px;
  color: #d8d8ff;
  font-size: clamp(16px, 1.6vw, 20px);
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(64px, 10vw, 132px);
  line-height: 0.96;
  letter-spacing: 0;
}

.role {
  margin: 18px 0 28px;
  color: var(--accent);
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 800;
}

.summary {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 207, 26, 0.68);
  background: rgba(255, 207, 26, 0.1);
}

.button.primary {
  color: #111;
  background: var(--accent);
  border-color: var(--accent);
}

.button.primary:hover {
  background: #ffe06a;
}

.hero-media {
  position: relative;
  z-index: 1;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 40px 110px var(--shadow);
}

.hero-media img {
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}

.scroll-cue {
  position: absolute;
  right: clamp(20px, 4vw, 60px);
  bottom: 34px;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.scroll-cue::before {
  content: "";
  width: 1px;
  height: 42px;
  background: var(--faint);
}

.section,
.contact-band,
.footer {
  padding-inline: clamp(20px, 7vw, 96px);
}

.section {
  padding-top: 86px;
  padding-bottom: 86px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.about,
.skills {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  gap: clamp(28px, 7vw, 110px);
  background: var(--panel);
}

.about {
  grid-template-columns: 1fr;
  padding-top: 72px;
  background:
    linear-gradient(180deg, rgba(18, 20, 25, 0.92), rgba(18, 20, 25, 1));
}

.about .section-copy {
  max-width: 760px;
}

.section-copy h2,
.section-heading h2,
.contact-band h2 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.28;
  letter-spacing: 0;
}

.section-copy p:not(.eyebrow),
.contact-band > p {
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.resume-panel {
  display: grid;
  grid-template-columns: clamp(260px, 25vw, 360px) minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.resume-sidebar {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 26px;
  min-width: 0;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.16);
}

.resume-avatar {
  width: min(198px, 52vw);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, #ffffff 0 42%, #f2f2ef 68%, #e8e8e3 100%);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 0 8px rgba(255, 255, 255, 0.035);
}

.resume-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

.resume-name {
  text-align: center;
}

.resume-name h3 {
  margin: 0;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.resume-name p {
  margin: 10px 0 18px;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: rgba(255, 255, 255, 0.86);
}

.resume-name strong {
  display: block;
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 500;
}

.resume-info {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 290px;
  margin: 0;
  font-size: clamp(15px, 1.45vw, 19px);
  line-height: 1.35;
}

.resume-info div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  min-width: 0;
}

.resume-info dt,
.resume-info dd {
  margin: 0;
}

.resume-info dt {
  white-space: nowrap;
}

.resume-info dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.resume-info a {
  transition: color 180ms ease;
}

.resume-info a:hover {
  color: var(--accent);
}

.resume-main {
  align-self: center;
  display: grid;
  gap: clamp(32px, 4.5vw, 54px);
  min-width: 0;
  padding: clamp(30px, 4vw, 50px);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.16);
}

.resume-block h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--text);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: 0;
}

.resume-block h3 span {
  width: 9px;
  height: 36px;
  background: var(--accent);
}

.resume-skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px clamp(24px, 4vw, 48px);
}

.resume-skill-grid p {
  display: grid;
  place-items: center;
  min-height: 42px;
  margin: 0;
  padding: 7px 18px;
  border: 1px solid rgba(255, 207, 26, 0.5);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 207, 26, 0.12);
  font-size: clamp(16px, 1.65vw, 21px);
  line-height: 1.25;
  text-align: center;
}

.resume-experience {
  display: grid;
  gap: 16px;
  color: var(--muted);
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.85;
}

.resume-experience p {
  margin: 0;
}

.resume-role {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(17px, 1.8vw, 23px);
  line-height: 1.4;
  color: var(--text);
}

.resume-role b {
  font-weight: 900;
}

.project-card span {
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-heading a {
  color: var(--text);
  white-space: nowrap;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 20px;
}

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

.project-card {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  font: inherit;
  text-align: left;
  background: var(--panel-soft);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 207, 26, 0.55);
  outline: none;
}

.project-card img {
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}

.project-card div {
  min-height: 92px;
  padding: 22px;
  background: rgba(10, 11, 14, 0.72);
}

.project-card p {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 750;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 14px;
}

.skill-list span {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  color: #101010;
  background: var(--accent);
  font-size: 17px;
  font-weight: 800;
}

.contact-band {
  display: grid;
  grid-template-columns: 0.9fr 1fr auto;
  align-items: center;
  gap: 40px;
  padding-top: 72px;
  padding-bottom: 72px;
  background: #101116;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-band .contact-actions {
  justify-content: end;
  margin-top: 0;
}

.footer {
  min-height: 98px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  background: #08090b;
}

.footer div {
  display: flex;
  gap: 20px;
  font-size: 21px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 68px clamp(18px, 5vw, 80px) 42px;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  width: min(1280px, 100%);
  height: 100%;
  margin: 0;
}

.lightbox-stage {
  position: relative;
  align-self: center;
  width: 100%;
  max-height: calc(100vh - 170px);
  aspect-ratio: 16 / 9;
}

.lightbox img,
.lightbox-video {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 30px 80px rgba(0, 0, 0, 0.55));
}

.lightbox img {
  display: block;
  object-fit: contain;
}

.lightbox-video {
  position: absolute;
  inset: 0;
  display: none;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}

.lightbox.is-video .lightbox-video {
  display: block;
}

.lightbox.is-video .festival-video-actions {
  display: none;
}

.lightbox figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 28px;
  color: #f7f7f7;
}

.lightbox figcaption span {
  color: #b9bbc5;
}

.festival-video-actions {
  display: none;
  position: absolute;
  left: 12.4%;
  bottom: 3.9%;
  z-index: 3;
  grid-template-columns: repeat(2, 1fr);
  gap: 7.7%;
  width: 29.4%;
}

.festival-video-actions.is-visible {
  display: grid;
}

.festival-video-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(156, 52, 33, 0.3);
  border-radius: 999px;
  color: #8d1d18;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(127, 50, 23, 0.16);
  backdrop-filter: blur(8px);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.festival-video-actions button:hover,
.festival-video-actions button:focus-visible {
  border-color: rgba(156, 52, 33, 0.62);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transform: translateY(-1px);
}

.video-exit {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.lightbox.is-video .video-exit {
  display: grid;
  place-items: center;
}

.video-exit:hover,
.video-exit:focus-visible {
  border-color: rgba(255, 207, 26, 0.7);
  background: rgba(0, 0, 0, 0.68);
  outline: none;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  border-color: rgba(255, 207, 26, 0.72);
  background: rgba(255, 207, 26, 0.16);
  outline: none;
}

.lightbox-close {
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  font-size: 30px;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  width: 54px;
  height: 54px;
  font-size: 44px;
  transform: translateY(-50%);
}

.lightbox-nav.prev {
  left: 28px;
}

.lightbox-nav.next {
  right: 28px;
}

body.light .lightbox {
  background: rgba(12, 12, 14, 0.9);
}

body.light {
  color-scheme: light;
  --bg: #f5f5f1;
  --panel: #ffffff;
  --panel-soft: #fbfbf7;
  --text: #121212;
  --muted: #555a64;
  --faint: #9297a3;
  --line: rgba(0, 0, 0, 0.14);
  --shadow: rgba(0, 0, 0, 0.16);
}

body.light .site-header {
  background: rgba(245, 245, 241, 0.8);
}

body.light .hero::before {
  background: linear-gradient(180deg, rgba(245, 245, 241, 0), var(--bg));
}

body.light .contact-band,
body.light .footer {
  background: #ffffff;
}

body.light .project-card div {
  background: rgba(255, 255, 255, 0.88);
}

body.light .resume-sidebar,
body.light .resume-main {
  background: rgba(255, 255, 255, 0.78);
}

body.light .resume-skill-grid p {
  color: #151515;
  background: rgba(255, 207, 26, 0.42);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .hero,
  .about,
  .skills,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
  }

  .scroll-cue {
    display: none;
  }

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

  .resume-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .resume-sidebar {
    align-content: start;
  }

  .resume-main {
    padding: 26px;
    border-radius: 8px;
  }

  .resume-skill-grid {
    grid-template-columns: 1fr;
  }

  .contact-band .contact-actions {
    justify-content: start;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 18px 18px;
  }

  .brand span:last-child {
    display: none;
  }

  .theme-toggle {
    min-width: 70px;
    height: 36px;
  }

  .hero {
    padding-inline: 18px;
  }

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

  .button {
    width: 100%;
    min-height: 50px;
    padding-inline: 18px;
  }

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

  .resume-panel {
    padding: 18px;
    gap: 24px;
  }

  .resume-avatar {
    width: min(178px, 62vw);
  }

  .resume-info {
    font-size: 14px;
  }

  .resume-info div {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    text-align: left;
  }

  .resume-main {
    padding: 20px 16px;
  }

  .resume-block h3 {
    font-size: 24px;
  }

  .resume-block h3 span {
    height: 30px;
  }

  .resume-skill-grid p,
  .resume-experience {
    font-size: 14px;
  }

  .resume-role {
    font-size: 16px;
  }

  .lightbox {
    padding: 72px 14px 34px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 28px;
    width: 46px;
    height: 46px;
    font-size: 36px;
    transform: none;
  }

  .lightbox-nav.prev {
    left: 18px;
  }

  .lightbox-nav.next {
    right: 18px;
  }

  .lightbox figcaption {
    padding-inline: 56px;
  }

  .festival-video-actions {
    left: 8%;
    right: 8%;
    bottom: 4%;
    width: auto;
    gap: 10px;
  }

  .festival-video-actions button {
    min-height: 34px;
    font-size: 12px;
  }

  .video-exit {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .section,
  .contact-band,
  .footer {
    padding-inline: 18px;
  }

  .footer {
    grid-template-columns: 1fr;
    padding-top: 26px;
    padding-bottom: 26px;
  }
}
