/* =========================================================
   PERSONAL WEBSITE
   GLOBAL STYLE
   assets/css/style.css

   Header + Footer + Common Components
========================================================= */


/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {
    --primary: #111827;
    --primary-hover: #1f2937;

    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-light: #eef2ff;

    --white: #ffffff;
    --black: #000000;

    --text: #111827;
    --text-light: #6b7280;
    --text-muted: #9ca3af;

    --background: #ffffff;
    --background-light: #f8fafc;

    --border: #e5e7eb;

    --header-height: 78px;

    --container-width: 1200px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-sm:
        0 4px 15px rgba(0, 0, 0, 0.05);

    --shadow-md:
        0 10px 30px rgba(0, 0, 0, 0.08);

    --transition:
        all 0.3s ease;
}


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    background: var(--background);
    color: var(--text);

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

ul,
ol {
    margin: 0;
    padding: 0;

    list-style: none;
}


/* =========================================================
   COMMON CONTAINER
========================================================= */

.container {
    width:
        min(
            calc(100% - 40px),
            var(--container-width)
        );

    margin-left: auto;
    margin-right: auto;
}


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

.site-header {
    position: sticky;

    top: 0;

    z-index: 1000;

    width: 100%;

    height: var(--header-height);

    background:
        rgba(255, 255, 255, 0.92);

    border-bottom:
        1px solid rgba(229, 231, 235, 0.8);

    backdrop-filter:
        blur(16px);

    -webkit-backdrop-filter:
        blur(16px);

    transition:
        box-shadow 0.3s ease,
        background 0.3s ease;
}


/* =========================================================
   HEADER CONTAINER
========================================================= */

.site-header .container {
    height: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: inline-flex;

    align-items: center;

    flex-shrink: 0;

    color: var(--primary);

    text-decoration: none;

    font-size: 20px;

    font-weight: 800;

    letter-spacing: -0.5px;

    white-space: nowrap;

    transition:
        var(--transition);
}

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


/* =========================================================
   MAIN NAVIGATION
========================================================= */

.main-navigation {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 4px;

    margin-left: auto;
}

.main-navigation a {
    position: relative;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 42px;

    padding:
        0 12px;

    color:
        #374151;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    border-radius:
        var(--radius-sm);

    transition:
        color 0.3s ease,
        background 0.3s ease;
}

.main-navigation a::after {
    content: "";

    position: absolute;

    left: 12px;
    right: 12px;

    bottom: 4px;

    height: 2px;

    border-radius: 10px;

    background:
        var(--accent);

    transform:
        scaleX(0);

    transform-origin:
        center;

    transition:
        transform 0.3s ease;
}

.main-navigation a:hover {
    color:
        var(--accent);

    background:
        var(--accent-light);
}

.main-navigation a:hover::after {
    transform:
        scaleX(1);
}


/* =========================================================
   CV BUTTON
========================================================= */

.cv-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    min-height: 44px;

    padding:
        0 18px;

    color:
        var(--white);

    background:
        var(--primary);

    border:
        1px solid var(--primary);

    border-radius:
        9px;

    text-decoration: none;

    font-size: 13px;

    font-weight: 700;

    white-space: nowrap;

    transition:
        var(--transition);
}

.cv-button:hover {
    background:
        var(--accent);

    border-color:
        var(--accent);

    transform:
        translateY(-2px);

    box-shadow:
        0 8px 20px
        rgba(79, 70, 229, 0.20);
}


/* =========================================================
   HEADER SCROLL STATE
========================================================= */

.site-header.header-scrolled {
    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.07);

    background:
        rgba(255, 255, 255, 0.97);
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-button {
    display: none;

    width: 42px;
    height: 42px;

    padding: 0;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 5px;

    background:
        transparent;

    border:
        1px solid var(--border);

    border-radius:
        9px;
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;

    display: block;

    background:
        var(--primary);

    border-radius:
        10px;

    transition:
        var(--transition);
}


/* =========================================================
   MOBILE MENU OPEN STATE
========================================================= */

.mobile-menu-button.active span:nth-child(1) {
    transform:
        translateY(7px)
        rotate(45deg);
}

.mobile-menu-button.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.active span:nth-child(3) {
    transform:
        translateY(-7px)
        rotate(-45deg);
}


/* =========================================================
   MAIN
========================================================= */

main {
    min-height:
        60vh;
}


/* =========================================================
   COMMON LINKS
========================================================= */

a {
    transition:
        var(--transition);
}


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

.site-footer {
    padding:
        70px 0 25px;

    color:
        #d1d5db;

    background:
        #0b1120;
}


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

