/* General Body & Font Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 4rem 0;
}

h1, h2, h3 {
    font-weight: 600;
    color: #ffffff;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #00aaff;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Navigation Bar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #222;
}

nav .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00aaff;
}

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

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 400;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #00aaff;
}

/* Header & Intro Section */
header#home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    margin-top: 60px; /* Offset for fixed nav */
}

.intro-text {
    max-width: 50%;
}

.intro-text h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.intro-text .subtitle {
    font-size: 1.5rem;
    color: #00aaff;
    margin-bottom: 1.5rem;
}

.intro-text .description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: #00aaff;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
    background-color: #0088cc;
    transform: translateY(-3px);
}

.intro-image img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #222;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
}

/* Skills Section */
#skills {
    background-color: #1a1a1a;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
}

.skill-category h3 {
    font-size: 1.5rem;
    color: #00aaff;
    margin-bottom: 1.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.skill-tag {
    background-color: #252525;
    color: #e0e0e0;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    border: 1px solid #333;
    transition: background-color 0.3s, color 0.3s;
}

.skill-tag:hover {
    background-color: #00aaff;
    color: #fff;
}


/* Work Section */
#work {
    background-color: #121212;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.work-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 170, 255, 0.25), 0 0 1px 1px rgba(0, 170, 255, 0.4);
    border-color: rgba(0, 170, 255, 0.25);
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #000;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.work-card:hover .video-container video {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.85;
    transition: opacity 0.3s ease, background 0.3s ease;
    z-index: 2;
}

.work-card:hover .play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.25);
}

.play-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 170, 255, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    padding-left: 4px; /* visually center play icon */
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover .play-icon {
    transform: scale(1.15);
    background: #00bfff;
    box-shadow: 0 0 30px rgba(0, 170, 255, 0.8);
}

.work-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.work-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.work-card:hover .work-info h3 {
    color: #00aaff;
}

.work-info .category {
    margin: 0;
    font-size: 0.85rem;
    color: #00aaff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Lightbox Modal CSS */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none; /* Managed by javascript style */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 960px;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 2001;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    z-index: 2003;
    transition: background 0.3s, transform 0.3s, border-color 0.3s;
}

.lightbox-close:hover {
    background: rgba(0, 170, 255, 0.8);
    border-color: #00aaff;
    transform: rotate(90deg);
}

.lightbox-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.lightbox-video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
}

.lightbox-details {
    padding: 2rem;
    background: #151515;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.lightbox-details h3 {
    margin: 0 0 0.8rem 0;
    font-size: 1.8rem;
    color: #fff;
}

.lightbox-details p {
    margin: 0;
    font-size: 1.05rem;
    color: #b0b0b0;
    line-height: 1.6;
}


/* Work Experience Section */
#experience {
    background-color: #1a1a1a;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: #222;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    position: relative;
    background-color: inherit;
    width: 50%;
    padding-top: 10px;
    padding-bottom: 10px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 28px;
    background-color: #fff;
    border: 3px solid #00aaff;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
    text-align: right;
}

.timeline-item:nth-child(odd)::after {
    right: -8px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
    text-align: left;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: #121212;
    position: relative;
    border-radius: 6px;
}

.timeline-content h3 {
    margin-top: 0;
    color: #00aaff;
}

.timeline-content .company {
    font-style: italic;
    font-size: 0.9rem;
    color: #aaa;
}

/* Contact Footer */
#contact {
    background-color: #121212;
    text-align: center;
}

.contact-info .contact-link {
    display: inline-block;
    font-size: 1.2rem;
    color: #00aaff;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.contact-info .contact-link:hover {
    color: #fff;
}

.social-links a {
    color: #e0e0e0;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #00aaff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .intro-section {
        flex-direction: column-reverse;
        text-align: center;
    }

    .intro-text {
        max-width: 100%;
        margin-top: 2rem;
    }

    .intro-text h1 {
        font-size: 3rem;
    }

    .intro-image img {
        width: 250px;
        height: 250px;
    }

    nav ul {
        display: none;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 15px;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }

    .timeline-item::after,
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 12px;
    }
}
