:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-soft: #0d1b2f;
  --bg-grad-mid: #0c1728;
  --panel: rgba(255, 255, 255, 0.065);
  --panel-strong: rgba(255, 255, 255, 0.105);
  --text: #f7fbff;
  --muted: #9eb0c5;
  --line: rgba(255, 255, 255, 0.13);
  --blue: #38bdf8;
  --green: #2dd4bf;
  --amber: #fbbf24;
  --accent-text: #a7f3d0;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);

  --overlay-faint: rgba(255, 255, 255, 0.035);
  --overlay-grid: rgba(255, 255, 255, 0.045);
  --overlay-soft: rgba(255, 255, 255, 0.06);
  --overlay-mid: rgba(255, 255, 255, 0.08);

  --header-bg: rgba(8, 17, 31, 0.82);
  --surface-strong: rgba(8, 17, 31, 0.96);
  --surface-strong-2: rgba(12, 30, 49, 0.78);
  --avatar-bg: rgba(8, 17, 31, 0.72);
  --contact-link-bg: rgba(8, 17, 31, 0.46);
  --mobile-nav-bg: rgba(8, 17, 31, 0.96);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-soft: #e9eef5;
  --bg-grad-mid: #ffffff;
  --panel: rgba(15, 23, 42, 0.045);
  --panel-strong: rgba(15, 23, 42, 0.07);
  --text: #0b1626;
  --muted: #4c5b70;
  --line: rgba(15, 23, 42, 0.13);
  --blue: #0284c7;
  --green: #0d9488;
  --amber: #b45309;
  --accent-text: #0f766e;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);

  --overlay-faint: rgba(15, 23, 42, 0.03);
  --overlay-grid: rgba(15, 23, 42, 0.05);
  --overlay-soft: rgba(15, 23, 42, 0.05);
  --overlay-mid: rgba(15, 23, 42, 0.07);

  --header-bg: rgba(244, 247, 251, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-strong-2: rgba(226, 236, 246, 0.88);
  --avatar-bg: rgba(255, 255, 255, 0.82);
  --contact-link-bg: rgba(255, 255, 255, 0.65);
  --mobile-nav-bg: rgba(255, 255, 255, 0.98);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(56, 189, 248, 0.18), transparent 33%),
    linear-gradient(240deg, rgba(45, 212, 191, 0.15), transparent 36%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-grad-mid) 48%, var(--bg) 100%);
  transition: background 0.25s ease;
}

.site-bg::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(var(--overlay-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--overlay-grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
}

.logo {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--overlay-mid);
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: var(--overlay-mid);
  color: var(--text);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-toggle,
.theme-toggle {
  display: inline-grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--overlay-mid);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle {
  padding: 0 12px;
}

.lang-toggle:hover,
.theme-toggle:hover {
  background: var(--panel-strong);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--overlay-mid);
  color: var(--text);
  cursor: pointer;
}

.section {
  padding: 112px 0;
}

.hero {
  display: flex;
  min-height: 100vh;
  align-items: center;
  padding-top: 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.7fr);
  gap: 64px;
  align-items: center;
}

.badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 9px 13px;
  text-transform: uppercase;
}

.hero h1,
.section h1,
.section h2 {
  margin-top: 24px;
  max-width: 850px;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.section h2 {
  font-size: clamp(2.1rem, 4vw, 4.3rem);
  line-height: 1;
}

.hero-role {
  margin-top: 24px;
  color: var(--blue);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 750;
}

.hero-copy,
.section-copy,
.contact p {
  max-width: 720px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--overlay-soft);
  color: var(--text);
}

.hero-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-strong), var(--overlay-faint));
  box-shadow: var(--shadow);
  padding: 26px;
  overflow: hidden;
}

.profile-mark {
  display: grid;
  min-height: 330px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(45, 212, 191, 0.08)),
    url("../assets/profile.jpg") center / cover;
}

.profile-mark span {
  display: grid;
  width: 148px;
  height: 148px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--avatar-bg);
  box-shadow: var(--shadow);
  font-size: 3.5rem;
  font-weight: 900;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.metrics div,
.architecture-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--overlay-soft);
  padding: 16px;
}

.metrics strong {
  display: block;
  color: var(--text);
  font-size: 1.65rem;
}

.metrics span,
.architecture-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.architecture-card {
  margin-top: 10px;
}

.architecture-card p {
  margin-top: 8px;
  color: var(--text);
  line-height: 1.6;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 72px;
  align-items: start;
}

.section-heading {
  margin-bottom: 34px;
}

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

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

.card,
.project-card {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
  padding: 26px;
}

.card i {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--green);
  font-size: 1.1rem;
}

.card h3,
.project-card h3,
.timeline-item h3 {
  margin-top: 22px;
  font-size: 1.25rem;
}

