:root {
  --bg: #0b0d12;
  --bg-soft: #10131a;
  --panel: rgba(255,255,255,.045);
  --panel-strong: rgba(255,255,255,.08);
  --text: #f2f3f5;
  --muted: #969ca8;
  --line: rgba(255,255,255,.10);
  --accent: #c7ff4a;
  --accent-soft: rgba(199,255,74,.12);
  --nav-bg: rgba(11,13,18,.72);
}

html[data-bs-theme="light"] {
  --bg: #f3f0e8;
  --bg-soft: #ebe7dc;
  --panel: rgba(20,22,26,.04);
  --panel-strong: rgba(20,22,26,.08);
  --text: #181a1f;
  --muted: #666b74;
  --line: rgba(20,22,26,.12);
  --accent: #4b6500;
  --accent-soft: rgba(75,101,0,.10);
  --nav-bg: rgba(243,240,232,.78);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}

::selection {
  background: var(--accent);
  color: #0b0d12;
}

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

.navbar {
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: .25s ease;
}

.navbar.scrolled {
  border-color: var(--line);
}

.navbar-brand {
  font-family: "DM Mono", monospace;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.nav-link {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
}

.section-pad {
  padding: 120px 0;
}

.border-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 85%);
  opacity: .28;
  pointer-events: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: 32px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.eyebrow,
.section-kicker,
.mini-label,
.skill-group-title {
  font-family: "DM Mono", monospace;
  letter-spacing: .12em;
}

.eyebrow {
  color: var(--accent);
  font-size: .82rem;
}

.display-title {
  font-size: clamp(4.7rem, 11vw, 9.6rem);
  line-height: .82;
  letter-spacing: -.075em;
  font-weight: 800;
  margin: 18px 0 34px;
}

.display-title span {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}

.hero-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.btn-main,
.btn-ghost {
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 700;
  transition: .2s ease;
}

.btn-main {
  background: var(--accent);
  color: #10120c;
  border: 1px solid var(--accent);
}

.btn-main:hover {
  transform: translateY(-2px);
  background: var(--accent);
  color: #10120c;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
}

.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 56px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .72rem;
}

.hero-meta span::before {
  content: "/";
  margin-right: 7px;
  color: var(--accent);
}

.terminal-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(8,10,14,.88);
  box-shadow: 0 30px 80px rgba(0,0,0,.24);
  transform: rotate(2deg);
}

.terminal-head {
  padding: 15px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  gap: 7px;
}

.terminal-head span {
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,.22);
  border-radius: 50%;
}

.terminal-body {
  padding: 28px;
  font-family: "DM Mono", monospace;
  font-size: .82rem;
  color: #d8dde6;
  min-height: 320px;
}

.terminal-body p {
  margin-bottom: 11px;
}

.prompt {
  color: #c7ff4a;
}

.terminal-output {
  color: #7d8492;
  padding-left: 14px;
}

.blink-line {
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: .25; }
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: .75rem;
  margin-bottom: 24px;
}

.section-kicker::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.05;
}

.muted-joke {
  display: inline-block;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
  letter-spacing: -.02em;
  max-width: 480px;
  margin-top: 18px;
  font-weight: 500;
}

.lead-copy {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.45;
  letter-spacing: -.025em;
}

.body-copy {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
  margin-top: 24px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin-top: 44px;
}

.about-grid > div {
  background: var(--bg);
  padding: 24px;
  min-height: 145px;
}

.mini-label {
  display: block;
  color: var(--muted);
  font-size: .67rem;
  margin-bottom: 20px;
}

.about-grid strong {
  display: block;
  font-size: 1.05rem;
}

.about-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-card {
  display: grid;
  grid-template-columns: 70px 1fr 56px;
  gap: 18px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  transition: .25s ease;
}

.project-card:hover {
  padding-left: 14px;
  padding-right: 14px;
  background: var(--panel);
}

.project-number {
  font-family: "DM Mono", monospace;
  color: var(--muted);
  font-size: .8rem;
  padding-top: 5px;
}

.project-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.project-top h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: -.03em;
}

.project-type {
  color: var(--muted);
  font-size: .75rem;
  white-space: nowrap;
  padding-top: 5px;
}

.project-content p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.8;
  margin: 15px 0 18px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-list span,
.skill-cloud span {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: .74rem;
  color: var(--muted);
}

.project-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s ease;
}

.project-card:hover .project-icon {
  background: var(--accent);
  color: #10120c;
  border-color: var(--accent);
  transform: rotate(10deg);
}

.work-note {
  color: var(--muted);
  max-width: 680px;
  line-height: 1.8;
  font-size: .9rem;
  margin: 30px 0 0 auto;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-period {
  font-family: "DM Mono", monospace;
  color: var(--accent);
  font-size: .76rem;
  padding-top: 4px;
}

.timeline-content h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.timeline-content h3 span {
  color: var(--muted);
  font-weight: 500;
}

.timeline-content p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 800px;
}

.text-accent {
  color: var(--accent);
}

.skill-group {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.skill-group-title {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  margin-bottom: 17px;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.skill-cloud span {
  color: var(--text);
  padding: 9px 13px;
}

.cert-list {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.cert-list i {
  color: var(--accent);
  margin-right: 8px;
}

.contact-section {
  background:
    radial-gradient(circle at center, var(--accent-soft), transparent 32%),
    var(--bg-soft);
}

.contact-title {
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: .96;
  letter-spacing: -.065em;
  font-weight: 800;
}

.contact-title span {
  color: var(--accent);
}

.contact-copy {
  color: var(--muted);
  margin: 28px auto;
  line-height: 1.8;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  font-weight: 700;
  border-bottom: 1px solid var(--text);
  padding-bottom: 5px;
}

.email-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.social-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 42px;
}

.social-row a {
  color: var(--muted);
}

.social-row a:hover {
  color: var(--text);
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--muted);
  font-size: .77rem;
}

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

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

.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }
.delay-3 { transition-delay: .24s; }
.delay-4 { transition-delay: .32s; }

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 66%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: .65;
  transition: opacity .2s ease;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
  }

  .project-card {
    grid-template-columns: 42px 1fr;
  }

  .project-icon {
    display: none;
  }

  .project-top {
    display: block;
  }

  .project-type {
    display: inline-block;
    margin-top: 8px;
  }
}

@media (max-width: 767.98px) {
  .section-pad {
    padding: 88px 0;
  }

  .display-title {
    font-size: clamp(4rem, 21vw, 6.5rem);
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .project-number {
    padding: 0;
  }

  .cursor-glow {
    display: none;
  }

  .hero-meta {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}
