:root {
  --bg: #0a0e17;
  --bg-alt: #0f1520;
  --surface: #151c2c;
  --surface-hover: #1a2236;
  --border: rgba(255, 255, 255, 0.06);
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --accent-glow: rgba(0, 212, 170, 0.25);
  --gradient: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
  --font: 'Outfit', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --nav-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 500px;
  height: 500px;
  background: var(--accent-glow);
  top: -200px;
  right: -100px;
}

.bg-glow--2 {
  width: 400px;
  height: 400px;
  background: rgba(0, 168, 255, 0.12);
  bottom: 20%;
  left: -150px;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: var(--transition);
}

.nav--scrolled {
  background: rgba(10, 14, 23, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.nav__cta {
  padding: 0.5rem 1.25rem !important;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 8px;
  color: var(--accent) !important;
}

.nav__cta:hover {
  background: rgba(0, 212, 170, 0.25);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem;
}

.hero__badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__role {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--gradient);
  color: #0a0e17;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

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

.btn--ghost:hover {
  border-color: rgba(255,255,255,0.15);
  background: var(--surface);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.hero__meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero__meta svg { color: var(--accent); flex-shrink: 0; }

/* Code window */
.code-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot--red { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green { background: #28c840; }

.code-window__title {
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-window__body {
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.8;
  overflow-x: auto;
}

.code-window .kw { color: #c792ea; }
.code-window .var { color: #82aaff; }
.code-window .prop { color: #7fdbca; }
.code-window .str { color: #c3e88d; }
.code-window .num { color: #f78c6c; }
.code-window .fn { color: #82aaff; }

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}

.section--alt { background: var(--bg-alt); }

.section--contact {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
  margin-top: 0.75rem;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about__stats {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stat {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.stat__num {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(0, 212, 170, 0.1));
}

.timeline__item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline__marker {
  position: absolute;
  left: -2rem;
  top: 1.25rem;
  width: 14px;
  height: 14px;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
  border-radius: 50%;
  transform: translateX(-1px);
}

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.timeline__card:hover {
  border-color: rgba(0, 212, 170, 0.2);
  transform: translateX(4px);
}

.timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.timeline__header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline__date {
  font-size: 0.8rem;
  color: var(--accent);
  font-family: var(--mono);
  white-space: nowrap;
}

.timeline__company {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline__card ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.timeline__card li {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* Education */
.edu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.edu__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.edu__card:hover {
  border-color: rgba(0, 212, 170, 0.2);
  transform: translateY(-4px);
}

.edu__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 12px;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.edu__card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.edu__spec {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.edu__school {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.edu__date {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.edu__highlight {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--accent-dim);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--accent);
}

/* Projects */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: rgba(0, 212, 170, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-card__tags span {
  padding: 0.2rem 0.65rem;
  background: var(--accent-dim);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.project-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-bottom: 0.75rem;
}

.project-card p:last-child {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

/* Skills */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.skill-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags span {
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  transition: var(--transition);
}

.skill-tags span:hover {
  border-color: rgba(0, 212, 170, 0.3);
  color: var(--accent);
}

.soft-skills h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.soft-skills__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.soft-skills__list span {
  padding: 0.5rem 1.25rem;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--accent);
}

/* Contact */
.contact__intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

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

.contact__grid > .contact__card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.contact__card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.contact__card:hover {
  border-color: rgba(0, 212, 170, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 212, 170, 0.1);
}

.contact__card svg { color: var(--accent); flex-shrink: 0; }

.contact__card span {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-all;
  line-height: 1.4;
  font-size: 0.9rem;
}

.contact__card--static { cursor: default; }
.contact__card--static:hover { transform: none; box-shadow: none; }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__sub {
  margin-top: 0.25rem;
  font-size: 0.75rem !important;
  opacity: 0.6;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.1s; }
.fade-up:nth-child(2) { animation-delay: 0.2s; }
.fade-up:nth-child(3) { animation-delay: 0.3s; }
.fade-up:nth-child(4) { animation-delay: 0.4s; }
.fade-up:nth-child(5) { animation-delay: 0.5s; }
.fade-up:nth-child(6) { animation-delay: 0.6s; }

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

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-h) + 2rem);
  }

  .hero__desc { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__meta { justify-content: center; }
  .hero__visual { order: -1; max-width: 480px; margin: 0 auto; }

  .about__grid { grid-template-columns: 1fr; }
  .about__stats {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .stat { flex: 1; min-width: 140px; }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 23, 0.98);
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__links li { width: 100%; }
  .nav__links a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav__toggle { display: flex; }
  .nav__toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav__toggle.active span:nth-child(2) { opacity: 0; }
  .nav__toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .timeline__header { flex-direction: column; }
}
