/* CSS Reset & Baseline */
:root {
  /* Color Palette - Premium Emerald Theme */
  --bg-primary: #0b1115;
  --bg-secondary: #121c22;
  --text-primary: #f0f4f8;
  --text-secondary: #8b9eb0;
  --accent-primary: #10b981;
  /* Emerald */
  --accent-secondary: #06b6d4;
  /* Cyan */
  --accent-glow: rgba(16, 185, 129, 0.4);

  /* Glassmorphism Variables */
  --glass-bg: rgba(20, 21, 35, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Typography */
  --font-main: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
}

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

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Typography styles */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

li {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: var(--section-padding);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

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

/* Glassmorphism Utilities */
.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 16px;
}

/* Abstract Background Shapes */
.bg-shape {
  position: absolute;
  filter: blur(100px);
  z-index: -1;
  border-radius: 50%;
  opacity: 0.5;
  animation: float 20s infinite alternate;
}

.bg-shape-1 {
  top: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: var(--accent-secondary);
}

.bg-shape-2 {
  bottom: 20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: var(--accent-primary);
  animation-delay: -5s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(-50px, 50px) scale(1.1);
  }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  padding: 1rem 0;
  transition: padding 0.3s ease;
}

.navbar.scrolled {
  padding: 0.5rem 0;
}

.nav-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
}

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

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

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

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  width: 80%;
  max-width: 320px;
  height: 100vh;
  z-index: 1001;
  padding: 2rem;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  background: rgba(11, 17, 21, 0.98);
  /* Deep slate to ensure readability */
  border-radius: 0;
  /* Override glass-effect radius */
  border: none;
  border-left: 1px solid var(--glass-border);
}

.mobile-menu.active {
  transform: translateX(0);
}

.close-btn {
  align-self: flex-end;
  font-size: 1.5rem;
  cursor: pointer;
  margin-bottom: 2rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-links a {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: #5356d4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.greeting {
  color: var(--accent-secondary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.name {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role {
  font-size: 2rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.summary {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
}

.hero-image-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  z-index: 2;
  position: relative;
}

.glow-ring {
  position: absolute;
  top: -10%;
  left: -10%;
  right: -10%;
  bottom: -10%;
  background: conic-gradient(from 0deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
  filter: blur(60px);
  opacity: 0.3;
  z-index: 0;
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

/* About Section */
.about-card {
  padding: 3rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.about-card p {
  margin-bottom: 1.5rem;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-primary);
}

.contact-item .icon {
  color: var(--accent-primary);
  font-size: 1.2rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-btn {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
}

.social-btn:hover {
  background: var(--accent-primary);
  color: #fff;
  transform: translateY(-3px);
  border-color: transparent;
}

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

.skill-category {
  padding: 2rem;
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
}

.skill-category h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.skill-category h3 i {
  color: var(--accent-secondary);
}

.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.chip:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: #fff;
}

/* Experience Section Timeline */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--glass-border);
  top: 0;
  bottom: 0;
  left: 20px;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 0 40px 50px;
  position: relative;
}

.timeline-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  left: 12px;
  top: 15px;
  background: var(--accent-primary);
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-content {
  padding: 2rem;
  position: relative;
}

.timeline-content::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 15px;
  width: 0;
  z-index: 1;
  left: -10px;
  border: medium solid var(--glass-border);
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--glass-border) transparent transparent;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.timeline-header h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin: 0;
}

.timeline-date {
  color: var(--accent-secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

.timeline-header.primary-org {
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--glass-border);
  padding-bottom: 1rem;
}

.timeline-header.primary-org h3 {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.organization-role {
  margin-bottom: 1.5rem;
}

.client-name {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.role-date {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

.role-divider {
  border: 0;
  height: 1px;
  background: var(--glass-border);
  margin: 1.5rem 0;
}

.experience-list {
  color: var(--text-secondary);
  margin-left: 1.5rem;
}

.experience-list li {
  list-style-type: disc;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.experience-list li strong {
  color: #fff;
}

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

.project-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.tech-stack {
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.project-card p:last-child {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
}

/* Education & Certifications */
.edu-cert-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.certifications,
.education-card {
  padding: 2.5rem;
}

.certifications .section-title,
.education-card .section-title {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  left: 0;
  transform: none;
  text-align: left;
}

.certifications .section-title::after,
.education-card .section-title::after {
  left: 0;
  transform: none;
}

.cert-list li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
}

.cert-list li:last-child {
  border-bottom: none;
}

.accent-icon {
  color: var(--accent-secondary);
  font-size: 1.2rem;
}

.edu-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.institution {
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.edu-details {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.divider {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.languages-section h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.lang-chips {
  display: flex;
  gap: 1rem;
}

/* Footer */
footer {
  padding: 1rem 0;
  margin-top: 2rem;
  border-bottom: none;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-content .social-links {
  margin-top: 0;
  justify-content: center;
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.2s;
}

.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries */
@media (max-width: 992px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-text {
    order: 2;
  }

  .hero-image-container {
    order: 1;
    max-width: 300px;
  }

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

  .section-title {
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
  }

  .certifications .section-title,
  .education-card .section-title {
    left: 0;
    transform: none;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .name {
    font-size: 3rem;
  }

  .role {
    font-size: 1.5rem;
  }

  .edu-cert-container {
    grid-template-columns: 1fr;
  }

  .timeline::after {
    left: 15px;
  }

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

  .timeline-dot {
    left: 7px;
  }
}

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

  .name {
    font-size: 2.2rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .timeline-header {
    flex-direction: column;
    gap: 0.2rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 0.5rem;
  }
}

/* Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 15px var(--accent-glow);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background: var(--accent-secondary);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}