/* Global Styles */
:root {
    --primary-color: #f5de7d;
    --secondary-color: #f0c14b;
    --dark-bg: #222;
    --darker-bg: #111;
    --light-bg: #f8f8f8;
    --text-dark: #333;
    --text-medium: #555;
    --text-light: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--light-bg);
    /* background-color: #d6bd31; */
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position:relative;
}

/* Burger Menu */
.burger-menu {
    position: relative;
    z-index: 1001;
    margin-right: auto;
}

.burger-icon {
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
}

.burger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    transition: all 0.3s ease;
}

.burger-menu:hover .burger-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu:hover .burger-icon span:nth-child(2) {
    opacity: 0;
}

.burger-menu:hover .burger-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    position: absolute;
    left: 0;
    top: 100%;
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 0 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.burger-menu:hover .nav-links {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 5px 10px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
}

/* Centered Title */
.nav-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    gap:12px;
    
}

.nav-title span {
    font-size: 0.9rem;
    line-height: 1.2;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.nav-title span:nth-child(2) {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 1;
    color: var(--secondary-color);
}

.nav-title:hover span {
    opacity: 1;
}

.nav-contact {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px 25px;
    border: 2px solid var(--secondary-color);
    border-radius: 30px;
    transition: all 0.3s ease;
    margin-left: auto; 
}

.nav-contact:hover {
    background: var(--primary-color);
    color: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
    background-color: #f5f7fa;
    
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 80px 0;
    background-color: #f5f7fa;
    
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

.hero-text {
    flex: 1;
    max-width: 650px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

.title-gradient {
    background: linear-gradient(to right, #333, #555);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 30px;
    color: #555;
    position: relative;
    display: inline-block;
    padding-left: 15px;
}

.hero-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #f0c14b;
    border-radius: 50%;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: #555;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Hero Image */
.hero-image {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.5s ease;
}

.image-wrapper:hover {
    transform: perspective(1000px) rotateY(-5deg) scale(1.02);
    box-shadow: inset 0 2px 8px rgba(193, 193, 193, 0.3);
}

.profile-image {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
    border-radius: 20px;
}

.image-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    z-index: 1;
    opacity: 0.8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #f4d35e 0%, #f0c14b 100%);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(245, 222, 125, 0.4);

}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
  0 2px 4px rgba(0, 0, 0, 0.1),
  0 6px 12px rgba(39, 37, 28, 0.35);

}

.btn-secondary {
    background: #f5f7fa;
    color: var(--text-dark);
    border: 2px solid var(--dark-bg);
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    border:none;
    transform: translateY(-3px);
}

.btn svg {
    fill: currentColor;
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: translateX(3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.indicator-line {
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, #f5de7d 0%, #f5de7d 40%, transparent 100%);
    margin-top: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    z-index: 1;
}



/* Experience Section */
.experience {
    background-color: #f5f7fa;
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-type: y mandatory;
}

.experience-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    text-align: center;
}

.timeline-container {
    position: relative;
    width: 100%;
    margin: 60px auto 0;
    overflow: hidden;
    height: 400px;
    height: 100%;
}

.timeline-line {
    position: absolute;
    top: 5%;
    left: 0;
    right: 0;
    height: 3px;
    /* background: rgba(244, 162, 97, 0.2); */
    background: #222;
    z-index: 1;
    
}

.timeline {
    display: flex;
    width: 500%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 2;
    will-change: transform; /* Optimize for animation */
}

.timeline-item {
    width: 20%;
    padding: 0 40px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-dot {
    width: 24px;
    height: 24px;
    background: var(--secondary-color);
    color: #333333; /* softer dark */
    border-radius: 50%;
    border: 4px solid #f5f7fa;
    box-shadow: 0 0 0 2px #f5de7d ;
    z-index: 3;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.timeline-item.active .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px var(--secondary-color);
}

.timeline-content {
    width: 100%;
    max-width: 500px;
    margin-top: 30px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    /* transition: all 0.6s ease; */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-item.active .timeline-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.timeline-year {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-content h3 {
    color: #2a2a2a;
    margin: 0 0 5px;
    font-size: 1.5rem;
    font-weight: 700;
}

.timeline-content h4 {
    color: #555;
    margin: 0 0 20px;
    font-weight: 500;
    font-size: 1.1rem;
}

.timeline-details {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.timeline-details p {
    color: #666;
    margin: 0 0 15px;
    line-height: 1.6;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-skills li {
    background: rgba(244, 229, 97, 0.1);
    /* background: linear-gradient(135deg, #f9e58f 0%, #f7cf61 100%); */
    /* color: var(--secondary-color); */
    /* color:#2c2c2c; */
    color:grey;
    padding: 5px 12px;
    border:2px solid var(--secondary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 400;
}

/* ===== Portfolio Section ===== */
.portfolio {
    background-color: #f5f7fa;
    padding: 80px 20px;
    position: relative;
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1300px;
    margin: 40px auto 0;
    transition: all 0.4s ease;
}

.portfolio-gallery-professional {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1300px;
    margin: 40px auto 0;
    transition: all 0.4s ease;
}

@media (max-width: 1024px) {
    .portfolio-gallery-professional {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1200px;
    }
}

@media (max-width: 768px) {
    .portfolio-gallery-professional {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
}

/* Portfolio Item - Card View */
.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-height: 250px;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    opacity: 0;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay h3 {
    margin: 0 0 5px;
    font-size: 1.3rem;
}

.portfolio-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Expanded View Styles - FIXED */
.project-expanded {
    position: relative;
    width: 100%;
    background: white;
    padding: 40px;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    z-index: 10;
    border-radius: 15px;
}

.portfolio-item.expanded {
    grid-column: 1 / -1;
    z-index: 20;
    margin-bottom: 40px; /* Adds space below expanded item */
}

.portfolio-item.expanded .project-expanded {
    display: flex;
    animation: expandFadeIn 0.4s ease;
}

@keyframes expandFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.portfolio-gallery.has-expanded,
.portfolio-gallery-professional.has-expanded {
    display: block; /* Changes grid to block layout when expanded */
}

.portfolio-gallery.has-expanded .portfolio-item:not(.expanded),
.portfolio-gallery-professional.has-expanded .portfolio-item:not(.expanded) {
    display: none; /* Completely hides other items */
}

/* Expanded Content Styles */
.close-expanded {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    z-index: 11;
    transition: color 0.2s;
}

.close-expanded:hover {
    color: #000;
}

.expanded-title {
    text-align: center;
    margin: 20px 0 30px;
    font-size: 2rem;
    color: #222;
}

.expanded-images {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

.expanded-images img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Image with Text Overlay for Professional Work */
.image-with-text {
    position: relative;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
}

.image-with-text img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.image-text-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 25%;
    height: 100%;
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.65), rgba(40, 40, 40, 0.65));
    backdrop-filter: blur(10px);
    color: white;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 5;
    overflow-y: auto;
}

.image-title-overlay {
    margin: 0 0 20px 0;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    text-transform: uppercase;
    border-bottom: 2px solid rgba(245, 222, 125, 0.3);
    padding-bottom: 12px;
    width: 100%;
}

.image-text-overlay p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    text-align: start;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Modern Bullet Points for Professional Work */
.overlay-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overlay-list li {
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 300;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

.overlay-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.overlay-list li:hover::before {
    background: var(--secondary-color);
    transform: rotate(45deg) scale(1.2);
}

.image-with-text.hide-text .image-text-overlay {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.image-with-text:hover img {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .image-text-overlay {
        width: 45%;
        padding: 25px 20px;
    }
    
    .image-title-overlay {
        font-size: 1.1rem;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .image-text-overlay p {
        font-size: 0.9rem;
    }
    
    .overlay-list {
        gap: 10px;
    }
    
    .overlay-list li {
        font-size: 0.85rem;
        padding-left: 16px;
    }
    
    .overlay-list li::before {
        width: 6px;
        height: 6px;
        top: 6px;
    }
}

.expanded-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Sections */
section {
    padding: 80px 20px;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Competitions Section */
.competitions {
    padding: 80px 20px;
    background-color: #f5f7fa;
}

.competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 40px auto 0;
}

.competition-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.competition-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.competition-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(to bottom, #f3c53a 0%, #f5de7d 30%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.5rem;
}

.competition-card h3 {
    margin: 0 0 10px;
    color: #333;
}

.competition-card p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}


/* Skills Section */
.skills {
    background-color: #f5f7fa;
    text-align: center;
    padding: 80px 20px;
}

.section-title {
    color: var(--secondary-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 800px;
    margin: 40px auto 0;
}

.skill-box {
    width: 45%;
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.skills.visible .skill-box {
    opacity: 1;
    transform: translateY(0);
}

.skill-box label {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
    color: #444;
}

.progress-bar {
    position: relative;
    height: 8px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    /* background: linear-gradient(to right, #f5de7d, #c69c47); */
    background: linear-gradient(135deg, #f4d35e 0%, #f0c14b 100%);

    width: 0; /* Start at 0 */
    transition: width 1.5s ease-in-out 0.3s;
}

.skill-box span {
    position: absolute;
    right: 0;
    top: -25px;
    font-size: 14px;
    font-weight: bold;
    /* color: #e76f51; */
    opacity: 0;
    transition: opacity 0.3s ease 1.8s; 
}

.skills.visible .skill-box span {
    opacity: 1;
}

.contact {
    background-color: #222;
    color: white;
}

.contact h2 {
    color: white;
}

.contact form {
    max-width: 500px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
}

.contact input,
.contact textarea {
    padding: 15px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Montserrat', sans-serif;
}

.contact input::placeholder,
.contact textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact button {
    padding: 15px;
    background: var(--secondary-color);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 20px;
}

.contact button:hover {
    background: var(--primary-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    background: #111;
    color: white;
}

.social-links {
    margin-bottom: 20px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 15px;
    transition: 0.3s;
    display: inline-block;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    /* Large desktop adjustments */
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 1024px) {
    /* Tablet landscape */
    .navbar-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
    }

    .burger-menu {
        order: 1;
        display: flex;
        align-items: center;
        height: 100%;
        margin-right: 0;
    }

    .nav-title {
        order: 2;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-grow: 1;
        text-align: center;
        margin: 0;
    }

    .nav-title span {
        font-size: 0.8rem;
        margin: 0 5px;
    }

    .nav-title span:nth-child(2) {
        font-size: 1rem;
    }

    .nav-contact {
        order: 3;
        padding: 8px 20px;
    }

    .hero-content {
        gap: 40px;
    }
}

@media (max-width: 992px) {
    /* Tablet portrait */
    .nav-title {
        flex-direction: column;
        gap: 2px;
    }

    .nav-contact {
        padding: 7px 15px;
        font-size: 0.85rem;
    }

    .hero-container {
        padding-top: 70px;
    }

    .image-wrapper {
        width: 280px;
        height: 380px;
    }
}

@media (max-width: 768px) {
    /* Small tablet */
    .navbar {
        padding: 10px 12px;
    }

    .nav-title span {
        font-size: 0.7rem;
    }

    .nav-title span:nth-child(2) {
        font-size: 0.85rem;
    }

    .nav-contact {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .burger-icon {
        width: 24px;
        height: 17px;
    }

    .hero-content {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .image-wrapper {
        max-width: 350px;
    }
}

@media (max-width: 600px) {
    /* Large mobile */
    .nav-title span {
        font-size: 0.65rem;
    }

    .nav-title span:nth-child(2) {
        font-size: 0.78rem;
    }

    .nav-contact {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }
    .hero-container .scroll-indicator {
        display: none !important;
    }
}

@media (max-width: 480px) {
    /* Standard mobile */
    .navbar {
        padding: 8px 10px;
    }

    .nav-title span {
        font-size: 0.6rem;
    }

    .nav-title span:nth-child(2) {
        font-size: 0.7rem;
    }

    .nav-contact {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .burger-icon {
        width: 22px;
        height: 16px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    /* Scroll indicator removal */
    .hero-container .scroll-indicator {
        display: none !important;
    }
    .timeline-item {
        transition: opacity 0.3s ease;
    }
    
    .timeline-item:not(.active) {
        display: none;
        opacity: 0;
    }
    
}

@media (max-width: 375px) {
    /* Small mobile */
    .nav-title span {
        font-size: 0.55rem;
    }

    .nav-title span:nth-child(2) {
        font-size: 0.65rem;
    }

    .nav-contact {
        padding: 3px 6px;
        font-size: 0.65rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 320px) {
    /* Extra small mobile */
    .navbar {
        padding: 6px 8px;
    }

    .nav-title {
        gap: 1px;
    }

    .nav-title span {
        font-size: 0.5rem;
    }

    .nav-title span:nth-child(2) {
        font-size: 0.6rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }
}

@media only screen and (max-width: 480px) {
    .experience {
        height: auto;
        min-height: 100vh;
        padding: 30px 0;
        box-sizing: border-box;
    }

    .experience-container {
        position: static;
        transform: none;
        width: 92%;
        margin: 0 auto;
        padding: 10px 0 60px; /* Extra padding at bottom for buttons */
    }

    .section-title {
        font-size: 0.9rem;
    }

    .experience-container h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .timeline-container {
        margin: 30px auto 0;
        height: auto;
        min-height: 400px;
    }

    .timeline-line {
        top: 30px;
        height: 2px;
    }

    .timeline {
        flex-direction: row;
        width: 500%;
        height: auto;
        padding-bottom: 20px; /* Space for buttons */
    }

    .timeline-item {
        width: 20%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .timeline-dot {
        width: 16px;
        height: 16px;
        border-width: 3px;
        margin-top: 22px;
    }

    .timeline-content {
        margin-top: 25px;
        max-width: 100%;
    }

    .timeline-year {
        font-size: 1rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .timeline-content h4 {
        font-size: 0.9rem;
    }

    .timeline-details {
        padding: 15px;
    }

    .timeline-details p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .timeline-skills {
        gap: 5px;
    }

    .timeline-skills li {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* Navigation buttons - ORIGINAL STYLING PRESERVED */
    .timeline-nav {
        position: relative;
        bottom: 0;
        margin-top: 20px;
        display: flex;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    .timeline-nav button {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-width: 100px;
        background-color: var(--secondary-color);
        color: white;
        border: none;
        border-radius: 25px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .timeline-nav button:hover {
        background-color: #e6a700;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

    .timeline-nav button:active {
        transform: translateY(0);
    }

    .timeline-nav button:disabled {
        background-color: #cccccc;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
}

/* Specific adjustments for very small phones */
@media only screen and (max-width: 375px) {
    .timeline-content h3 {
        font-size: 1rem;
    }
    
    .timeline-details {
        padding: 12px;
    }
    
    .timeline-details p {
        font-size: 0.75rem;
    }

    .timeline-nav button {
        padding: 7px 14px;
        font-size: 0.8rem;
        min-width: 90px;
    }
}

@media only screen and (max-width: 320px) {
    .experience-container {
        width: 95%;
    }
    
    .timeline-item {
        padding: 0 10px;
    }
    
    .timeline-details p {
        font-size: 0.7rem;
    }
    
    .timeline-skills li {
        font-size: 0.65rem;
    }
    
    .timeline-nav button {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-width: 80px;
    }
}

/* ===== Lightbox Styles ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.lightbox-image-container {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox.active .lightbox-image {
    transform: scale(1);
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev svg,
.lightbox-next svg {
    stroke: currentColor;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 25px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

/* Lightbox Responsive */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-prev svg,
    .lightbox-next svg {
        width: 30px;
        height: 30px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }
    
    .lightbox-counter {
        font-size: 0.9rem;
        padding: 8px 20px;
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        width: 95%;
        height: 95%;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        bottom: 80px;
        top: auto;
        transform: none;
    }
    
    .lightbox-prev {
        left: calc(50% - 55px);
    }
    
    .lightbox-next {
        right: calc(50% - 55px);
    }
    
    .lightbox-prev:hover,
    .lightbox-next:hover {
        transform: scale(1.1);
    }
    
    .lightbox-image {
        max-height: 70vh;
    }
    
    .lightbox-counter {
        bottom: 25px;
    }
}

/* Academic project images cursor hint */
.portfolio-item[data-project="1"] .expanded-images img,
.portfolio-item[data-project="2"] .expanded-images img,
.portfolio-item[data-project="3"] .expanded-images img,
.portfolio-item[data-project="4"] .expanded-images img,
.portfolio-item[data-project="5"] .expanded-images img,
.portfolio-item[data-project="6"] .expanded-images img,
.portfolio-item[data-project="7"] .expanded-images img,
.portfolio-item[data-project="8"] .expanded-images img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item[data-project="1"] .expanded-images img:hover,
.portfolio-item[data-project="2"] .expanded-images img:hover,
.portfolio-item[data-project="3"] .expanded-images img:hover,
.portfolio-item[data-project="4"] .expanded-images img:hover,
.portfolio-item[data-project="5"] .expanded-images img:hover,
.portfolio-item[data-project="6"] .expanded-images img:hover,
.portfolio-item[data-project="7"] .expanded-images img:hover,
.portfolio-item[data-project="8"] .expanded-images img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}