/* ===================================================
   Design System — Akash Mani Portfolio
   =================================================== */

/* --- Custom Properties --- */
:root {
  --color-primary: #6C63FF;
  --color-primary-hover: #5A52D5;
  --color-accent: #00D2FF;
  --color-bg-deep: #0B0F1A;
  --color-bg-card: #111827;
  --color-bg-card-light: #1E293B;
  --color-text: #E2E8F0;
  --color-text-muted: #94A3B8;
  --color-text-heading: #F8FAFC;
  --color-border: rgba(108, 99, 255, 0.15);
  --color-glass-bg: rgba(17, 24, 39, 0.6);
  --color-glass-border: rgba(108, 99, 255, 0.2);
  --gradient-primary: linear-gradient(135deg, #6C63FF, #00D2FF);
  --gradient-hero: linear-gradient(135deg, #0B0F1A 0%, #1a1145 50%, #0B0F1A 100%);
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(108, 99, 255, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  line-height: 1.3;
}

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

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

ul {
  list-style: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================================================
   Header / Navigation
   =================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

header.scrolled {
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  padding: 0.6rem 0;
}

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

header .logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity var(--transition);
}

header .logo:hover {
  opacity: 0.8;
}

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

header .nav-links li a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

header .nav-links li a:hover {
  color: var(--color-text-heading);
  background: rgba(108, 99, 255, 0.1);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===================================================
   Hero Section
   =================================================== */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: heroGradient 12s ease infinite;
}

@keyframes heroGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}

#hero .container {
  position: relative;
  z-index: 1;
}

#hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease forwards;
}

#hero .typed-wrapper {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  min-height: 2.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

#hero .typed-wrapper .typed-text {
  color: var(--color-accent);
  font-weight: 600;
  border-right: 2px solid var(--color-accent);
  padding-right: 4px;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}

#hero p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s both;
}

/* ===================================================
   Buttons
   =================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(108, 99, 255, 0.1);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.2);
}

/* ===================================================
   Section Shared Styles
   =================================================== */
.section {
  position: relative;
  z-index: 1;
}

.section-dark {
  background: var(--color-bg-card);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-divider {
  position: relative;
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

/* ===================================================
   Scroll Animations
   =================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section .section-title,
.section .about-content,
.section .timeline-item,
.section .education-item,
.section .project-card,
.section .skill-category,
.section > .container > p,
.section .social-links,
.section > .container > .btn {
  opacity: 0;
  transform: translateY(30px);
}

.section.is-visible .section-title { animation: fadeInUp 0.6s ease forwards; }
.section.is-visible .about-content { animation: fadeInUp 0.6s ease 0.1s forwards; }
.section.is-visible > .container > p { animation: fadeInUp 0.6s ease 0.1s forwards; }
.section.is-visible > .container > .btn { animation: fadeInUp 0.6s ease 0.2s forwards; }
.section.is-visible .social-links { animation: fadeInUp 0.6s ease 0.3s forwards; }

.section.is-visible .timeline-item:nth-child(1) { animation: fadeInUp 0.6s ease 0.1s forwards; }
.section.is-visible .timeline-item:nth-child(2) { animation: fadeInUp 0.6s ease 0.2s forwards; }
.section.is-visible .timeline-item:nth-child(3) { animation: fadeInUp 0.6s ease 0.3s forwards; }
.section.is-visible .timeline-item:nth-child(4) { animation: fadeInUp 0.6s ease 0.4s forwards; }

.section.is-visible .education-item:nth-child(1) { animation: fadeInUp 0.6s ease 0.1s forwards; }
.section.is-visible .education-item:nth-child(2) { animation: fadeInUp 0.6s ease 0.2s forwards; }

.section.is-visible .project-card:nth-child(1) { animation: fadeInUp 0.6s ease 0.1s forwards; }
.section.is-visible .project-card:nth-child(2) { animation: fadeInUp 0.6s ease 0.2s forwards; }

.section.is-visible .skill-category:nth-child(1) { animation: fadeInUp 0.6s ease 0.1s forwards; }
.section.is-visible .skill-category:nth-child(2) { animation: fadeInUp 0.6s ease 0.2s forwards; }
.section.is-visible .skill-category:nth-child(3) { animation: fadeInUp 0.6s ease 0.3s forwards; }

/* ===================================================
   About Section
   =================================================== */
#about {
  padding: 6rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: center;
}

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

.about-text p:last-child {
  margin-bottom: 0;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 50%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid transparent;
  background-image: linear-gradient(var(--color-bg-card), var(--color-bg-card)), var(--gradient-primary);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 30px rgba(108, 99, 255, 0.2), 0 0 60px rgba(0, 210, 255, 0.1);
  transition: box-shadow var(--transition);
}

.about-image img:hover {
  box-shadow: 0 0 40px rgba(108, 99, 255, 0.35), 0 0 80px rgba(0, 210, 255, 0.15);
}

/* ===================================================
   Experience / Timeline
   =================================================== */
#experience {
  padding: 6rem 0;
}

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent), var(--color-primary));
  opacity: 0.4;
}

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

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 0 12px rgba(108, 99, 255, 0.5);
  z-index: 1;
}

