:root {
  --bg: #05070f;
  --bg-deep: #020409;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-gradient: linear-gradient(140deg, rgba(15, 23, 42, 0.82), rgba(5, 8, 20, 0.7));
  --panel-strong: rgba(15, 23, 42, 0.9);
  --accent: #60a5fa;
  --accent-strong: #38bdf8;
  --accent-soft: rgba(96, 165, 250, 0.15);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 18px 45px rgba(2, 6, 23, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #0b1120, var(--bg));
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body.cursor-ready {
  cursor: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.1), transparent 50%),
    radial-gradient(circle at 40% 90%, rgba(37, 99, 235, 0.12), transparent 50%);
  animation: glowShift 16s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes glowShift {
  0%,
  100% {
    opacity: 0.7;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-12px);
  }
}

#matrix {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}

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

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

a:hover {
  color: var(--accent-strong);
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 600;
}

h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-strong);
}

.nav__links {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}

.hero {
  padding-bottom: 64px;
}

.hero__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  padding: 64px 0;
}

.hero__intro h1 {
  font-size: clamp(2.6rem, 3vw, 3.6rem);
  margin: 10px 0;
}

.eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin: 0 0 8px;
}

.title {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.typing {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 24px;
}

.typing-cursor {
  color: var(--accent-strong);
  margin-left: 4px;
  animation: blink 1.2s steps(2, end) infinite;
}

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

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  border: none;
  padding: 12px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1120;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.25);
}

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

.btn--ghost:hover {
  border-color: var(--accent-strong);
  box-shadow: 0 10px 20px rgba(96, 165, 250, 0.16);
}

.glass-card {
  background: var(--panel-gradient);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.terminal {
  background: rgba(6, 10, 20, 0.7);
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  overflow: hidden;
}

.terminal__bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.85);
}

.terminal__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
}

.terminal__body {
  padding: 16px;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 13px;
  color: var(--muted);
}

.terminal__prompt {
  color: var(--accent-strong);
  margin-right: 6px;
}

.terminal__output {
  margin: 6px 0 14px;
  color: var(--text);
}

.hero__badges,
.contact__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 12px;
}

.section {
  padding: 64px 0;
}

.section__header {
  margin-bottom: 32px;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.section__header h2 {
  margin: 0;
  font-size: clamp(2rem, 2.6vw, 2.6rem);
}

.about {
  display: grid;
  gap: 32px;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card h3 {
  margin: 0;
  font-size: 2rem;
  color: var(--accent-strong);
}

.stat-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.skills__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.25);
  font-size: 13px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(96, 165, 250, 0.18);
}

.skills__bars {
  display: grid;
  gap: 16px;
}

.skill-bar__label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.skill-bar__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.skill-bar__fill {
  display: block;
  height: 100%;
  width: var(--level);
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), var(--accent-strong));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.timeline {
  display: grid;
  gap: 24px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.45), rgba(96, 165, 250, 0.05));
}

.timeline-item {
  padding-left: 48px;
  position: relative;
  display: grid;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.25);
  border: 2px solid rgba(56, 189, 248, 0.6);
}

.timeline-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.timeline-item h3 {
  margin: 0;
  font-size: 1.25rem;
}

.timeline-role {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.95rem;
}

.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.timeline-item:hover .timeline-details,
.timeline-item.is-open .timeline-details {
  max-height: 200px;
}

.timeline-details ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.project-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(56, 189, 248, 0.18);
}

.project-card ul {
  padding-left: 18px;
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.contact__form {
  display: grid;
  gap: 16px;
}

.contact__form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
textarea {
  background: rgba(6, 10, 20, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.footer {
  text-align: center;
  padding: 48px 0 64px;
  color: var(--muted);
}

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

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

.cursor {
  position: fixed;
  width: 28px;
  height: 28px;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9999;
  display: grid;
  place-items: center;
  transition: transform 0.1s ease;
  opacity: 0;
}

body.cursor-ready .cursor {
  opacity: 1;
}

.cursor__block {
  width: 12px;
  height: 16px;
  border-radius: 3px;
  background: var(--accent-strong);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
  animation: blink 1.1s steps(2, end) infinite;
}

.cursor--active .cursor__block {
  transform: scale(1.25);
  box-shadow: 0 0 14px rgba(125, 211, 252, 0.7);
}

@media (max-width: 860px) {
  .nav__links {
    display: none;
  }
}

@media (max-width: 720px) {
  .hero__content {
    padding-top: 48px;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item {
    padding-left: 40px;
  }

  .timeline-item::before {
    left: 5px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .hero__intro h1 {
    font-size: clamp(2.2rem, 8vw, 2.8rem);
  }

  .section__header h2 {
    font-size: clamp(1.6rem, 6vw, 2rem);
  }
}

@media (pointer: coarse) {
  body {
    cursor: auto;
  }

  .cursor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  body {
    scroll-behavior: auto;
  }
}
