/* CSS Variables for easy customization */
:root {
    /* Main Colors */
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --highlight-color: #38bdf8;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --light-gray: #f1f5f9;
    --border-color: #e2e8f0;
    
    /* Text Colors */
    --text-dark: #0f172a;
    --text-light: #f8fafc;
    --text-gray: #64748b;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
}

/* Dark Theme Variables */
.dark-theme {
    --primary-color: #3b82f6;
    --secondary-color: #2563eb;
    --accent-color: #60a5fa;
    --highlight-color: #38bdf8;
    --dark-color: #f8fafc;
    --light-color: #0f172a;
    --gray-color: #94a3b8;
    --light-gray: #1e293b;
    --border-color: #334155;
    
    --text-dark: #f8fafc;
    --text-light: #0f172a;
    --text-gray: #cbd5e1;
}

/* Basic Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* For fixed header */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-color);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    /* Fix horizontal scroll issue */
    overflow-x: hidden;
    max-width: 100vw;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--spacing-md);
}

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

a:hover {
    color: var(--accent-color);
}

ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

li {
    margin-bottom: var(--spacing-sm);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-resume {
    background-color: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-resume:hover {
    background-color: var(--highlight-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Header & Navigation */
header {
    background-color: var(--light-color);
    color: var(--text-dark);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin: 0 var(--spacing-md);
}

nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 3px;
    transition: all var(--transition-fast);
}

/* Theme Switch */
.theme-switch-wrapper {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 999;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--gray-color);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: var(--transition-normal);
}

.slider:before {
    background-color: white;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: var(--transition-normal);
    width: 26px;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.theme-switch-wrapper em {
    margin-top: var(--spacing-sm);
    color: var(--text-dark);
    font-size: var(--text-lg);
}

/* Hero Section */
#hero {
    padding: 150px 0 80px;
    background-color: var(--light-color);
    position: relative;
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.hero-content h2 {
    font-size: var(--text-2xl);
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.hero-content p {
    font-size: var(--text-lg);
    color: var(--text-gray);
    margin-bottom: var(--spacing-lg);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--text-dark);
    font-size: var(--text-2xl);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* Section Styling */
section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.section-header h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.underline {
    height: 4px;
    width: 70px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
#about {
    background-color: var(--light-gray);
}

.about-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.about-text {
    flex: 2;
}

.about-text h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.about-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--light-color);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.detail-item i {
    color: var(--primary-color);
    font-size: var(--text-xl);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.skill-category {
    background-color: var(--light-color);
    border-radius: 8px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-icon {
    font-size: var(--text-3xl);
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.skill-category h3 {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: var(--spacing-sm);
}

.skill-category ul {
    list-style-type: none;
    padding: 0;
}

.skill-category li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-color);
}

.skill-category li:last-child {
    border-bottom: none;
}

/* Projects Section */
#projects {
    background-color: var(--light-color);
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-sm);
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background-color: transparent;
    color: var(--text-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.project-card {
    background-color: var(--light-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.project-links {
    display: flex;
    gap: var(--spacing-md);
}

.project-links a {
    background-color: var(--light-color);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.project-links a:hover {
    background-color: var(--primary-color);
    color: white;
}

.project-info {
    padding: var(--spacing-lg);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.tag {
    font-size: var(--text-xs);
    background-color: var(--light-gray);
    color: var(--text-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
}

.project-info h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.project-info p {
    color: var(--text-gray);
    font-size: var(--text-sm);
}

/* Project Details Modal */
.project-details {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    overflow-y: auto;
    padding: 50px 20px;
    max-width: 100%;
}

.project-details-content {
    background-color: var(--light-color);
    max-width: 900px;
    margin: 0 auto;
    border-radius: 8px;
    padding: var(--spacing-xl);
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.close-details {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    font-size: var(--text-2xl);
    color: var(--text-dark);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close-details:hover {
    color: var(--primary-color);
}

.details-gallery {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
}

.details-gallery img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.details-section {
    margin-bottom: var(--spacing-lg);
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.details-section h4 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.details-section h5 {
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.implementation-subsection, .challenge-item {
    margin-bottom: var(--spacing-md);
}

.project-links-bottom {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* Container for images to prevent horizontal scrolling */
.image-container {
    max-width: 100%;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.image-container img {
    max-width: 100%;
    display: block;
    height: auto;
}

/* Subsection divider - subtle half line */
.subsection-divider {
    height: 1px;
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) 30%, transparent 100%);
    width: 100%;
    margin: var(--spacing-xl) 0 var(--spacing-md) 0;
    opacity: 0.7;
}

/* App screenshot with text layout */
.app-showcase {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    gap: 2rem;
}

.app-description {
    flex: 3;
}

.app-image {
    flex: 2;
    display: flex;
    justify-content: center;
}

.app-screenshot {
    max-width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.bom-table-container {
    margin: 1.5rem 0;
    font-family: 'Poppins', sans-serif;
}

.bom-table-wrapper {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.bom-table th {
    background-color: #f0f4f8;
    color: #333;
    font-weight: 600;
    text-align: left;
    padding: 8px 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bom-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #eaedf0;
}

.bom-table tr:last-child {
    font-weight: 600;
}

.bom-table tr:last-child td {
    background-color: #f0f4f8;
    border-top: 2px solid #ddd;
}

.bom-table tr:hover:not(:last-child) {
    background-color: #f8fafc;
}

.text-right {
    text-align: right;
}

.price-cell {
    position: relative;
}

.usd {
    color: #666;
    font-size: 0.8em;
    display: inline-block;
    margin-left: 4px;
}

.bom-legend {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.bom-description {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

/* Dark Mode Styles */
.dark-theme .bom-table-wrapper {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dark-theme .bom-table th {
    background-color: #2d3748;
    color: #e2e8f0;
    border-bottom: none;
}

.dark-theme .bom-table td {
    border-bottom: 1px solid #2d3748;
}

.dark-theme .bom-table tr:nth-child(even) {
    background-color: #1a202c;
}

.dark-theme .bom-table tr:nth-child(odd) {
    background-color: #2d3748;
}

.dark-theme .bom-table tr:last-child td {
    background-color: #2d3748;
    border-top: 2px solid #4a5568;
}

.dark-theme .bom-table tr:hover:not(:last-child) {
    background-color: #4a5568;
}

.dark-theme .usd {
    color: #cbd5e0;
}

.dark-theme .bom-legend {
    color: #a0aec0;
}

.dark-theme .bom-description {
    color: #e2e8f0;
}

/* Zoomable image */
.zoomable-image {
    cursor: pointer;
    transition: opacity var(--transition-fast);
    max-width: 100%;
    height: auto;
}

.zoomable-image:hover {
    opacity: 0.9;
}

/* GitHub Tag Styling */
.github-tag {
    position: absolute;
    top: 20px;
    right: -10px;
    z-index: 10;
    transition: all 0.3s ease;
}

.github-tag a {
    background-color: #333;
    color: white;
    width: 40px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px 0 0 3px;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.github-tag a:before {
    content: '';
    position: absolute;
    top: -5px;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 5px 0;
    border-color: transparent #222 transparent transparent;
    transition: all 0.3s ease;
}

/* Corrected - pull-out animation for GitHub tag */
.github-tag a:hover {
    background-color: var(--primary-color);
    transform: translateX(-5px); /* FIXED: Negative value to pull out from the card */
    box-shadow: -4px 3px 7px rgba(0, 0, 0, 0.3);
}

/* Update the hover state border color for consistency */
.github-tag a:hover:before {
    border-color: transparent var(--secondary-color) transparent transparent;
}

/* Dark theme support */
.dark-theme .github-tag a {
    background-color: #444;
}

.dark-theme .github-tag a:before {
    border-color: transparent #333 transparent transparent;
}

/* Specific styling for timing diagram carousel only */
.timing-diagram-carousel {
    height: 500px !important;
}

.timing-diagram-carousel .carousel-slide img {
    max-width: 98% !important;
    max-height: 98% !important;
}

.timing-diagram-carousel .carousel-slide img[src="Asset/sleep_wearable_data_flow.png"] {
    width: 1200px !important;
    max-width: none !important;
}


/* Image Carousel Styles */
.image-carousel {
    position: relative;
    margin-bottom: var(--spacing-md);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.custom-carousel {
    height: 400px;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
}

.carousel-slides {
    display: flex;
    transition: transform 0.4s ease;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.carousel-slide figure {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.carousel-slide img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    flex: 1;
}

.carousel-slide figcaption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    margin: 0;
    border-radius: 0;
    padding: var(--spacing-sm);
    font-size: var(--text-sm);
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition-normal);
    font-style: italic;
}

.carousel-slide:hover figcaption {
    opacity: 1;
}

/* Dark theme carousel captions */
.dark-theme .carousel-slide figcaption {
    background-color: rgba(0, 0, 0, 0.9);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 3;
    backdrop-filter: blur(2px);
}

.carousel-arrow:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.carousel-arrow.next {
    right: 10px;
}

.carousel-arrow.prev {
    left: 10px;
}

.carousel-arrow-icon {
    font-size: 18px;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 3;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.carousel-indicator.active {
    background-color: white;
}

.image-container:hover::after {
    opacity: 1;
}

/* Video Container Styles */
.video-container {
    margin: 2rem auto;
    max-width: 800px;
    cursor: pointer;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.video-thumbnail {
    position: relative;
    width: 100%;
}

.video-thumbnail img {
    width: 100%;
    display: block;
    height: auto;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-normal);
}

.play-button i {
    color: white;
    font-size: 30px;
    margin-left: 5px; /* Small offset to center the play icon visually */
}

.video-container:hover .play-button {
    background-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1003;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.video-modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1000px;
}

.video-modal-content video {
    width: 100%;
    display: block;
    border-radius: 4px;
}

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

.close-video:hover {
    color: var(--primary-color);
}

/* Animation for the modal */
@keyframes videoZoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

.video-modal-content {
    animation-name: videoZoom;
    animation-duration: 0.6s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
    }
    
    .play-button i {
        font-size: 24px;
    }
}

/* Horizontally scrollable container for sequence diagram */
.diagram-container {
    overflow-x: auto;
    max-width: 100%;
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #f8f9fa;
    padding: var(--spacing-sm);
    position: relative;
}

.project-header::before {
  content: "cd3f0c33-d76b-4843-94a1-4aedf077ae78";    /* ID */
  display: none;        /* completely invisible */
  font-size: 0;         /* just in case */
}

.sequence-diagram {
    display: block;
    max-width: none;
    width: auto;
    height: auto;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.sequence-diagram:hover {
    opacity: 0.9;
}

/* Click instructions overlay */
.diagram-container::after {
    content: 'Click to enlarge';
    position: absolute;
    bottom: 5px;
    right: 250px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.diagram-container:hover::after {
    opacity: 1;
}

/* Modal styles for enlarged diagram */
.diagram-modal {
    display: none;
    position: fixed;
    z-index: 1002;
    padding-top: 30px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.diagram-modal-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 90vh;
}

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

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

/* Make the modal content scale with animation */
@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

.diagram-modal-content {
    animation-name: zoom;
    animation-duration: 0.6s;
}

/* Experience Section */
#experience {
    background-color: var(--light-gray);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left:20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left:0;
    top:0;
    bottom:0;
    width:2px;
    background-color: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-xl);
}

.timeline-dot {
    position: absolute;
    left: -25px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--light-color);
}

.timeline-date {
    position: absolute;
    left: -150px;
    top: 0;
    width: 120px;
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
}

.timeline-content {
    background-color: var(--light-color);
    border-radius: 8px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.timeline-content h4 {
    font-size: var(--text-base);
    color: var(--text-gray);
    margin-bottom: var(--spacing-md);
}

/* Testimonials Section */
#testimonials {
    background-color: var(--primary-color);
    color: white;
    padding: var(--spacing-md) 0;
}

#testimonials .section-header h2 {
    color: white;
}

#testimonials .underline {
    background-color: white;
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    height: 250px;
}

.testimonial-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.testimonial-item.active {
    opacity: 1;
    z-index: 1;
}

.testimonial-content {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.testimonial-content p {
    font-style: italic;
    position: relative;
    padding: 0 var(--spacing-lg);
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: var(--text-3xl);
    position: absolute;
    color: rgba(255, 255, 255, 0.5);
}

.testimonial-content p::before {
    left: 0;
    top: -10px;
}

.testimonial-content p::after {
    right: 0;
    bottom: -10px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

.author-info h4 {
    margin-bottom: 0;
    color: white;
}

.author-info p {
    margin-bottom: 0;
    opacity: 0.8;
    font-size: var(--text-sm);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-lg);
}

.carousel-controls button {
    background: none;
    border: none;
    color: white;
    font-size: var(--text-xl);
    cursor: pointer;
    padding: var(--spacing-sm);
    transition: opacity var(--transition-fast);
}

.carousel-controls button:hover {
    opacity: 0.8;
}

.carousel-dots {
    display: flex;
    gap: var(--spacing-sm);
    margin: 0 var(--spacing-md);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.dot.active {
    background-color: white;
}

/* Contact Section */
#contact {
    background-color: var(--light-color);
}

.contact-content {
    display: flex;
    gap: var(--spacing-xl);
}

.contact-info, .contact-form {
    flex: 1;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.contact-details {
    margin: var(--spacing-lg) 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.contact-item i {
    font-size: var(--text-xl);
    color: var(--primary-color);
    width: 24px;
    text-align: center;
    margin-top: 3px;
}

.contact-text h4 {
    margin-bottom: var(--spacing-xs);
}

.contact-text p {
    margin-bottom: 0;
    color: var(--text-gray);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    color: var(--primary-color);
    font-size: var(--text-lg);
    transition: all var(--transition-fast);
}

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

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--light-color);
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    transition: border-color var(--transition-fast);
}

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

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo a {
    color: white;
    font-size: var(--text-xl);
    font-weight: 700;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav a {
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: var(--spacing-sm);
}

.footer-social a {
    color: white;
    font-size: var(--text-lg);
    transition: color var(--transition-fast);
}

.footer-social a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: var(--text-sm);
    opacity: 0.8;
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--text-xl);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        text-align: center;
        margin-bottom: var(--spacing-lg);
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline {
        padding-left: 70px;
    }
    
    .timeline-dot {
        left: 14px;
    }
    
    .timeline-date {
        position: relative;
        left: 0;
        top: 0;
        text-align: left;
        margin-bottom: var(--spacing-xs);
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }
    
    /* 1. Improve Mobile Navigation */
    nav ul {
        top: 80px; /* Change from 70px to account for header height */
        padding: var(--spacing-xl) 0; /* Increase padding */
        border-radius: 0 0 8px 8px; /* Add rounded bottom corners */
        position: fixed;
        left: 0;
        right: 0;
        background-color: var(--light-color);
        flex-direction: column;
        align-items: center;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        z-index: 999;
    }
    
    nav ul.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav ul li {
        margin: var(--spacing-sm) 0;
    }
    
    nav ul li a {
        padding: 0.75rem 0; /* Increase touch target */
        font-size: var(--text-lg); /* Larger text for easier reading */
        color: var(--text-dark);
        text-decoration: none;
        font-weight: 500;
        position: relative;
        transition: color var(--transition-fast);
    }

    .menu-toggle {
        display: flex;
        width: 35px; /* Slightly larger for easier tapping */
        height: 25px; /* Adjusted height */
    }
    
    .hero-content h1 {
        font-size: var(--text-4xl);
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-nav ul {
        justify-content: center;
    }

    /* 2. Fix Project Details Modal for Mobile */
    .project-details {
        padding: 20px 10px; /* Reduce padding */
    }
    
    .project-details-content {
        padding: var(--spacing-lg) var(--spacing-md); /* Reduce content padding */
        margin: 0; /* Remove margin for full width */
        border-radius: 8px 8px 0 0; /* Only round top corners */
        max-height: 90vh; /* Limit height */
        overflow-y: auto; /* Enable scrolling */
    }
    
    .close-details {
        right: var(--spacing-sm); /* Move closer to edge */
        top: var(--spacing-sm);
        z-index: 10; /* Ensure it's above content */
        background: rgba(0,0,0,0.5); /* Add background for visibility */
        border-radius: 50%;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: var(--text-2xl); /* Keep original font size */
        color: var(--text-light); /* Make icon visible on dark background */
    }

    /* 3. Optimize Image Carousels for Mobile */
    .custom-carousel {
        height: 250px; /* Reduce height */
    }
    
    .carousel-arrow {
        width: 35px; /* Larger touch targets */
        height: 35px;
        background-color: rgba(0, 0, 0, 0.7); /* More visible */
    }
    
    .carousel-arrow.next {
        right: 5px; /* Move closer to edge */
    }
    
    .carousel-arrow.prev {
        left: 5px;
    }
    
    .carousel-indicators {
        bottom: 5px;
    }
    
    .carousel-indicator {
        width: 10px; /* Larger indicators */
        height: 10px;
    }

    /* 4. Fix BOM Table Overflow */
    .bom-table-container {
        margin: 1rem -var(--spacing-md); /* Extend to container edges */
    }
    
    .bom-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    .bom-table {
        min-width: 500px; /* Ensure minimum width */
        font-size: 0.8rem; /* Smaller text */
    }
    
    .bom-table th,
    .bom-table td {
        padding: 4px 6px; /* Reduce padding */
        white-space: nowrap; /* Prevent text wrapping */
    }

    /* 5. Improve App Showcase Layout */
    .app-showcase {
        flex-direction: column; /* Stack vertically */
        gap: 1rem;
    }
    
    .app-image {
        order: -1; /* Put image first */
    }
    
    .app-screenshot {
        max-width: 280px; /* Limit width on mobile */
    }

    /* 7. Fix Contact Form Layout */
    .contact-content {
        gap: var(--spacing-lg); /* Reduce gap */
    }
    
    .form-group input,
    .form-group textarea {
        padding: 1rem; /* Larger touch targets */
        font-size: var(--text-base); /* Prevent zoom on iOS */
    }
    
    .social-links {
        justify-content: center; /* Center social icons */
        margin-top: var(--spacing-lg);
    }
    
    .social-icon {
        width: 45px; /* Larger touch targets */
        height: 45px;
    }

    /* 12. Improve Touch Targets */
    .btn {
        padding: 1rem 1.5rem; /* Larger touch targets */
        font-size: var(--text-base);
    }
    
    .filter-btn {
        padding: 0.75rem 1.25rem; /* Larger filter buttons */
        margin: 0.25rem; /* Add margin for easier tapping */
    }
    
    .project-links a {
        padding: 0.75rem 1.25rem; /* Larger project links */
    }

    /* Audio player responsive */
    .audio-listen-btn {
        top: 70px;
        left: 10px;
        width: 48px;
        height: 48px;
    }
    
    .audio-listen-btn::after {
        display: none; /* Hide tooltip on mobile */
    }
    
    .floating-audio-player {
        right: 10px;
        bottom: 10px;
        min-width: 320px;
        padding: 8px 15px;
    }
    /* Responsive for label */
    .audio-bubble-label {
        display: none; /* Hide label on smaller screens to save space */
    }
}

@media (max-width: 480px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
        --text-2xl: 1.5rem;
    }
    
    .container {
        width: 95%;
        padding: 0 var(--spacing-sm);
    }
    
    #hero {
        padding: 120px 0 60px;
    }
    
    .theme-switch-wrapper {
        top: auto;
        bottom: 100px;
    }
    
    .project-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .details-gallery {
        flex-direction: column;
    }
    
    .details-gallery img {
        width: 100%;
        height: auto;
    }
    
    .project-links-bottom {
        flex-direction: column;
    }

    /* 6. Better Typography and Spacing */
    .details-section h4 {
        font-size: var(--text-lg); /* Reduce heading size */
        line-height: 1.4;
    }
    
    .details-section h5 {
        font-size: var(--text-base);
        margin-bottom: var(--spacing-sm);
    }
    
    .details-section p {
        font-size: var(--text-sm); /* Slightly smaller body text */
        line-height: 1.6;
        margin-bottom: var(--spacing-sm);
    }
    
    .implementation-subsection {
        margin-bottom: var(--spacing-md); /* Reduce spacing */
    }

    /* 8. Improve Audio Player Mobile Layout */
    .floating-audio-player {
        min-width: calc(100vw - 20px); /* Almost full width */
        bottom: 5px;
        right: 10px;
        left: 10px; /* Full width approach */
        padding: 8px 12px;
    }
    
    .time-display {
        font-size: 0.7rem; /* Smaller text */
    }
    
    .audio-control-btn {
        width: 35px; /* Slightly smaller */
        height: 35px;
    }

    /* 9. Fix Skills Grid on Small Screens */
    .skills-container {
        grid-template-columns: 1fr; /* Single column */
        gap: var(--spacing-md);
    }
    
    .skill-category {
        padding: var(--spacing-md); /* Reduce padding */
    }
    
    .skill-category ul {
        padding-left: var(--spacing-md); /* Reduce indentation */
    }

    /* 13. Fix Timeline for Mobile */
    .timeline {
        padding-left: 40px; /* Reduce left padding */
    }
    
    .timeline::before {
        left: 15px; /* Move line closer */
    }
    
    .timeline-dot {
        left: 9px; /* Adjust dot position */
    }
    
    .timeline-content {
        padding: var(--spacing-md); /* Reduce padding */
    }

    /* Audio player responsive */
    .audio-listen-btn {
        width: 44px;
        height: 44px;
    }
}

/* Figure and Figcaption Styling */
figure {
    margin: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

figcaption {
    font-size: var(--text-sm);
    color: var(--text-gray);
    text-align: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: rgba(248, 250, 252, 0.9);
    border-radius: 0 0 4px 4px;
    font-style: italic;
    line-height: 1.4;
    margin-top: var(--spacing-xs);
}

/* Dark theme figcaption */
.dark-theme figcaption {
    background-color: rgba(30, 41, 59, 0.9);
    color: var(--text-gray);
}

/* Dark theme carousel captions */
.dark-theme .carousel-slide figcaption {
    background-color: rgba(0, 0, 0, 0.9);
}

.carousel-slide figure {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
}


.carousel-slide figcaption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    margin: 0;
    border-radius: 0;
    padding: var(--spacing-sm);
    font-size: var(--text-sm);
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition-normal);
    font-style: italic;
}

.carousel-slide:hover figcaption {
    opacity: 1;
}

/* Project card figcaptions */
.project-card figure figcaption {
    background-color: var(--light-color);
    color: var(--text-dark);
    padding: var(--spacing-sm);
    font-size: var(--text-xs);
}

/* About section figure */
.about-image figure {
    text-align: center;
}

.about-image figcaption {
    background-color: transparent;
    padding: var(--spacing-sm) 0;
    font-size: var(--text-base);
    margin-top: var(--spacing-sm);
}

/* App showcase figure */
.app-image figure {
    text-align: center;
}

/* Testimonial figure - compact styling */
.testimonial-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: var(--spacing-md);
}

.testimonial-figure img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    margin-bottom: var(--spacing-xs);
}

.testimonial-figure figcaption {
    font-size: var(--text-xs);
    padding: 0;
    background: none;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-align: center;
    width: 80px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    figcaption {
        font-size: var(--text-xs);
        padding: var(--spacing-xs);
    }
    
    .carousel-slide figcaption {
        font-size: var(--text-xs);
        padding: var(--spacing-xs);
    }
}

/* Audio Player Styles */

/* Floating Audio Bubble Button (original, not used for the main bubble now) */
.audio-listen-btn {
    position: fixed;
    top: 80px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1003;
}

.audio-listen-btn.show {
    display: flex;
}

.audio-listen-btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.audio-listen-btn i {
    font-size: 1.3rem;
}

/* Tooltip for audio button (original, not used for the main bubble now) */
.audio-listen-btn::after {
    content: 'Listen to article';
    position: absolute;
    left: 100%;
    margin-left: 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.audio-listen-btn:hover::after {
    opacity: 1;
}

/* Floating Audio Player */
.floating-audio-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--light-color);
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    gap: 15px;
    min-width: 350px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    z-index: 1004;
}

.floating-audio-player.active {
    display: flex;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.audio-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.audio-control-btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

.audio-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--light-gray);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    font-size: 0.75rem;
    color: var(--text-gray);
    display: flex;
    justify-content: space-between;
}

#close-player {
    background-color: var(--gray-color);
    width: 32px;
    height: 32px;
}

#close-player:hover {
    background-color: var(--dark-color);
}

/* Dark Theme Support */
.dark-theme .floating-audio-player {
    background: rgba(30, 41, 59, 0.95);
}

.dark-theme .progress-bar {
    background-color: var(--light-gray);
}

/* Alternative button style for inside project details (kept for reference, but removed from HTML) */
.project-audio-btn {
    background: var(--light-gray);
    color: var(--text-dark);
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.project-audio-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Pulse animation for the listen button (original, not used for the main bubble now) */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.audio-listen-btn {
    animation: pulse 2s infinite;
}

.audio-listen-btn:hover {
    animation: none;
}

/* Floating Audio Bubble - Minimal CSS (This is the one being used) */
.audio-bubble {
    position: fixed !important;
    top: 80px !important;
    left: 20px !important;
    background: #2563eb !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 56px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    z-index: 1003 !important;
    transition: all 0.3s ease !important;
    animation: subtle-pulse 2s infinite !important;
    overflow: visible !important; /* Crucial for the label to be visible outside the circle */
}

.audio-bubble:hover {
    transform: scale(1.1) !important;
    background: #3b82f6 !important;
    animation: none !important;
}

/* Subtle pulse animation */
@keyframes subtle-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* NEW: Styles for the "Listen to article" label */
.audio-bubble-label {
    position: absolute;
    top: 50%;
    left: 100%; /* Position to the right of the bubble */
    transform: translateY(-50%) translateX(-10px); /* Vertically center and start slightly left for slide-in */
    margin-left: 15px; /* Space between bubble and label */
    
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 25px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap; /* Keep text on one line */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    
    display: flex; /* For text and arrow alignment */
    align-items: center;
    
    opacity: 0; /* Start hidden */
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

/* Arrow using pseudo-element */
.audio-bubble-label::before {
    content: '';
    position: absolute;
    left: -8px; /* Position to overlap with the label */
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--primary-color); /* Color of the label background */
}

/* Show label when the parent bubble has the 'show-label' class */
.audio-bubble.show-label .audio-bubble-label {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0); /* Slide to final position */
}

/* Dark theme support for label */
.dark-theme .audio-bubble-label {
    background: var(--secondary-color); /* Use secondary for dark theme */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-theme .audio-bubble-label::before {
    border-right-color: var(--secondary-color);
}

/* Hover effect for the bubble, affecting the label */
.audio-bubble:hover .audio-bubble-label {
    background-color: var(--secondary-color); /* Match bubble hover */
}
.audio-bubble:hover .audio-bubble-label::before {
    border-right-color: var(--secondary-color);
}

/* 10. Add Specific Mobile Utilities */
/* Add these new utility classes */
@media (max-width: 768px) {
    .mobile-scroll-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -var(--spacing-md);
        padding: 0 var(--spacing-md);
    }
    
    .mobile-full-width {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
    
    .mobile-text-center {
        text-align: center;
    }
    
    .mobile-hide {
        display: none !important;
    }
}

/* 11. CSS Addition for Text Justification */
@media (max-width: 768px) {
    .mobile-text-justify {
        text-align: left; /* Better than justify on mobile */
        hyphens: auto; /* Enable hyphenation */
        word-wrap: break-word;
    }
}
/* Enhanced Testimonials Section */
#testimonials {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

#testimonials::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.testimonials-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    height: 280px;
    overflow: hidden;
}

.testimonial-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-slow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-item.active {
    opacity: 1;
    z-index: 1;
}

.testimonial-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.testimonial-content p {
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    padding: 0 var(--spacing-lg);
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: var(--text-3xl);
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    font-family: Georgia, serif;
}

.testimonial-content p::before {
    left: -5px;
    top: -10px;
}

.testimonial-content p::after {
    right: 0;
    bottom: -20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: auto;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.author-info h4 {
    margin-bottom: 2px;
    color: white;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* LinkedIn Icon in Testimonials */
.linkedin-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.linkedin-icon-link:hover {
    color: white;
    transform: scale(1.1);
}

.author-info p {
    margin-bottom: 0;
    opacity: 0.85;
    font-size: var(--text-sm);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-lg);
}

.carousel-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: var(--text-lg);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.carousel-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: var(--spacing-sm);
    margin: 0 var(--spacing-lg);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active {
    background-color: white;
    transform: scale(1.3);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Enhanced GitHub tag hover animation */
.github-tag a:hover {
    background-color: var(--primary-color);
    transform: translateX(10px); /* Positive value to slide out to the right */
    box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.3);
}

/* Fix for project card hover on mobile */
@media (hover: hover) {
    .project-card:hover .project-overlay {
        opacity: 1;
    }
}

@media (hover: none) {
    .project-overlay {
        opacity: 1; /* Always visible on touch devices */
        background-color: rgba(0, 0, 0, 0.4); /* Lighter overlay on mobile */
    }
}

/* Better mobile menu animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Improved project details modal header */
.project-details-content > h3 {
    padding-right: 40px; /* Ensure title doesn't overlap with close button */
    line-height: 1.3;
}

/* Enhanced scroll to top button */
#scroll-to-top {
    backdrop-filter: blur(10px);
    background-color: rgba(37, 99, 235, 0.9);
}

/* Fix for BOM table on mobile */
@media (max-width: 768px) {
    .bom-table-container {
        margin: 1rem 0;
    }
    
    .mobile-scroll-indicator {
        text-align: center;
        font-size: var(--text-xs);
        color: var(--text-gray);
        margin-bottom: var(--spacing-xs);
        font-style: italic;
    }
}

/* Smooth loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-category {
    opacity: 0;
    transform: translateY(30px);
}

.project-card {
    opacity: 0;
    transform: translateY(30px);
}

.timeline-item {
    opacity: 0;
    transform: translateY(30px);
}

.skill-category.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.project-card.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item.animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* Better focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
.filter-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Enhanced dark theme transitions */
body, header, .project-card, .skill-category, .timeline-content {
    transition: background-color var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
}

/* Responsive testimonials for mobile */
@media (max-width: 768px) {
    .testimonials-carousel {
        height: 320px;
        max-width: 95%;
    }
    
    .testimonial-content {
        padding: var(--spacing-md);
    }
    
    .testimonial-content p {
        font-size: 0.85rem;
        padding: 0 var(--spacing-sm);
    }
    
    .testimonial-author {
        flex-direction: row;
        align-items: center;
    }
    
    .testimonial-author img {
        width: 50px;
        height: 50px;
    }
    
    .author-info h4 {
        font-size: var(--text-base);
    }
    
    .author-info p {
        font-size: var(--text-xs);
    }
    
    .carousel-controls button {
        width: 35px;
        height: 35px;
    }
    
    /* LinkedIn icon on mobile */
    .linkedin-icon-link {
        font-size: 0.8rem;
    }
}

/* LinkedIn URL fix for contact section */
.contact-item a[href*="linkedin"] {
    word-break: break-all;
}

/* Add these styles to your style.css file */

/* Enhanced Testimonials Section */
#testimonials {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

#testimonials::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.testimonials-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    height: 280px;
    overflow: hidden;
}

.testimonial-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-slow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-item.active {
    opacity: 1;
    z-index: 1;
}

.testimonial-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.testimonial-content p {
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    padding: 0 var(--spacing-lg);
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: var(--text-3xl);
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    font-family: Georgia, serif;
}

.testimonial-content p::before {
    left: -5px;
    top: -10px;
}

.testimonial-content p::after {
    right: 0;
    bottom: -20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: auto;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.author-info h4 {
    margin-bottom: 2px;
    color: white;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* LinkedIn Icon in Testimonials */
.linkedin-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.linkedin-icon-link:hover {
    color: white;
    transform: scale(1.1);
}

.author-info p {
    margin-bottom: 0;
    opacity: 0.85;
    font-size: var(--text-sm);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-lg);
}

.carousel-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: var(--text-lg);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.carousel-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: var(--spacing-sm);
    margin: 0 var(--spacing-lg);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active {
    background-color: white;
    transform: scale(1.3);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Enhanced GitHub tag hover animation */
.github-tag a:hover {
    background-color: var(--primary-color);
    transform: translateX(10px); /* Positive value to slide out to the right */
    box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.3);
}

/* Fix for project card hover on mobile */
@media (hover: hover) {
    .project-card:hover .project-overlay {
        opacity: 1;
    }
}

@media (hover: none) {
    .project-overlay {
        opacity: 1; /* Always visible on touch devices */
        background-color: rgba(0, 0, 0, 0.4); /* Lighter overlay on mobile */
    }
}

/* Better mobile menu animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Improved project details modal header */
.project-details-content > h3 {
    padding-right: 40px; /* Ensure title doesn't overlap with close button */
    line-height: 1.3;
}

/* Enhanced scroll to top button */
#scroll-to-top {
    backdrop-filter: blur(10px);
    background-color: rgba(37, 99, 235, 0.9);
}

/* Fix for BOM table on mobile */
@media (max-width: 768px) {
    .bom-table-container {
        margin: 1rem 0;
    }
    
    .mobile-scroll-indicator {
        text-align: center;
        font-size: var(--text-xs);
        color: var(--text-gray);
        margin-bottom: var(--spacing-xs);
        font-style: italic;
    }
}

/* Smooth loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skill category animations and hover effects */
.skill-category {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-normal);
    cursor: pointer;
}

/* Override the existing hover effect with a more subtle one */
.skill-category:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Add a subtle color change to the icon on hover */
.skill-category:hover .skill-icon {
    color: var(--accent-color);
    transform: scale(1.1) rotate(5deg);
    transition: all var(--transition-normal);
}

/* Enhance the h3 title on hover */
.skill-category:hover h3 {
    color: var(--primary-color);
    transition: color var(--transition-normal);
}

/* Dark theme support for skill card hover */
.dark-theme .skill-category:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
    background-color: var(--light-gray);
}

.dark-theme .skill-category:hover h3 {
    color: var(--accent-color);
}

.project-card {
    opacity: 0;
    transform: translateY(30px);
}

.timeline-item {
    opacity: 0;
    transform: translateY(30px);
}

.skill-category.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.project-card.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item.animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* Better focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
.filter-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Enhanced dark theme transitions */
body, header, .project-card, .skill-category, .timeline-content {
    transition: background-color var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
}

/* Responsive testimonials for mobile */
@media (max-width: 768px) {
    .testimonials-carousel {
        height: 320px;
        max-width: 95%;
    }
    
    .testimonial-content {
        padding: var(--spacing-md);
    }
    
    .testimonial-content p {
        font-size: 0.85rem;
        padding: 0 var(--spacing-sm);
    }
    
    .testimonial-author {
        flex-direction: row;
        align-items: center;
    }
    
    .testimonial-author img {
        width: 50px;
        height: 50px;
    }
    
    .author-info h4 {
        font-size: var(--text-base);
    }
    
    .author-info p {
        font-size: var(--text-xs);
    }
    
    .carousel-controls button {
        width: 35px;
        height: 35px;
    }
    
    /* LinkedIn icon on mobile */
    .linkedin-icon-link {
        font-size: 0.8rem;
    }
}

/* LinkedIn URL fix for contact section */
.contact-item a[href*="linkedin"] {
    word-break: break-all;
}

/* Add these styles to your style.css file */

/* Enhanced Testimonials Section - Fixed Image Cut-off */
#testimonials {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

#testimonials::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.testimonials-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    height: 320px; /* Increased height to prevent cut-off */
    overflow: visible; /* Changed from hidden to prevent image cut-off */
    padding-bottom: 20px; /* Add padding for image overflow */
}

.testimonial-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-slow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-item.active {
    opacity: 1;
    z-index: 1;
}

.testimonial-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.testimonial-content p {
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    padding: 0 var(--spacing-lg);
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: var(--text-3xl);
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    font-family: Georgia, serif;
}

.testimonial-content p::before {
    left: -5px;
    top: -10px;
}

.testimonial-content p::after {
    right: 0;
    bottom: -20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: auto;
    padding: 0 var(--spacing-sm); /* Add padding to prevent cut-off */
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center; /* Ensure image is centered */
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0; /* Prevent image from shrinking */
}

.author-info h4 {
    margin-bottom: 2px;
    color: white;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* LinkedIn Icon in Testimonials */
.linkedin-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.linkedin-icon-link:hover {
    color: white;
    transform: scale(1.1);
}

.author-info p {
    margin-bottom: 0;
    opacity: 0.85;
    font-size: var(--text-sm);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-xl); /* Increased margin */
}

.carousel-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: var(--text-lg);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.carousel-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: var(--spacing-sm);
    margin: 0 var(--spacing-lg);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active {
    background-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Enhanced GitHub tag hover animation */
.github-tag a:hover {
    background-color: var(--primary-color);
    transform: translateX(10px); /* Positive value to slide out to the right */
    box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.3);
}

/* Fix for project card hover on mobile */
@media (hover: hover) {
    .project-card:hover .project-overlay {
        opacity: 1;
    }
}

@media (hover: none) {
    .project-overlay {
        opacity: 1; /* Always visible on touch devices */
        background-color: rgba(0, 0, 0, 0.4); /* Lighter overlay on mobile */
    }
}

/* Better mobile menu animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Improved project details modal header */
.project-details-content > h3 {
    padding-right: 40px; /* Ensure title doesn't overlap with close button */
    line-height: 1.3;
}

/* Enhanced scroll to top button */
#scroll-to-top {
    backdrop-filter: blur(10px);
    background-color: rgba(37, 99, 235, 0.9);
}

/* Fix for BOM table on mobile */
@media (max-width: 768px) {
    .bom-table-container {
        margin: 1rem 0;
    }
    
    .mobile-scroll-indicator {
        text-align: center;
        font-size: var(--text-xs);
        color: var(--text-gray);
        margin-bottom: var(--spacing-xs);
        font-style: italic;
    }
}

/* Smooth loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skill category animations and hover effects */
.skill-category {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-normal);
    cursor: pointer;
}

/* Override the existing hover effect with a more subtle one */
.skill-category:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Add a subtle color change to the icon on hover */
.skill-category:hover .skill-icon {
    color: var(--accent-color);
    transform: scale(1.1) rotate(5deg);
    transition: all var(--transition-normal);
}

/* Enhance the h3 title on hover */
.skill-category:hover h3 {
    color: var(--primary-color);
    transition: color var(--transition-normal);
}

/* Dark theme support for skill card hover */
.dark-theme .skill-category:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
    background-color: var(--light-gray);
}

.dark-theme .skill-category:hover h3 {
    color: var(--accent-color);
}

.project-card {
    opacity: 0;
    transform: translateY(30px);
}

.timeline-item {
    opacity: 0;
    transform: translateY(30px);
}

.skill-category.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.project-card.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item.animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* Better focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
.filter-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Enhanced dark theme transitions */
body, header, .project-card, .skill-category, .timeline-content {
    transition: background-color var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
}

/* Responsive testimonials for mobile */
@media (max-width: 768px) {
    .testimonials-carousel {
        height: auto;
        min-height: 350px; /* Increased min-height for mobile */
        max-width: 95%;
        padding-bottom: 30px;
    }
    
    .testimonial-content {
        padding: var(--spacing-md);
    }
    
    .testimonial-content p {
        font-size: 0.85rem;
        padding: 0 var(--spacing-sm);
    }
    
    .testimonial-author {
        flex-direction: row;
        align-items: center;
        padding: 0 var(--spacing-xs);
    }
    
    .testimonial-author img {
        width: 50px;
        height: 50px;
    }
    
    .author-info h4 {
        font-size: var(--text-base);
    }
    
    .author-info p {
        font-size: var(--text-xs);
    }
    
    .carousel-controls {
        margin-top: var(--spacing-lg);
    }
    
    .carousel-controls button {
        width: 35px;
        height: 35px;
    }
    
    /* LinkedIn icon on mobile */
    .linkedin-icon-link {
        font-size: 0.8rem;
    }
}

/* LinkedIn URL fix for contact section */
.contact-item a[href*="linkedin"] {
    word-break: break-all;
}

/* Add these styles to your style.css file */

/* Enhanced Testimonials Section - Fixed Image Cut-off */
#testimonials {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

#testimonials::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.testimonials-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    height: 320px; /* Increased height to prevent cut-off */
    overflow: visible; /* Changed from hidden to prevent image cut-off */
    padding-bottom: 20px; /* Add padding for image overflow */
}

