/* ========================================
   GOOGLE FONTS
======================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');


/* ========================================
   CSS VARIABLES
======================================== */

:root {
    --bg: #0b0f14;
    --surface: #111821;
    --text: #f1f5f9;
    --muted: #96a3b3;
    --line: #25303d;
    --accent: #4cc9f0;
    --accent-dark: #071018;
}


/* ========================================
   RESET / BASE STYLES
======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* ========================================
   REUSABLE CONTAINER
======================================== */

.container {
    width: min(1100px, calc(100% - 40px));
    margin-inline: auto;
}


/* ========================================
   HEADER / NAVIGATION
======================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(11, 15, 20, 0.96);
    border-bottom: 1px solid var(--line);
}

.nav {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: var(--text);
    font-family: "Space Mono", monospace;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.brand span {
    color: var(--accent);
}

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

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.menu-btn {
    width: 45px;
    height: 45px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    background-color: rgba(17, 24, 33, 0.75);
    backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease;
}

.menu-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--accent-dark);
}


/* ========================================
   HERO SECTION
======================================== */

.hero {
    padding-block: 120px 105px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent);
    font-family: "Space Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.hero h1 {
    max-width: 900px;
    margin: 0 0 28px;
    font-size: clamp(2.8rem, 7vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero h1 span {
    display: block;
    color: #8793a1;
}

.intro {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    padding: 11px 17px;
    border: 1px solid var(--line);
    font-weight: 600;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--accent-dark);
}

.primary:hover {
    background-color: #75d8f6;
    border-color: #75d8f6;
}

.secondary {
    color: var(--text);
}

.secondary:hover {
    background-color: var(--surface);
}


/* ========================================
   GENERAL SECTIONS
======================================== */

.section {
    padding-block: 90px;
    border-bottom: 1px solid var(--line);
}

.section-head h2,
.about h2,
.contact h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}


/* ========================================
   PROJECTS SECTION
======================================== */

.projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-top: 40px;
    background-color: var(--line);
    border: 1px solid var(--line);
}

.project {
    min-height: 280px;
    padding: 30px;
    background-color: var(--bg);
    transition: background-color 0.2s ease;
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 25px;
    background-color: var(--surface);
    border: 1px solid var(--line);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project:hover .project-image img {
    transform: scale(1.03);
}

.project:hover {
    background-color: #0e151d;
}

.project-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-family: "Space Mono", monospace;
    font-size: 0.72rem;
}

.project h3 {
    margin: 34px 0 10px;
    font-size: 1.45rem;
}

.project p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.tags span {
    padding: 4px 8px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.75rem;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 22px;
}

.project-links a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

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


/* ========================================
   ABOUT SECTION
======================================== */

.about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 80px;
}

.about-copy {
    color: var(--muted);
    font-size: 1.05rem;
}

.about-copy p {
    margin: 0 0 18px;
}

.about-copy p:last-child {
    margin-bottom: 0;
}


/* ========================================
   CERTIFICATES SECTION
======================================== */

.certificates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.certificate {
    overflow: hidden;
    background-color: var(--surface);
    border: 1px solid var(--line);
}

.certificate-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #dfe5ec;
}

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

.certificate-info {
    padding: 22px;
}

.certificate-source {
    margin: 0 0 8px;
    color: var(--accent);
    font-family: "Space Mono", monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.certificate-info h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.certificate-info p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}


/* ========================================
   CERTIFICATE MODAL
======================================== */

.certificate {
    cursor: pointer;
}

.certificate:hover {
    border-color: var(--accent);
}


/* ---------- Modal Background ---------- */

.certificate-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}


/* ---------- Show Modal ---------- */

.certificate-modal.show {
    display: flex;
}


/* ---------- Large Certificate ---------- */

.modal-certificate {
    width: auto;
    max-width: 1100px;
    max-height: 90vh;
    object-fit: contain;
    border: 1px solid var(--line);
}


/* ---------- Close Button ---------- */

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 45px;
    height: 45px;
    padding: 0;
    border: 1px solid var(--line);
    background-color: var(--surface);
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}


.modal-close:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--accent-dark);
}


/* ========================================
   CERTIFICATE MODAL RESPONSIVENESS
======================================== */

@media (max-width: 720px) {

    .certificate-modal {
        padding: 18px;
    }

    .modal-certificate {
        max-width: 100%;
        max-height: 82vh;
    }

    .modal-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 1.7rem;
    }

}


/* ========================================
   CURRENT LEARNING SECTION
======================================== */

.focus {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 35px;
    border-top: 1px solid var(--line);
}

.focus div {
    min-width: 0;
    padding: 25px 15px;
    border-right: 1px solid var(--line);
}

.focus div:last-child {
    border-right: 0;
}

.focus strong {
    display: block;
    margin-bottom: 35px;
    color: var(--accent);
    font-family: "Space Mono", monospace;
}

.focus span {
    display: block;
}


/* ========================================
   CONTACT SECTION
======================================== */

.contact {
    padding-block: 105px;
}

.contact h2 {
    max-width: 700px;
    margin-bottom: 25px;
}

.email {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: clamp(1.5rem, 4vw, 3rem);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}

.socials {
    display: flex;
    gap: 18px;
    margin-top: 30px;
}

.socials a {
    color: var(--muted);
    text-decoration: none;
    font-size: 24px;
    transition: 0.3s ease;
}

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

/* ===== BACK TO TOP ===== */

.back-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background-color: var(--surface);
    color: var(--text);
    font-size: 1.4rem;
    text-decoration: none;
    border-radius: 50%;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.back-to-top:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--accent-dark);
}


/* ========================================
   FOOTER
======================================== */

.footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-block: 25px;
    color: var(--muted);
    font-size: 0.8rem;
}


/* ========================================
   MEDIA QUERIES
======================================== */

/* ---------- Tablets ---------- */

@media (max-width: 900px) {

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

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

    .focus div:nth-child(2) {
        border-right: 0;
    }
}


/* ---------- Mobile ---------- */

@media (max-width: 720px) {

    .container {
        width: min(100% - 28px, 1100px);
    }

    .nav {
        min-height: 62px;
    }

    .menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 62px;
        right: 14px;
        left: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px;
        background-color: var(--surface);
        border: 1px solid var(--line);
    }

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

    .nav-links a {
        padding: 12px;
    }

    .nav-links a:hover {
        background-color: #18212b;
    }

    .hero {
        padding-block: 85px;
    }

    .hero h1 {
        font-size: clamp(2.6rem, 13vw, 4.5rem);
    }

    .intro {
        font-size: 1rem;
    }

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

    .about {
        grid-template-columns: 1fr;
        gap: 35px;
    }

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

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

    .focus div {
        border-bottom: 1px solid var(--line);
    }

    .focus div:nth-child(odd) {
        border-right: 1px solid var(--line);
    }

    .focus div:nth-child(even) {
        border-right: 0;
    }

    .focus div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .footer {
        flex-direction: column;
        gap: 8px;
    }

    .for-copyright {
        display: block;
    }

}


/* ---------- Very Small Screens ---------- */

@media (max-width: 420px) {

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        text-align: center;
    }

    .project {
        padding: 24px 20px;
    }

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

    .focus div,
    .focus div:nth-child(odd),
    .focus div:nth-child(even) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .focus div:last-child {
        border-bottom: 0;
    }

    .for-copyright {
        display: block;
    }

}
