/* ===== CSS VARIABLES ===== */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --text-color: #2b2d42;
  --light-text: #f8f9fa;
  --card-bg: #f8f9fa;
  --sidebar-bg: rgba(255, 255, 255, 0.9);
  --sidebar-active: #4361ee;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
}

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

/* ===== NAVIGATION ===== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  position: sticky;
  top: 0;
  background-color: var(--background-color);
  z-index: 1000;
}

nav .left a {
  color: var(--text-color);
  font-size: 24px;
  font-weight: 700;
}

nav .right {
  display: flex;
  gap: 20px;
}

nav .right a {
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

nav .right a:hover {
  color: var(--primary-color);
}

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
  background-color: var(--sidebar-bg);
  padding: 15px 10px;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.sidebar a {
  position: relative;
  color: var(--text-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.sidebar a:hover,
.sidebar a.active {
  background-color: var(--sidebar-active);
  color: white;
}

.sidebar a::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 15px;
  background: var(--sidebar-bg);
  color: var(--text-color);
  padding: 5px 15px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.sidebar a:hover::after {
  opacity: 1;
  visibility: visible;
  left: 110%;
}

/* ===== SECTION 1: HERO ===== */
.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80vh;
  padding: 80px 0;
  gap: 40px;
}

.hero-section .text {
  flex: 1;
  max-width: 600px;
}

.hero-section h1 {
  font-size: 3.5rem;
  margin: 80px 0px 10px 130px;
  color: var(--text-color);
}

.hero-section h2 {
  font-size: 1.8rem;
  margin: 20px 0px 10px 130px;
  color: var(--primary-color);
}

.hero-section .tagline {
  font-size: 1.2rem;
  margin: 20px 0px 10px 130px;
  font-weight: 500;
}

.hero-section .intro {
  margin: 20px 0px 40px 130px;
  color: #555;
}

.hero-section .headshot img {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--primary-color);
  box-shadow: var(--shadow);
}

/* CTA Button */
.cta-button {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  margin-top: 20px;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--card-bg);
  color: var(--text-color);
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* ===== SECTION 2: EDUCATION ===== */
.education-section {
  padding: 80px 0;
}

.education-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--text-color);
}

.education-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.degree-card {
  display: flex;
  gap: 20px;
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.degree-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.degree-icon {
  font-size: 2rem;
  color: var(--primary-color);
}

.degree-card h3 {
  margin-bottom: 5px;
  color: var(--text-color);
}

.institution {
  font-weight: 500;
  margin-bottom: 5px;
}

.duration {
  color: #666;
  font-size: 0.9rem;
}

/* ===== SECTION 3: SKILLS ===== */
.skills-section {
  padding: 80px 0;
}

.skills-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.skills-container {
  max-width: 1000px;
  margin: 0 auto;
}

.skills-card {
  display: flex;
  gap: 40px;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  color: black;
  text-align: left;
}

.skill-category {
  margin-bottom: 20px;
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
}

.skill-cells {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.cell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.cell:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cell img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.cell span {
  font-weight: 500;
}

/* ===== SECTION 4: EXPERIENCE ===== */
.experience-section {
  padding: 80px 0;
}

.experience-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--text-color);
}

.experience-container {
  max-width: 1000px;
  margin: 0 auto;
}

.experience-card {
  display: flex;
  gap: 40px;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.company-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.company-info img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid var(--primary-color);
}

.company-info h3 {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.position {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 20px;
}

.experience-details {
  margin-top: 30px;
  flex: 2;
}

.experience-description {
  margin-bottom: 30px;
  line-height: 1.7;
}

/* ===== SECTION 5: PROJECTS ===== */
.projects-section {
  padding: 80px 0;
}

.projects-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--text-color);
}

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

.project-card {
  display: flex;
  gap: 40px;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.project-info h3 {
  font-size: 1.3rem;
  margin-top: 15px;
}

.project-info p {
  line-height: 1.6;
  margin: 5px 0;
}

.project-info .project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  margin-top: 10px;
}

.project-info .project-link:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.project-gallery {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-top: 30px;
}

