html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand / core colors*/
    --primary-color: #b6974a;
    --secondary-color: #F0FFF0;
    --accent-color: goldenrod;
    --text-color: rgb(205, 197, 197);
    --background-color: linear-gradient(135deg, #111, #353535);
    --secondary-bg-color: #4e3e0f;
    --main-dark-bg: linear-gradient(135deg, #111, #111, #4e3e0f);
    --secondary-dark-bg: #f3e1a0;

    /* Transition */
    --transation-cubic: all 0.45s cubic-bezier(.71, .12, .21, .85);

    /* Helper variables */
    --goldenrod: goldenrod;
    --gold: gold;
    --darkgold: darkgoldenrod;
    --whitesmoke: whitesmoke;
    --mid-gray: #353535;
    --card-bg: #1f1f1f;
    --card-alt-bg: #2a2a2a;
    --muted: #ccc;
    --accent-light: rgb(242, 221, 160);
    --card-border-translucent: rgba(255, 255, 255, 0.1);
    /* nav link color token (desktop override uses this) */
    --nav-link-color: rgba(255, 255, 255, 0.7);
}

/* Light theme overrides (toggle by setting `data-theme="light"` on <html>) */
:root[data-theme="light"] {
    --background-color: linear-gradient(135deg, #f6f6f6, #eaeaea);
    --main-dark-bg: linear-gradient(135deg, #fafafa, #f0f0f0);
    --secondary-bg-color: #f3e6c2;
    --secondary-dark-bg: #fff3d6;

    --whitesmoke: #111111;
    /* text on light bg */
    --text-color: #353535;
    --mid-gray: #d0d0d0;
    --card-bg: #ffffff;
    --card-alt-bg: #fbfbfb;
    --muted: #333333;
    --card-border-translucent: rgba(0, 0, 0, 0.06);

    /* keep accents the same so visuals remain consistent */
    --goldenrod: goldenrod;
    --gold: gold;
    --darkgold: darkgoldenrod;
    --nav-link-color: rgba(0, 0, 0, 0.7);
}

/* Base */
body {
    font-family: 'Georgia', Times, serif;
    color: var(--primary-color);
    margin-top: 55px;
    background: var(--background-color);
    width: 100%;
}

a {
    color: var(--whitesmoke);
    text-decoration: none;
}

/* ----------- container ------------ */
.profile-container {
    width: 100%;
    margin: 0 auto;
}

/* ----------- Nav Bar ------------ */
/* The Base Style for DP (Centered) */
.profile-image {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--goldenrod);
    z-index: 100;
    transition: var(--transation-cubic);
}

/* Sticky state */
body.is-scrolled .profile-image {
    position: fixed;
    top: 21px;
    left: 21px;
    transform: translateX(0) scale(0.6);
    box-shadow: 0 0 20px 1px var(--secondary-bg-color);
    color: var(--whitesmoke);
}

nav {
    position: fixed;
    color: var(--nav-link-color);
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    height: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: var(--main-dark-bg);
    padding: 20px 0;
    border-bottom: 1px solid var(--goldenrod);
    border-radius: 0 0 0 88px;
    z-index: 99;
    transition: var(--transation-cubic);
}

.nav-title {
    color: transparent;
    transform: translate(-50%) scale(0.4);
    position: absolute;
    top: 50px;
    left: 50px;
    transition: var(--transation-cubic);
}

body.is-scrolled-contact .nav-title {
    position: static;
    transform: translate(0) scale(1);
    color: var(--primary-color);
}

body.is-scrolled-contact .nav-hidden-cont {
    display: none;
}

nav a {
    font-size: 0.7em;
    color: var(--whitesmoke);
    padding: 0 0.2em;
    transition: var(--transation-cubic);
}

nav a:hover,
nav a:focus {
    color: var(--goldenrod);
    text-shadow: 0 0 2px var(--gold);
    text-decoration: underline;
}

/* ----------- Header ------------ */
.profile-header {
    position: relative;
    width: 100%;
    height: calc(100vh - 50px);
    text-align: center;
    margin: 0 auto;
    background: var(--main-dark-bg);
    padding: 1em;
    border-top: 1px solid var(--goldenrod);
    border-radius: 80px 0 0 0;
    transition: var(--transation-cubic);
}

hr {
    position: static;
    border: none;
    box-shadow: 0 0 100px 20px var(--secondary-bg-color);
    margin: 0 auto;
    width: 100%;
}

.icons-hr {
    border: none;
    box-shadow: 0 0 100px 55px darkblue;
}

/* ------------- Contact -------------- */
.contact-info {
    margin: 30px auto 0;
    padding: 0;
    font-size: 1.3em;
    transition: all 0.3s ease-in-out;
    border-radius: 0 0 10px 55px;
}

#contact-heading {
    text-align: center;
    font-size: 1.7em;
}

.contact-note {
    font-size: 1.05em;
    color: var(--text-color);
    text-align: justify;
    line-height: 1.7;
    padding: 0.5em 0.5em 1em;
}

.profile-name {
    font-size: 2em;
    font-style: oblique;
    margin: 170px 0 0 0;
}

.profission {
    font-size: 1.2em;
    font-style: oblique;
}

.bio {
    font-size: 1.5em;
    color: var(--whitesmoke);
    margin-top: 5px;
    text-align: justify;
    text-align-last: center;
    line-height: 1.65;
    font-style: italic;
}

.contact-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    height: 50px;
    position: relative;
    background: transparent;
}

.icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    font-size: 0.65em;
    color: var(--whitesmoke);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: var(--transation-cubic);
    z-index: 100;
}

body.is-scrolled-contact .icons {
    position: fixed;
    top: 65px;
    left: 3px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(0);
    background: var(--mid-gray);
    box-shadow: 1px 1px 0 0 var(--whitesmoke);
    padding: 3px;
    border-radius: 8px;
    color: var(--whitesmoke);
}

.contacts-icons {
    font-size: 2.2em;
    color: var(--whitesmoke);
    transition: var(--transation-cubic);
    cursor: pointer;
}

body.is-scrolled-contact .contacts-icons {
    font-size: 2em;
    color: var(--goldenrod);
}

.contacts-icons:hover,
.contacts-icons:focus {
    color: var(--goldenrod);
    text-shadow: 0 0 20px black;
    transform: scale(1.1);
}

/* ----------- Skills ------------ */
.skills-section {
    padding: 4em 0.5em;
    color: var(--whitesmoke);
}

.section-title {
    text-align: center;
    font-size: 2em;
    margin-bottom: 2em;
    letter-spacing: 2px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2em;
    margin: 0 auto;
    position: relative;
}

.skill-card {
    box-sizing: border-box;
    width: 100%;
    background: var(--card-bg);
    padding: 2em;
    border-radius: 1em;
    border: 1px solid var(--card-border-translucent);
    transition: all 0.3s ease;
    margin: 0 auto;
}

.skill-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1em;
    margin-bottom: 1em;
    position: relative;
}

.skill-header i {
    font-size: 2.5em;
    color: var(--gold);
}

i.html,
i.css,
i.js,
i.frontend {
    color: transparent;
}

.skill-badge {
    margin-left: auto;
    background: var(--gold);
    color: black;
    padding: 0.3em 1em;
    border-radius: 1em;
    font-size: 0.75em;
    font-weight: bold;
    text-align: center;
}

.learning-badge {
    background: darkorange;
}

.skill-description {
    line-height: 1.6;
    font-size: 0.95em;
    opacity: 0.9;
}

/* =============== Floating icons =============== */
body.is-scrolled-skills-html .nav-skills {
    position: fixed;
    color: var(--goldenrod);
    background: var(--mid-gray);
    border-radius: 8px 8px 0 0;
    box-shadow: -1px 1px 0 var(--whitesmoke);
    padding: 5px;
    font-size: 1em;
    font-weight: bold;
    top: 75px;
    left: calc(25px + 72px + 0.5em);
    transform: translateX(0) scale(0.9) rotate(-90deg);
    z-index: 100;
}

