:root {
  --bg-main: #08111d;
  --bg-secondary: #101b2f;
  --card: rgba(8, 20, 39, 0.76);
  --card-strong: rgba(10, 27, 52, 0.92);
  --line: rgba(160, 186, 228, 0.18);
  --text: #eef4ff;
  --muted: #a5b6d4;
  --primary: #7fd7c1;
  --secondary: #77a6ff;
  --accent: #f6cd75;
  --shadow: 0 24px 80px rgba(2, 8, 18, 0.45);
  --surface-glow: rgba(119, 166, 255, 0.2);
  --hero-overlay: linear-gradient(145deg, rgba(127, 215, 193, 0.12), rgba(119, 166, 255, 0.08));
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 16%, transparent), transparent 28%),
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--secondary) 18%, transparent), transparent 24%),
    linear-gradient(160deg, var(--bg-main) 0%, var(--bg-secondary) 58%, #091321 100%);
  min-height: 100vh;
  transition:
    background 0.45s ease,
    color 0.3s ease;
}

body[data-theme="brand"] {
  --bg-main: #171015;
  --bg-secondary: #2a1722;
  --card: rgba(31, 16, 30, 0.78);
  --card-strong: rgba(42, 20, 34, 0.92);
  --line: rgba(255, 193, 208, 0.18);
  --text: #fff5f8;
  --muted: #dec3cd;
  --primary: #ff9d7a;
  --secondary: #f36ca5;
  --accent: #ffd98a;
  --surface-glow: rgba(243, 108, 165, 0.2);
  --hero-overlay: linear-gradient(145deg, rgba(255, 157, 122, 0.14), rgba(243, 108, 165, 0.1));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 92%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 16, 28, 0.66);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand,
.nav a,
.btn,
.contact-card a,
.theme-btn {
  text-decoration: none;
}

.brand {
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.nav a {
  color: var(--muted);
  font-size: 0.96rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.theme-btn {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 10px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.theme-btn.is-active {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: #08111d;
  box-shadow: 0 12px 24px var(--surface-glow);
}

.hero,
.section,
.contact-section {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.8s ease forwards;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
  padding: 72px 0 30px;
}

.hero-copy,
.hero-panel,
.project-card,
.strength-item,
.timeline-item,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-copy {
  padding: 42px;
}

.hero-copy::after,
.project-card::after,
.strength-item::after,
.timeline-item::after,
.contact-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
}

.hero-panel {
  padding: 28px;
  background: var(--hero-overlay), var(--card-strong);
}

.eyebrow,
.panel-label,
.project-meta,
.strength-index,
.timeline-year,
.contact-card span {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero h1,
.section h2 {
  margin: 10px 0 16px;
  font-family: "Manrope", sans-serif;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
  max-width: 12ch;
}

.hero-summary,
.section-text,
.project-card p,
.timeline-item p,
.contact-card p,
.stat-label,
.stat-value,
.strength-item p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.highlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.92rem;
}

.highlight-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  box-shadow: 0 0 18px var(--surface-glow);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn:hover,
.nav a:hover,
.contact-card a:hover,
.theme-btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: #03111d;
}

.btn-secondary {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

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

.stat {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.stat::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 34px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.stat-value {
  display: block;
  margin-top: 18px;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
}

.section {
  margin-top: 28px;
  padding: 34px;
}

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

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

.gallery-intro {
  max-width: 52ch;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.project-card {
  padding: 24px;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%),
    var(--card);
}

.project-card h3,
.gallery-card h3,
.strength-item h3,
.timeline-item h3 {
  margin: 10px 0 8px;
  font-size: 1.18rem;
}

.gallery-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%),
    var(--card);
  box-shadow: var(--shadow);
}

.gallery-visual {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 9 / 16;
  min-height: auto;
  padding: 12px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 16%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 18px 40px rgba(0, 0, 0, 0.18);
}

.gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
}

.gallery-placeholder {
  display: grid;
  place-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 24px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.gallery-placeholder span {
  color: var(--primary);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-placeholder strong {
  max-width: 18ch;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.4;
}

.gallery-copy {
  width: 100%;
  padding: 0 4px 4px;
}

.gallery-metric-shell {
  display: grid;
  align-content: start;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.98));
  color: #12233b;
}

.gallery-metric-head {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(18, 35, 59, 0.08);
}

.gallery-metric-head strong {
  font-size: 1.12rem;
}

.gallery-metric-head span {
  color: #607089;
  font-size: 0.88rem;
}

.gallery-metric-grid {
  display: grid;
  gap: 12px;
}

.gallery-metric-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(63, 100, 255, 0.1);
  background: linear-gradient(180deg, rgba(78, 118, 255, 0.06), rgba(78, 118, 255, 0.02));
}

.gallery-metric-item span {
  display: block;
  color: #607089;
  font-size: 0.84rem;
}

.gallery-metric-item strong {
  display: block;
  margin-top: 6px;
  color: #1e57d8;
  font-family: "Manrope", sans-serif;
  font-size: 1.55rem;
  line-height: 1.2;
}

.project-tags,
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-tags span,
.timeline-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 0.88rem;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
}

.strength-list,
.timeline {
  display: grid;
  gap: 16px;
}

.strength-item,
.timeline-item {
  padding: 22px;
}

.strength-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--card);
}

.strength-index {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.timeline-item {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 42%),
    var(--card);
}

.timeline-item::after {
  content: "";
  position: absolute;
  inset: auto -10% -55% 35%;
  height: 180px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%);
}

.contact-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  margin-top: 28px;
  padding: 34px;
}

.contact-card {
  padding: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 45%),
    var(--card);
}

.footer {
  padding: 20px 4px 0;
}

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

.contact-card p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-card p:last-child {
  border-bottom: 0;
}

.contact-card a,
.contact-card strong {
  color: var(--text);
  font-weight: 600;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 160px;
  text-align: center;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .split-section,
  .contact-section,
  .project-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    padding-top: 14px;
  }

  .topbar {
    position: static;
    border-radius: 26px;
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .theme-switch {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-top: 24px;
  }

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

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

  .gallery-visual {
    width: min(100%, 300px);
  }

  .hero-copy,
  .hero-panel,
  .section,
  .contact-section {
    padding: 22px;
  }

  .hero h1 {
    max-width: none;
  }

  .contact-card p {
    flex-direction: column;
  }
}
