/* General Styles */
body {
    font-family: sans-serif; /* Replace with a professional font later */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-image: url('background.svg'); /* Using the provided SVG as background */
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Makes background fixed while content scrolls */
    color: #333; /* Dark grey text */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: #007bff; /* Blue links - keeping text color */
}

a:hover {
    text-decoration: underline;
}

/* Header and Navigation */
header {
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
    backdrop-filter: blur(5px); /* Adds a blur effect to the background */
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s ease;
    transform: translateY(0);
}

/* Header states for scroll behavior */
header.header-hidden {
    transform: translateY(-100%);
}

header.header-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* Ensure smooth transitions work on all devices */
@media (prefers-reduced-motion: no-preference) {
    header {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    background-color 0.3s ease;
    }
}

/* Desktop and Tablet behavior (width > 768px) - Always visible */
@media (min-width: 769px) {
    header {
        position: fixed !important;
        transform: translateY(0) !important;
    }
    
    /* Ensure header never hides on desktop/tablet */
    header.header-hidden {
        transform: translateY(0) !important;
    }
}

/* Mobile behavior (width ≤ 768px) - Hide/show with 3-second delay */
@media (max-width: 768px) {
    header {
        transition: transform 0.25s ease-out, 
                    box-shadow 0.25s ease-out,
                    background-color 0.25s ease;
    }
    
    header.header-scrolled {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
    
    /* Mobile-specific hide behavior */
    header.header-hidden {
        transform: translateY(-100%);
    }
}

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

.logo {
    font-size: 1.5em;
    font-weight: bold;
}

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

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #333; /* Keeping text color */
    font-weight: bold;
}

nav ul li a.active {
    color: #007bff; /* Highlight active page in navigation */
    border-bottom: 2px solid #007bff;
    padding-bottom: 3px;
}

/* Hero Section */
.hero {
    padding-top: 100px; /* Space for fixed header */
    /* background: linear-gradient(to right, #6a11cb, #2575fc); Gradient background */
    color: #333; /* Adjust hero text color for pastel background */
    text-align: center;
    background-color: rgba(255, 242, 235, 0.7); /* Using a semi-transparent second color */
    padding-bottom: 40px;
}

/* Ensure content doesn't jump when header hides/shows */
body {
    padding-top: 0;
    transition: padding-top 0.3s ease;
}

/* Prevent layout shift during header transitions */
header + * {
    margin-top: 0;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-photo img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%; /* Circular photo */
    border: 5px solid rgb(255, 214, 186); /* Using a pastel color for border */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.bio h1 {
    margin-top: 0;
    font-size: 2.5em;
    color: #333; /* Keeping text color */
}

.bio h2 {
    margin-top: 0;
    font-size: 1.5em;
    color: #555; /* Slightly darker text for subtitle */
}

.bio p {
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 800px;
    margin: 20px auto;
     color: #333; /* Keeping text color */
}

.social-links a {
    color: #333; /* Adjust social icon color for pastel background */
    margin: 0 10px;
    font-size: 1.8em;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: rgb(255, 214, 186); /* Highlight on hover with a pastel color */
}

/* Intro Video Section */
.intro-video-section {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 242, 235, 0.8));
    backdrop-filter: blur(5px);
    border-radius: 15px;
    margin: 30px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.intro-video-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 214, 186, 0.1), transparent);
    pointer-events: none;
    animation: shimmer 3s ease-in-out infinite;
}

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

.intro-video-content h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #333;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out;
}

