:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --panel: rgba(20, 20, 20, 0.95);
  --line: rgba(255, 193, 7, 0.15);
  --text: #ffffff;
  --muted: #a0a0a0;
  --accent: #ffc107;
  --accent-warm: #ff9800;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --radius-sm: 12px;
  --content-width: min(1200px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  overflow-x: hidden;
}

body {
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 60%, rgba(180, 30, 30, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 30% 80%, rgba(120, 20, 20, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(200, 40, 40, 0.15) 0%, transparent 45%),
    var(--bg);
  font-family: "Poppins", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: hidden;
}

.hero.active ~ .page-section,
.hero.active ~ .site-footer {
  overflow-y: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.page-shell {
  width: var(--content-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
}

main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 193, 7, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: #000;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  box-shadow: 0 6px 24px rgba(255, 193, 7, 0.4);
}

.brand-copy {
  display: inline-flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  position: relative;
  border-radius: 12px;
  transition: all 300ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  transition: width 300ms ease, left 300ms ease;
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
  background: rgba(255, 193, 7, 0.08);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 60%;
  left: 20%;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: transparent;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-toggle span:first-child {
  transform: translateY(-4px);
}

.nav-toggle span:last-child {
  transform: translateY(4px);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}

/* Sections */
.section {
  padding: 100px 0 0;
}

.section-heading {
  margin-bottom: 48px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

.section-heading p {
  color: var(--muted);
  margin-top: 8px;
}

.sub-heading {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--accent);
}

/* Page Sections - show/hide */
.hero {
  display: none;
}

.hero.active {
  display: grid;
  flex: 1;
}

.page-section {
  display: none;
  padding: 60px 0;
}

.page-section.active {
  display: block;
}

/* Hero */
.hero {
  position: relative;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  min-height: 0;
  padding: 24px 0;
  overflow: hidden;
}

.hero-content {
  max-width: 600px;
}

.hero-kicker {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  color: var(--accent);
  text-shadow: 0 0 50px rgba(255, 193, 7, 0.4);
}

.hero-role {
  font-size: 1.6rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero-role-live {
  color: var(--accent);
  font-weight: 700;
}

.hero-role-live::after {
  content: "|";
  margin-left: 4px;
  animation: blink 1s infinite;
}

.hero-text {
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 28px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 18px;
  margin-bottom: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--accent);
  color: #000;
}

.button.primary:hover {
  box-shadow: 0 10px 30px rgba(255, 193, 7, 0.3);
}

.button.secondary {
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--accent);
}

.hero-contact {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-contact .divider {
  color: rgba(255, 255, 255, 0.2);
}

/* Portrait */
.hero-stage {
  display: flex;
  justify-content: center;
}

.portrait-orbit {
  position: relative;
  width: min(340px, 32vw);
  height: min(340px, 32vw);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 0 60px rgba(255, 193, 7, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

.portrait-shell {
  position: relative;
  width: min(280px, 26vw);
  height: min(280px, 26vw);
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid var(--accent);
  box-shadow: 0 0 40px rgba(255, 193, 7, 0.25);
}

.hero-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Skills */
.skills-block,
.experience-block,
.projects-block,
.education-block {
  margin-bottom: 60px;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.skill-name {
  font-weight: 500;
}

.skill-percent {
  color: var(--accent);
}

.skill-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  border-radius: 4px;
  transition: width 1s ease;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tags span {
  padding: 8px 16px;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border-color 200ms ease, background 200ms ease;
}

.skill-tags span:hover {
  border-color: var(--accent);
  background: rgba(255, 193, 7, 0.1);
}

/* Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 40px;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.2);
}

.timeline-content {
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
}

.timeline-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

.timeline-date {
  color: var(--accent);
  font-size: 0.85rem;
  white-space: nowrap;
}

.timeline-role {
  color: var(--muted);
  margin-bottom: 14px;
}

.timeline-list {
  list-style: none;
  margin-bottom: 14px;
}

.timeline-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.timeline-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-tech span {
  padding: 4px 10px;
  background: rgba(255, 193, 7, 0.1);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent);
}

/* Projects */
.project-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 10px 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  transition: all 200ms ease;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #000;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 193, 7, 0.15);
}

.project-info {
  padding: 24px;
}

.project-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.project-info p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  padding: 4px 10px;
  background: rgba(255, 193, 7, 0.1);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent);
}

/* Education */
.edu-card {
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.edu-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.edu-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* University Page */
.university-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}

.university-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.university-banner {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 152, 0, 0.1) 100%);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: var(--radius);
  padding: 32px;
}

.university-info-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
}

.university-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.university-highlights {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.highlight-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.highlight-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.highlight-item p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.university-about {
  padding: 28px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.university-about h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent);
}

.university-about p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.university-about p:last-child {
  margin-bottom: 0;
}

.university-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.95rem;
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list li span {
  color: var(--text);
  font-weight: 500;
}

.honor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.honor-tags span {
  padding: 8px 14px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--accent);
}

.location-text {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1024px) {
  .university-content {
    grid-template-columns: 1fr;
  }
}

