:root {
  color-scheme: dark;
  --bg: #07100f;
  --bg-soft: #0d1918;
  --surface: rgba(12, 26, 24, 0.78);
  --surface-solid: #10211f;
  --line: rgba(210, 229, 222, 0.14);
  --text: #eef8f4;
  --muted: #abc3bb;
  --teal: #4bd4c1;
  --amber: #f2b14f;
  --accent: #d7f8ef;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.36);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7faf8;
  --bg-soft: #eef5f2;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --line: rgba(23, 51, 46, 0.14);
  --text: #0e1917;
  --muted: #536963;
  --teal: #0f8f80;
  --amber: #a96c13;
  --accent: #062f2a;
  --shadow: 0 20px 60px rgba(21, 55, 48, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  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;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr auto 42px;
  left: 0;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 56px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10;
}

.site-header[data-elevated="true"] {
  border-bottom-color: var(--line);
}

.brand {
  align-items: center;
  display: flex;
  font-size: 0.95rem;
  font-weight: 700;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--teal), var(--amber));
  border-radius: 8px;
  color: #06100e;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  letter-spacing: 0;
  width: 44px;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: clamp(14px, 2vw, 28px);
}

.nav-links a,
.social-row a,
.social-row span,
.site-footer a {
  color: var(--muted);
  font-size: 0.94rem;
  transition: color 180ms ease;
}

.nav-links a:hover,
.social-row a:hover,
.site-footer a:hover {
  color: var(--text);
}

.theme-toggle {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.theme-icon,
.theme-icon::before {
  border-radius: 999px;
  display: block;
}

.theme-icon {
  background: var(--teal);
  height: 16px;
  position: relative;
  width: 16px;
}

.theme-icon::before {
  background: var(--surface-solid);
  content: "";
  height: 16px;
  left: 6px;
  position: absolute;
  top: -2px;
  width: 16px;
}

:root[data-theme="light"] .theme-icon::before {
  display: none;
}

.hero {
  min-height: 94vh;
  overflow: hidden;
  padding: 132px clamp(18px, 4vw, 56px) 84px;
  position: relative;
}

.hero-media,
.hero-overlay {
  inset: 0;
  position: absolute;
}

.hero-media {
  background-image: url("assets/cyber-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(5, 12, 11, 0.94) 0%, rgba(5, 12, 11, 0.78) 42%, rgba(5, 12, 11, 0.24) 100%),
    linear-gradient(180deg, rgba(5, 12, 11, 0.08) 0%, var(--bg) 96%);
}

:root[data-theme="light"] .hero-overlay {
  background:
    linear-gradient(90deg, rgba(247, 250, 248, 0.96) 0%, rgba(247, 250, 248, 0.82) 44%, rgba(247, 250, 248, 0.38) 100%),
    linear-gradient(180deg, rgba(247, 250, 248, 0.02) 0%, var(--bg) 96%);
}

.hero-inner {
  align-items: center;
  display: grid;
  gap: clamp(32px, 7vw, 96px);
  grid-template-columns: minmax(0, 1fr) minmax(290px, 420px);
  margin: 0 auto;
  max-width: 1180px;
  min-height: calc(94vh - 216px);
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3rem, 8vw, 7.2rem);
  line-height: 0.95;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 1.02;
  margin-bottom: 0;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  max-width: 680px;
}

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

.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--teal);
  border-color: transparent;
  color: #041211;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.button.ghost {
  color: var(--muted);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
}

.profile-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.avatar {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(75, 212, 193, 0.92), rgba(242, 177, 79, 0.9)),
    var(--surface-solid);
  border-radius: 8px;
  color: #06100e;
  display: flex;
  font-size: 2.4rem;
  font-weight: 950;
  height: 128px;
  justify-content: center;
  margin-bottom: 20px;
  width: 128px;
}

.panel-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.snapshot-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.snapshot-list div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.snapshot-list dt {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 3px;
}

.snapshot-list dd {
  font-weight: 800;
  margin: 0;
}

.section {
  margin: 0 auto;
  max-width: 1180px;
  padding: 92px clamp(18px, 4vw, 56px);
}

.section-heading {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
  margin-bottom: 42px;
}

.section-heading.compact {
  display: block;
  max-width: 760px;
}

.about-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
}

.text-block {
  color: var(--text);
  font-size: 1.18rem;
  max-width: 720px;
}

.muted {
  color: var(--muted);
}

.stats-grid,
.focus-grid,
.project-list {
  display: grid;
  gap: 16px;
}

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

.stat,
.focus-card,
.project-card,
.timeline li,
.contact-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat {
  padding: 22px;
}

.stat span,
.card-index,
.project-type,
.timeline span {
  color: var(--amber);
  font-weight: 900;
}

.stat span {
  display: block;
  font-size: 1.9rem;
  line-height: 1;
  margin-bottom: 8px;
}

.stat p,
.focus-card p,
.project-card p,
.project-card li,
.timeline p,
.contact-copy p,
.site-footer p {
  color: var(--muted);
  margin-bottom: 0;
}

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

.focus-card {
  min-height: 230px;
  padding: 24px;
}

.card-index {
  display: inline-block;
  font-size: 0.85rem;
  margin-bottom: 44px;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: space-between;
  min-height: 310px;
  padding: 26px;
}

.project-card.featured {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 14%, transparent), transparent 52%),
    var(--surface);
}

.project-type {
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.project-points {
  color: var(--muted);
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 18px;
}

.project-points li::marker {
  color: var(--teal);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 10px;
}

.project-actions {
  display: flex;
  margin-top: 2px;
}

.demo-link {
  align-items: center;
  background: var(--teal);
  border: 1px solid transparent;
  border-radius: 8px;
  color: #041211;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  transition: background 180ms ease, transform 180ms ease;
}

.demo-link:hover {
  background: var(--amber);
  transform: translateY(-1px);
}

.demo-link.unavailable {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.timeline {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
}

.timeline li {
  display: grid;
  gap: 18px;
  grid-template-columns: 92px 1fr;
  padding: 20px 22px;
}

.contact-section {
  align-items: end;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  max-width: 1070px;
  padding: 34px;
}

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-links a,
.contact-links span {
  background: color-mix(in srgb, var(--surface-solid) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: block;
  font-weight: 800;
  padding: 14px 16px;
  word-break: break-word;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px clamp(18px, 4vw, 56px) 40px;
}

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

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner,
  .about-grid,
  .section-heading,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: 0;
  }

  .profile-panel {
    max-width: 520px;
  }

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

@media (max-width: 640px) {
  .site-header {
    min-height: 64px;
  }

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

  .hero {
    padding-top: 104px;
  }

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

  .button {
    width: 100%;
  }

  .section {
    padding-bottom: 68px;
    padding-top: 68px;
  }

  .focus-grid,
  .project-list {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-row: auto;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
