/* 1. Root & Variables */
:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --primary-color: #007bff;
    --border-width: 3px;
    --border-radius: 8px;
    --shadow-offset: 5px;
    --font-main:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        sans-serif;
}

/* 2. Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

section {
    padding: 5rem 0;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
}

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

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    max-width: 65ch;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* 3. CTA Button Styles */
.cta-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: var(--border-width) solid var(--text-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--text-color);
    transition: all 0.2s ease;
    margin-right: 1rem;
    margin-top: 1rem;
}

.cta-button:hover {
    box-shadow: none;
    transform: translate(var(--shadow-offset), var(--shadow-offset));
}

.cta-button.primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-color);
    border-bottom: var(--border-width) solid var(--text-color);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links .nav-cta {
    padding: 0.5rem 1rem;
    border: var(--border-width) solid var(--text-color);
    border-radius: var(--border-radius);
    box-shadow: 3px 3px 0 var(--text-color);
    transition: all 0.2s ease;
}

.nav-links .nav-cta:hover {
    box-shadow: none;
    transform: translate(3px, 3px);
    color: var(--text-color);
}

#menu-toggle {
    display: none;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.hamburger-menu .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* 4. Section: Hero */
#hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 0;
}

#hero h2 {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.15rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-text {
    flex: 2;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    border: var(--border-width) solid var(--text-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--text-color);
}

/* 5. Section: Projects */
#projects .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-color);
    border: var(--border-width) solid var(--text-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 #ddd;
}

.project-card:hover {
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 #888;
}

.project-card h3 {
    color: var(--primary-color);
}

.project-card .tagline {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-card .tech-stack {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-card .description {
    text-align: justify;
}

.project-card .tech-stack span {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    background: #eee;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    flex-grow: 1;
}

.project-card .project-links {
    margin-top: 1rem;
}

.project-card .project-links a {
    margin-right: 1rem;
    font-weight: 700;
}

.project-gallery {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.project-gallery img {
    min-width: 100%;
    aspect-ratio: 16/9;
    object-fit: contain;
    border-radius: 4px;
    border: 2px solid var(--text-color);
    scroll-snap-align: center;
}

/* 6. Other Projects */
#other-projects {
    background-color: #f9f9f9;
}

#other-projects .project-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, 500px);
    justify-content: center;
}

#other-projects .project-card {
    border: var(--border-width) solid #ddd;
    box-shadow: none;
}

#other-projects .project-card:hover {
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 #ccc;
}

#other-projects .project-card:hover {
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 #ddd;
}

/* 7. Section: Skills */
#skills {
    background: #f9f9f9;
}

#skills .skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    border-bottom: var(--border-width) solid var(--text-color);
    padding-bottom: 0.5rem;
}

.skill-category ul {
    list-style: none;
    padding-top: 1rem;
}

.skill-category li {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* 8. Section: Certifications */
#certifications {
    background-color: var(--bg-color);
}

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

.cert-card {
    border: var(--border-width) solid var(--text-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: #fdfdfd;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 #ddd;
    transition: all 0.2s ease;
}

.cert-card:hover {
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-color);
    transform: translate(-3px, -3px);
}

.cert-card h3 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cert-card .issuer {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cert-card .validated-skill {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

/* 9. Section: About */
#about {
    text-align: center;
}

#about .about-content {
    max-width: 80ch;
    margin: 0 auto;
}

#about .about-content p {
    font-size: 1.1rem;
    text-align: justify;
}

#about .about-content blockquote {
    font-size: 1.25rem;
    font-weight: 600;
    border-left: 5px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

/* 10. Section: Contact */
#contact {
    text-align: center;
    background: #f4f4f4;
}

#contact p {
    font-size: 1.15rem;
    max-width: 60ch;
    margin: 0 auto 2rem auto;
}

#contact form {
    max-width: 600px;
    margin: 2rem auto 0 auto;
    text-align: left;
}

#contact .form-group {
    margin-bottom: 1.5rem;
}

#contact label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
    width: 100%;
    padding: 12px;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: var(--border-width) solid var(--text-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 #ddd;
    transition: all 0.2s ease;
}

#contact input[type="text"]:focus,
#contact input[type="email"]:focus,
#contact textarea:focus {
    outline: none;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-color);
}

#contact textarea {
    min-height: 150px;
}

#contact button[type="submit"] {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: var(--border-width) solid var(--text-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--text-color);
    transition: all 0.2s ease;
    cursor: pointer;
    margin-top: 0;
}

#contact button[type="submit"]:hover {
    box-shadow: none;
    transform: translate(var(--shadow-offset), var(--shadow-offset));
}

/* 11. Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    border-top: var(--border-width) solid #eee;
    background: #f9f9f9;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* 12. Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 17, 17, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox:target {
    display: flex;
}

.lightbox .project-gallery {
    max-width: 90%;
    max-height: 90%;
}

.lightbox .project-gallery img {
    width: auto;
    max-width: 85vw;
    max-height: 80vh;
    border-radius: var(--border-radius);
    border: 3px solid var(--bg-color);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bg-color);
    text-decoration: none;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* 13. Responsive Media Query */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 1.5rem;
    }

    #hero {
        text-align: center;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }
    #hero h2 {
        text-align: center;
    }
    .hero-image {
        order: -1;
    }
    .hero-image img {
        max-width: 250px;
    }

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

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

    .nav-links {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        text-align: center;
        border-bottom: var(--border-width) solid var(--text-color);
        padding-bottom: 1rem;
    }

    .nav-links li {
        padding: 1rem 0;
        width: 100%;
    }

    .hamburger-menu {
        display: flex;
    }

    #menu-toggle:checked ~ .nav-links {
        display: flex;
    }

    #menu-toggle:checked ~ .hamburger-menu .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    #menu-toggle:checked ~ .hamburger-menu .bar:nth-child(2) {
        opacity: 0;
    }
    #menu-toggle:checked ~ .hamburger-menu .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    #hero {
        padding-top: 80px;
    }

    html {
        scroll-padding-top: 80px;
    }
}
