:root {
  --bg: #07111f;
  --bg-accent: #10233f;
  --surface: rgba(11, 22, 39, 0.72);
  --surface-strong: rgba(10, 20, 35, 0.88);
  --surface-border: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --muted: #b3bfd1;
  --brand: #78c4ff;
  --brand-strong: #9d7dff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(120, 196, 255, 0.2), transparent 30%),
    radial-gradient(circle at top right, rgba(157, 125, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #09111e 0%, #050a14 100%);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

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

.site-shell {
  position: relative;
  overflow-x: hidden;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(circle at 10% 10%, rgba(120, 196, 255, 0.12), transparent 22%),
    radial-gradient(circle at 85% 15%, rgba(157, 125, 255, 0.14), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(27, 50, 84, 0.55), transparent 45%);
}

.page-about .page-backdrop {
  background:
    radial-gradient(circle at 15% 20%, rgba(72, 159, 255, 0.16), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(108, 90, 220, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(8, 14, 26, 0.2), rgba(8, 14, 26, 0.7));
}

.page-projects .page-backdrop {
  background:
    radial-gradient(circle at 25% 10%, rgba(94, 224, 187, 0.12), transparent 28%),
    radial-gradient(circle at 82% 15%, rgba(120, 196, 255, 0.14), transparent 25%),
    linear-gradient(180deg, rgba(5, 10, 20, 0.1), rgba(5, 10, 20, 0.75));
}

.page-contact .page-backdrop {
  background:
    radial-gradient(circle at 20% 15%, rgba(157, 125, 255, 0.15), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(120, 196, 255, 0.15), transparent 28%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.15), rgba(7, 17, 31, 0.8));
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 1rem 0 0;
}

.navbar {
  padding: 0.75rem 0;
}

.brand-mark {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link {
  color: rgba(244, 247, 251, 0.72);
  font-weight: 600;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.site-main {
  padding-bottom: 2rem;
}

.site-footer {
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-section,
.content-section,
.contact-section,
.stack-section {
  padding: 4rem 0 2rem;
}

.hero-section {
  min-height: calc(100vh - 130px);
  display: flex;
  align-items: center;
}

.hero-title {
  line-height: 0.95;
  margin-bottom: 1.5rem;
  max-width: 11ch;
}

.hero-copy,
.section-heading p,
.stack-card p,
.project-card p,
.contact-copy {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.eyebrow,
.section-kicker,
.project-label,
.contact-label {
  color: var(--brand);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}

.text-gradient {
  background: linear-gradient(90deg, #ffffff 0%, #a6d3ff 45%, #c5b1ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.typewriter-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  margin: 1.5rem 0 2rem;
  color: #d8e3f1;
  font-size: 1.05rem;
}

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

.typewriter-cursor {
  color: var(--brand);
  font-weight: 700;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  border: 0;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.32);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem rgba(7, 17, 31, 0.95), 0 0 0 0.25rem rgba(120, 196, 255, 0.35);
}

.glass-panel {
  background: linear-gradient(180deg, rgba(18, 29, 47, 0.82) 0%, rgba(10, 18, 31, 0.78) 100%);
  border: 1px solid var(--surface-border);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.profile-panel,
.contact-card,
.stack-card,
.project-card,
.feature-grid .glass-panel {
  padding: 2rem;
}

.profile-panel {
  position: relative;
  overflow: hidden;
}

.profile-orb {
  width: 11rem;
  height: 11rem;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.65), transparent 20%),
    linear-gradient(135deg, rgba(120, 196, 255, 0.85) 0%, rgba(157, 125, 255, 0.85) 100%);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.18), 0 20px 50px rgba(0, 0, 0, 0.25);
}

.profile-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.metric-grid,
.feature-grid,
.project-grid,
.detail-grid,
.contact-grid {
  display: grid;
  gap: 1rem;
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.metric-card {
  padding: 1rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.metric-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 2rem;
}

.section-heading h1,
.section-heading h2,
.stack-card h1,
.stack-card h2,
.project-card h2,
.contact-card h1 {
  margin-bottom: 1rem;
}

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

.stack-layout {
  display: grid;
  gap: 1.5rem;
}

.stack-card {
  min-height: min(75vh, 34rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.story-card {
  min-height: auto;
}

.story-shell {
  display: grid;
  gap: 1.5rem;
}

.story-heading {
  max-width: 48rem;
}

.story-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(120, 196, 255, 0.12);
  border: 1px solid rgba(120, 196, 255, 0.28);
  color: var(--brand);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.story-heading h2,
.story-step h3 {
  margin-bottom: 0.75rem;
}

.story-heading p,
.story-step p,
.story-quote p {
  color: var(--muted);
  line-height: 1.8;
}

.story-rail {
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.story-rail span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 100%);
}

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

.story-step,
.story-quote {
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.story-step-label {
  margin-bottom: 0.75rem;
  color: var(--brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.story-highlight {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.story-avatar {
  width: 5.5rem;
  height: 5.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(120, 196, 255, 0.95) 0%, rgba(157, 125, 255, 0.95) 100%);
  color: #06101d;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.22), 0 20px 50px rgba(0, 0, 0, 0.2);
}

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

.detail-grid h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-list span {
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #dce6f5;
  font-size: 0.95rem;
}

.tag-list.compact span {
  font-size: 0.85rem;
  padding: 0.45rem 0.8rem;
}

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

.project-card {
  min-height: 18rem;
  display: flex;
  flex-direction: column;
}

.project-card .tag-list {
  margin-top: auto;
}

.project-link {
  align-self: flex-start;
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: #ffffff;
}

.project-link::after {
  content: "\2197";
  font-size: 0.95em;
}

.contact-card {
  padding: 2.5rem;
}

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

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

a.contact-link:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 196, 255, 0.35);
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991.98px) {
  .hero-title {
    max-width: none;
  }

  .feature-grid,
  .project-grid,
  .detail-grid,
  .contact-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .stack-card {
    min-height: auto;
  }
}

@media (max-width: 767.98px) {
  .site-header {
    padding-top: 0.5rem;
  }

  .hero-section,
  .content-section,
  .contact-section,
  .stack-section {
    padding-top: 2.5rem;
  }

  .hero-title {
    font-size: clamp(2.75rem, 14vw, 4.25rem);
  }

  .profile-panel,
  .contact-card,
  .stack-card,
  .project-card,
  .feature-grid .glass-panel {
    padding: 1.5rem;
  }

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

  .typewriter-row {
    flex-wrap: wrap;
  }

  .story-highlight {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}
