:root {
  --bg-main: #071222;
  --bg-elev: #0c1b32;
  --bg-elev-soft: rgba(12, 27, 50, 0.72);
  --text-main: #ebf2ff;
  --text-muted: #95a7c4;
  --line: rgba(140, 172, 216, 0.2);
  --accent: #2f89ff;
  --accent-strong: #46a2ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(52, 120, 255, 0.2), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(39, 95, 196, 0.18), transparent 65%),
    var(--bg-main);
  position: relative;
  overflow-x: hidden;
}

.navbar-brand,
.nav-link {
  color: var(--text-main) !important;
}

.nav-link {
  opacity: 0.85;
}

.nav-link:hover {
  opacity: 1;
}

.navbar-toggler-icon {
  filter: invert(1) brightness(1.2);
}

.side-nav-wrap {
  width: min(100% - 1.5rem, 1320px);
  margin: 0 auto;
  padding: 0 0.75rem;
  display: none;
}

.side-nav {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.55rem;
  padding: 0.15rem 0 0.35rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.side-nav::before {
  content: none;
}

.side-nav-link {
  position: relative;
  display: block;
  white-space: nowrap;
  padding: 0.45rem 0.85rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  background: rgba(18, 41, 74, 0.8);
  border: 1px solid rgba(111, 162, 240, 0.24);
  border-radius: 999px;
  transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.side-nav-link::before {
  content: none;
}

.side-nav-link:hover {
  color: #9cccff;
  border-color: rgba(144, 191, 255, 0.45);
  transform: translateY(-1px);
}

.hero {
  padding-top: 3.8rem;
  padding-bottom: 3.8rem;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

.text-secondary {
  color: var(--text-muted) !important;
}

.small-label {
  color: #7bb4ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}

.glass,
.service-card,
.project-card {
  background: var(--bg-elev-soft);
  border: 1px solid var(--line);
  border-radius: 1rem;
  backdrop-filter: blur(8px);
}

.service-card,
.project-card {
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.service-card:hover,
.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(114, 167, 246, 0.45);
}

.project-card {
  transition: none;
}

.project-card:hover {
  transform: none;
  border-color: var(--line);
}

.project-link-wrap {
  display: flex;
  justify-content: flex-end;
}

.project-link-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
}

.skill-pill {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.86rem;
  color: #cfe1ff;
  background: rgba(41, 102, 194, 0.28);
  border: 1px solid rgba(98, 143, 212, 0.35);
}

.btn-accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  border: none;
  color: #fff;
  font-weight: 700;
}

.btn-accent:hover,
.btn-accent:focus {
  color: #fff;
  filter: brightness(1.08);
}

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

.btn-outline-light:hover {
  background: rgba(230, 240, 255, 0.08);
}

.bg-orb {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(65px);
}

.orb-1 {
  width: 300px;
  height: 300px;
  top: 6%;
  left: -90px;
  background: rgba(66, 132, 255, 0.24);
}

.orb-2 {
  width: 380px;
  height: 380px;
  bottom: -100px;
  right: -120px;
  background: rgba(35, 88, 191, 0.24);
}

.section-reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.7s ease forwards;
}

.delay-1 {
  animation-delay: 0.12s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.28s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 991.98px) {
  main {
    --mobile-block-gap: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--mobile-block-gap);
  }

  main > section.container {
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  main > section.container .row.g-4 {
    --bs-gutter-y: var(--mobile-block-gap);
  }
}

.hero-compact {
  padding-top: 2.4rem;
  padding-bottom: 1.8rem;
}

.info-chip {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: #d8e6ff;
  background: rgba(20, 42, 74, 0.82);
  border: 1px solid rgba(125, 165, 224, 0.24);
  font-size: 0.95rem;
}

.stats-card {
  background: rgba(10, 26, 48, 0.85);
  border: 1px solid rgba(125, 165, 224, 0.18);
  border-radius: 1rem;
}

.stats-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #eef5ff;
}

.stats-label {
  display: block;
  color: var(--text-muted);
}

.detail-list {
  padding-left: 1rem;
  color: var(--text-muted);
}

.detail-list li + li {
  margin-top: 0.6rem;
}

.timeline {
  position: relative;
  margin-left: 0.4rem;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.45rem;
  width: 1px;
  background: rgba(111, 152, 214, 0.28);
}

.timeline-card {
  position: relative;
  margin-bottom: 1.25rem;
}

.timeline-card:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -1.92rem;
  top: 1.05rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f89ff, #69b4ff);
  box-shadow: 0 0 0 5px rgba(8, 18, 34, 1);
}

.timeline-body {
  background: var(--bg-elev-soft);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.timeline-badge {
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #c7ddff;
  background: rgba(24, 56, 104, 0.55);
  border: 1px solid rgba(93, 139, 213, 0.25);
}

.timeline-subtitle {
  margin-bottom: 0;
  color: #73a8f2;
}

.progress-dark {
  height: 0.5rem;
  background: rgba(118, 145, 190, 0.16);
}

.progress-dark .progress-bar {
  background: linear-gradient(90deg, #2f89ff, #66b7ff);
}

.language-item {
  margin-bottom: 1.4rem;
}

.skill-pill-alt {
  background: rgba(25, 58, 104, 0.22);
  border-color: rgba(111, 162, 240, 0.22);
}

.skill-pill-wide {
  white-space: normal;
  border-radius: 1rem;
  max-width: 100%;
}

@media (max-width: 767.98px) {
  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-marker {
    left: -1.42rem;
  }

  .timeline-header {
    flex-direction: column;
  }

  .timeline-badge {
    align-self: flex-start;
  }
}

@media (min-width: 1650px) {
  .side-nav-wrap {
    display: block;
    position: fixed;
    left: 0.9rem;
    top: 11rem;
    z-index: 20;
    width: auto;
    margin: 0;
    padding: 0;
  }

  .side-nav {
    flex-direction: column;
    gap: 0.9rem;
    overflow: visible;
    padding: 0.25rem 0;
    min-width: 150px;
    margin-bottom: 0;
  }

  .side-nav::before {
    content: "";
    position: absolute;
    top: 0.35rem;
    bottom: 0.35rem;
    left: 0.45rem;
    width: 1px;
    background: rgba(110, 154, 221, 0.35);
  }

  .side-nav-link {
    padding: 0.2rem 0 0.2rem 1.75rem;
    font-size: 0.95rem;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .side-nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    background: #4c9dff;
    transform: translateY(-50%);
    box-shadow: 0 0 0 6px rgba(7, 18, 34, 1);
  }

  .side-nav-link:hover {
    border-color: transparent;
    transform: translateX(2px);
  }
}

@media (min-width: 1650px) and (max-width: 1899.98px) {
  .side-nav-wrap {
    left: 0.75rem;
  }

  .side-nav {
    min-width: 128px;
  }

  .side-nav-link {
    padding-left: 1.55rem;
    font-size: 0.88rem;
  }

  .side-nav-link::before {
    width: 0.82rem;
    height: 0.82rem;
  }
}
