/* ===== CSS Variables ===== */
:root {
  --bg-primary: #0b1120;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-card-hover: #1f2a3d;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --accent-dim: rgba(56, 189, 248, 0.15);
  --accent-glow: rgba(56, 189, 248, 0.4);
  --border: rgba(148, 163, 184, 0.12);
  --gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

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

ul {
  list-style: none;
}

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

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

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo span {
  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-secondary);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
  padding: 0.5rem 1.1rem !important;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--bg-primary) !important;
}

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(129, 140, 248, 0.1), transparent),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(192, 132, 252, 0.08), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}

.pulse {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

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

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.hero-location {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.hero-location i {
  color: var(--accent);
  margin-right: 0.35rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

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

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.hero-links a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.hero-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-3px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-indicator a {
  color: var(--text-muted);
  font-size: 1.25rem;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== Sections ===== */
.section {
  padding: 5.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-desc {
  color: var(--text-secondary);
  margin-top: 0.75rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== About ===== */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
}

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

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.about-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-card h3 i {
  color: var(--accent);
}

.about-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.about-card ul li:last-child {
  border-bottom: none;
}

.about-card ul li i {
  color: var(--accent);
  margin-top: 3px;
  width: 18px;
  flex-shrink: 0;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

.skill-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.skill-card.full-width {
  grid-column: 1 / -1;
}

.skill-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 12px;
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

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

.skill-tags span {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-card:hover .skill-tags span {
  border-color: rgba(56, 189, 248, 0.2);
}

/* ===== Experience / Timeline ===== */
.experience {
  background: var(--bg-secondary);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(56, 189, 248, 0.1));
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2.5rem;
}

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

.timeline-marker {
  position: absolute;
  left: 4px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: var(--shadow);
}

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

.timeline-header h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.company {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.95rem;
}

.timeline-date {
  font-size: 0.85rem;
  font-family: var(--mono);
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.timeline-list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  overflow: hidden;
}

.project-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-card.featured {
  border-color: rgba(56, 189, 248, 0.25);
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(56, 189, 248, 0.06) 100%);
}

.project-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.project-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 14px;
  color: var(--accent);
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.project-card > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.project-card ul {
  margin-bottom: 1.5rem;
}

.project-card ul li {
  position: relative;
  padding-left: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.project-card ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--mono);
  padding: 0.25rem 0.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
}

/* ===== Education ===== */
.education {
  background: var(--bg-secondary);
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

.edu-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-3px);
}

.edu-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 10px;
  color: var(--accent);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.edu-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.edu-place {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

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

.cert-list {
  margin-top: 0.75rem;
}

.cert-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.4rem 0;
}

.cert-list li i {
  color: var(--accent);
  width: 16px;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-card:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.contact-card i {
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  word-break: break-all;
}

.contact-card.location {
  cursor: default;
}

.contact-card.location:hover {
  transform: none;
  box-shadow: none;
  background: var(--bg-card);
  border-color: var(--border);
}

/* ===== Footer ===== */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

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

.footer-note {
  margin-top: 0.35rem;
  font-size: 0.8rem !important;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

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

  .skill-card.full-width {
    grid-column: 1;
  }

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

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

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    border-left: 1px solid var(--border);
    transition: right 0.35s ease;
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .hero {
    padding: 5rem 0 3rem;
  }

  .section {
    padding: 4rem 0;
  }

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

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

  .about-stats {
    gap: 1.5rem;
  }
}

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

.nav-overlay.show {
  display: block;
}
