:root {
  --blue: #4c75c4;
  --dark-blue: #3a5ba0;
  --cream: #fefce8;
  --yellow: #f3cc6a;
  --red: #e63946;
  --white: #ffffff;
  --text: #4c75c4;;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--cream);
  margin: 0;
  color: var(--text);
}

h1, h2, h3, h4 {
  margin: 0;
}

/* -------------------- NAVBAR -------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 30px 8px 10px; 
  background: var(--blue);
  color: var(--white);
  transition: background 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 8px; 
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  margin-left: -5px; 
}

.logo-img {
  width: 40px !important; 
  height: 40px !important;
  object-fit: contain;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

.navbar h1 {
  font-size: 18px; 
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.navbar nav {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.navbar nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.navbar nav a:hover {
  color: var(--yellow);
}

.navbar nav a.active {
  color: var(--yellow);
}

.navbar nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--yellow);
  transition: width 0.3s ease;
}

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

/* Reset all margins/padding for elements in the navbar */
.navbar * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Hero Section */
.hero-left {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-animation-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.hero-icon {
    position: absolute;
    top: 30%;
    left: 20%;
    width: 200px !important;
    transition: transform 0.5s cubic-bezier(0.0, 0.0, 0.1, 1);
}

/* Icon positions */
.hero-icon.icon-1 { transform: translate(90px, 60px); z-index: 3; }
.hero-icon.icon-2 { transform: translate(0px, 0px); z-index: 4; }
.hero-icon.icon-3 { transform: translate(-95px, 60px); z-index: 5; }
.hero-icon.icon-4 { transform: translate(-80px, -60px); z-index: 2; }
.hero-icon.icon-5 { transform: translate(80px, -50px); z-index: 1; }
.hero-icon.icon-6 { transform: translate(10px, 80px); z-index: 6; }

/* Hover effects */
.hero-icon.icon-1:hover { transform: translate(140px, 80px) scale(1.15); z-index: 10; }
.hero-icon.icon-2:hover { transform: translate(0px, 0px) scale(1.15); z-index: 10; }
.hero-icon.icon-3:hover { transform: translate(-140px, 100px) scale(1.15); z-index: 10; }
.hero-icon.icon-4:hover { transform: translate(-140px, -60px) scale(1.15); z-index: 10; }
.hero-icon.icon-5:hover { transform: translate(140px, -80px) scale(1.15); z-index: 10; }
.hero-icon.icon-6:hover { transform: translate(20px, 120px) scale(1.15); z-index: 10; }

/* Spread positions */
.icon-animation-container.is-spread .icon-1 { transform: translate(210px, 120px) rotate(10deg); }
.icon-animation-container.is-spread .icon-2 { transform: translate(0px, -40px) rotate(-5deg); }
.icon-animation-container.is-spread .icon-3 { transform: translate(-210px, 150px) rotate(-10deg); }
.icon-animation-container.is-spread .icon-4 { transform: translate(-210px, -90px) rotate(-15deg); }
.icon-animation-container.is-spread .icon-5 { transform: translate(210px, -120px) rotate(15deg); }
.icon-animation-container.is-spread .icon-6 { transform: translate(30px, 180px) rotate(5deg); }

.hero {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 40px 60px;
}

.hero img {
  width: 300px;
}

.hero h1 {
  font-size: 60px;
  color: var(--red);
}

.explore-btn {
  border: 2px solid var(--dark-blue);
  background: none;
  color: var(--dark-blue);
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}

/* About Section */
.section-title {
  color: var(--red);
  font-size: 36px;
  font-weight: 700;
  margin: 20px 50px;
}

.about-grid {
  display: flex;
  gap: 50px;
  padding: 0 50px;
  align-items: stretch;
}

.about-image {
  background: var(--yellow);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image img {
  width: 100%;
  max-width: 250px;
  height: auto;
}

.about-text {
  background: var(--blue);
  color: var(--white);
  border-radius: 20px;
  padding: 25px;
  flex-grow: 1;
  font-size: 18px;
  line-height: 1.6;
}

/* Education & Skills */
.edu-skill-container {
  display: flex;
  justify-content: space-between;
  padding: 50px;
}

.edu-skill-left {
  width: 65%;
}

.edu-tag {
  background: var(--yellow);
  padding: 5px 10px;
  border-radius: 10px;
  margin-right: 8px;
  font-weight: 600;
}

.skill-tags span {
  display: inline-block;
  background: var(--dark-blue);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  margin: 4px;
}

/* Experience */
.experience-card {
  background: var(--yellow);
  padding: 20px;
  border-radius: 15px;
  width: 30%;
}

/* -------------------- PROJECT GRID - FILLED VERSION -------------------- */
.projects-section {
    padding: 60px 40px;
    min-height: auto;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--yellow);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--dark-blue);
}