.intro-video-content p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.video-quote-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.video-wrapper {
    flex: 1;
    min-width: 400px;
    max-width: 600px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.animated-quote {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    text-align: left;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.quote-text {
    font-size: 2.5em;
    font-weight: 800;
    line-height: 1.2;
    color: #2563eb; /* Strong blue color that's always visible */
    margin-bottom: 20px;
    opacity: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    /* Remove gradient for now to ensure visibility */
}

.quote-word {
    display: inline-block;
    opacity: 1 !important;
    transform: translateY(0);
    animation: wordReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    margin-right: 0.3em;
    color: #2563eb;
}

.quote-emoji {
    display: inline-block;
    opacity: 1 !important;
    transform: scale(1);
    animation: emojiPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    font-size: 1.2em;
    margin-left: 0.2em;
}

.quote-underline {
    height: 4px;
    background: linear-gradient(90deg, #4a5fe7, #6b46c1, #ec4899);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    animation: underlineGrow 1.5s ease-out 2s forwards;
    box-shadow: 0 2px 8px rgba(74, 95, 231, 0.4);
    opacity: 1;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes wordReveal {
    0% {
        opacity: 1;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes emojiPop {
    0% {
        opacity: 1;
        transform: scale(0.8);
    }
    70% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes underlineGrow {
    to {
        transform: scaleX(1);
    }
}

/* Staggered animation delays for words */
.quote-word[data-delay="0"] { animation-delay: 0.5s; }
.quote-word[data-delay="1"] { animation-delay: 0.7s; }
.quote-word[data-delay="2"] { animation-delay: 0.9s; }
.quote-word[data-delay="3"] { animation-delay: 1.1s; }
.quote-word[data-delay="4"] { animation-delay: 1.3s; }
.quote-emoji[data-delay="5"] { animation-delay: 1.8s; }

/* Ensure text is always visible */
.quote-word, .quote-emoji {
    opacity: 1 !important;
    color: #2563eb !important;
}

/* Make sure the quote text container is visible */
.animated-quote {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Additional fallback for quote text */
.quote-text * {
    color: #2563eb !important;
    opacity: 1 !important;
}

/* Alternative fallback without gradient for better visibility */
@supports not (-webkit-background-clip: text) {
    .quote-text {
        background: none !important;
        color: #4a5fe7 !important;
        -webkit-text-fill-color: #4a5fe7 !important;
    }
}

/* Responsive images and videos */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Ensure video containers are responsive */
.video-container {
    width: 100%;
    max-width: 100%;
}

/* Responsive text scaling */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 320px) {
    html {
        font-size: 13px;
    }
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    a, button, input, textarea {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better navigation for mobile */
    nav ul li a {
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Fallback: Show text immediately if animations don't work */
@media (prefers-reduced-motion: reduce) {
    .quote-word, .quote-emoji {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    .quote-underline {
        transform: scaleX(1) !important;
        animation: none !important;
    }
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 214, 186, 0.6);
}

.video-container:hover::before {
    opacity: 1;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 2;
    transition: transform 0.3s ease;
}

.video-container:hover iframe {
    transform: scale(1.01);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Portfolio Sections */
.portfolio-section {
    padding: 60px 0;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.7); /* Semi-transparent white background */
    backdrop-filter: blur(3px); /* Subtle blur effect */
    border-radius: 10px; /* Rounded corners */
    margin: 20px 0; /* Add some margin between sections */
}

/* Page Section - for individual pages */
.page-section {
    padding-top: 120px; /* Extra padding to account for fixed header */
    min-height: calc(100vh - 200px); /* Ensure page fills most of the viewport */
    background-color: rgba(255, 255, 255, 0.6); /* Semi-transparent white background */
    backdrop-filter: blur(3px); /* Subtle blur effect */
    border-radius: 15px;
    margin: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(200, 200, 255, 0.3);
}

/* Loading and Error Messages */
.loading, .error-message {
    padding: 30px;
    text-align: center;
    font-style: italic;
    color: #666;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    backdrop-filter: blur(3px);
    margin: 20px auto;
    max-width: 80%;
    border: 1px solid rgba(200, 200, 255, 0.4);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.portfolio-section h2 {
    font-size: 2em;
    margin-bottom: 40px;
     color: #333; /* Keeping text color */
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 cards per row */
    gap: 30px 30px; /* row-gap column-gap */
    position: relative;
}

/* Add vertical dividers between columns */
.project-grid::before,
.project-grid::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(200, 200, 255, 0.4), transparent);
    z-index: 1;
}

.project-grid::before {
    left: calc(33.333% - 1px);
}

.project-grid::after {
    left: calc(66.666% - 1px);
}

/* Add horizontal dividers after each row - only for portfolio pages */
.page-section .project-card:nth-child(3n) {
    position: relative;
}

.page-section .project-card:nth-child(3n):after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: -50%;
    right: -50%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(200, 200, 255, 0.4), transparent);
    z-index: 1;
}

.project-card {
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: all 0.3s ease;
    border: 1px solid rgba(200, 200, 255, 0.5); /* Subtle border color to match background */
    position: relative;
    z-index: 2; /* Ensure cards appear above dividers */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(180, 180, 255, 0.8);
}

/* Featured card for home page */
.featured-card {
    text-align: center;
    padding: 40px 20px;
    background-color: rgba(255, 255, 255, 0.9); /* More opaque background for featured cards */
    border: 1px solid rgba(200, 200, 255, 0.6); /* Subtle border matching theme */
    box-shadow: 0 4px 12px rgba(100, 100, 255, 0.1); /* Subtle shadow with theme color */
    max-width: 600px;
    margin: 0 auto;
}

/* View All button */
.view-all-btn {
    display: inline-block;
    background-color: rgba(100, 100, 255, 0.8); /* Semi-transparent blue button */
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 20px;
    transition: all 0.3s;
    backdrop-filter: blur(3px); /* Subtle blur effect */
    border: 1px solid rgba(150, 150, 255, 0.5); /* Subtle border */
    font-weight: bold;
}

.view-all-btn:hover {
    background-color: rgba(80, 80, 255, 0.9); /* More opaque on hover */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 4px 8px rgba(100, 100, 255, 0.3); /* Shadow on hover */
    text-decoration: none;
}

.project-card:hover {
    transform: translateY(-10px); /* Subtle lift on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Increased shadow on hover */
}

.project-card h3 {
    margin-top: 0;
    font-size: 1.3em;
     color: #333; /* Keeping text color */
}

.project-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
     border: 1px solid rgb(255, 214, 186); /* Using a pastel color for border */
}

.project-card p {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 15px;
     color: #333; /* Keeping text color */
}

/* Scrollable descriptions for portfolio pages only */
.page-section .project-card p {
    max-height: 120px; /* Limit height for scroll */
    overflow-y: auto; /* Enable vertical scrolling */
    padding-right: 8px; /* Space for scrollbar */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(200, 200, 255, 0.6) transparent; /* Firefox */
}

/* Custom scrollbar for webkit browsers (Chrome, Safari) - portfolio pages only */
.page-section .project-card p::-webkit-scrollbar {
    width: 6px;
}

.page-section .project-card p::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.page-section .project-card p::-webkit-scrollbar-thumb {
    background: rgba(200, 200, 255, 0.6);
    border-radius: 3px;
}

.page-section .project-card p::-webkit-scrollbar-thumb:hover {
    background: rgba(180, 180, 255, 0.8);
}

.project-card a {
    display: inline-block;
    margin-top: 10px;
    color: #333; /* Adjust link color */
    font-weight: bold;
}

.project-card a:hover {
     color: rgb(255, 214, 186); /* Highlight on hover with a pastel color */
}

.project-card .upload-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: rgb(255, 214, 186); /* Using a pastel color for button */
    color: #333; /* Adjust button text color */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
     font-weight: bold;
}

.project-card .upload-btn:hover {
    background-color: rgb(255, 220, 220); /* Highlight on hover with a pastel color */
}

.music-card .video-placeholder {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    margin-bottom: 15px;
     border: 1px solid rgb(255, 214, 186); /* Using a pastel color for border */
      border-radius: 4px;
      overflow: hidden; /* Ensures border radius is applied to iframe */
}

.music-card .video-placeholder iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* Remove iframe default border */
}

/* Contact Section */
.contact-section {
    padding: 60px 0;
    background-color: rgb(255, 242, 235); /* Using the second pastel color */
}

.contact-section h2 {
     font-size: 2em;
    margin-bottom: 40px;
    text-align: center;
     color: #333; /* Keeping text color */
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.contact-content form {
    flex: 1 1 400px; /* Allow form to grow and shrink */
    background-color: rgb(255, 232, 205); /* Using the third pastel color */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
     border: 1px solid rgb(255, 214, 186); /* Using a pastel color for border */
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
     color: #333; /* Keeping text color */
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid rgb(255, 214, 186); /* Using a pastel color for border */
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
     background-color: rgb(255, 242, 235); /* Using a lighter pastel color for input background */
     color: #333; /* Keeping text color */
}

.btn-submit {
    display: inline-block;
    padding: 12px 25px;
    background-color: rgb(255, 214, 186); /* Using a pastel color for button */
    color: #333; /* Adjust button text color */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
     font-weight: bold;
}

.btn-submit:hover {
    background-color: rgb(255, 220, 220); /* Highlight on hover with a pastel color */
}

.contact-info {
    flex: 1 1 300px; /* Allow contact info to grow and shrink */
    background-color: rgb(255, 232, 205); /* Using the third pastel color */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: left;
     border: 1px solid rgb(255, 214, 186); /* Using a pastel color for border */
}

.contact-info p {
    margin-top: 0;
    font-size: 1.1em;
     color: #333; /* Keeping text color */
}

.contact-info .social-links {
    margin-top: 20px;
}

.contact-info .social-links a {
    color: #333; /* Adjust social icon color */
    margin: 0 10px 0 0; /* Adjust spacing */
    font-size: 1.5em;
}

.contact-info .social-links a:hover {
    color: rgb(255, 214, 186); /* Highlight on hover with a pastel color */
}

/* Footer */
footer {
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
    backdrop-filter: blur(5px); /* Adds a blur effect to the background */
    padding: 20px 0;
    text-align: center;
    color: #333;
    border-top: 1px solid rgba(200, 200, 255, 0.5); /* Subtle border to match the theme */
}

.footer-links a {
    color: #333; /* Adjust social icon color */
    margin: 0 10px;
    font-size: 1.5em;
}

.footer-links a:hover {
    color: rgb(255, 214, 186); /* Highlight on hover with a pastel color */
}

/* Enhanced Responsiveness for All Screen Sizes */

/* Extra Large Screens (1440px and above) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero {
        padding: 140px 40px 100px;
    }
    
    .profile-photo img {
        width: 320px;
        height: 320px;
    }
    
    .bio h1 {
        font-size: 4em;
    }
    
    .featured-card {
        max-width: 900px;
        padding: 60px 50px;
    }
    
    .video-quote-container {
        gap: 80px;
    }
}

/* Large Screens (1200px - 1439px) */
@media (max-width: 1439px) and (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 20px;
    }
    
    .hero {
        padding: 120px 30px 80px;
        margin: 20px;
    }
    
    .video-quote-container {
        gap: 70px;
    }
}

/* Medium-Large Screens (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .container {
        max-width: 960px;
        padding: 15px;
    }
    
    .hero {
        padding: 110px 25px 70px;
        margin: 15px;
    }
    
    .profile-photo img {
        width: 260px;
        height: 260px;
    }
    
    .bio h1 {
        font-size: 3.2em;
    }
    
    .bio h2 {
        font-size: 1.6em;
    }
    
    .featured-card {
        max-width: 750px;
        padding: 45px 35px;
    }
    
    .video-quote-container {
        gap: 60px;
    }
    
    .video-wrapper {
        min-width: 380px;
        max-width: 500px;
    }
}

/* Tablet Landscape (769px - 991px) */
@media (max-width: 991px) and (min-width: 769px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    .hero {
        padding: 100px 20px 60px;
        margin: 15px 10px;
    }
    
    .profile-photo img {
        width: 240px;
        height: 240px;
    }
    
    .bio h1 {
        font-size: 2.8em;
    }
    
    .bio h2 {
        font-size: 1.5em;
    }
    
    .bio p {
        font-size: 1.1em;
    }
    
    .featured-card {
        max-width: 700px;
        padding: 40px 30px;
    }
    
    .featured-card h2 {
        font-size: 2em;
    }
    
    .video-quote-container {
        gap: 50px;
    }
    
    .video-wrapper {
        min-width: 350px;
        max-width: 450px;
    }
    
    .quote-text {
        font-size: 2.2em;
    }
}

/* Mobile Landscape & Small Tablets (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
    .container {
        width: 95%;
        padding: 10px;
    }
    
    header {
        padding: 12px 0;
    }
    
    header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        font-size: 1.6em;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    nav ul li a {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .hero {
        padding: 90px 15px 50px;
        margin: 10px 5px;
    }
    
    .profile-photo img {
        width: 200px;
        height: 200px;
    }
    
    .bio h1 {
        font-size: 2.4em;
    }
    
    .bio h2 {
        font-size: 1.3em;
    }
    
    .bio p {
        font-size: 1em;
        max-width: 600px;
    }
    
    .social-links a {
        font-size: 1.8em;
        margin: 0 12px;
    }
    
    .portfolio-section {
        padding: 60px 0;
        margin: 30px 10px;
    }
    
    .featured-card {
        max-width: 100%;
        padding: 35px 25px;
    }
    
    .featured-card h2 {
        font-size: 1.8em;
    }
    
    .featured-card p {
        font-size: 1em;
    }
    
    .intro-video-section {
        padding: 50px 0;
        margin: 20px 10px;
    }
    
    .intro-video-content h2 {
        font-size: 2em;
    }
    
    .video-quote-container {
        flex-direction: column;
        gap: 35px;
    }
    
    .video-wrapper {
        min-width: auto;
        max-width: 100%;
        padding: 0 5px;
    }
    
    .animated-quote {
        min-width: auto;
        max-width: 100%;
        text-align: center;
        padding: 15px;
    }
    
    .quote-text {
        font-size: 1.6em;
        line-height: 1.3;
    }
    
    .contact-section {
        padding: 70px 0;
        margin: 30px 10px;
    }
    
    .contact-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .contact-content form,
    .contact-info {
        flex: none;
        width: 100%;
    }
}

/* Mobile Portrait (320px - 480px) */
@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 8px;
    }
    
    header {
        padding: 10px 0;
    }
    
    header .container {
        flex-direction: column;
        gap: 12px;
    }
    
    .logo {
        font-size: 1.4em;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    nav ul li a {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .hero {
        padding: 80px 10px 40px;
        margin: 8px 3px;
    }
    
    .profile-photo img {
        width: 160px;
        height: 160px;
    }
    
    .bio h1 {
        font-size: 2em;
    }
    
    .bio h2 {
        font-size: 1.2em;
    }
    
    .bio p {
        font-size: 0.9em;
        max-width: 100%;
        line-height: 1.5;
    }
    
    .social-links a {
        font-size: 1.6em;
        margin: 0 8px;
    }
    
    .portfolio-section {
        padding: 50px 0;
        margin: 20px 5px;
    }
    
    .featured-card {
        max-width: 100%;
        padding: 25px 15px;
    }
    
    .featured-card h2 {
        font-size: 1.6em;
    }
    
    .featured-card p {
        font-size: 0.9em;
        line-height: 1.6;
    }
    
    .view-all-btn {
        padding: 12px 25px;
        font-size: 1em;
    }
    
    .intro-video-section {
        padding: 40px 0;
        margin: 15px 5px;
    }
    
    .intro-video-content h2 {
        font-size: 1.8em;
    }
    
    .intro-video-content p {
        font-size: 1em;
    }
    
    .video-quote-container {
        flex-direction: column;
        gap: 25px;
    }
    
    .video-wrapper {
        padding: 0;
    }
    
    .animated-quote {
        padding: 10px;
    }
    
    .quote-text {
        font-size: 1.4em;
        line-height: 1.2;
    }
    
    .contact-section {
        padding: 60px 0;
        margin: 20px 5px;
    }
    
    .contact-section h2 {
        font-size: 1.8em;
    }
    
    .contact-content {
        flex-direction: column;
        gap: 25px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .btn-submit {
        padding: 10px 20px;
        font-size: 1em;
    }
    
    footer {
        padding: 15px 0;
    }
    
    .footer-links a {
        font-size: 1.3em;
        margin: 0 8px;
    }
}

/* Very Small Screens (below 320px) */
@media (max-width: 319px) {
    .container {
        width: 98%;
        padding: 5px;
    }
    
    .hero {
        padding: 70px 5px 30px;
        margin: 5px 2px;
    }
    
    .profile-photo img {
        width: 140px;
        height: 140px;
    }
    
    .bio h1 {
        font-size: 1.8em;
    }
    
    .bio h2 {
        font-size: 1.1em;
    }
    
    .bio p {
        font-size: 0.85em;
    }
    
    .social-links a {
        font-size: 1.4em;
        margin: 0 6px;
    }
    
    .featured-card {
        padding: 20px 10px;
    }
    
    .featured-card h2 {
        font-size: 1.4em;
    }
    
    .featured-card p {
        font-size: 0.85em;
    }
    
    .quote-text {
        font-size: 1.2em;
    }
    
    nav ul li a {
        padding: 5px 8px;
        font-size: 0.75em;
    }
}

/* Legacy Mobile Support */
@media (max-width: 768px) {
    .hero .container {
        flex-direction: column-reverse;
    }

    .contact-content {
        flex-direction: column;
    }

    /* Responsive grid for mobile - single column */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Hide dividers on mobile */
    .project-grid::before,
    .project-grid::after {
        display: none;
    }

    /* Hide horizontal dividers on mobile */
    .page-section .project-card:nth-child(3n):after {
        display: none;
    }

    /* Add horizontal dividers after each card on mobile */
    .page-section .project-card:not(:last-child):after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 10%;
        right: 10%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(200, 200, 255, 0.4), transparent);
        z-index: 1;
    }

    /* Responsive intro video section */
    .intro-video-section {
        padding: 60px 0;
        margin: 20px 10px;
    }

    .intro-video-content h2 {
        font-size: 2em;
    }

    .intro-video-content p {
        font-size: 1.1em;
        margin-bottom: 30px;
    }

    .video-quote-container {
        flex-direction: column;
        gap: 40px;
    }

    .video-wrapper {
        padding: 0 10px;
        min-width: auto;
        max-width: 100%;
    }

    .animated-quote {
        min-width: auto;
        max-width: 100%;
        text-align: center;
        padding: 0 10px;
    }

    .quote-text {
        font-size: 1.8em;
        line-height: 1.3;
    }

    .video-container {
        border-radius: 15px;
        border-width: 2px;
    }

    .video-container:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    /* Additional responsive improvements for mobile */
    .hero {
        border-radius: 20px;
    }
    
    .portfolio-section,
    .intro-video-section,
    .contact-section {
        border-radius: 20px;
    }
    
    .featured-card {
        border-radius: 20px;
    }
    
    /* Ensure text remains readable on small screens */
    .featured-card p span {
        display: inline-block;
        margin-bottom: 5px;
    }
    
    /* Improve button accessibility on touch devices */
    .view-all-btn {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Better spacing for social links on mobile */
    .social-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }
    
    /* Optimize form elements for mobile */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group textarea {
        width: 100%;
        box-sizing: border-box;
        min-height: 44px;
    }
    
    .btn-submit {
        min-height: 44px;
        width: 100%;
        touch-action: manipulation;
    }
}

/* Tablet responsiveness */
@media (max-width: 1024px) and (min-width: 769px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    /* Adjust divider for 2-column layout */
    .project-grid::before {
        left: calc(50% - 1px);
    }

    .project-grid::after {
        display: none;
    }

    /* Hide 3-column horizontal dividers on tablet */
    .page-section .project-card:nth-child(3n):after {
        display: none;
    }

    /* Add horizontal dividers after every 2nd card on tablet */
    .page-section .project-card:nth-child(2n):after {
        content: '';
        position: absolute;
        bottom: -12px;
        left: -25%;
        right: -25%;
        height: 2px;
        background: linear-gradient(to right, transparent, rgba(200, 200, 255, 0.4), transparent);
        z-index: 1;
    }

    /* Responsive intro video section for tablet */
    .intro-video-section {
        padding: 70px 0;
        margin: 25px 15px;
    }

    .intro-video-content h2 {
        font-size: 2.2em;
    }

    .video-quote-container {
        gap: 50px;
    }

    .video-wrapper {
        min-width: 350px;
    }

    .animated-quote {
        min-width: 280px;
    }

    .quote-text {
        font-size: 2.2em;
    }

    .video-container {
        border-radius: 18px;
    }
}