.nav-skills::after {
    content: "";
    display: block;
    position: absolute;
    top: 19px;
    left: 0;
    width: 55.375px;
    height: calc(100vw - 180px);
    transform: translateX(50%) rotate(-90deg);
    max-height: 200px;
    background: transparent;
    border-radius: 0 0 8px 8px;
    box-shadow: -1px 1px 0 transparent;
    transition: var(--transation-cubic);
}

body.is-scrolled-skills-html .nav-skills::after {
    background: var(--mid-gray);
    transform: translateX(0) rotate(0);
    box-shadow: -1px 1px 0 var(--whitesmoke);
}

.icon {
    position: absolute;
    top: 0;
    left: 0;
    color: transparent;
    background-color: transparent;
    transition: var(--transation-cubic);
    transform: translateX(-50%);
    opacity: 0.9;
    font-size: 2.6em;
}

body.is-scrolled-skills-html .html {
    color: var(--goldenrod);
    position: fixed;
    top: 69px;
    bottom: auto;
    left: calc(25px + 72px + 0.5em + 40px);
    z-index: 100;
    transform: translateX(-50%) scale(0.7);
}

body.is-scrolled-skills-css .css {
    color: var(--goldenrod);
    position: fixed;
    top: 69px;
    bottom: auto;
    left: calc(25px + 72px + 0.5em + 70px);
    z-index: 100;
    transform: translateX(-50%) scale(0.7);
}

body.is-scrolled-skills-js .js {
    color: var(--goldenrod);
    position: fixed;
    top: 69px;
    bottom: auto;
    left: calc(25px + 72px + 0.5em + 100px);
    z-index: 100;
    transform: translateX(-50%) scale(0.7);
}

body.is-scrolled-skills-fd .frontend {
    color: var(--goldenrod);
    position: fixed;
    top: 69px;
    bottom: auto;
    left: calc(25px + 72px + 0.5em + 140px);
    z-index: 100;
    transform: translateX(-50%) scale(0.65);
}

/* ============== Certificates ============== */
.certifications-section {
    padding: 4em 0.5em;
    color: var(--whitesmoke);
}

.certifications-grid {
    display: grid;
    gap: 2em;
}

.certificate-card {
    background: var(--card-bg);
    padding: 2em;
    border-radius: 1em;
    border: 1px solid var(--card-border-translucent);
    transition: all 0.45s ease-in-out;
}

.certificate-card:hover {
    border-color: var(--gold);
}

.certificate-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.certificate,
.project-view {
    text-decoration: none;
    display: block;
    width: fit-content;
    background: var(--darkgold);
    color: var(--whitesmoke);
    padding: 0.75em 1.2em;
    border-radius: 1em;
    font-size: 0.75em;
    font-weight: bold;
    text-align: center;
    margin-top: 1em;
    transition: all 0.3s ease;
    cursor: pointer;
}

.certificate:hover,
.certificate:focus,
.project-view:hover,
.project-view:focus {
    background: var(--goldenrod);
    box-shadow: 0 0 20px var(--goldenrod);
    transform: scale(1.05);
}

/* ----------- Timeline / Projects ------------ */
.learning-journey,
.projects-section {
    margin: 60px auto 60px 15px;
    max-width: 100%;
    padding: 2em;
}

.learning-journey h2,
.projects-section h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 1.5em;
    color: var(--whitesmoke);
}

.learning-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.learning-item {
    padding: 1em;
    border-left: 4px solid var(--goldenrod);
    background: var(--card-alt-bg);
    border-radius: 8px;
    color: var(--muted);
}

.learning-item.highlight {
    border-left: 4px solid orange;
    background: var(--mid-gray);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    color: var(muted);
}

.learning-date {
    display: block;
    font-weight: bold;
    color: var(--accent-light);
    margin-bottom: 0.5em;
}

.projects-grid {
    display: grid;
    gap: 2em;
}

