
:root {
    --bg: #262626;
    --card: #161718;
    --muted: #9aa0a6;
    --accent: #00bcd4;
    --text: #eef0f1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Segoe UI, Roboto, system-ui, -apple-system, "Helvetica Neue", Arial;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(8,8,9,0.6);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    /*justify-content: space-between;*/
    justify-content: center;
    padding: 0 24px;
}

    header .nav-wrapper {
        /*flex-grow: 1;*/
        flex-grow: 0;
        display: flex;
        justify-content: center;
    }

    header .brand {
        font-weight: 700;
        letter-spacing: 0.4px
    }

    header nav a {
        color: var(--text);
        text-decoration: none;
        margin-left: 18px;
        font-size: 1.1rem;
    }

        header nav a:hover {
            color: var(--accent);
            transition: color .3s;
        }

/* Main layout */
main {
    padding-top: 50px;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px
}

/* About section */
.section {
    padding: 30px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    scroll-margin-top: 60px;
}

    .section h2 {
        text-align: center;
    }

.about {
    display: flex;
    gap: 28px;
    align-items: center
}

.profile {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    flex-shrink: 0
}

.about-content h1 {
    margin-bottom: 8px;
    color: var(--accent);
}

.about-content p {
    color: var(--muted);
    max-width: 720px
}

/* Socials */
.socials {
    display: flex;
    gap: 10px;
    margin-top: 12px
}

    .socials a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--card);
        color: var(--accent);
        text-decoration: none;
        border: 1px solid rgba(255,255,255,0.5);
        transition: all 0.3s ease;
    }

        .socials a:hover {
            background: var(--accent);
            color: var(--bg);
            transform: translateY(-3px);
        }

/* Portfolio inline buttons */
.portfolio-inline {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap
}

    .portfolio-inline .label {
        font-weight: 600
    }

.inline-buttons {
    display: flex;
    gap: 10px
}

.pill {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .pill:hover {
        background: var(--accent);
        color: var(--bg);
        transform: translateY(-3px);
    }

/* Portfolio sections */
.portfolio-section h2 {
    margin-bottom: 18px;
    color: var(--accent);
}

.projects-grid {
    display: grid;
    /* Laptop/Desktop (Default) - 3 columns */
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* * Media Query for Mobile Devices
 * This rule applies when the screen width is 768px or less.
 */
@media (max-width: 600px) {
    .projects-grid {
        /* Mobile: 1 column per row */
        grid-template-columns: 1fr;
    }
}

.project-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: #1e1f22;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

    .project-card:hover {
        border-color: var(--accent);
        cursor: pointer;
        transform: translateY(-3px);
    }

    .project-card img {
        width: 100%;
        height: 60%;
        object-fit: cover;
        border-radius: 6px;
        margin-bottom: 10px
    }

    .project-card h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .project-card p {
        font-size: 0.9rem;
        color: var(--muted)
    }

/* Contact */
.contact-section form {
    margin: 0 auto;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.contact-section h2 {
    margin-bottom: 18px
}

input, textarea {
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.03);
    color: var(--text);
    padding: 10px;
    border-radius: 6px;
    font-size: 0.95rem
}

button {
    margin: 0 auto;
    background: var(--accent);
    border: none;
    color: var(--bg);
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: max-content
}

/* Footer */
footer {
    padding: 28px;
    text-align: center;
    color: var(--muted)
}

/* Small screens */
@media(max-width:800px) {
    .about {
        flex-direction: column;
        text-align: center
    }

    header nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center
    }
}

.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px,1px,1px,1px);
    white-space: nowrap
}

/* Project pages style */
.navbar {
    text-align: center;
    padding: 10px 0;
    background-color: #111;
}

    .navbar ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .navbar li {
        display: inline-block;
        margin: 0 10px;
    }

    .navbar a {
        color: #fff;
        text-decoration: none;
        font-weight: 500;
        border-bottom: 2px solid transparent;
        transition: border-color 0.3s;
    }

        .navbar a:hover {
            color: var(--accent)
        }

/* Project Layout */
.project-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px;
    color: #ddd;
}

.project-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%; /* Ensure the container uses full width */
}

    /* 1. Remove fixed height from iframe/img 
  2. Set max-width to control desktop size 
*/
    .project-media img {
        width: 100%; /* Allows it to shrink on small screens */
        max-width: 800px; /* Controls max size on large screens */
        height: auto; /* IMPORTANT: Allows the image to scale proportionally */
        border-radius: 12px;
        box-shadow: 0 0 10px rgba(0,0,0,0.3);
        margin-bottom: 20px;
    }

/* Specific CSS for the video iframe to maintain a 16:9 aspect ratio */
.video-container {
    /* Use a wrapper for the iframe to control aspect ratio */
    position: relative;
    width: 100%;
    max-width: 1000px;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio (9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 12px;
}

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none; /* Remove redundant border styling */
        border-radius: 12px;
    }


/* Cleanup: Remove extra margin from the last item */
.project-media > *:last-child {
    margin-bottom: 0;
}

/* Info Section */
.project-info {
    text-align: center;
    margin-bottom: 20px;
}

.project-title {
    color:  var(--accent);
    font-size: 2rem;
    margin-bottom: 5px;
}

.project-meta {
    color: #aaa;
    font-size: 1rem;
}

..project-gallery {
    display: flex;
    flex-direction: column; /* stack vertically */
    align-items: center; /* center them horizontally */
    gap: 20px; /* space between images */
    margin: 30px 0;
}

.project-gallery img {
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Description */
.project-description {
    line-height: 1.6;
}

    .project-description h3 {
        margin-top: 20px;
    }

    .project-description ul {
        margin-top: 10px;
        padding-left: 20px;
    }
