/* =========================================================
   Wen-Ni Liu Personal Website
========================================================= */

:root {
    --blue: #1296db;
    --blue-dark: #0878b8;
    --blue-light: #dff3ff;

    --red: #e94b4b;
    --yellow: #ffd84d;

    --white: #ffffff;
    --bg: #f5fbff;

    --text: #203040;
    --text-soft: #64748b;

    --border: rgba(18, 150, 219, 0.18);

    --shadow:
        0 12px 30px rgba(18, 150, 219, 0.10);

    --shadow-hover:
        0 18px 40px rgba(18, 150, 219, 0.18);
}


/* =========================================================
   Global
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

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

    color: var(--text);

    line-height: 1.75;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(18, 150, 219, 0.14),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(255, 216, 77, 0.18),
            transparent 22%
        ),
        linear-gradient(
            180deg,
            #f2fbff 0%,
            #ffffff 55%,
            #f7fcff 100%
        );

    min-height: 100vh;
}


/* =========================================================
   Navigation
========================================================= */

nav {
    position: sticky;
    top: 14px;
    z-index: 1000;

    width: min(1100px, calc(100% - 40px));

    margin: 20px auto;

    padding: 10px 16px;

    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;

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

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

    border:
        2px solid rgba(18, 150, 219, 0.16);

    border-radius: 999px;

    box-shadow:
        0 8px 25px rgba(18, 150, 219, 0.10);
}


nav a {
    padding: 8px 14px;

    border-radius: 999px;

    color: var(--blue-dark);

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    transition: all 0.25s ease;
}


nav a:hover {
    color: white;

    background: var(--blue);

    transform: translateY(-2px);
}


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

header {
    position: relative;

    width: min(1050px, calc(100% - 40px));

    margin: 85px auto 60px;

    padding: 75px 70px;

    overflow: hidden;

    border-radius: 34px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #e8f7ff 55%,
            #cbeeff 100%
        );

    border:
        2px solid rgba(18, 150, 219, 0.15);

    box-shadow:
        0 25px 65px rgba(18, 150, 219, 0.16);
}


/*
   Large Doraemon-blue decorative circle
*/

header::before {
    content: "";

    position: absolute;

    width: 350px;
    height: 350px;

    right: -120px;
    top: -140px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #36b6f4,
            var(--blue)
        );

    opacity: 0.95;
}


/*
   Yellow bell-like decorative circle
*/

header::after {
    content: "";

    position: absolute;

    width: 90px;
    height: 90px;

    right: 115px;
    bottom: -28px;

    border-radius: 50%;

    background: var(--yellow);

    border: 7px solid white;

    box-shadow:
        0 7px 18px rgba(32, 48, 64, 0.12);
}


header h1 {
    position: relative;
    z-index: 2;

    margin: 0 0 20px;

    font-size: clamp(48px, 7vw, 76px);

    line-height: 1;

    letter-spacing: -3px;

    font-weight: 850;

    color: var(--blue-dark);
}


header p {
    position: relative;
    z-index: 2;

    max-width: 650px;

    margin: 6px 0;

    color: var(--text-soft);

    font-size: 18px;
}


header p:first-of-type {
    margin-top: 26px;

    font-size: 21px;

    font-weight: 750;

    color: var(--red);
}


/* =========================================================
   Hero Links
========================================================= */

.links {
    margin-top: 28px !important;
}


.links a {
    display: inline-block;

    margin: 6px 6px 6px 0;

    padding: 9px 17px;

    color: var(--blue-dark);

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    background: white;

    border:
        2px solid rgba(18, 150, 219, 0.18);

    border-radius: 999px;

    transition: all 0.25s ease;
}


.links a:hover {
    color: white;

    background: var(--blue);

    border-color: var(--blue);

    transform: translateY(-3px);

    box-shadow:
        0 9px 20px rgba(18, 150, 219, 0.25);
}


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

section {
    width: min(1000px, calc(100% - 40px));

    margin: 28px auto;

    padding: 45px 50px;

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

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

    border-radius: 26px;

    box-shadow: var(--shadow);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;

    scroll-margin-top: 110px;
}


section:hover {
    transform: translateY(-4px);

    border-color:
        rgba(18, 150, 219, 0.30);

    box-shadow: var(--shadow-hover);
}


/* =========================================================
   Section Titles
========================================================= */

h2 {
    position: relative;

    display: inline-block;

    margin: 0 0 30px;

    padding-left: 22px;

    font-size: 29px;

    letter-spacing: -0.7px;

    color: var(--blue-dark);
}


/*
   Red collar-style accent
*/

h2::before {
    content: "";

    position: absolute;

    left: 0;
    top: 8px;

    width: 7px;
    height: 29px;

    border-radius: 10px;

    background: var(--red);
}


/*
   Little yellow dot
*/

h2::after {
    content: "";

    position: absolute;

    width: 8px;
    height: 8px;

    right: -16px;
    top: 3px;

    border-radius: 50%;

    background: var(--yellow);
}


h3 {
    margin-bottom: 5px;

    color: #25384a;

    font-size: 19px;
}


/* =========================================================
   Text
========================================================= */

p {
    color: var(--text-soft);
}


/* =========================================================
   Research Interests
========================================================= */

ul {
    padding-left: 0;

    list-style: none;
}


ul li {
    position: relative;

    margin: 12px 0;

    padding:
        13px 18px
        13px 48px;

    border-radius: 15px;

    background:
        linear-gradient(
            90deg,
            #effaff,
            #ffffff
        );

    border:
        1px solid rgba(18, 150, 219, 0.12);

    transition: all 0.25s ease;
}