.card ul {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
  list-style: none;
}

.card li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--amber);
}

.project-number {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 900;
}

.project-card p,
.timeline-item p {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
}

.experience-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  list-style: none;
}

.experience-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.075);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.25;
  padding: 8px 12px;
}

.project-card strong {
  display: block;
  margin-top: 22px;
  color: var(--blue);
  font-size: 0.9rem;
  line-height: 1.5;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.project-link i {
  color: var(--green);
  transition: transform 0.2s ease;
}

.project-link:hover i {
  transform: translateX(4px);
}

.yuso-showcase,
.case-study {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--overlay-faint), rgba(45, 212, 191, 0.055));
}

.yuso-heading,
.case-heading {
  max-width: 900px;
}

.yuso-heading p,
.case-heading p {
  max-width: 820px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.yuso-hero,
.case-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.62fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--surface-strong), var(--surface-strong-2)),
    linear-gradient(90deg, rgba(56, 189, 248, 0.14), rgba(251, 191, 36, 0.08));
  box-shadow: var(--shadow);
  padding: 36px;
  overflow: hidden;
}

.yuso-hero-copy h2,
.yuso-hero-copy h3,
.case-hero-copy h2,
.case-hero-copy h3,
.case-panel h2,
.case-panel h3,
.yuso-panel h2,
.yuso-panel h3 {
  margin-top: 18px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
}

.yuso-hero-copy p,
.case-hero-copy p,
.case-panel p,
.yuso-panel p {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.yuso-screen-stack,
.case-screen-stack {
  position: relative;
  min-height: 500px;
}

.screen {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.screen-main {
  transform: translateX(4%);
}

.screen-float {
  position: absolute;
  right: -8%;
  bottom: 0;
  width: 72%;
}

.yuso-layout,
.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 18px;
}

.yuso-panel,
.case-panel,
.feature-card,
.gallery-shot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}

.yuso-panel,
.case-panel {
  padding: 28px;
}

.architecture-flow {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.architecture-flow span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--overlay-soft);
  color: var(--text);
  font-weight: 750;
  padding: 13px 14px;
}

.architecture-flow i {
  color: var(--green);
  padding-left: 14px;
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
  list-style: none;
}

.capability-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--text);
  line-height: 1.45;
}

.capability-list li::before {
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

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

.feature-card {
  padding: 24px;
}

.feature-card i {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--amber);
}

.feature-card h2,
.feature-card h3 {
  margin-top: 18px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.feature-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.yuso-gallery,
.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.gallery-shot {
  overflow: hidden;
}

.gallery-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.2;
  object-fit: cover;
  object-position: top left;
}

.gallery-shot figcaption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  padding: 14px 16px;
}

.timeline {
  display: grid;
  gap: 18px;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.timeline-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
}

.timeline-item::before {
  position: absolute;
  top: 28px;
  left: -31px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.timeline-item span {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
}

.contact-section {
  padding-bottom: 140px;
}

.contact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(251, 191, 36, 0.06));
  box-shadow: var(--shadow);
  padding: 56px;
  text-align: center;
}

.contact .eyebrow,
.contact p {
  margin-right: auto;
  margin-left: auto;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.contact-links a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--contact-link-bg);
  padding: 0 18px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

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

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid,
  .section-grid,
  .cards,
  .project-grid,
  .yuso-hero,
  .case-hero,
  .yuso-layout,
  .case-layout,
  .feature-grid,
  .yuso-gallery,
  .case-gallery {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-panel {
    max-width: 560px;
  }

  .yuso-hero,
  .case-hero {
    min-height: auto;
  }

  .yuso-screen-stack,
  .case-screen-stack {
    min-height: 420px;
  }

  .screen-main {
    transform: none;
  }

  .screen-float {
    right: 16px;
    width: 68%;
  }
}

@media (max-width: 740px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-end {
    gap: 10px;
  }

  .nav-links {
    position: fixed;
    top: 76px;
    right: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--mobile-nav-bg);
    padding: 12px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    justify-content: center;
  }

  .section {
    padding: 82px 0;
  }

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

  .hero-actions,
  .contact-links {
    flex-direction: column;
  }

  .btn,
  .contact-links a {
    width: 100%;
  }

  .profile-mark {
    min-height: 250px;
  }

  .yuso-hero,
  .case-hero {
    padding: 22px;
  }

  .yuso-screen-stack,
  .case-screen-stack {
    min-height: auto;
  }

  .screen-float {
    position: static;
    width: 100%;
    margin-top: 12px;
  }

  .capability-list {
    grid-template-columns: 1fr;
  }

  .contact {
    padding: 34px 20px;
  }

  .experience-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .experience-list li {
    border-radius: 8px;
  }
}
