/* ════════════════════════════════════════════════════
   DESIGN TOKENS — Color Palette & Variables
   ════════════════════════════════════════════════════ */
:root {
  /* Backgrounds */
  --bg-base: #09090b; /* near-black */
  --bg-surface: #111113; /* section alt */
  --bg-elevated: #18181b; /* cards */
  --bg-border: #27272a; /* subtle borders */

  /* Brand Colors */
  --primary: #6c63ff; /* electric indigo */
  --primary-dim: rgba(108, 99, 255, 0.15);
  --primary-glow: rgba(108, 99, 255, 0.35);
  --secondary: #a78bfa; /* soft lavender */
  --accent: #38bdf8; /* sky blue pop */

  /* Text */
  --text-primary: #f4f4f5;
  --text-muted: #71717a;
  --text-subtle: #3f3f46;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-accent: linear-gradient(135deg, var(--primary), var(--accent));

  /* Spacing scale */
  --section-pad: 9rem 9%;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ════════════════════════════════════════════════════
   RESET & BASE
   ════════════════════════════════════════════════════ */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", sans-serif;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════════════════ */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.2rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 4.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4rem;
  line-height: 1.1;
}

/* ════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════ */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition);
}

.logo {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  cursor: pointer;
}

.logo-dot {
  color: var(--primary);
}

nav a {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-left: 3.5rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding-bottom: 2px;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width var(--transition);
}

nav a:hover,
nav a.active {
  color: var(--text-primary);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* ════════════════════════════════════════════════════
   HOME
   ════════════════════════════════════════════════════ */
.home {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6rem;
  min-height: 100vh;
  padding: var(--section-pad);
  padding-top: 12rem;
  overflow: hidden;
}

/* Subtle grid background */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 99, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 99, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
  pointer-events: none;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent);
  padding: 0.6rem 1.4rem;
  border-radius: 10rem;
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
  width: fit-content;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.home-content h1 {
  font-size: 6.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.home-content h3 {
  font-size: 3rem;
  margin-bottom: 2rem;
  font-weight: 400;
  color: var(--text-muted);
}

.home-content h3 span {
  color: var(--secondary);
  font-weight: 600;
}

.home-content p {
  font-size: 1.7rem;
  line-height: 1.75;
  margin-bottom: 3.5rem;
  color: var(--text-muted);
  max-width: 50rem;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.8rem;
  border-radius: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.01em;
}

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

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px var(--primary-glow);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--primary-dim);
}

/* Social */
.social-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.social-text {
  font-size: 1.4rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
}

.social-divider {
  width: 3rem;
  height: 1px;
  background: var(--bg-border);
}

.social-icons {
  display: flex;
  gap: 1.2rem;
}

.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  font-size: 1.7rem;
  border-radius: 1rem;
  transition: var(--transition);
  color: var(--text-muted);
}

.social-icons a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-dim);
  transform: translateY(-4px);
}

/* Profile image */
.home-img {
  position: relative;
  width: 400px;
  height: 400px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 0.9s ease forwards;
}

.img-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  animation: breathe 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.home-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 3px solid rgba(108, 99, 255, 0.4);
  box-shadow: 0 0 60px var(--primary-dim);
  transition: var(--transition);
}

.home-img:hover img {
  transform: scale(1.04);
  border-color: var(--primary);
  box-shadow: 0 0 80px var(--primary-glow);
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Typing cursor */
.typing-text span {
  border-right: 2.5px solid var(--secondary);
  padding-right: 4px;
  animation: blink 0.7s step-end infinite;
}

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

/* ════════════════════════════════════════════════════
   ABOUT
   ════════════════════════════════════════════════════ */
.about {
  background: var(--bg-surface);
  padding: var(--section-pad);
}

.about-container {
  max-width: 1100px;
  margin: auto;
}

.about-summary {
  margin-bottom: 5rem;
}

.about-summary .section-title {
  margin-bottom: 2rem;
}

.about-summary p {
  font-size: 1.7rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 80rem;
}

/* Tabs */
.tabs {
  background: var(--bg-elevated);
  padding: 3.5rem;
  border-radius: 2rem;
  border: 1px solid var(--bg-border);
}

.tab-buttons {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--bg-border);
  padding-bottom: 2rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 2rem;
  background: transparent;
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 1rem;
  font-size: 1.4rem;
  font-family: "Outfit", sans-serif;
  font-weight: 500;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}

