/* ========================================
   CSS Custom Properties & Reset
   ======================================== */
:root {
  --clr-bg:       #0a0a0f;
  --clr-surface:  #12121a;
  --clr-border:   #1e1e2e;
  --clr-text:     #e4e4e7;
  --clr-muted:    #71717a;
  --clr-accent:   #818cf8;
  --clr-accent-2: #c084fc;
  --clr-white:    #fafafa;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

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

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

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

/* ========================================
   Utility
   ======================================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 720px;
}

.section {
  min-height: 100vh;
  padding: 120px 0 80px;
  position: relative;
}

/* ========================================
   Reveal Animation
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

/* ========================================
   Navigation
   ======================================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s var(--ease-out);
  background: transparent;
}

#navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--clr-border);
  padding: 14px 0;
}

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

.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-muted);
  border-radius: 8px;
  transition: all 0.3s var(--ease-out);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--clr-white);
}

.nav-link.active {
  background: rgba(129, 140, 248, 0.1);
}

/* Mobile toggle */
.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(--clr-text);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--clr-muted);
  transition: color 0.3s;
}

.mobile-link:hover {
  color: var(--clr-white);
}

/* ========================================
   Hero / Home
   ======================================== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 0;
  min-height: 100vh;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--clr-accent);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--clr-accent-2);
  bottom: -100px;
  left: -100px;
  animation-delay: -7s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: #34d399;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(30px, -40px) scale(1.05); }
  50%      { transform: translate(-20px, 20px) scale(0.95); }
  75%      { transform: translate(15px, 30px) scale(1.02); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 0 24px;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--clr-accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--clr-white) 0%, var(--clr-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 1.25rem;
  color: var(--clr-muted);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--clr-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

.hero-scroll {
  position: absolute;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--clr-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--clr-accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%      { opacity: 0.3; transform: scaleY(0.6); }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  color: #fff;
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(129, 140, 248, 0.4);
}

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

.btn-outline:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* ========================================
   Section Heading
   ======================================== */
.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
}

.heading-number {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--clr-accent);
  display: block;
  margin-bottom: 8px;
}

/* ========================================
   Resume
   ======================================== */
.resume-block {
  margin-bottom: 60px;
}

.resume-category {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--clr-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--clr-border);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--clr-border);
}

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

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

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

.timeline-date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--clr-muted);
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--clr-white);
  margin-bottom: 4px;
}

.timeline-company {
  color: var(--clr-accent);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.timeline-content p:last-child {
  color: var(--clr-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

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

.skill-group h4 {
  font-size: 0.95rem;
  color: var(--clr-white);
  margin-bottom: 12px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  transition: all 0.3s var(--ease-out);
}

.skill-tag:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  transform: translateY(-2px);
}

.resume-download {
  text-align: center;
  margin-top: 48px;
}

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

.project-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(129, 140, 248, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.project-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(192, 132, 252, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--clr-border);
}

.project-placeholder {
  width: 48px;
  height: 48px;
  color: var(--clr-accent);
}

.project-info {
  padding: 24px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.project-tags span {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--clr-accent);
  background: rgba(129, 140, 248, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
}

.project-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--clr-white);
  margin-bottom: 8px;
}

.project-info p {
  font-size: 0.9rem;
  color: var(--clr-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-links {
  display: flex;
  gap: 16px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text);
  transition: color 0.3s;
}

.project-link:hover {
  color: var(--clr-accent);
}

.project-link svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   Contact
   ======================================== */
.contact-intro {
  font-size: 1.1rem;
  color: var(--clr-muted);
  text-align: center;
  margin-bottom: 48px;
  line-height: 1.7;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-muted);
}

.form-group input,
.form-group textarea {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  color: var(--clr-text);
  transition: all 0.3s var(--ease-out);
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--clr-muted);
  opacity: 0.5;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

.contact-alt {
  text-align: center;
  margin-top: 48px;
}

.contact-alt p {
  font-size: 0.9rem;
  color: var(--clr-muted);
  margin-bottom: 16px;
}

.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.social-link {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
  transition: all 0.3s var(--ease-out);
}

.social-link:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  transform: translateY(-3px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.8rem;
  color: var(--clr-muted);
  border-top: 1px solid var(--clr-border);
}

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

  .nav-toggle {
    display: flex;
  }

  .hero-scroll {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 100px 0 60px;
  }

  .section-heading {
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2.2rem;
  }

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

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }
}
