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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #222;
}

/* =========================
   Header & Navigation
========================= */

header {
    background-color: #222;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

nav h1 {
    color: white;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    transition: 0.3s ease;
}

nav a:hover {
    opacity: 0.7;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

/* =========================
   General Sections
========================= */

section {
    max-width: 1100px;
    margin: auto;
    padding: 80px 20px;
    scroll-margin-top: 80px;
}

section h2 {
    margin-bottom: 25px;
    font-size: 32px;
}

.section-heading {
    text-align: center;
    margin-bottom: 50px;
}

.section-heading p {
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: #666;
}

.section-heading h2 {
    font-size: 38px;
}

.section-description {
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

/* =========================
   Hero Section
========================= */

#home {
    background-color: #f7f7f7;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 1100px;
    width: 100%;
    margin: auto;
    padding: 80px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.hero-text {
    flex: 1;
}

.intro {
    font-size: 18px;
    margin-bottom: 10px;
}

.hero-text h2 {
    font-size: 52px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.hero-text h3 {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 20px;
}

.hero-text > p:not(.intro) {
    font-size: 18px;
    max-width: 600px;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 0 0 300px;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    background-color: #ddd;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center 30%;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-placeholder span {
    color: #666;
}

/* =========================
   Buttons
========================= */

.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    transition: 0.3s ease;
}

.primary-btn {
    background-color: #222;
    color: white;
}

.primary-btn:hover {
    background-color: #444;
}

.secondary-btn {
    border: 1px solid #222;
    color: #222;
}

.secondary-btn:hover {
    background-color: #222;
    color: white;
}

/* =========================
   About Section
========================= */

.about-content {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 17px;
    line-height: 1.8;
}

.about-highlights {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.highlight-card {
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background-color: #f8f8f8;
}

.highlight-card h3 {
    font-size: 32px;
    margin-bottom: 8px;
}

/* =========================
   Support Experience
========================= */

#impact {
    background-color: #f5f5f5;
    max-width: none;
    padding-left: max(20px, calc((100% - 1100px) / 2));
    padding-right: max(20px, calc((100% - 1100px) / 2));
}

.support-content {
    max-width: 1000px;
    margin: auto;
}

.support-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background-color: white;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

.metric-card h3 {
    font-size: 30px;
    margin-bottom: 8px;
}

.metric-card p {
    color: #666;
    margin: 0;
}

.support-dashboard {
    background-color: white;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.dashboard-label {
    font-size: 13px;
    letter-spacing: 1.5px;
    color: #666;
    margin-bottom: 15px;
}

.support-image {
    width: 100%;
    display: block;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.support-image:hover {
    opacity: 0.9;
}

.dashboard-note {
    text-align: center;
    color: #777;
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 0;
}

.dashboard-note1 {
    color: #777;
    font-size: 14px;
    margin: 15px 0 0;
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

/* =========================
   Skills Section
========================= */

#skills {
    background-color: #f5f5f5;
    max-width: none;
    padding-left: max(20px, calc((100% - 1100px) / 2));
    padding-right: max(20px, calc((100% - 1100px) / 2));
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.skill-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.skill-card h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* =========================
   Projects Section
========================= */

.projects-container {
    max-width: 1000px;
    margin: auto;
}

.project-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Project Gallery */

.project-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 10px;
    padding: 10px;
    background-color: #eee;
}

/* Desktop Screenshot 1 */
.project-gallery img:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background-color: #f5f5f5;
    border-radius: 10px;
    display: block;
}

/* Desktop Screenshot 2 */
.project-gallery img:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
    border-radius: 10px;
    display: block;
}

/* Desktop Screenshot 3 */
.project-gallery img:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
    border-radius: 10px;
    display: block;
}

/* Mobile Screenshot */
.project-gallery img:nth-child(4) {
    grid-column: 2;
    grid-row: 2 / 4;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
    border-radius: 10px;
    display: block;
}

/* Project Content */

.project-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-type {
    font-size: 13px;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.project-content h3 {
    font-size: 30px;
    margin-bottom: 20px;
}

.project-description {
    line-height: 1.7;
    margin-bottom: 25px;
}

.project-details {
    display: flex;
    gap: 40px;
    margin-bottom: 25px;
}

.project-details strong {
    display: block;
    margin-bottom: 5px;
}

.project-details p {
    margin: 0;
}

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.technologies span {
    background-color: #f0f0f0;
    padding: 7px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.project-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================
   Contact Section
========================= */

.contact-content {
    max-width: 700px;
    margin: auto;
    text-align: center;
}

.contact-content > p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 35px;
}

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

.contact-links a {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid #222;
    color: #222;
    text-decoration: none;
    border-radius: 5px;
}

.contact-links a:hover {
    background-color: #222;
    color: white;
}

/* =========================
   Footer
========================= */

footer {
    background-color: #222;
    color: white;
    padding: 50px 20px;
}

.footer-content {
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.footer-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.footer-content > p {
    color: #ccc;
    margin-bottom: 25px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links + .copyright {
    font-size: 14px;
    margin-bottom: 0;
}

/* =========================
   Mobile
========================= */

@media (max-width: 768px) {

    /* Navigation */

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
        gap: 0;
    }

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

    .nav-links li {
        padding: 10px 0;
    }

    nav {
        flex-direction: row;
        position: relative;
    }

    /* General */

    section {
        padding: 60px 20px;
    }

    .section-heading h2 {
        font-size: 32px;
    }

    /* Hero */

    #home {
        min-height: auto;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        padding: 60px 20px;
    }

    .hero-text h2 {
        font-size: 40px;
    }

    .hero-text h3 {
        font-size: 20px;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        width: 220px;
        height: 220px;
        flex: none;
    }

    .image-placeholder {
        width: 220px;
        height: 220px;
    }

    /* About */

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

    .about-highlights {
        width: 100%;
    }

    /* Skills */

    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Projects */

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    .project-gallery img {
        max-height: 400px;
    }

    .project-content {
        padding: 30px;
    }

    .project-content h3 {
        font-size: 26px;
    }

    .project-details {
        flex-direction: column;
        gap: 15px;
    }

        /* Support Experience */

    .support-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .support-dashboard {
        padding: 15px;
    }

    .metric-card {
        padding: 20px 15px;
    }

    .metric-card h3 {
        font-size: 24px;
    }

    /* Project Gallery on Mobile */

    .project-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    /* All screenshots */
    .project-gallery img:nth-child(1),
    .project-gallery img:nth-child(2),
    .project-gallery img:nth-child(3),
    .project-gallery img:nth-child(4) {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        height: auto;
        aspect-ratio: auto;
        object-fit: contain;
    }

}

/* =========================
   Image Lightbox
========================= */

#lightbox {
    display: none !important;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    padding: 30px;
}

#lightbox.active {
    display: flex !important;
}

#lightbox img {
    max-width: 95%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
}

#lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: white;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
}

/* Clickable images */

.project-gallery .gallery-image,
.support-image {
    cursor: zoom-in;
}