/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #1e1e2f;
    --card-bg: #2a2a3e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --accent-color: #ff6b61;
    --accent-hover: #ff5a4f;
    --border-color: #3a3a4f;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(30, 30, 47, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

/* Theme Switcher */
.theme-switcher {
    position: relative;
}

.theme-toggle {
    display: flex;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 0.3rem;
    gap: 0.2rem;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    color: var(--accent-color);
    background-color: rgba(255, 107, 97, 0.1);
}

.theme-btn.active {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 97, 0.3);
}

.theme-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

.theme-btn[data-theme="dark"]::before {
    content: '🌙';
}

.theme-btn[data-theme="light"]::before {
    content: '☀️';
}

.theme-btn[data-theme="cyberpunk"]::before {
    content: '🤖';
}

.theme-btn[data-theme="techno"]::before {
    content: '⚡';
}

.theme-btn span {
    position: relative;
    z-index: 2;
    font-size: 0;
}

.theme-btn.active span {
    font-size: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo-image {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 97, 0.3);
}

.nav-logo-image:hover {
    transform: scale(1.1);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(255, 107, 97, 0.5);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.3rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-color) 0%, #252536 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

.hero-text {
    animation: fadeInUp 1s ease-out;
}

.hero-greeting {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.highlight {
    color: var(--accent-color);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: 2px solid var(--accent-color);
    background-color: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 97, 0.3);
}

.btn-secondary {
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 97, 0.1);
}

/* Profile Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-bg {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-color), #ff8a80);
    opacity: 0.1;
    animation: rotate 20s linear infinite;
}

.profile-bg::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
    animation: rotate 15s linear infinite reverse;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 3px solid var(--accent-color);
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

/* Technical Skills Section */
.technical-skills {
    padding: 5rem 0;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.technical-skills-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.technical-skills-header {
    text-align: center;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.technical-skills-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.technical-skills-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    border-radius: 2px;
}

.technical-skills-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.technical-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

/* Ensure technical skills items don't inherit any animations */
.technical-skills .skill-item {
    animation: none !important;
}

.skill-category {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Electric glow effect on hover */
.skill-category::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff, #0080ff, #ff0080, #8000ff, #00ffff);
    background-size: 400% 400%;
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: electric-pulse 2s ease-in-out infinite alternate;
}

.skill-category:hover::before {
    opacity: 0.3;
    animation: electric-pulse 3s ease-in-out infinite alternate;
}

.skill-category:hover {
    border-color: #00ffff;
    box-shadow:
        0 0 10px rgba(0, 255, 255, 0.15),
        0 0 20px rgba(0, 255, 255, 0.08),
        inset 0 0 10px rgba(0, 255, 255, 0.05);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.02), rgba(0, 255, 255, 0.01));
}

/* Electric pulse animation */
@keyframes electric-pulse {
    0% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    50% {
        background-position: 100% 50%;
        filter: hue-rotate(180deg);
    }
    100% {
        background-position: 0% 50%;
        filter: hue-rotate(360deg);
    }
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.skill-category-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border-radius: 15px;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 97, 0.3);
    transition: transform 0.3s ease;
}

.skill-category:hover .skill-category-icon {
    transform: scale(1.1) rotate(5deg);
}

.skill-category-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: stretch;
    text-align: center;
    width: 100%;
}

.skill-item {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background-color: rgba(255, 107, 97, 0.05);
    border: 1px solid rgba(255, 107, 97, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    width: 100%;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.3;
}



.skill-item:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background-color: rgba(255, 107, 97, 0.1);
}

