:root {
  --bg: #070816;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --card: rgba(12, 18, 38, 0.78);
  --text: #f8fbff;
  --muted: #b7c2d6;
  --line: rgba(255, 255, 255, 0.14);
  --purple: #8b5cf6;
  --cyan: #22d3ee;
  --gold: #f8c56b;
  --black: #05070f;
  --green: #34d399;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f7f8ff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --card: rgba(255, 255, 255, 0.92);
  --text: #111827;
  --muted: #4b5563;
  --line: rgba(17, 24, 39, 0.12);
  --black: #ffffff;
  --shadow: 0 24px 80px rgba(30, 41, 59, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.28), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 30rem),
    linear-gradient(135deg, var(--bg), var(--black));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  gap: 12px;
  background: var(--bg);
  transition: opacity 260ms ease, visibility 260ms ease;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-mark {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: white;
  font-weight: 900;
  animation: pulse 1.1s infinite alternate;
}
@keyframes pulse { from { transform: scale(0.94); } to { transform: scale(1.04); } }

.site-header {
  position: fixed;
  z-index: 60;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 72px);
  transition: background 180ms ease, box-shadow 180ms ease;
}
.site-header.is-scrolled {
  background: rgba(7, 8, 22, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
[data-theme="light"] .site-header.is-scrolled { background: rgba(255, 255, 255, 0.82); }
.brand, .nav-links, .header-actions, .hero-actions, .footer-links { display: flex; align-items: center; }
.brand { gap: 10px; font-weight: 900; }
.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: white;
}
.nav-links { gap: clamp(12px, 2vw, 28px); color: var(--muted); font-weight: 800; }
.nav-links a:hover { color: var(--text); }
.header-actions { gap: 10px; }
.icon-button, .nav-toggle {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.icon-button { padding: 8px 12px; font-weight: 800; }
.nav-toggle { display: none; width: 44px; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 5px auto; background: var(--text); }

.section-shell { padding: clamp(74px, 9vw, 128px) clamp(18px, 5vw, 72px); }
.hero { min-height: 100vh; display: grid; align-items: center; overflow: hidden; position: relative; }
.hero::before {
  content: "";
  position: absolute;
  inset: 10% -10% auto auto;
  width: 48vw;
  height: 48vw;
  border-radius: 999px;
  background: conic-gradient(from 90deg, var(--purple), var(--cyan), var(--gold), var(--purple));
  filter: blur(64px);
  opacity: 0.22;
  animation: drift 9s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(-8%, 8%) rotate(18deg); } }
.hero-grid, .split-section, .contact-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: clamp(32px, 7vw, 92px);
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 980px; margin: 0; font-size: clamp(2.9rem, 7vw, 6.9rem); line-height: 0.94; letter-spacing: 0; }
h2 { margin: 0; font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1.04; letter-spacing: 0; }
h3 { margin: 0 0 10px; font-size: 1.22rem; line-height: 1.22; }
.hero-tagline { color: var(--cyan); font-size: clamp(1.1rem, 2vw, 1.55rem); font-weight: 900; }
.hero-subtitle, .stacked-copy, .glass-card p, .feature-card p, .project-card p, .team-card p, .detail-card p { color: var(--muted); }
.typing-line { font-size: 1.05rem; font-weight: 900; color: var(--gold); min-height: 32px; }
.typing-line span::after { content: "|"; animation: blink 0.8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-actions { flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { border: 0; background: linear-gradient(135deg, var(--purple), var(--cyan)); color: white; box-shadow: 0 18px 42px rgba(34, 211, 238, 0.18); }
.button.ghost { background: var(--surface); color: var(--text); }
.button.dark { background: #080a13; color: white; border-color: rgba(248, 197, 107, 0.28); }
.glass-panel, .glass-card, .feature-card, .team-card, .project-card, .detail-card, .resume-card, .service-card, .faq-item, .contact-form, .newsletter {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.hero-dashboard { padding: 24px; }
.panel-top { display: flex; gap: 8px; margin-bottom: 24px; }
.panel-top span { width: 12px; height: 12px; border-radius: 99px; background: var(--gold); }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-row div { padding: 16px; border-radius: 18px; background: var(--surface); }
.metric-row strong { display: block; font-size: 2.2rem; color: var(--cyan); }
.signal-chart { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; height: 140px; margin: 24px 0; }
.signal-chart span { border-radius: 12px 12px 0 0; background: linear-gradient(180deg, var(--cyan), var(--purple)); }
.signal-chart span:nth-child(1) { height: 42%; } .signal-chart span:nth-child(2) { height: 72%; } .signal-chart span:nth-child(3) { height: 54%; } .signal-chart span:nth-child(4) { height: 88%; } .signal-chart span:nth-child(5) { height: 64%; }

.section-heading { max-width: 900px; margin-bottom: 36px; }
.team-grid, .feature-grid, .projects-grid, .details-grid, .resume-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.team-card, .project-card, .feature-card, .detail-card, .resume-card { padding: 22px; }
.photo-placeholder {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.6), rgba(34, 211, 238, 0.45));
  color: white;
  font-size: 1.6rem;
  font-weight: 900;
}
.badge-row, .tag-list, .card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.badge, .tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}
.badge.open { color: var(--green); } .badge.gold { color: var(--gold); } .badge.cyan { color: var(--cyan); }
.card-actions { margin-top: 16px; }
.card-actions a { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.86rem; font-weight: 900; }
.mission-grid, .service-grid, .tech-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.glass-card, .service-card { padding: 24px; }
.service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-card { font-weight: 900; color: var(--cyan); }
.tech-category { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.tech-category h3 { color: var(--gold); }
.tech-category ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.tech-category li { padding: 8px 10px; border-radius: 999px; background: var(--surface-strong); font-weight: 800; }

.project-toolbar { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(150px, 0.5fr)); gap: 12px; margin-bottom: 16px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
textarea { resize: vertical; }
.project-count { color: var(--muted); margin-bottom: 18px; font-weight: 800; }
.project-card { display: flex; flex-direction: column; gap: 12px; }
.project-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; color: var(--muted); font-size: 0.9rem; }
.work-band { background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(34, 211, 238, 0.12)); border-block: 1px solid var(--line); }
.contact-list p { margin: 8px 0; color: var(--muted); }
.contact-form { padding: 24px; display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
.form-status { min-height: 24px; color: var(--green); font-weight: 900; }
.faq-list { display: grid; gap: 12px; }
.faq-item { overflow: hidden; }
.faq-question { width: 100%; border: 0; padding: 18px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font-weight: 900; }
.faq-answer { display: none; padding: 0 18px 18px; color: var(--muted); }
.faq-item.is-open .faq-answer { display: block; }
.newsletter { text-align: center; }
.newsletter form { display: flex; gap: 12px; max-width: 640px; margin: 24px auto 0; }
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 34px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}
.footer-links { gap: 16px; color: var(--muted); font-weight: 800; }
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: white;
  font-weight: 900;
  cursor: pointer;
}
.back-to-top.is-visible { display: block; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 520ms ease, transform 520ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1080px) {
  .hero-grid, .split-section, .contact-section { grid-template-columns: 1fr; }
  .team-grid, .feature-grid, .projects-grid, .details-grid, .resume-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-toolbar { grid-template-columns: 1fr 1fr; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: calc(100% - 4px);
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px; }
  h1 { font-size: 2.8rem; }
  .metric-row, .team-grid, .feature-grid, .projects-grid, .details-grid, .resume-grid, .mission-grid, .tech-grid, .project-toolbar, .service-grid { grid-template-columns: 1fr; }
  .newsletter form, .hero-actions { flex-direction: column; align-items: stretch; }
  .site-footer { grid-template-columns: 1fr; }
}