.projects {
  overflow: visible;
}

.project-links {
  display: flex;
  flex-direction: column;
}

.project-link {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  transition: var(--transition);
}

.project-link:hover {
  color: var(--secondary-color);
}

.project-link i {
  font-size: 0.8rem;
}

/* Project Gallery Buttons */
.project-buttons {
  display: flex;
  gap: 15px;
  margin: 10px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-btn {
  padding: 10px 20px;
  background-color: var(--card-bg);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  transition: var(--transition);
}

.gallery-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-btn.active {
  background-color: var(--primary-color);
  color: white;
}

/* Project Galleries */
.gallery {
  display: none;
  width: 100%;
  margin: 0 auto;
  padding: 20px 0;
  overflow: visible;
}

.gallery.active {
  display: block;
  width: 100%;
}

.gallery.expanded {
  width: 100%;
}

.gallery .images-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.gallery img {
  width: calc(25% - 15px);
  min-width: 160px;
  height: 135px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  flex-shrink: 0;
}

.gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
  filter: brightness(0.3);
}

/* Hidden images and Show More button */
.hidden-image {
  display: none !important;
}

.gallery.expanded .hidden-image {
  display: block !important;
}

.see-more-btn {
  padding: 10px 20px;
  color: blue;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  transition: var(--transition);
  margin-top: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.see-more-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  color: white;
}

/* JavaScript Tooltip */
.tooltip {
  position: fixed;
  background-color: transparent;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%);
}

/* ===== IMAGE MODAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.modal-content {
  margin: auto;
  margin-top: 60px;
  display: block;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

#modalCaption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: white;
  padding: 20px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close:hover,
.close:focus {
  color: var(--primary-color);
  text-decoration: none;
}

/* Modal Arrow Navigation */
.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 15px 12px;
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  border-radius: 5px;
  transition: all 0.3s ease;
  z-index: 1001;
}

.modal-arrow:hover {
  background-color: rgba(0, 0, 0, 0.9);
  color: var(--primary-color);
}

.modal-arrow-left {
  left: 20px;
}

.modal-arrow-right {
  right: 20px;
}

/* ===== SECTION 6: CONTACT ===== */
.contact-section {
  padding: 80px 0;
}

.contact-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--text-color);
}

.contact-container {
  display: flex;
  gap: 50px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  flex: 1;
}

.contact-info p {
  margin: 50px 20px 30px 0px;
  line-height: 1.7;
}

.contact-methods {
  display: flex;
  gap: 15px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-color);
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--primary-color);
}

.contact-link i {
  width: 20px;
  text-align: center;
}

.download-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 6px;
  margin-top: 20px;
  transition: var(--transition);
}

.download-cv:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

.submit-button {
  padding: 15px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 50px;
  border-top: 1px solid #eee;
  color: #666;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
  .hero-section {
    flex-direction: column-reverse;
    text-align: center;
    padding: 60px 0;
  }
  
  .hero-section .text {
    max-width: 100%;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .experience-card {
    flex-direction: column;
  }
  
  .company-info {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .contact-container {
    flex-direction: column;
  }
  
  .hero-section h1,
  .hero-section h2,
  .hero-section .tagline,
  .hero-section .intro,
  .experience-details,
  .contact-info,
  .contact-info p,
  .experience-section h2,
  .experience-description {
    margin-left: 0;
    margin-right: 0;
    text-align: center;
  }
  
  .hero-section h1 {
    font-size: 2.8rem;
  }
  
  .hero-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  nav .right a span {
    display: none;
  }
  
  .hero-section h1 {
    font-size: 2.2rem;
  }
  
  .hero-section .headshot img {
    width: 250px;
    height: 250px;
  }
  
  .degree-card {
    flex-direction: column;
    text-align: center;
  }
  
  .degree-icon {
    margin-bottom: 15px;
  }
  
  .gallery {
    gap: 15px;
  }
  
  .gallery img {
    width: 140px;
    height: 105px;
  }
  
  .project-buttons {
    gap: 10px;
  }
  
  .gallery-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}