/* Legacy Skills Section */
.skills {
    background-color: var(--card-bg);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.skills-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.skills-scroll {
    display: flex;
    gap: 3rem;
    /* Animation only for legacy skills section */
    white-space: nowrap;
}

.skill-item {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background-color: rgba(255, 107, 97, 0.1);
    border: 1px solid rgba(255, 107, 97, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.skill-item:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    background-color: rgba(255, 107, 97, 0.2);
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.about-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    overflow: visible; /* Ensure all text is visible */
    word-wrap: break-word; /* Prevent text overflow */
    hyphens: auto; /* Better text wrapping */
}

.services {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.service-item:hover {
    background-color: rgba(255, 107, 97, 0.1);
    transform: translateX(10px);
}

.service-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    border-radius: 10px;
    color: white;
}

.service-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations - Optimized for performance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Performance optimizations */
.skill-item,
.profile-bg,
.btn {
    will-change: transform;
}

/* Optimize for smooth animations */
.hero-text,
.service-item,
.stat-item {
    will-change: opacity, transform;
}

/* Hardware acceleration for better performance */
.profile-bg::before,
.profile-bg {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce paint and composite operations */
.nav-link::after {
    will-change: width;
}

/* Optimize button interactions */
.btn {
    contain: layout style;
}

/* Loading state */
body:not(.loaded) * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .skills-scroll {
        animation: none !important;
    }
    
    .profile-bg {
        animation: none !important;
    }
}

/* Projects Section */
.projects {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.projects-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card.featured {
    border: 2px solid var(--accent-color);
}

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 107, 97, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Removed hover effect for project overlay - no "View Project" button on hover */

.project-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.project-link:hover {
    background-color: white;
    color: var(--accent-color);
}

.project-content {
    padding: 1.5rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.project-date {
    display: none; /* Hidden - date removed from gallery */
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background-color: rgba(255, 107, 97, 0.15);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 107, 97, 0.3);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background-color: var(--bg-color);
    position: relative;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    border-radius: 10px;
    color: white;
}

.contact-details {
    flex: 1;
}

.contact-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.contact-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.email-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.email-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.contact-form-container {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 97, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background-color: var(--bg-color);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 97, 0.3);
}

.social-icon {
    font-size: 1.2rem;
}



/* Video Links Section */
.video-links {
    padding: 5rem 0;
    background-color: var(--card-bg);
}

.video-links-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.video-links-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.video-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.video-link-card {
    background-color: var(--bg-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.video-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 15px;
    background: var(--card-bg);
    margin-bottom: 15px; /* Space between video and content */
}

.video-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    object-fit: cover;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    z-index: 2;
}

.video-container:hover .video-overlay {
    opacity: 0.8;
}

.video-play-btn {
    background: rgba(255, 107, 97, 0.9);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.video-play-btn:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* Video magnification when playing */
.video-playing {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.3s ease;
}

.video-playing .video-overlay {
    display: none !important;
}

.play-icon {
    font-size: 1.2rem;
}

.platform-badge {
    font-size: 0.8rem;
    opacity: 0.9;
}

.video-platform {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.video-content {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.video-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Experience Section */
.experience {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.experience-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.experience-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.experience-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    border-radius: 2px;
}

.experience-timeline {
    display: grid;
    gap: 2rem;
    align-items: start;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    /* Auto-scaling columns based on screen size */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.experience-item {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.experience-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.experience-position {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.experience-company {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.experience-period {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background-color: rgba(255, 107, 97, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 107, 97, 0.2);
    display: inline-block;
}

.experience-description {
    text-align: left;
}

.experience-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

/* Character References Section */
.references {
    padding: 5rem 0;
    background-color: var(--card-bg);
}

.references-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.references-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    gap: 2rem;
    justify-content: center;
}

.reference-card {
    background-color: var(--bg-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.reference-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.reference-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-color);
}

.reference-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reference-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.reference-title {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.reference-relationship {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.reference-contact {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.contact-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Contact Section Updates */
.contact-simple {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    align-items: center;
    text-align: center;
}

.contact-item-simple {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.contact-item-simple:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(255, 107, 97, 0.15);
}

/* Circuit Board Background Animation */
.hero {
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 107, 97, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 97, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-color) 0%, #252536 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(90deg, transparent 49%, rgba(255, 215, 0, 0.03) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(255, 215, 0, 0.03) 50%, transparent 51%),
        radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255, 215, 0, 0.05) 2px, transparent 2px);
    background-size: 60px 60px, 60px 60px, 60px 60px, 60px 60px;
    animation: circuit-flow 20s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes circuit-flow {
    0% {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 60px 60px, 60px 60px, 60px 60px, 60px 60px;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Enhanced Profile Background */
.profile-bg {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.1), transparent, rgba(255, 107, 97, 0.1), transparent);
    animation: rotate 20s linear infinite;
}

.profile-bg::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 215, 0, 0.3), transparent);
    transform: translateX(-50%) rotate(45deg);
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.3; transform: translateX(-50%) rotate(45deg) scale(1); }
    100% { opacity: 0.8; transform: translateX(-50%) rotate(45deg) scale(1.1); }
}

/* Enhanced Responsive Design for Better Mobile/Desktop Adaptation */

/* Large Desktop Screens (1400px and up) */
@media (min-width: 1400px) {
    .projects-container,
    .video-links-container,
    .references-container,
    .contact-container {
        max-width: 1600px;
        padding: 0 4rem;
    }

    .hero-container {
        max-width: 1400px;
    }

    .about-container {
        max-width: 1400px;
    }
}

/* Desktop Screens (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .projects-container,
    .video-links-container,
    .references-container,
    .contact-container {
        max-width: 1400px;
        padding: 0 3rem;
    }
}

/* Tablet and Small Desktop (768px to 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .projects-container,
    .video-links-container,
    .references-container,
    .contact-container {
        padding: 0 2rem;
    }

    .hero-greeting {
        font-size: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-title {
        font-size: 2.5rem;
    }

    .projects-title,
    .video-links-title,
    .references-title {
        font-size: 2.5rem;
    }

    /* Technical Skills for Tablet */
    .technical-skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .skill-category {
        padding: 1.8rem;
    }

    .skill-category-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .skill-category-icon {
        margin: 0 auto;
    }
}

/* Video autoplay controls for mobile */
.video-autoplay-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 3;
}

/* Mobile and Tablet (up to 767px) */
@media (max-width: 767px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem;
        gap: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        border-top: 1px solid var(--border-color);
    }

    /* Mobile video autoplay settings */
    .video-playing {
        box-shadow: 0 0 30px rgba(255, 107, 97, 0.4);
        position: relative;
    }

    .video-playing::after {
        content: '🔊 Auto-playing';
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--accent-color);
        color: white;
        padding: 0.3rem 0.6rem;
        border-radius: 10px;
        font-size: 0.7rem;
        font-weight: 500;
        white-space: nowrap;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-right {
        gap: 1rem;
    }

    .theme-toggle {
        order: -1;
        margin-bottom: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-greeting {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .profile-container {
        width: 300px;
        height: 300px;
    }

    .profile-bg {
        width: 250px;
        height: 250px;
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-title {
        font-size: 2rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skills-scroll {
        gap: 2rem;
    }

    .skill-item {
        font-size: 1rem;
        padding: 0.3rem 0.8rem;
    }

    /* Technical Skills Mobile Styles */
    .technical-skills {
        padding: 3rem 0;
    }

    .technical-skills-container {
        padding: 0 1rem;
    }

    .technical-skills-title {
        font-size: 2rem;
    }

    .technical-skills-subtitle {
        font-size: 1rem;
    }

    .technical-skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .skill-category-header {
        margin-bottom: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .skill-category-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
        margin: 0 auto;
    }

    .skill-category-title {
        font-size: 1.2rem;
    }

    .skill-list {
        gap: 0.6rem;
    }

    .skill-item {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
        min-height: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .hero-greeting {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projects-title {
        font-size: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-title {
        font-size: 2rem;
    }

    .social-links {
        gap: 1rem;
    }

    .social-link {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .references-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .references-title {
        font-size: 2rem;
    }

    .video-links-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .video-links-title {
        font-size: 2rem;
    }

    /* Better Mobile Navigation */
    .navbar {
        padding: 0.8rem 0;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    /* Improved Mobile Typography */
    .projects-title,
    .video-links-title,
    .references-title,
    .contact-title {
        font-size: 2.2rem;
        margin-bottom: 3rem;
    }

    .hero-greeting {
        font-size: 2.2rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    /* Better Mobile Spacing */
    .projects,
    .video-links,
    .references {
        padding: 3rem 0;
    }
}

/* Extra Small Mobile Devices (380px and below) */
@media (max-width: 380px) {
    .hero-greeting {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .profile-container {
        width: 250px;
        height: 250px;
    }

    .profile-bg {
        width: 200px;
        height: 200px;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .about-title {
        font-size: 1.8rem;
    }

    .projects-title,
    .video-links-title,
    .references-title {
        font-size: 1.8rem;
    }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 80vh;
    }

    .hero-greeting {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }


}

/* High DPI / Retina Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }


}

/* Video Modal Styles - Dynamic Orientation Support */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.video-modal-content {
    position: relative;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s ease-out;
}

.video-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: var(--accent-color);
    transform: rotate(90deg);
}

.video-modal-iframe-container {
    position: relative;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-iframe {
    border: none;
    border-radius: 0;
}

/* ===== PORTRAIT VIDEO MODALS ===== */

/* Mobile Portrait Video - Full screen like YouTube mobile */
.video-modal.portrait-video.portrait-mobile .video-modal-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
    max-width: none;
    max-height: none;
}

.video-modal.portrait-video.portrait-mobile .video-modal-iframe-container {
    width: 100vw;
    height: 100vh;
}

.video-modal.portrait-video.portrait-mobile .video-modal-iframe {
    width: 100vw;
    height: 56.25vw; /* 9:16 aspect ratio */
    max-height: 100vh;
}

.video-modal.portrait-video.portrait-mobile .video-modal-info {
    display: none; /* Full screen experience */
}

/* Desktop Portrait Video - Centered with vertical orientation */
.video-modal.portrait-video.portrait-desktop .video-modal-content {
    width: 60vh; /* Based on max video height */
    max-width: 400px;
    height: auto;
    border-radius: 20px;
}

.video-modal.portrait-video.portrait-desktop .video-modal-iframe-container {
    width: 100%;
    height: 0;
    padding-bottom: 177.78%; /* 9:16 aspect ratio */
    position: relative;
}

.video-modal.portrait-video.portrait-desktop .video-modal-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 177.78%; /* Match the padding-bottom */
}

.video-modal.portrait-video.portrait-desktop .video-modal-info {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    position: relative;
}

/* ===== LANDSCAPE VIDEO MODALS ===== */

/* Mobile Landscape Video - Horizontal video on mobile */
.video-modal.landscape-video.landscape-mobile .video-modal-content {
    width: 95vw;
    height: auto;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.video-modal.landscape-video.landscape-mobile .video-modal-iframe-container {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.video-modal.landscape-video.landscape-mobile .video-modal-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-modal.landscape-video.landscape-mobile .video-modal-info {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Desktop Landscape Video - Like YouTube theater mode */
.video-modal.landscape-video.landscape-desktop .video-modal-content {
    width: 90vw;
    max-width: 1400px;
    height: auto;
    border-radius: 20px;
}

.video-modal.landscape-video.landscape-desktop .video-modal-iframe-container {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.video-modal.landscape-video.landscape-desktop .video-modal-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-modal.landscape-video.landscape-desktop .video-modal-info {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Video info section */
.video-modal-info {
    padding: 2rem;
    flex-shrink: 0;
}

.video-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.video-modal-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Modal body scroll lock */
body.modal-open {
    overflow: hidden;
    padding-right: 0; /* Prevent layout shift from scrollbar */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .video-modal-close {
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.8);
        font-size: 22px;
    }

    .video-modal-info {
        padding: 1.5rem;
    }

    .video-modal-title {
        font-size: 1.25rem;
    }

    .video-modal-description {
        font-size: 0.9rem;
    }
}

/* Specific mobile video modal styles */
@media (max-width: 768px) {
    /* Mobile Portrait Video - Full screen vertical layout */
    .video-modal.portrait-video.portrait-mobile .video-modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        border: none;
        max-width: none;
        max-height: none;
    }

    .video-modal.portrait-video.portrait-mobile .video-modal-iframe-container {
        width: 100vw;
        height: 100vh;
    }

    .video-modal.portrait-video.portrait-mobile .video-modal-iframe {
        width: 100vw;
        height: 56.25vw; /* 9:16 aspect ratio */
        max-height: 100vh;
    }

    .video-modal.portrait-video.portrait-mobile .video-modal-info {
        display: none; /* Full screen experience for portrait videos */
    }

    .video-modal.portrait-video.portrait-mobile .video-modal-close {
        top: 20px;
        right: 20px;
    }

    /* Mobile Landscape Video - Horizontal layout in mobile */
    .video-modal.landscape-video.landscape-mobile .video-modal-content {
        width: 95vw;
        height: auto;
        border-radius: 15px;
        border: 1px solid var(--border-color);
    }

    .video-modal.landscape-video.landscape-mobile .video-modal-iframe-container {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        position: relative;
    }

    .video-modal.landscape-video.landscape-mobile .video-modal-iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .video-modal.landscape-video.landscape-mobile .video-modal-info {
        padding: 1.5rem;
        border-top: 1px solid var(--border-color);
    }

    .video-modal.landscape-video.landscape-mobile .video-modal-close {
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .video-modal-content {
        max-width: 98vw;
        max-height: 98vh;
        border-radius: 10px;
    }

    .video-modal-info {
        padding: 1rem;
    }

    .video-modal-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .video-modal-description {
        font-size: 0.85rem;
    }
}

/* Animation for modal appearance */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-modal.active .video-modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* ===== RESPONSIVE iPHONE 17 PRO MAX MOCKUP STYLES ===== */

.iphone-container {
    /* Responsive sizing: scales with viewport */
    width: min(90vw, 425px);
    height: min(102vh, 900px);
    max-width: 425px;
    max-height: 900px;
    /* Center the phone */
    margin: 20px auto;
    /* Phone styling */
    background: linear-gradient(145deg,
        #1a1a1a 0%,
        #0a0a0a 25%,
        #1a1a1a 50%,
        #2a2a2a 75%,
        #1a1a1a 100%);
    border-radius: 50px;
    padding: clamp(8px, 2.5vw, 15px);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    overflow: hidden;
    /* Titanium frame with subtle iridescence */
   	background-image:
   		radial-gradient(at 30% 30%, rgba(200, 200, 220, 0.1) 0%, transparent 50%),
   		radial-gradient(at 70% 70%, rgba(180, 190, 210, 0.08) 0%, transparent 50%);
    /* Ensure crisp rendering */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;

    /* Animate phone responsiveness */
    transition: all 0.3s ease;
}

/* Dynamic Island - iPhone 17 Pro Max */
.iphone-notch {
    width: 160px;
    height: 32px;
    background: linear-gradient(145deg, #0a0a0a 0%, #000000 50%, #0a0a0a 100%);
    border-radius: 18px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    z-index: 3;
    /* Dynamic Island deeper inset effect */
    border: 1px solid rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Inner Dynamic Island shadow for depth */
.iphone-notch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 14px;
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.4) 30%,
        transparent 70%
    );
    pointer-events: none;
}

.iphone-screen {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, #000000 0%, #0a0a0a 100%),
        linear-gradient(135deg, rgba(20, 20, 20, 0.3) 0%, rgba(10, 10, 10, 0.3) 100%);
    border-radius: 42px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* Pro-level screen reflection effects */
    box-shadow:
        inset 0 0 50px rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    /* Anti-aliasing for crisp display */
    -webkit-font-smoothing: subpixel-antialiased;
    transform: translateZ(0);
}

.scrollable-videos {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollable-videos::-webkit-scrollbar {
    display: none;
}

.video-container {
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
    position: relative;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.iphone-buttons {
    position: absolute;
    right: -8px;
    top: 120px;
    width: 6px;
    height: 50px;
    background: linear-gradient(90deg, #444, #222);
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* ===== TIKTOK PHONE MOCKUP STYLES ===== */

/* Phone Container */
.tiktok-phone-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 420px;
    margin: 0 auto;
}

/* iPhone Mockup - More Authentic Design */
.phone-mockup {
    position: relative;
    width: 340px;
    height: 700px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1a1a1a 0%, #000000 50%, #0a0a0a 100%);
    border-radius: 45px;
    padding: 15px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    overflow: hidden;
    /* iPhone-like depth effect */
    transform: translateZ(0);
}

/* Phone Screen - iPhone Styling */
.phone-screen {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 100% 100% at 50% 50%, #000000 0%, #0a0a0a 100%),
        linear-gradient(135deg, rgba(20, 20, 20, 0.9) 0%, rgba(10, 10, 10, 0.9) 100%);
    border-radius: 35px;
    padding: 60px 20px 80px 20px; /* Extra space for home indicator */
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(0.5px);
    /* Anti-aliasing for crisp iPhone-like display */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* iPhone Home Indicator */
.phone-home-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    z-index: 20;
    /* iPhone-style pill shape */
    border-radius: 2.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

/* Phone Notch */
.phone-notch {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 25px;
    background: linear-gradient(145deg, #000000, #1a1a1a);
    border-radius: 15px;
    box-shadow: inset 0 0 0 2px #333;
}

/* Phone Status Bar - iPhone 17 Design */
.phone-status-bar {
    position: absolute;
    top: 28px;
    left: 28px;
    right: 28px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    z-index: 20;
    letter-spacing: -0.15px;
}

.phone-time {
    color: #fff;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.phone-network {
    color: #fff;
    opacity: 0.85;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.phone-network::before {
    content: '📶';
    font-size: 10px;
    margin-right: 2px;
}

.phone-battery {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}

.battery-icon {
    width: 24px;
    height: 10px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    position: relative;
    background: transparent;
    opacity: 0.9;
}

.battery-icon::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 1px 1px 0;
}

.battery-level {
    position: absolute;
    left: 1px;
    top: 1px;
    height: 8px;
    width: 88%;
    background: #4CAF50;
    border-radius: 2px;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 50%, #CDDC39 100%);
}

/* TikTok App Header */
.tiktok-app-header {
    position: absolute;
    top: 55px;
    left: 20px;
    right: 20px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 15;
}

.tiktok-logo {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.tiktok-camera-btn {
    width: 35px;
    height: 35px;
    background: #000;
    border: 1px solid #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* TikTok Video Scroll Container */
.tiktok-video-scroll {
    position: absolute;
    top: 95px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100% - 95px);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* TikTok Video Items */
.tiktok-video-item {
    width: 100%;
    height: 100%;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Active video indicator */
.tiktok-video-item.active .tiktok-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* TikTok Video Container */
.tiktok-video-container {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* TikTok Video Iframe */
.tiktok-video-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* TikTok Overlay (Play Button & Info) */
.tiktok-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 80px; /* Leave space for actions */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(transparent 60%, rgba(0, 0, 0, 0.6));
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: all;
    z-index: 10;
    padding: 2rem;
}

.tiktok-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* TikTok Play Button */
.tiktok-play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.tiktok-play-btn:hover {
    background: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* TikTok Video Info */
.tiktok-video-info {
    text-align: center;
    color: #ffffff;
    max-width: 250px;
    width: 100%;
}

.tiktok-video-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.tiktok-video-description {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
}

/* TikTok Actions (Like, Comment, Share) */
.tiktok-actions {
    position: absolute;
    right: 15px;
    bottom: 120px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 20;
}

.action-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.action-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

/* Like animation */
.like-btn.liked .action-icon {
    animation: heartBounce 0.6s ease;
}

@keyframes heartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Action labels (optional - commented out for cleaner look) */
/*
.action-btn::after {
    content: attr(title);
    position: absolute;
    right: 55px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 10px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-btn:hover::after {
    opacity: 1;
}
*/

/* Scroll Indicator */
.tiktok-scroll-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease;
    z-index: 21;
}

/* Phone Instructions */
.phone-instructions {
    margin-top: 1rem;
    text-align: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.phone-instructions p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0.5rem 0;
}

/* ===== YOUTUBE VIDEO CARDS (Regular Cards) ===== */

.youtube-video-card {
    background-color: var(--bg-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.youtube-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.youtube-video-content {
    padding: 1.5rem;
}

.youtube-video-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.youtube-video-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== RESPONSIVE DESIGN FOR PHONE MOCKUP ===== */

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1199px) {
    .phone-mockup {
        width: 280px;
        height: 560px;
    }

    .tiktok-phone-container {
        max-width: 350px;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .phone-mockup {
        width: 85vw;
        max-width: 300px;
        height: calc(85vw * 2);
        max-height: 600px;
    }

    .tiktok-phone-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .phone-instructions {
        padding: 0 1rem;
    }

    .phone-instructions p {
        font-size: 13px;
    }

    .tiktok-app-header {
        top: 45px;
        height: 35px;
    }

    .tiktok-logo {
        font-size: 16px;
    }

    .tiktok-camera-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .phone-status-bar {
        top: 20px;
        font-size: 11px;
    }

    .tiktok-video-scroll {
        top: 80px;
        height: calc(100% - 80px);
    }
}

/* Very Small Mobile */
@media (max-width: 480px) {
    .phone-mockup {
        width: 90vw;
        height: calc(90vw * 2.1);
        padding: 15px;
    }

    .phone-screen {
        padding: 40px 15px 15px 15px;
    }

    .tiktok-app-header {
        top: 40px;
    }

    .tiktok-actions {
        right: 12px;
        bottom: 100px;
    }

    .action-btn {
        width: 45px;
        height: 45px;
    }

    .action-icon {
        font-size: 18px;
    }

    .tiktok-play-btn {
        width: 70px;
        height: 70px;
        font-size: 20px;
    }

    .tiktok-video-info {
        max-width: 200px;
    }

    .tiktok-video-title {
        font-size: 14px;
    }

    .tiktok-video-description {
        font-size: 12px;
    }
}

/* ===== LIKE ANIMATION ===== */

@keyframes likePopup {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== CUSTOM SCROLLBAR FOR PHONE SCROLL ===== */

.tiktok-video-scroll::-webkit-scrollbar {
    width: 0px;
}

.tiktok-video-scroll {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* ===== PHONE REFLECTIONS/SHADOWS ===== */

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 25px;
    pointer-events: none;
    z-index: 1;
}

.phone-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Print Styles */
@media print {
    .navbar,
    .hero-buttons,
    .video-custom-controls,
    .video-modal,
    .tiktok-phone-container {
        display: none !important;
    }
}
