:root {
  --bg: #030208;
  --bg-soft: #080611;
  --panel: rgba(13, 10, 24, 0.9);
  --panel-strong: rgba(18, 14, 34, 0.96);
  --text: #f6f3ff;
  --muted: #d0c8e2;
  --subtle: #9488ad;
  --line: rgba(147, 51, 234, 0.25);
  --purple: #9333ea;
  --purple-strong: #7e22ce;
  --accent: #c084fc;
  --green: #22c55e;
  --amber: #f59e0b;
  --danger: #ef4444;
  --shadow: rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(147, 51, 234, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(126, 34, 206, 0.1) 0%, transparent 40%),
    #030208;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.22;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

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

p {
  color: var(--muted);
  line-height: 1.72;
}

.nav {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(7, 6, 13, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px var(--shadow);
}

.brand {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #070411;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--purple-strong));
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

.page {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 52px;
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: 
    linear-gradient(90deg, rgba(5, 4, 10, 0.98), rgba(5, 4, 10, 0.85) 58%, rgba(5, 4, 10, 0.95)),
    radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 100% 100%, 40px 40px;
  box-shadow: 0 24px 70px var(--shadow);
}

.hero {
  min-height: 620px;
  padding: 64px 56px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero {
  min-height: 430px;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(5, 4, 10, 0.8) 100%),
    linear-gradient(90deg, rgba(139, 92, 246, 0.22), transparent 50%);
}

.hero > *,
.page-hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.tagline {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  max-width: 940px;
  margin-bottom: 14px;
  font-size: 4.35rem;
  line-height: 0.98;
}

.hero h2,
.page-hero h2 {
  max-width: 920px;
  margin-bottom: 18px;
  color: #e9ddff;
  font-size: 1.75rem;
  line-height: 1.22;
}

.hero-text,
.lead {
  max-width: 790px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions,
.buttons,
.contact-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid rgba(168, 85, 247, 0.42);
  border-radius: 8px;
  color: #070411;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--purple-strong));
  box-shadow: 0 16px 34px rgba(139, 92, 246, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.72);
}

.button.secondary {
  color: var(--text);
  background: rgba(17, 15, 29, 0.78);
  box-shadow: none;
}

.button.secondary:hover {
  background: rgba(28, 24, 48, 0.94);
}

.button.small {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 0.9rem;
}

.nav-links a:focus-visible,
.button:focus-visible,
.project-card:focus-visible,
.back-link a:focus-visible,
.filter-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.signal-strip {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.signal {
  min-height: 112px;
  padding: 16px;
  border: 1px solid rgba(194, 169, 255, 0.16);
  border-radius: 8px;
  background: rgba(7, 6, 13, 0.64);
}

.signal span {
  display: block;
  margin-bottom: 8px;
  color: var(--subtle);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signal strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.36;
}

.section {
  margin-top: 34px;
}

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

.section-header h2 {
  margin-bottom: 6px;
  font-size: 2rem;
}

.section-header p {
  max-width: 700px;
  margin: 0;
  color: var(--subtle);
}

.card,
.snapshot-card,
.project-card,
.skill-box,
.achievement-card,
.timeline-item,
.detail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px var(--shadow);
}

.card,
.snapshot-card,
.skill-box,
.achievement-card,
.detail-card {
  padding: 24px;
}

.card h2,
.detail-card h2 {
  margin-bottom: 12px;
}

.snapshot-grid,
.achievement-grid,
.project-grid,
.skill-grid,
.proof-grid,
.two-column,
.three-column,
.cert-columns {
  display: grid;
  gap: 18px;
}

.snapshot-grid,
.achievement-grid,
.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

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

.project-toolbar {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(17, 15, 29, 0.78);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter-button.is-active {
  color: #070411;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--purple-strong));
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 315px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.48);
  background: var(--panel-strong);
}

.project-card.is-hidden {
  display: none;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.project-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #070411;
  background: linear-gradient(135deg, var(--accent), var(--purple-strong));
}

.project-icon svg {
  width: 22px;
  height: 22px;
}

.project-type {
  color: var(--subtle);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.project-card h3,
.skill-box h3,
.snapshot-card h2,
.achievement-card strong,
.timeline-item h3 {
  color: var(--text);
}

.project-card h3 {
  margin-bottom: 8px;
  font-size: 1.28rem;
}

.project-card p {
  margin-bottom: 18px;
}

.card-link {
  display: inline-block;
  margin-top: auto;
  color: var(--accent);
  font-weight: 900;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row.large {
  gap: 10px;
}

.chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid rgba(139, 92, 246, 0.26);
  border-radius: 6px;
  color: #eee7ff;
  background: rgba(139, 92, 246, 0.12);
  font-size: 0.86rem;
  font-weight: 750;
}

.chip.cyan {
  color: #d9fbff;
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.1);
}

.skill-box h3,
.snapshot-card h2 {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.skill-box p,
.snapshot-card p,
.achievement-card p {
  margin: 0;
}

.achievement-card span,
.timeline-item span,
.mini-label {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.achievement-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.06rem;
  line-height: 1.36;
}

.list-clean {
  margin: 0;
  color: #e5ddf6;
  line-height: 1.8;
  padding-left: 22px;
}

.list-clean li {
  margin-bottom: 6px;
}

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

.timeline-item {
  padding: 18px 18px 18px 20px;
  border-left: 3px solid rgba(34, 211, 238, 0.55);
}

.timeline-item p {
  margin: 0;
}

.diagram-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 4, 10, 0.72);
  overflow-x: auto;
}

.diagram-card img {
  display: block;
  width: 100%;
  min-width: 650px;
  border: 1px solid rgba(194, 169, 255, 0.14);
  border-radius: 6px;
}

.callout {
  border-left: 3px solid var(--purple-strong);
  background: rgba(139, 92, 246, 0.1);
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 28px;
}

.contact-card .contact-line {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--subtle);
}

.contact-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.back-link {
  margin-top: 28px;
}

.back-link a {
  color: var(--accent);
  font-weight: 900;
}

.footer {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 42px;
  text-align: center;
}

.footer p {
  color: var(--subtle);
  font-size: 0.92rem;
}

/* Tech Stack */
.tech-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.tech-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tech-item:hover {
  border-color: var(--accent);
  background: var(--panel-strong);
}

.tech-item strong {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.tech-item span {
  color: var(--subtle);
  font-size: 0.95rem;
  font-weight: 700;
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cert-grid.mini {
  grid-template-columns: repeat(3, 1fr);
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: var(--panel-strong);
}

.cert-badge-placeholder {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple-strong));
  color: #070411;
  font-weight: 900;
  font-size: 0.8rem;
  text-align: center;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.cert-info h3 {
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.cert-info span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cert-info p {
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cert-verify {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 900;
}

.mini-cert {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
}

.mini-cert strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
}

.mini-cert span {
  color: var(--subtle);
  font-size: 0.85rem;
}

@media (max-width: 1100px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cert-grid,
  .cert-grid.mini {
    grid-template-columns: 1fr;
  }
  
  .cert-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 980px) {
  .tech-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .tech-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .signal-strip,
  .skill-grid.four,
  .snapshot-grid,
  .achievement-grid,
  .cert-columns,
  .three-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .page-hero {
    min-height: auto;
    padding: 34px 28px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 3rem;
  }

  .hero h2,
  .page-hero h2 {
    font-size: 1.42rem;
  }

  .signal-strip,
  .project-grid,
  .skill-grid,
  .skill-grid.four,
  .snapshot-grid,
  .achievement-grid,
  .proof-grid,
  .two-column,
  .three-column,
  .cert-columns {
    grid-template-columns: 1fr;
  }

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

  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    justify-content: flex-start;
  }

  .contact-card .contact-line {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .page,
  .nav,
  .footer {
    width: min(100% - 20px, 1180px);
  }

  .nav-links {
    gap: 10px;
  }

  .card,
  .snapshot-card,
  .project-card,
  .skill-box,
  .achievement-card,
  .detail-card {
    padding: 20px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.34rem;
  }

  .hero h2,
  .page-hero h2 {
    font-size: 1.22rem;
  }

  .button {
    width: 100%;
  }

  .diagram-card img {
    min-width: 520px;
  }
}
