:root {
  --bg: #0f172a;
  --bg-alt: #111c33;
  --text: #f8fafc;
  --muted: #cbd5f5;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --card-bg: rgba(15, 23, 42, 0.65);
  --border: rgba(148, 163, 184, 0.25);
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-sm: 0.75rem;
  --shadow-lg: 0 40px 80px -40px rgba(56, 189, 248, 0.4);
  --shadow-md: 0 20px 40px -20px rgba(15, 23, 42, 0.75);
  --shadow-soft: 0 12px 30px -12px rgba(15, 23, 42, 0.55);
  --max-width: 1100px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.12), transparent 45%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 32px;
  width: auto;
  display: block;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.25rem;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
}

.hero {
  padding: 8rem 0 6rem;
}

.hero .container {
  display: grid;
  gap: 3rem;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.hero-content h1 {
  font-size: clamp(2.5rem, 4vw + 1rem, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 48ch;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0f172a;
  box-shadow: var(--shadow-lg);
}

.btn.primary:hover,
.btn.primary:focus {
  transform: translateY(-2px);
}

.btn.secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(15, 23, 42, 0.4);
}

.btn.secondary:hover,
.btn.secondary:focus {
  background: rgba(15, 23, 42, 0.65);
}

.hero-illustration {
  position: relative;
  min-height: 320px;
}

.floating-card {
  position: absolute;
  right: 12%;
  top: 10%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: min(260px, 80%);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  animation: float 6s ease-in-out infinite;
}

.floating-card span {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.floating-card p {
  margin: 0;
  color: var(--muted);
}

.floating-card.delayed {
  top: auto;
  bottom: 12%;
  right: 0;
  animation-delay: -3s;
}

.section-heading {
  text-align: left;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw + 1rem, 2.75rem);
  margin: 0;
}

.about,
.skills,
.experience,
.projects,
.contact {
  padding: 6rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  color: var(--muted);
}

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

.skill-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.skill-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
}

.timeline {
  position: relative;
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
  padding-left: 2.75rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  bottom: 0.75rem;
  left: 1rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.45), rgba(148, 163, 184, 0.15));
}

.timeline-item {
  position: relative;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-soft);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.2rem;
  top: 1.95rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.15);
}

.timeline-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-meta time {
  font-weight: 600;
}

.timeline-separator {
  opacity: 0.6;
}

.timeline-now {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent);
  font-weight: 600;
}

.timeline-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.timeline-content p {
  margin: 0;
  color: var(--muted);
}

.timeline-content ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

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

.project-card {
  position: relative;
  padding: 2.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.65));
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover::after,
.project-card:focus-within::after {
  opacity: 1;
}

.project-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge.secondary {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  border-color: rgba(148, 163, 184, 0.2);
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.project-card p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.project-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.project-link:hover,
.project-link:focus {
  color: var(--text);
}

.contact-content {
  max-width: 540px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
}

.contact-content p {
  color: var(--muted);
  margin-top: 0;
}

.social-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0;
  margin: 2rem 0 0;
}

.social-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.social-links a:hover,
.social-links a:focus {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: rgba(15, 23, 42, 0.9);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.to-top {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.to-top:hover,
.to-top:focus {
  color: var(--text);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-16px);
  }
}

@media (max-width: 720px) {
  .site-nav ul {
    position: absolute;
    inset: 72px 1.75rem auto;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .site-nav ul.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .timeline {
    padding-left: 1.75rem;
  }

  .timeline::before {
    left: 0.5rem;
  }

  .timeline-item {
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  }

  .timeline-item::before {
         left: -1.7rem; */
  }

}

@media (max-width: 560px) {
  .hero {
    padding-top: 6rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-content {
    padding: 2rem;
  }

  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item {
    padding: 1.5rem;
  }

  .timeline-item::before {
    display: none;
  }
}