.project-card {
    background: var(--card-alt-bg);
    padding: 1.5em;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.3s ease;
}

.project-card:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.project-card h3 {
    color: var(--gold);
    margin-bottom: 0.5em;
}

.project-card p {
    color: var(--muted);
    margin-bottom: 1em;
}

.featured-project {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.featured-project::before {
    content: "CLIENT PROJECT";
    display: inline-block;
    background: var(--darkgold);
    color: black;
    padding: 0.3em 0.8em;
    border-radius: 1em;
    font-size: 0.75em;
    font-weight: bold;
    margin-bottom: 1em;
}

.project-links {
    display: flex;
    justify-content: space-around;
}

/* ----------- Footer ------------ */
footer {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1em;
    padding: 1em;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-size: 0.7em;
    color: var(--muted);
    background: var(--main-dark-bg);
    border-top: 1px solid var(--goldenrod);
    border-radius: 45px 5px 0 0;
}

/* Theme toggle button (visible in both themes) */
.theme-toggle {
    position: fixed;
    right: 5px;
    top: 40px;
    width: 45px;
    height: 45px;
    text-align: center;
    background: var(--background-color);
    color: var(--whitesmoke);
    border: 1px solid var(--whitesmoke);
    padding: 0.5em 0.9em;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.70em;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    z-index: 2000;
    transition: var(--transation-cubic);
}

.theme-toggle:focus,
.theme-toggle:hover {
    outline: 2px solid gold;
    box-shadow: 0 6px 25px gold;
}

footer a {
    color: var(--darkgold);
    text-decoration: none;
}

footer a:hover,
.project-anchor:hover {
    text-decoration: underline;
}

footer a:focus {
    text-shadow: -2px 3px 10px var(--goldenrod);
}

/* ----------- Media Queries ------------ */
@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width:1020px) {
    :root {
        --transation-cubic: all 0.6s cubic-bezier(.71, .12, .21, .85);
    }

    html {
        scroll-padding-top: 0;
    }

    body {
        margin: 0;
    }

    /* Layout grid */
    .profile-container {
        display: grid;
        grid-template-columns: 340px 1fr;
        min-height: 100vh;
    }

    /* Sidebar */
    .profile-header {
        position: sticky;
        top: 0;
        height: 100vh;
        padding: 4em 2.5em;
        border: none;
        border-right: 1px solid var(--primary-color);
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        text-align: left;
        background: var(--main-dark-bg);
    }

    body.is-scrolled .profile-image {
        position: absolute;
        top: 50px;
        left: 80px;
        transform: translateX(-50%);
        width: 120px;
        height: 120px;
        object-fit: cover;
        border-radius: 50%;
        border: 2px solid var(--goldenrod);
        z-index: 100;
    }

    .profile-image {
        left: 80px;
        top: 50px;
    }

    .profile-name {
        margin: 50px auto 20px auto;
        font-size: 2em;
    }

    .profission {
        font-size: 1.2em;
        margin: 0 auto;
        text-align: center;
        margin-bottom: 1.5em;
    }

    .bio {
        font-size: 1em;
        text-align: justify;
        line-height: 1.6;
        margin-bottom: 2em;
    }

    /* Sidebar nav */
    nav {
        color: var(--whitesmoke);
        position: absolute;
        top: 10px;
        left: 60px;
        padding: 0;
        height: auto;
        border: none;
        background: none;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        gap: 1.2em;
    }

    nav a {
        color: var(--whitesmoke);
        font-size: 1.1em;
        transition: var(--transation-cubic);
        border-radius: 8px;
        box-shadow: -1px 1px 5px var(--whitesmoke);
        padding: 0.5em 1.1em;
        font-weight: bold;
    }

    body.is-scrolled-skills-html .nav-skills {
        position: unset;
        font-size: 1.1em;
        color: var(--nav-link-color);
        background: none;
        border-radius: 8px;
        box-shadow: -1px 1px 5px var(--whitesmoke);
        padding: 0.5em 1.1em;
        font-weight: bold;
        transform: translateX(0) scale(1) rotate(0);
        transition: var(--transation-cubic);
    }

    nav a:hover {
        color: var(--primary-color);
        opacity: 1;
        transform: translateX(4px);
        text-decoration: none;
    }

    .nav-title,
    .nav-hidden-cont,
    .nav-skills::after,
    body.is-scrolled-skills-html .nav-skills::after,
    .icon {
        display: none;
    }

    /* Social icons (sidebar bottom) */
    .icons {
        position: static;
        transform: none;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 1.2em;
        margin-top: 2em;
        background: var(--mid-gray);
        box-shadow: 1px 1px 10px 0 var(--whitesmoke);
        padding: 0.25em;
        border-radius: 8px;
    }

    .contacts-icons {
        font-size: 2.5em;
    }

    body.is-scrolled-contact .icons {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        width: 339px;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        gap: 1.2em;
        background: var(--mid-gray);
        box-shadow: none;
        padding: 0.5em;
        border-radius: 0;
    }

    /* Main content */
    .main-content {
        padding: 5em 2em 0 2em;
        max-width: 1200px;
    }

    .section-title {
        text-align: left;
        font-size: 2.2em;
        margin: 1em 0;
    }

    /* Grids */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5em;
    }

    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5em;
    }

    .learning-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5em;

    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5em;
    }

    .skill-card,
    .certificate-card,
    .project-card,
    .learning-item {
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .project-card:hover,
    .certificate-card:hover {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        transform: translate(-2px, -2px);
    }

    /* Floating icons adjustments for desktop */
    .skills-icons {
        width: 339px;
        font-size: 0.8em;
        position: fixed;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 2em;
        left: 0;
        bottom: 65px;
        padding: 0.5em;
        color: var(--gold);
        background: var(--mid-gray);
        transition: var(--transation-cubic);
    }

    .icon {
        position: unset;
        top: unset;
        left: unset;
        color: unset;
        background-color: unset;
        transition: var(--transation-cubic);
        transform: unset;
        opacity: unset;
        font-size: 2.6em;
    }

    body.is-scrolled-contact .html,
    body.is-scrolled-contact .css,
    body.is-scrolled-contact .js,
    body.is-scrolled-contact .frontend {
        color: var(--goldenrod);
        position: unset;
        top: unset;
        bottom: unset;
        left: unset;
        z-index: 100;
        transform: unset;
    }

    body.is-scrolled-skills-css .html {
        color: var(--goldenrod);
        position: unset;
        top: unset;
        bottom: unset;
        left: unset;
        z-index: 100;
        transform: unset;
    }

    body.is-scrolled-skills-css .css {
        color: var(--goldenrod);
        position: unset;
        top: unset;
        bottom: unset;
        left: unset;
        z-index: 100;
        transform: unset;
    }

    body.is-scrolled-skills-js .js {
        color: var(--goldenrod);
        position: unset;
        top: unset;
        bottom: unset;
        left: unset;
        z-index: 100;
        transform: unset;
    }

    body.is-scrolled-skills-fd .frontend {
        color: var(--goldenrod);
        position: unset;
        top: unset;
        bottom: unset;
        left: unset;
        z-index: unset;
        transform: unset;
    }

    /* Footer tweaks */
    footer {
        font-size: 1.2em;
        width: 100%;
        background: transparent;
        margin: 0 auto;
        border-radius: 0;
        border-top: 1px solid var(--primary-color);
        padding: 0.58em 0;
    }
}

@media (min-width:1800px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width:768px) and (orientation:landscape) {
    .custom-cursor {
        position: fixed;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        pointer-events: none;
        background: transparent;
        box-shadow: 0 0 50px 10px rgba(255, 215, 0, 0.8);
        transform: translate(-50%, -50%);
        z-index: 9999;
    }

    .certifications-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 3em;
    }

    .learning-list {
        list-style: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 3em;
    }

    .projects-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2em;
    }
}