.tab-btn.active {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--secondary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.skills-group h3 {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.skills-group h3 i {
  color: var(--primary);
  font-size: 1.3rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skills span {
  padding: 0.6rem 1.3rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 0.8rem;
  font-size: 1.3rem;
  color: var(--text-primary);
  transition: var(--transition);
  cursor: default;
}

.skills span:hover {
  border-color: var(--primary);
  color: var(--secondary);
  background: var(--primary-dim);
}

/* Education */
.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  background: var(--bg-surface);
  padding: 3rem;
  border-radius: 1.5rem;
  border: 1px solid var(--bg-border);
  border-left: 3px solid var(--primary);
  transition: var(--transition);
}

.edu-card:hover {
  border-left-color: var(--secondary);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.edu-icon {
  font-size: 3.5rem;
  color: var(--primary);
  background: var(--primary-dim);
  width: 6rem;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.2rem;
  flex-shrink: 0;
}

.edu-info h3 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.edu-faculty {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.edu-meta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.edu-meta span {
  font-size: 1.4rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.edu-meta span i {
  color: var(--accent);
  font-size: 1.2rem;
}

/* ════════════════════════════════════════════════════
   EXPERIENCE
   ════════════════════════════════════════════════════ */
.experience {
  background: var(--bg-base);
  padding: var(--section-pad);
}

.exp-container {
  max-width: 1100px;
  margin: auto;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.exp-card {
  background: var(--bg-elevated);
  padding: 3rem;
  border-radius: 1.5rem;
  border: 1px solid var(--bg-border);
  position: relative;
  transition: var(--transition);
}

.exp-card:hover {
  border-color: rgba(108, 99, 255, 0.3);
  transform: translateX(6px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.exp-dot {
  position: absolute;
  left: -3.65rem;
  top: 3rem;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 12px var(--primary-glow);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.8rem;
  gap: 1.5rem;
}

.exp-header h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.exp-header h4 {
  font-size: 1.4rem;
  color: var(--text-muted);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.mode-tag {
  background: var(--primary-dim);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--secondary);
  padding: 0.2rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 1.1rem;
  font-family: "JetBrains Mono", monospace;
}

.accent-tag {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--accent);
}

.exp-date {
  font-size: 1.3rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.exp-card ul {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.exp-card ul li {
  font-size: 1.45rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: 1.8rem;
  position: relative;
}

.exp-card ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ════════════════════════════════════════════════════
   PROJECTS
   ════════════════════════════════════════════════════ */
.projects {
  background: var(--bg-surface);
  padding: var(--section-pad);
}

.projects-container {
  max-width: 1100px;
  margin: auto;
}

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.carousel {
  display: flex;
  gap: 0;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* CARD */
.project-card {
  min-width: 100%;
  background: var(--bg-elevated);
  padding: 2.5rem;
  border-radius: 2rem;
  border: 1px solid var(--bg-border);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  opacity: 0.35;
  transform: scale(0.92);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-card.active {
  opacity: 1;
  transform: scale(1);
}

/* IMAGE */
.project-img {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 280px;
  border-radius: 1.4rem;
  overflow: hidden;
  background: var(--bg-base);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  border-radius: inherit;
}

.project-card.active:hover .project-overlay {
  opacity: 1;
}

.project-card.active:hover .project-img img {
  transform: scale(1.04);
}

.overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--primary);
  color: #fff;
  padding: 1.1rem 2.5rem;
  border-radius: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  transition: var(--transition);
}

.overlay-btn:hover {
  background: var(--secondary);
  transform: scale(1.05);
}

/* BODY */
.project-body h3 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.project-body p {
  font-size: 1.5rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* TECH */
.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.tech span {
  background: var(--primary-dim);
  border: 1px solid rgba(108, 99, 255, 0.25);
  padding: 0.4rem 1.1rem;
  border-radius: 0.8rem;
  font-size: 1.2rem;
  color: var(--secondary);
  font-family: "JetBrains Mono", monospace;
}

/* ARROWS */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  font-size: 1.8rem;
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.nav-arrow:hover {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary);
}

.nav-arrow.left {
  left: -2.8rem;
}
.nav-arrow.right {
  right: -2.8rem;
}

/* DOTS */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 3rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-border);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  padding: 0;
}

.dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

/* ════════════════════════════════════════════════════
   CONTACT
   ════════════════════════════════════════════════════ */
.contact {
  background: var(--bg-base);
  padding: var(--section-pad);
}

.contact-container {
  max-width: 1100px;
  margin: auto;
  text-align: center;
}

.contact-subtitle {
  font-size: 1.7rem;
  color: var(--text-muted);
  margin-bottom: 5rem;
  margin-top: -2rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
}

.contact-card {
  background: var(--bg-elevated);
  padding: 3.5rem 2rem;
  border-radius: 1.8rem;
  border: 1px solid var(--bg-border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  color: var(--text-primary);
}

.contact-icon {
  width: 5.5rem;
  height: 5.5rem;
  background: var(--primary-dim);
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--primary);
  transition: var(--transition);
}

.contact-card h3 {
  font-size: 1.8rem;
  font-weight: 600;
}

.contact-card span {
  font-size: 1.3rem;
  color: var(--text-muted);
}

.contact-card:hover {
  transform: translateY(-8px);
  border-color: rgba(108, 99, 255, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.contact-card:hover .contact-icon {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════ */
footer {
  padding: 3rem 9%;
  text-align: center;
  border-top: 1px solid var(--bg-border);
  background: var(--bg-base);
}

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

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .home {
    gap: 4rem;
  }
  .home-img {
    width: 320px;
    height: 320px;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 55%;
  }

  header {
    padding: 1.8rem 5%;
  }

  nav {
    position: absolute;
    display: none;
    top: 100%;
    right: 0;
    width: 100%;
    background: rgba(9, 9, 11, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--bg-border);
    padding: 2rem 5%;
    flex-direction: column;
  }

  nav.active {
    display: flex;
  }

  nav a {
    margin-left: 0;
    padding: 1.2rem 0;
    font-size: 1.8rem;
    border-bottom: 1px solid var(--bg-border);
  }

  nav a:last-child {
    border-bottom: none;
  }

  .home {
    flex-direction: column-reverse;
    padding-top: 12rem;
    text-align: center;
  }

  .home-img {
    width: 260px;
    height: 260px;
    margin: 0 auto;
  }

  .cta-buttons {
    justify-content: center;
  }
  .social-wrapper {
    justify-content: center;
  }

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

  .exp-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .nav-arrow.left {
    left: -1.5rem;
  }
  .nav-arrow.right {
    right: -1.5rem;
  }

  .tabs {
    padding: 2rem;
  }

  .edu-card {
    flex-direction: column;
  }
}