/*
   Doraemon-like blue circle bullet
*/

ul li::before {
    content: "";

    position: absolute;

    left: 18px;
    top: 50%;

    width: 13px;
    height: 13px;

    transform: translateY(-50%);

    border-radius: 50%;

    background: var(--blue);

    border:
        3px solid white;

    box-shadow:
        0 0 0 2px rgba(18, 150, 219, 0.20);
}


ul li:hover {
    transform: translateX(6px);

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


/* =========================================================
   Education / Experience
========================================================= */

.entry {
    position: relative;

    margin-top: 20px;

    padding: 24px 28px;

    border-left:
        5px solid var(--blue);

    border-radius:
        0 17px 17px 0;

    background:
        linear-gradient(
            90deg,
            rgba(18, 150, 219, 0.08),
            rgba(255, 255, 255, 0)
        );

    transition: transform 0.25s ease;
}


.entry:hover {
    transform: translateX(6px);
}


.entry h3 {
    margin-top: 0;

    color: var(--blue-dark);
}


.entry p {
    margin: 4px 0;
}


/* =========================================================
   Publications
========================================================= */

.publication {
    position: relative;

    margin:
        20px 0 30px;

    padding:
        26px 28px;

    overflow: hidden;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f5fcff
        );

    border:
        2px solid rgba(18, 150, 219, 0.12);

    box-shadow:
        0 6px 20px rgba(18, 150, 219, 0.06);

    transition: all 0.25s ease;
}


/*
   Blue strip
*/

.publication::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 6px;
    height: 100%;

    background: var(--blue);
}


.publication:hover {
    transform: translateY(-5px);

    border-color:
        rgba(18, 150, 219, 0.30);

    box-shadow:
        0 16px 35px rgba(18, 150, 219, 0.13);
}


.publication strong {
    color: #263849;
}


.publication a {
    display: inline-block;

    margin-top: 5px;

    padding: 7px 15px;

    border-radius: 999px;

    color: white;

    font-weight: 700;

    font-size: 14px;

    text-decoration: none;

    background: var(--blue);

    transition: all 0.2s ease;
}


.publication a:hover {
    background: var(--red);

    transform: translateY(-2px);
}


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

.project {
    margin: 20px 0;

    padding: 25px;

    border:
        2px solid rgba(18, 150, 219, 0.13);

    border-radius: 20px;

    background: white;

    transition: all 0.25s ease;
}


.project:hover {
    transform: translateY(-5px);

    border-color: var(--blue);

    box-shadow:
        0 15px 30px rgba(18, 150, 219, 0.12);
}


/* =========================================================
   General Links
========================================================= */

a {
    color: var(--blue-dark);

    text-underline-offset: 4px;

    transition: color 0.2s ease;
}


a:hover {
    color: var(--red);
}


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

footer {
    position: relative;

    width: min(1000px, calc(100% - 40px));

    margin: 75px auto 40px;

    padding: 35px;

    text-align: center;

    border-top:
        2px solid rgba(18, 150, 219, 0.14);
}


footer::before {
    content: "●";

    display: block;

    margin-bottom: 5px;

    color: var(--yellow);

    font-size: 24px;

    text-shadow:
        0 0 0 var(--blue);
}


footer p {
    color: #94a3b8;

    font-size: 14px;
}


/* =========================================================
   Highlight selection
========================================================= */

::selection {
    color: white;

    background: var(--blue);
}


/* =========================================================
   Scrollbar
========================================================= */

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


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


::-webkit-scrollbar-thumb {
    background: var(--blue);

    border-radius: 10px;

    border:
        2px solid #eef9ff;
}


/* =========================================================
   Tablet
========================================================= */

@media (max-width: 850px) {

    nav {
        justify-content: flex-start;

        overflow-x: auto;

        white-space: nowrap;
    }


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


    header {
        margin-top: 55px;

        padding: 60px 40px;
    }


    section {
        padding: 36px 32px;
    }
}


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

@media (max-width: 600px) {

    nav {
        top: 8px;

        width:
            calc(100% - 20px);

        margin: 10px auto;
    }


    nav a {
        padding: 8px 11px;

        font-size: 13px;
    }


    header {
        width:
            calc(100% - 24px);

        margin:
            40px auto 30px;

        padding:
            50px 25px;

        border-radius: 24px;
    }


    header::before {
        width: 230px;
        height: 230px;

        right: -120px;
        top: -120px;
    }


    header::after {
        width: 65px;
        height: 65px;

        right: 40px;
        bottom: -25px;

        border-width: 5px;
    }


    header h1 {
        font-size: 45px;

        letter-spacing: -2px;
    }


    header p {
        font-size: 16px;
    }


    section {
        width:
            calc(100% - 24px);

        margin: 18px auto;

        padding: 30px 24px;

        border-radius: 21px;
    }


    h2 {
        font-size: 24px;
    }


    .publication,
    .project {
        padding: 20px;
    }
}
/* =========================================================
   GTR R35 Desktop Cars
========================================================= */

#car-world {
    position: fixed;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    pointer-events: none;

    z-index: 1;
}


.desktop-car {
    position: absolute;

    top: 0;
    left: 0;

    width: 90px;
    height: auto;

    user-select: none;
    pointer-events: none;

    will-change: transform;

    filter:
        drop-shadow(
            0 7px 8px
            rgba(0, 0, 0, 0.20)
        );
}

nav,
header,
section,
footer {
    position: relative;

    z-index: 10;
}