.card-image-wrapper {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue), var(--dark-blue));
}

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

.project-card:hover .card-image-wrapper img {
    transform: scale(1.1);
}

.card-content-bottom {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: var(--dark-blue);
    background: var(--yellow);
}

.card-content-bottom h2 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.card-content-bottom p {
    font-size: 13px;
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.4;
    color: #2d4a8a;
}

.card-btn {
    border: 2px solid var(--dark-blue);
    background: none;
    color: var(--dark-blue);
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    align-self: flex-start;
    transition: all 0.3s ease;
    font-size: 12px;
    margin-top: auto;
}

.card-btn:hover {
    background: var(--dark-blue);
    color: var(--white);
    transform: scale(1.05);
}

/* Modal & Carousel */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    border-radius: 1rem;
    display: flex;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.open .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--dark-blue);
    cursor: pointer;
    z-index: 1010;
    background: var(--yellow);
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: transform 0.2s;
}
.close-btn:hover {
    transform: scale(1.1);
}

.modal-carousel-panel {
    flex: 2;
    background-color: #222;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.carousel-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    z-index: 5;
    transition: color 0.2s;
}
.carousel-nav:hover {
    color: var(--yellow);
}
.carousel-nav.prev { left: 0.5rem; }
.carousel-nav.next { right: 0.5rem; }

.modal-description-panel {
    flex: 1;
    background-color: var(--blue);
    padding: 3rem;
    color: var(--white);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-description-panel h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-description-panel div#modalDescriptionText {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-tags {
    margin-bottom: 2rem;
}

.tag {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.modal-link-wrapper {
    margin-top: auto;
}

.modal-link {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--white);
    color: var(--white);
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s;
}

.modal-link:hover {
    background: var(--white);
    color: var(--blue);
}

/* Contact & Footer */
.contact-header {
  background: var(--yellow);
  padding: 30px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.contact-section h2 {
  font-size: 28px;       /* same size as your Contact Me title */
  font-weight: 700;
  color: white;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 12px;            
  margin: 16px 0;
}
.icon {
  width: 28px;          /* change size if needed */
  height: 28px
}
.contact-link {
  color: white !important;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
}

.contact-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.message-box input {
  border: 2px solid var(--blue);
  border-radius: 20px;
  padding: 8px 15px;
}

.message-box button {
  border: 2px solid var(--blue);
  background: var(--blue);
  color: white;
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
}

.footer {
  display: flex;
  justify-content: space-around;
  background: var(--blue);
  color: var(--white);
  padding: 40px 20px;
}

.footer-links, .footer-social {
  display: flex;
  flex-direction: column;
}

.footer-links a {
  color: white;
  text-decoration: none;
  margin-bottom: 5px;
}

.copyright {
  text-align: center;
  background: var(--dark-blue);
  color: white;
  padding: 10px;
  font-size: 13px;
}

/* -------------------- RESPONSIVE DESIGN -------------------- */
@media (max-width: 1024px) {
    .modal-content {
        flex-direction: column;
        height: 95vh;
        max-width: 95%;
    }
    .modal-carousel-panel {
        flex: 1;
        min-height: 40%;
    }
    .modal-description-panel {
        flex: 1;
        padding: 2rem;
        min-height: 60%;
    }
    .close-btn {
        color: var(--white);
        background: var(--dark-blue);
    }
    
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hero { 
        flex-direction: column; 
        text-align: center; 
    }
    .about-grid { 
        flex-direction: column; 
    }
    .edu-skill-container { 
        flex-direction: column; 
    }
    .experience-card { 
        width: 100%; 
        margin-top: 20px; 
    }
    .navbar {
        padding: 8px 20px;
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .projects-section {
        padding: 40px 20px;
    }
    
    .about-grid,
    .edu-skill-container {
        padding: 0 20px;
    }
    
    .navbar .logo {
        gap: 8px;
    }
    
    .logo-img {
        width: 35px !important;
        height: 35px !important;
    }
    
    .navbar h1 {
        font-size: 18px;
    }
    
    .navbar nav {
        gap: 15px;
    }
    
    .navbar nav a {
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .contact-header { 
        flex-direction: column; 
        gap: 15px; 
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 48px;
    }
    
    .section-title {
        margin: 20px 20px;
        font-size: 28px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .navbar .logo {
        justify-content: center;
    }
}