/* Life */
.life-block,
.gallery-block,
.work-gallery-block {
  margin-bottom: 60px;
}

/* Work Gallery */
.work-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.work-gallery-item {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.work-gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.work-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* University Gallery */
.university-gallery {
  margin-top: 32px;
  margin-bottom: 32px;
}

.university-gallery h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent);
}

.university-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.university-gallery-item {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.university-gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.university-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hobby-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hobby-tags span {
  padding: 12px 24px;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 200ms ease, background 200ms ease;
}

.hobby-tags span:hover {
  border-color: var(--accent);
  background: rgba(255, 193, 7, 0.1);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-header .sub-heading {
  margin-bottom: 0;
}

.view-all-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 200ms ease;
}

.view-all-btn:hover {
  background: rgba(255, 193, 7, 0.1);
  border-color: var(--accent);
}

.view-all-btn span {
  margin-left: 4px;
  opacity: 0.7;
}

/* Card Slider */
.card-slider {
  position: relative;
  padding: 40px 0 70px;
  overflow: hidden;
}

.card-track {
  position: relative;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-slide {
  position: absolute;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: all 500ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.card-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-slide.active {
  width: 420px;
  height: 280px;
  z-index: 10;
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(255, 193, 7, 0.3), 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translateX(0) scale(1);
}

.card-slide.prev-1 {
  width: 320px;
  height: 220px;
  z-index: 8;
  transform: translateX(-340px) scale(1);
  opacity: 0.85;
}

.card-slide.next-1 {
  width: 320px;
  height: 220px;
  z-index: 8;
  transform: translateX(340px) scale(1);
  opacity: 0.85;
}

.card-slide.prev-2 {
  width: 220px;
  height: 160px;
  z-index: 6;
  transform: translateX(-560px) scale(1);
  opacity: 0.5;
  border-color: rgba(255, 193, 7, 0.2);
}

.card-slide.next-2 {
  width: 220px;
  height: 160px;
  z-index: 6;
  transform: translateX(560px) scale(1);
  opacity: 0.5;
  border-color: rgba(255, 193, 7, 0.2);
}

.card-slide.hidden {
  opacity: 0;
  transform: translateX(0) scale(0.5);
  pointer-events: none;
}

.card-nav {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
}

.card-btn {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 200ms ease;
}

.card-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 193, 7, 0.1);
  color: var(--accent);
}

.card-dots {
  display: flex;
  gap: 8px;
}

.card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
}

.card-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* Responsive */
@media (max-width: 768px) {
  .card-slide.active {
    width: 280px;
    height: 190px;
  }

  .card-slide.prev-1,
  .card-slide.next-1 {
    width: 200px;
    height: 140px;
    transform: translateX(-220px) scale(1);
  }

  .card-slide.next-1 {
    transform: translateX(220px) scale(1);
  }

  .card-slide.prev-2,
  .card-slide.next-2 {
    width: 140px;
    height: 100px;
    transform: translateX(-360px) scale(1);
  }

  .card-slide.next-2 {
    transform: translateX(360px) scale(1);
  }
}

/* Lightbox - Grid View */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.95);
  opacity: 0;
  transition: opacity 300ms ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  flex-shrink: 0;
}

.lightbox-title {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
}

.lightbox-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 200ms ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
  overflow-y: auto;
  align-content: start;
}

.lightbox-grid-item {
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.lightbox-grid-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.2);
}

.lightbox-grid-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.grid-item-info {
  padding: 12px 14px;
}

.grid-item-info h4 {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.grid-item-info p {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}

/* Image Viewer - Single */
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.98);
  opacity: 0;
  transition: opacity 300ms ease;
}

.image-viewer.active {
  display: flex;
  opacity: 1;
}

.viewer-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: background 200ms ease;
}

.viewer-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.viewer-prev,
.viewer-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  transition: background 200ms ease;
}

.viewer-prev {
  left: 24px;
}

.viewer-next {
  right: 24px;
}

.viewer-prev:hover,
.viewer-next:hover {
  background: rgba(255, 193, 7, 0.4);
}

.viewer-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.viewer-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-icon {
  font-size: 1.5rem;
}

.contact-label {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contact-value {
  font-weight: 500;
}

/* Footer */
.site-footer {
  flex-shrink: 0;
  padding: 16px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.hero.active ~ .site-footer {
  display: none;
}

.site-footer p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.02); opacity: 0.8; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding: 56px 0 40px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-contact {
    justify-content: center;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .university-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --content-width: calc(100vw - 24px);
  }

  .site-header {
    top: 10px;
    padding: 14px 18px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 0.85rem;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    flex-direction: column;
    padding: 20px;
    background: rgba(10, 10, 10, 0.98);
    border-radius: 12px;
    gap: 16px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .timeline-header {
    flex-direction: column;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .portrait-orbit {
    width: 260px;
    height: 260px;
  }

  .portrait-shell {
    width: 220px;
    height: 220px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 193, 7, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 193, 7, 0.5);
}

::selection {
  background: rgba(255, 193, 7, 0.3);
  color: #fff;
}