.testimonial-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-slow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-item.active {
    opacity: 1;
    z-index: 1;
}

.testimonial-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.testimonial-content p {
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    padding: 0 var(--spacing-lg);
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: var(--text-3xl);
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    font-family: Georgia, serif;
}

.testimonial-content p::before {
    left: -5px;
    top: -10px;
}

.testimonial-content p::after {
    right: 0;
    bottom: -20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: auto;
    padding: 0 var(--spacing-sm); /* Add padding to prevent cut-off */
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center; /* Ensure image is centered */
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0; /* Prevent image from shrinking */
}

.author-info h4 {
    margin-bottom: 2px;
    color: white;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* LinkedIn Icon in Testimonials */
.linkedin-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.linkedin-icon-link:hover {
    color: white;
    transform: scale(1.1);
}

.author-info p {
    margin-bottom: 0;
    opacity: 0.85;
    font-size: var(--text-sm);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-xl); /* Increased margin */
}

.carousel-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: var(--text-lg);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.carousel-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: var(--spacing-sm);
    margin: 0 var(--spacing-lg);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active {
    background-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Enhanced GitHub tag hover animation */
.github-tag a:hover {
    background-color: var(--primary-color);
    transform: translateX(10px); /* Positive value to slide out to the right */
    box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.3);
}

