/* Variables & Reset */
:root {
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --bg-body: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --error: #ef4444;
  
  --font-main: 'Inter', sans-serif;
  --nav-height: 70px;
  --container-width: 1200px;
  
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height); /* Ensures smooth scroll lands correctly */
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* Utility Classes */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.bg-alt {
  background-color: var(--bg-alt);
}

.highlight {
  color: var(--primary);
}

.highlight-text {
  color: var(--primary);
  font-size: 0.6em;
  display: block;
  font-weight: 500;
  margin-top: 5px;
}

.text-left {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.mb-large {
  margin-bottom: 40px;
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  font-size: 1rem;
  gap: 8px;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--primary);
  color: #0f172a;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background-color: rgba(56, 189, 248, 0.1);
}

.btn-icon {
  width: 18px;
  height: 18px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-list {
  display: flex;
  gap: 25px; /* Reduced slightly to fit more items */
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
}

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

/* Active Link Indicator */
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  font-size: 0.9rem;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  padding: 2px;
  transition: var(--transition);
  font-family: var(--font-main);
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  color: var(--primary);
  font-weight: 700;
}

.lang-divider {
  color: var(--border);
}

.hamburger-btn, .close-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.greeting {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 15px;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 25px;
  font-weight: 400;
  min-height: 1.5em;
}

.cursor {
  display: inline-block;
  width: 2px;
  background-color: var(--primary);
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-description {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 35px;
  max-width: 500px;
}

.hero-btns {
  display: flex;
  gap: 15px;
}

/* Code Block Visual */
.code-block {
  background-color: #1e293b;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.code-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

pre {
  color: #e2e8f0;
  overflow-x: auto;
}

.k { color: #c678dd; }
.v { color: #e5c07b; }
.s { color: #98c379; }
.p { color: #61afef; }

/* --- NEW SKILLS SECTION (SPLIT) --- */
.skills-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.column-title i {
  color: var(--primary);
}

.skills-grid-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.skill-card-compact {
  background-color: var(--bg-card);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 15px;
  transition: var(--transition);
}

.skill-card-compact:hover {
  border-color: var(--primary);
  transform: translateX(5px);
}

.skill-icon-small {
  color: var(--primary);
  background-color: rgba(56, 189, 248, 0.1);
  padding: 10px;
  border-radius: 6px;
}

.skill-info h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.skill-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* PM Skills Badges */
.pm-skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.pm-badge {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-badge:hover {
  color: var(--primary);
  border-color: var(--primary);
  background-color: rgba(56, 189, 248, 0.05);
}

.pm-badge i {
  width: 16px;
  height: 16px;
}

/* --- EXPERIENCE SECTION --- */
.experience-timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  height: 100%;
  width: 2px;
  background-color: var(--border);
}

.experience-card {
  background-color: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
  margin-left: 60px;
  position: relative;
  transition: var(--transition);
}

.experience-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.timeline-dot {
  position: absolute;
  left: -41px; /* Adjust based on margin-left and dot size */
  top: 30px;
  width: 24px;
  height: 24px;
  background-color: var(--primary);
  border-radius: 50%;
  border: 4px solid var(--bg-alt);
  z-index: 2;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.exp-role {
  font-size: 1.3rem;
  color: var(--text-main);
  font-weight: 600;
}

.exp-company {
  color: var(--primary);
  font-weight: 500;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.exp-period {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  background-color: rgba(255,255,255,0.05);
  padding: 4px 10px;
  border-radius: 4px;
}

.exp-activities {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.exp-activities li {
  margin-bottom: 8px;
}

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

.exp-tag {
  font-size: 0.8rem;
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 4px;
}

/* --- EDUCATION SECTION --- */
.education-list {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.education-item {
  background-color: var(--bg-card);
  padding: 25px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

.education-item:hover {
  transform: translateX(5px);
  background-color: rgba(255,255,255,0.03);
}

.edu-info h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.edu-info p {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.edu-link {
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.edu-link:hover {
  border-bottom-color: var(--primary);
}

.edu-coursework {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edu-coursework li {
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: var(--transition);
}

.edu-coursework li:hover {
  background-color: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
}

.edu-skills {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edu-skill-badge {
  background-color: rgba(56, 189, 248, 0.08);
  color: var(--primary);
  padding: 5px 11px;
  border-radius: 16px;
  font-size: 0.8rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: var(--transition);
  display: inline-block;
}

.edu-skill-badge:hover {
  background-color: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
}

.edu-year {
  font-family: 'Fira Code', monospace;
  color: var(--primary);
  font-weight: 600;
}

/* --- CAROUSEL STYLES --- */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.carousel-view {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 30px;
}

.project-card {
  flex: 0 0 calc(33.333% - 20px); /* 3 cards per view minus gap adjustment */
  background-color: var(--bg-body);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

.project-image {
  height: 200px;
  position: relative;
  overflow: hidden;
}

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

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  backdrop-filter: blur(2px);
}

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

.project-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.project-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.project-tags span {
  font-size: 0.75rem;
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
}

/* Carousel Controls */
.carousel-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background-color: var(--primary);
  color: #0f172a;
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--bg-card) !important;
  color: var(--text-muted) !important;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.indicator.active {
  background-color: var(--primary);
  transform: scale(1.2);
}

/* Minimal Contact & Footer */
.contact-minimal {
  padding-bottom: 40px;
}

.contact-actions {
  margin-bottom: 60px;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-socials a {
  color: var(--text-muted);
  transition: var(--transition);
  padding: 10px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.03);
}

.footer-socials a:hover {
  color: var(--primary);
  background-color: rgba(56, 189, 248, 0.1);
  transform: translateY(-3px);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  padding-top: 30px;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
    margin-bottom: 30px;
  }

  .hero-btns {
    justify-content: center;
  }
  
  /* Tablet: 2 cards */
  .project-card {
    flex: 0 0 calc(50% - 15px);
  }

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

@media (max-width: 768px) {
  .hamburger-btn, .close-menu-btn {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-alt);
    flex-direction: column;
    padding: 80px 40px;
    transition: var(--transition);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 1001;
    align-items: center;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .lang-switcher {
    margin-left: 0;
    margin-top: 30px;
    font-size: 1.1rem;
    border-left: none;
    padding-left: 0;
  }

  .close-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
  }

  .hero-title {
    font-size: 2.5rem;
  }
  
  /* Mobile: 1 card */
  .project-card {
    flex: 0 0 100%;
  }
  
  .carousel-wrapper {
    gap: 10px;
  }
  
  .carousel-btn {
    width: 35px;
    height: 35px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
  }
  
  .prev-btn { left: 10px; }
  .next-btn { right: 10px; }

  /* Experience Mobile */
  .experience-timeline::before {
    left: 10px;
  }
  
  .experience-card {
    margin-left: 30px;
    padding: 20px;
  }

  .timeline-dot {
    left: -32px;
    width: 20px;
    height: 20px;
  }

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

  /* Education Mobile */
  .education-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .hero-btns {
    flex-direction: column;
  }
  
  .section-title {
    font-size: 2rem;
  }
}