.timeline-content {
  background: var(--color-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-glass-border);
  padding: 1.8rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-content:hover {
  border-color: rgba(108, 99, 255, 0.35);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.timeline-content h3 {
  font-size: 1.4rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.timeline-location {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.timeline-role {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(108, 99, 255, 0.2);
}

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

.timeline-role h4 {
  font-size: 1.1rem;
  color: var(--color-text-heading);
  margin-bottom: 0.15rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.timeline-content ul {
  padding-left: 18px;
  list-style: disc;
}

.timeline-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.timeline-content ul li:last-child {
  margin-bottom: 0;
}

/* ===================================================
   Education Section
   =================================================== */
#education {
  padding: 6rem 0;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.education-item {
  background: var(--color-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-glass-border);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.education-item:hover {
  border-color: rgba(108, 99, 255, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.education-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.education-location {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.education-item .degree {
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.education-item .edu-date {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.education-detail {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(108, 99, 255, 0.15);
}

.education-detail strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ===================================================
   Projects Section
   =================================================== */
#projects {
  padding: 6rem 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.project-card {
  background: var(--color-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: rgba(108, 99, 255, 0.35);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.project-card:hover::before {
  opacity: 1;
}

.project-content {
  padding: 2rem;
}

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

.project-content p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.project-tech {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(0, 210, 255, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0, 210, 255, 0.2);
}

/* ===================================================
   Skills Section
   =================================================== */
#skills {
  padding: 6rem 0;
}

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

.skill-category {
  background: var(--color-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.skill-category:hover {
  border-color: rgba(108, 99, 255, 0.35);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.skill-category h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
  font-weight: 700;
}

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

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.15);
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.skill-tag:hover {
  background: rgba(108, 99, 255, 0.15);
  border-color: rgba(108, 99, 255, 0.3);
  transform: translateY(-2px);
}

.skill-tag i {
  color: var(--color-primary);
  font-size: 1rem;
}

/* ===================================================
   Contact Section
   =================================================== */
#contact {
  padding: 6rem 0;
  text-align: center;
}

#contact > .container > p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.social-links {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.2);
  font-size: 1.2rem;
  color: var(--color-text);
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(108, 99, 255, 0.3);
}

/* ===================================================
   Footer
   =================================================== */
footer {
  position: relative;
  z-index: 1;
  background: rgba(11, 15, 26, 0.95);
  backdrop-filter: blur(8px);
  color: var(--color-text-muted);
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
}

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

  header .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(11, 15, 26, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: right var(--transition);
    border-left: 1px solid var(--color-border);
  }

  header .nav-links.active {
    right: 0;
  }

  header .nav-links li a {
    font-size: 1.1rem;
    padding: 12px 24px;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-image {
    order: -1;
    max-width: 220px;
    margin: 0 auto;
  }

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

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

  .timeline::before {
    left: 16px;
  }

  .timeline-item {
    padding-left: 50px;
  }

  .timeline-item::before {
    left: 9px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  #hero h1 {
    font-size: 2.2rem;
  }

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

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

  .section-title {
    font-size: 1.6rem;
  }

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

  .social-links {
    gap: 12px;
  }
}