/* ============================================
   PORTFOLIO – Design System & Styles
   Mobile-first · Dark Theme · Glassmorphism
   ============================================ */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Fira+Code:wght@400;500&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colours */
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #111118;
  --bg-card:       rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(108, 92, 231, 0.3);

  --text-primary:   #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted:     #6b6b82;

  --accent-1: #6c5ce7;
  --accent-2: #00cec9;
  --accent-3: #fd79a8;
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --gradient-warm: linear-gradient(135deg, var(--accent-1), var(--accent-3));

  /* Spacing */
  --section-py: 5rem;
  --container-px: 1.25rem;
  --container-max: 1100px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --transition: 0.35s var(--ease);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.section {
  padding: var(--section-py) 0;
  position: relative;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent-2);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 3rem;
}

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

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(108, 92, 231, 0.5); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-subtle);
}
.btn-outline:hover {
  border-color: var(--accent-1);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.15);
}

/* Pill / Tag */
.pill {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent-1);
  border: 1px solid rgba(108, 92, 231, 0.15);
  transition: var(--transition);
}
.pill:hover {
  background: rgba(108, 92, 231, 0.2);
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border-subtle);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.nav-links {
  display: none;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.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); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 320px;
  height: 100vh;
  background: rgba(17, 17, 24, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 6rem 2rem 2rem;
  transition: right 0.4s var(--ease);
  z-index: 999;
  border-left: 1px solid var(--border-subtle);
}
.mobile-menu.open { right: 0; }
.mobile-menu a {
  display: block;
  font-size: 1.15rem;
  font-weight: 500;
  padding: 1rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition), padding-left var(--transition);
}
.mobile-menu a:hover {
  color: var(--text-primary);
  padding-left: 0.5rem;
}
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

/* Animated background orbs */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  animation: orbFloat 8s infinite alternate var(--ease);
}
.hero-bg .orb-1 {
  width: 400px; height: 400px;
  background: var(--accent-1);
  top: -10%; left: -10%;
}
.hero-bg .orb-2 {
  width: 350px; height: 350px;
  background: var(--accent-2);
  bottom: -10%; right: -10%;
  animation-delay: 2s;
}
.hero-bg .orb-3 {
  width: 250px; height: 250px;
  background: var(--accent-3);
  top: 40%; left: 50%;
  animation-delay: 4s;
  opacity: 0.12;
}
@keyframes orbFloat {
  to { transform: translate(40px, -30px) scale(1.08); }
}

.hero-content {
  position: relative;
  z-index: 1;
}
.hero-greeting {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-greeting .wave { display: inline-block; animation: wave 2.5s infinite; transform-origin: 70% 70%; }
@keyframes wave {
  0%,60%,100% { transform: rotate(0); }
  10%,30%  { transform: rotate(14deg); }
  20%      { transform: rotate(-8deg); }
  40%      { transform: rotate(-4deg); }
  50%      { transform: rotate(10deg); }
}
.hero-name {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.hero-stat {
  text-align: left;
}
.hero-stat .stat-number {
  font-size: 1.65rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat .stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   ABOUT
   ============================================ */
.about-content {
  display: grid;
  gap: 2rem;
}
.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.about-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.highlight-card {
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.highlight-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(108, 92, 231, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.highlight-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.highlight-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.skill-category {
  padding: 1.5rem;
}
.skill-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.skill-category-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(0, 206, 201, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.skill-category-name {
  font-size: 0.92rem;
  font-weight: 600;
}
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================
   EXPERIENCE
   ============================================ */
.experience-timeline {
  position: relative;
  padding-left: 1.5rem;
}
.experience-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-1), var(--accent-2));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-1);
  border: 3px solid var(--bg-primary);
  transform: translateX(-5px);
}
.timeline-header {
  margin-bottom: 1rem;
}
.timeline-company {
  font-size: 1.15rem;
  font-weight: 700;
}
.timeline-role {
  font-size: 0.92rem;
  color: var(--accent-2);
  font-weight: 500;
}
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.timeline-project {
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.timeline-project h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.timeline-project ul {
  list-style: none;
}
.timeline-project li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.6;
}
.timeline-project li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-size: 0.9rem;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Screenshot Carousel */
.project-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.project-carousel img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.project-carousel img.active { opacity: 1; }

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}
.carousel-dot.active {
  background: var(--accent-2);
  width: 24px;
  border-radius: 4px;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: var(--transition);
  opacity: 0;
}
.project-carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: rgba(108, 92, 231, 0.5); }
.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

.project-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.65;
  flex: 1;
}
.project-features {
  margin-bottom: 1.25rem;
}
.project-features h5 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.project-features ul li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
  padding-left: 1.15rem;
  position: relative;
}
.project-features ul li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-size: 0.7rem;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.project-tech .pill {
  font-size: 0.72rem;
  padding: 0.22rem 0.65rem;
}
.project-links {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}
.project-links .btn {
  padding: 0.55rem 1.25rem;
  font-size: 0.82rem;
}

/* ============================================
   EDUCATION
   ============================================ */
.education-card {
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.edu-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(108, 92, 231, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.edu-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.edu-info .edu-degree {
  font-size: 0.92rem;
  color: var(--accent-2);
  font-weight: 500;
}
.edu-info .edu-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-content {
  max-width: 600px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.contact-item {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}
.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(108, 92, 231, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-detail h4 {
  font-size: 0.88rem;
  font-weight: 600;
}
.contact-detail p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 0;
  text-align: center;
}
.footer p {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.footer-socials a:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE – Tablet (≥ 768px)
   ============================================ */
@media (min-width: 768px) {
  :root {
    --section-py: 6rem;
    --container-px: 2rem;
  }

  .about-highlights {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .hero-stats {
    gap: 2.5rem;
  }
}

/* ============================================
   RESPONSIVE – Desktop (≥ 1024px)
   ============================================ */
@media (min-width: 1024px) {
  :root {
    --section-py: 7rem;
  }

  .nav-links {
    display: flex;
  }
  .nav-toggle { display: none; }

  .about-content {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .experience-timeline {
    padding-left: 2rem;
  }
}

/* ============================================
   SCROLL-BAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(108, 92, 231, 0.5); }

/* ============================================
   SELECTION
   ============================================ */
::selection {
  background: rgba(108, 92, 231, 0.3);
  color: #fff;
}