/* Fix for project card hover on mobile */
@media (hover: hover) {
    .project-card:hover .project-overlay {
        opacity: 1;
    }
}

@media (hover: none) {
    .project-overlay {
        opacity: 1; /* Always visible on touch devices */
        background-color: rgba(0, 0, 0, 0.4); /* Lighter overlay on mobile */
    }
}

/* Better mobile menu animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Improved project details modal header */
.project-details-content > h3 {
    padding-right: 40px; /* Ensure title doesn't overlap with close button */
    line-height: 1.3;
}

/* Enhanced scroll to top button */
#scroll-to-top {
    backdrop-filter: blur(10px);
    background-color: rgba(37, 99, 235, 0.9);
}

/* Fix for BOM table on mobile */
@media (max-width: 768px) {
    .bom-table-container {
        margin: 1rem 0;
    }
    
    .mobile-scroll-indicator {
        text-align: center;
        font-size: var(--text-xs);
        color: var(--text-gray);
        margin-bottom: var(--spacing-xs);
        font-style: italic;
    }
}

/* Smooth loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skill category animations and hover effects */
.skill-category {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-normal);
    cursor: pointer;
}

/* Override the existing hover effect with a more subtle one */
.skill-category:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Add a subtle color change to the icon on hover */
.skill-category:hover .skill-icon {
    color: var(--accent-color);
    transform: scale(1.1) rotate(5deg);
    transition: all var(--transition-normal);
}

