/* Root Variables */
:root {
    --bg: #111;
    --text: #eee;
    --accent: #66ccff;
    --card: #222;
}

body.light {
    --bg: #f5f5f5;
    --text: #222;
    --accent: #0077cc;
    --card: #fff;
}

/* General Body Styles */
body {
    margin-top: 70px;
    margin-left: 0;
    margin-bottom: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}

/* Navigation Styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    padding: 1em;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 1em;
}

.nav-links li a,
.nav-links li button {
    text-decoration: none;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

a{
    color: var(--text);
}

.menu-toggle {
    display: none;
    font-size: 1.5em;
    cursor: pointer;
}

/* Section Styles */
section {
    padding: 60px 20px;
    text-align: center;
}

/* Project Grid Styles */
.project-grid {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}


/* Project Card Styles */
.project-card {
    background-color: var(--card);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.project-card img {
    border-radius: 8px;
    width: auto;
    height: auto;
}

.project-card a {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent);
    color: var(--bg);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.project-card a:hover {
    background-color: #005f7f;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    align-items: center;
    justify-content: center; /* Centers the grid items horizontally */
    margin: 0 auto;          /* Horizontally centers the entire grid */
}


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

.image-slider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
}


.slider-image {
    position: absolute;
    width: 100%;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.slider-image.active {
    opacity: 1;
    visibility: visible;
    max-height: 400px;
    object-fit:fill;
    object-position: top;
}
 


.prev-btn,
.next-btn {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}


.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}


/* Contact Section */
#contact {
    padding: 60px 20px;
    text-align: center;
    background: var(--bg);
    color: var(--text);
}

#contact h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

#contact p {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: var(--text);
    opacity: 0.8;
}

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

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card);
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.contact-card img {
    width: 40px;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
}

body.light .contact-card img {
    filter: none;
}

.contact-card span {
    font-weight: 500;
    font-size: 1rem;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 20px;
    background: var(--bg);
    border-top: 1px solid #333;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: var(--bg);
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        border-left: 1px solid #444;
    }

    .nav-links.show {
        display: flex;
    }
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    justify-items: center;
    padding: 20px 0;
}

.skill-card {
    background: var(--card);
    padding: 15px;
    border-radius: 10px;
    width: 100px;
    text-align: center;
    transition: transform 0.2s ease;
    display: flex;               /* Use flexbox */
    flex-direction: column;     /* Stack items vertically */
    align-items: center;        /* Center horizontally */
    justify-content: center;    /* Center vertically */

}

.skill-card:hover {
    transform: scale(1.05);
}

.skill-card img {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    
}

.skill-card span {
    display: block;
    font-size: 0.9em;
    color: var(--text);
}

/* Hero Section */
.hero-video {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background-color: var(--bg);
    min-height: 50vh;
}

.hero .profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #00bfff;
    margin-bottom: 1rem;
}

.hero-content {
    display: flex;
    flex-direction: row;
    /* Change to horizontal layout */
    align-items: center;
    justify-content: center;
    gap: 3em;
    z-index: 1;
    text-align: left;
    flex-wrap: wrap;
    /* Optional: makes layout responsive */
    max-width: 1200px;
    width: 100%;
}

.hero-text {
    color: var(--text);
    max-width: 500px;
    flex: 1;
}

.hero-video-wrapper {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 800px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video-wrapper .video-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensures letterboxing inside aspect ratio */
    display: block;
}

.hero-btn,
.hero-btn-outline {
    margin: 10px 10px 0 0;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    display: inline-block;
}

.hero-btn {
    background-color: var(--accent);
    color: var(--bg);
}

.hero-btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.hero-btn:hover,
.hero-btn-outline:hover {
    opacity: 0.85;
}


/* Scroll Down Icon */
.scroll-down-icon {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: white;
    animation: bounce 1.5s infinite;
}

.scroll-down-icon a {
    text-decoration: none;
    color: inherit;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Tab Functionality */
.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.tab-btn {
    background: var(--card);
    color: var(--text);
    border: 2px solid var(--accent);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
}

.tab-btn.active {
    background: var(--accent);
    color: var(--bg);
}

.tab-content {
    display: none;
    opacity: 0;
    /* Initially hidden */
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    /* Fade in when active */
    transform: translateY(0);
}

.tab-content.fade-out {
    opacity: 0;
    /* Make the content fade out */
    transform: translateY(10px);
    /* Optional: Add a slight downward movement */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease;
}

/* Make sure active content fades in */
.tab-content.active {
    opacity: 1;
    /* Fade in */
    transform: translateY(0);
    /* Reset position */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease;
}

.fadeimg {
    opacity: 0;
    display: none;
    transition: opacity 3s ease;
}

.fadeimg.active {
    opacity: 1;
    transition: display 3s step-end;
    display: block;
}

.contact-profile {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #00bfff;
    margin-bottom: 10px;
}

.profile-desc {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
    color: #ccc;
    word-wrap: normal;
}



@media (max-width: 768px) {
    .image-slider {
        height: auto;
    }

    .slider-image {
        height: auto;
        max-height: 300px;
    }
}
/* General responsive image rules */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Project Card Images - Better scaling on small screens */
@media (max-width: 768px) {
    .project-card img {
        width: 100%;
        height: auto;
    }
}

/* Slider Images - Adjust height for smaller viewports */
@media (max-width: 768px) {
    .slider-image,
    .slider-image.active {
        height: 250px;
    }
}

/* Contact card images */
@media (max-width: 768px) {
    .contact-card img {
        width: 30px;
        height: auto;
    }
}

/* Skill card images */
@media (max-width: 768px) {
    .skill-card img {
        width: 30px;
        height: auto;
        align-content: center;
    }
}

/* Hero section image */
@media (max-width: 768px) {
    .hero .profile-pic {
        width: 120px;
        height: 120px;
    }
}

/* Adjust hero video height on small screens */
@media (max-width: 768px) {
    .hero-video-wrapper {
        max-width: 100%;
        aspect-ratio: auto;
        height: auto;
    }

    .hero-video-wrapper video {
        max-height: 300px;
    }
}
