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

:root {
  --bg: #0a0a0f;
  --bg-alt: #111118;
  --surface: #1a1a24;
  --border: #2a2a3a;
  --text: #e4e4ed;
  --text-muted: #9494a8;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --gradient: linear-gradient(135deg, #6366f1, #a855f7);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1100px;
  --transition: 0.3s ease;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #c4b5fd;
}

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

ul {
  list-style: none;
}

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

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
  background: var(--gradient);
  color: #fff;
  border-radius: 50px;
}

.btn-sm:hover {
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition);
  background: transparent;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color var(--transition);
}

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

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

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-content {
  max-width: var(--max-width);
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-description {
  max-width: 600px;
  margin: 0 auto 36px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-links {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.hero-links a {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.hero-links a:hover {
  color: var(--accent-light);
  transform: translateY(-2px);
}

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-blob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 48px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ===== About ===== */
.about-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

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

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.1);
}

.skill-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: var(--accent-light);
}

.skill-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.skill-card ul {
  list-style: none;
}

.skill-card li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
  position: relative;
  padding-left: 16px;
}

.skill-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

/* ===== Timeline (Experience) ===== */
.timeline {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

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

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  z-index: 1;
}

.timeline-header {
  margin-bottom: 12px;
}

.timeline-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.timeline-company {
  display: block;
  color: var(--accent-light);
  font-size: 0.95rem;
  margin-top: 2px;
}

.timeline-date {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.timeline-content ul {
  list-style: none;
}

.timeline-content li {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

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

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

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

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.1);
}

.project-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-light);
  background: var(--accent-glow);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 14px;
  width: fit-content;
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.93rem;
  flex: 1;
  margin-bottom: 16px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tech span {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.project-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-light);
}

.project-link:hover {
  color: #c4b5fd;
}

/* ===== Education ===== */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.edu-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.edu-degree {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-light);
  margin-bottom: 8px;
}

.edu-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

.edu-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.edu-focus {
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

/* ===== Contact ===== */
.contact-container {
  text-align: center;
  max-width: 600px;
}

.contact-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.contact-info strong {
  color: var(--text);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-links {
  display: flex;
  gap: 24px;
}

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

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

/* ===== Animations (scroll reveal) ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    border-left: 1px solid var(--border);
    transition: right var(--transition);
  }

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

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-name {
    font-size: 2.2rem;
  }

  .hero-title {
    font-size: 1.1rem;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 1.6rem;
    margin-bottom: 32px;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
    max-width: 260px;
  }

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

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