.footer-content {
    display: grid;

    grid-template-columns:
        1.5fr 1fr;

    gap: 70px;

    padding-bottom:
        45px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.10);
}


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

.footer-brand h3 {
    margin:
        0 0 12px;

    color:
        var(--white);

    font-size:
        22px;

    font-weight:
        800;

    line-height:
        1.3;
}

.footer-brand p {
    max-width:
        480px;

    margin:
        0;

    color:
        #9ca3af;

    font-size:
        15px;

    line-height:
        1.8;
}


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

.footer-links {
    display: flex;

    align-items:
        flex-start;

    justify-content:
        flex-end;

    flex-wrap:
        wrap;

    gap:
        10px 25px;
}

.footer-links a {
    color:
        #d1d5db;

    text-decoration:
        none;

    font-size:
        14px;

    font-weight:
        500;
}

.footer-links a:hover {
    color:
        #a5b4fc;

    transform:
        translateY(-2px);
}


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

.footer-bottom {
    padding-top:
        25px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        20px;
}

.footer-bottom p {
    margin:
        0;

    color:
        #6b7280;

    font-size:
        13px;
}


/* =========================================================
   FOCUS ACCESSIBILITY
========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline:
        3px solid
        rgba(79, 70, 229, 0.30);

    outline-offset:
        3px;
}


/* =========================================================
   SELECTION
========================================================= */

::selection {
    color:
        var(--white);

    background:
        var(--accent);
}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width:
        9px;
}

::-webkit-scrollbar-track {
    background:
        #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background:
        #cbd5e1;

    border-radius:
        20px;
}

::-webkit-scrollbar-thumb:hover {
    background:
        #94a3b8;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

    .main-navigation {
        gap: 0;
    }

    .main-navigation a {
        padding:
            0 9px;

        font-size:
            13px;
    }

    .cv-button {
        padding:
            0 14px;

        font-size:
            12px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 850px) {

    :root {
        --header-height:
            70px;
    }

    .container {
        width:
            min(
                calc(100% - 30px),
                var(--container-width)
            );
    }


    /* HEADER */

    .site-header {
        height:
            var(--header-height);
    }

    .site-header .container {
        position:
            relative;
    }


    /* LOGO */

    .logo {
        font-size:
            18px;

        max-width:
            calc(100% - 120px);

        overflow:
            hidden;

        text-overflow:
            ellipsis;
    }


    /* MOBILE BUTTON */

    .mobile-menu-button {
        display:
            flex;

        order:
            3;
    }


    /* CV BUTTON */

    .cv-button {
        margin-left:
            auto;

        min-height:
            40px;

        padding:
            0 13px;

        font-size:
            11px;
    }


    /* NAVIGATION */

    .main-navigation {
        position:
            absolute;

        top:
            calc(
                var(--header-height) + 8px
            );

        left:
            15px;

        right:
            15px;

        display:
            flex;

        flex-direction:
            column;

        align-items:
            stretch;

        gap:
            4px;

        padding:
            10px;

        background:
            rgba(255, 255, 255, 0.98);

        border:
            1px solid var(--border);

        border-radius:
            14px;

        box-shadow:
            0 15px 40px
            rgba(0, 0, 0, 0.10);

        opacity:
            0;

        visibility:
            hidden;

        transform:
            translateY(-10px);

        transition:
            opacity 0.3s ease,
            visibility 0.3s ease,
            transform 0.3s ease;
    }

    .main-navigation.active {
        opacity:
            1;

        visibility:
            visible;

        transform:
            translateY(0);
    }

    .main-navigation a {
        width:
            100%;

        min-height:
            45px;

        justify-content:
            flex-start;

        padding:
            0 15px;

        font-size:
            14px;
    }

    .main-navigation a::after {
        display:
            none;
    }

    .main-navigation a:hover {
        background:
            var(--accent-light);
    }


    /* FOOTER */

    .footer-content {
        grid-template-columns:
            1fr;

        gap:
            35px;
    }

    .footer-links {
        justify-content:
            flex-start;
    }

    .footer-bottom {
        flex-direction:
            column;

        align-items:
            flex-start;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .container {
        width:
            calc(100% - 24px);
    }

    .logo {
        font-size:
            16px;
    }

    .cv-button {
        display:
            none;
    }

    .mobile-menu-button {
        margin-left:
            auto;
    }

    .site-footer {
        padding:
            55px 0 20px;
    }

    .footer-brand h3 {
        font-size:
            20px;
    }

    .footer-links {
        flex-direction:
            column;

        gap:
            12px;
    }

}