/* Enhance the h3 title on hover */
.skill-category:hover h3 {
    color: var(--primary-color);
    transition: color var(--transition-normal);
}

/* Dark theme support for skill card hover */
.dark-theme .skill-category:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
    background-color: var(--light-gray);
}

.dark-theme .skill-category:hover h3 {
    color: var(--accent-color);
}

.project-card {
    opacity: 0;
    transform: translateY(30px);
}

.timeline-item {
    opacity: 0;
    transform: translateY(30px);
}

.skill-category.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.project-card.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item.animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* Better focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
.filter-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Enhanced dark theme transitions */
body, header, .project-card, .skill-category, .timeline-content {
    transition: background-color var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
}

/* Responsive testimonials for mobile */
@media (max-width: 768px) {
    .testimonials-carousel {
        height: auto;
        min-height: 350px; /* Increased min-height for mobile */
        max-width: 95%;
        padding-bottom: 30px;
    }
    
    .testimonial-content {
        padding: var(--spacing-md);
    }
    
    .testimonial-content p {
        font-size: 0.85rem;
        padding: 0 var(--spacing-sm);
    }
    
    .testimonial-author {
        flex-direction: row;
        align-items: center;
        padding: 0 var(--spacing-xs);
    }
    
    .testimonial-author img {
        width: 50px;
        height: 50px;
    }
    
    .author-info h4 {
        font-size: var(--text-base);
    }
    
    .author-info p {
        font-size: var(--text-xs);
    }
    
    .carousel-controls {
        margin-top: var(--spacing-lg);
    }
    
    .carousel-controls button {
        width: 35px;
        height: 35px;
    }
    
    /* LinkedIn icon on mobile */
    .linkedin-icon-link {
        font-size: 0.8rem;
    }
}

/* LinkedIn URL fix for contact section */
.contact-item a[href*="linkedin"] {
    word-break: break-all;
}