:root {
    --background: #FAF8F3;
    --primary: #E97451;
    --secondary: #E9CB86;
    --accent: #9CB380;
    /* --text: #454545; */
    --text: #3A3A3A;
    --neon-green: #81ca14;

    --land-btn-hover: #D66845;
    --land-btn-secondary-hover: #D4B86B;

    --accent-hover: #7A8B60;
    --svg-icon-hover: #F9F6EF;

    --project-link-hover: #5e970f;
    --highlight-colour: #E97451;

    --hover-text-1: #F9F6EF;
    --hover-text-2: #F9F6EF;

    --navbar-bg: #ECD29A;
    --navbar-scrolled: rgba(236, 210, 154, 0.9);

    --footer-bg: #454545;
    --footer-text: #E97451;
    --experience-title-about-page: #737070;
}

/* dark mode variables */
[data-theme="dark"] {
    --background: #353a40;
    --primary: #1F3A63;
    --secondary: #F5A623;
    --accent: #5b96c8;
    --text: #f2f2f2;
    --neon-green: #81ca14;

    --land-btn-hover: #163051;
    --land-btn-secondary-hover: #e0a91f;

    /* --hover-text-1: #81ca14; */
    --hover-text-1: #F5A623;
    --hover-text-2: #000000;

    --navbar-bg: #D98C1F;
    --navbar-scrolled: rgba(217, 140, 31, 0.9);
    --highlight-colour: #F5A623;

    --accent-hover: #4a85b0;
    --svg-icon-hover: #81ca14;

    --project-link-hover: #b8ff5c;

    --footer-bg: #2b2f36;
    /* --footer-bg: #2e3b4e; */
    /* kept as a second option*/
    --footer-text: #5b96c8;
    --experience-title-about-page: #ccbbbb;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--background);
    flex-direction: column;
    min-height: 100vh;
    /* ensure full viewport height */
    display: flex;


    /* reduce flash when moving between pages */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

body.loaded {
    opacity: 1;
}

* {
    font-family: "Quicksand", sans-serif;
    margin: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box
}

/* navigation bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--navbar-bg);
    z-index: 9999;
}

.navbar .logo {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 0.4rem;
    margin-right: auto;
    align-items: center;
    margin-right: auto;

    img {
        height: 40px;
        cursor: pointer;
        margin-left: 0.5rem;
    }
}

.navbar .logo a:hover {
    color: var(--text);
}

.navbar .navbar-nav {
    display: flex;
}

.navbar .navbar-nav a {
    color: var(--text);
    display: inline-block;
    font-size: 1.5rem;
    margin-right: 3rem;
    text-decoration: none;
}

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

.navbar .navbar-extra a {
    color: var(--text);
    margin: 0 0.5rem;
}

.navbar .navbar-extra a:hover {
    color: var(--primary);
}

#hamburger-menu {
    display: none;
}


.navbar.scrolled {
    background-color: var(--navbar-scrolled);
    backdrop-filter: blur(5px);
    /* safari */
    -webkit-backdrop-filter: blur(5px);
}

.navbar a {
    /* keeps link colour consistent */
    color: inherit;
    text-decoration: none;
    outline: none;
    /* smooth colour change on hover */
    transition: color 0.2s ease;
}

.navbar a:focus,
.navbar a:active {
    /* remove flash when clicked */
    outline: none;
    color: inherit;
    background: transparent;
}

.navbar a:focus {
    text-decoration: underline;
    outline: none;
}

/* navbar CSS ends */

/* general */
.container {
    margin: 4rem 2.5rem;
    flex: 1;
    /* this makes the container take all available space */
    padding-top: 24px;
}

.content {
    padding: 16px;
}

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

h1,
h2,
h3,
h4,
p,
li {
    color: var(--text);
}

p {
    font-size: 1.375rem;
    /* 22px */
    line-height: 1.6;
    /* ~35px line height for readability */
    margin-bottom: 1em;
    font-weight: 500;
}

h3 {
    font-size: 2.063rem;
    /* ~33px (22 × 1.5) */
    line-height: 1.3;
    margin-bottom: 0.75em;
}

h2 {
    font-size: 3.094rem;
    /* ~49.5px (33 × 1.5) */
    line-height: 1.2;
    margin-bottom: 0.75em;
}

h1 {
    font-size: 4.641rem;
    /* ~74.25px (49.5 × 1.5) */
    line-height: 1.1;
    margin-bottom: 0.75em;
}


#home,
#about,
#projects,
#contact {
    padding: 3rem;
}

#about-page-about-section {
    padding-top: 3rem;
    padding-right: 3rem;
    padding-left: 3rem;
    padding-bottom: 0.5rem;
}

#experience {
    padding-top: -2rem;
    padding-left: 3rem;
    padding-right: 3rem;
    padding-bottom: 3rem;
}


/* landing page */
.landing-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    /* for responsiveness on smaller screens */
    flex-wrap: wrap;
}

.landing-text {
    flex: 1;
    min-width: 250px;
}

.landing-content,
.short-about {
    margin-top: 10px;
    margin-bottom: 20px;
}

.land-button,
.land-button-secondary-colour {
    border: none;
    padding: 14px 20px;
    border-radius: 20px;
    margin-top: 18px;
    cursor: pointer;
    font-size: medium;
    position: relative;
    /* allow ::before outside */
    overflow: visible;
    z-index: 0;
    transition: background-color 0.3s, color 0.3s, transform 0.2s, box-shadow 0.2s;
}

.land-button {
    background-color: var(--primary);
    color: var(--text);
}

.land-button:hover {
    background-color: var(--land-btn-hover);
    color: var(--hover-text-1);
}

.land-button-secondary-colour {
    background-color: var(--secondary);
    color: var(--text);

}

.land-button-secondary-colour:hover {
    background-color: var(--land-btn-secondary-hover);
    color: var(--hover-text-2);
}

.land-button:hover,
.land-button-secondary-colour:hover {
    /* slighltly enlarge buttons */
    transform: scale(1.05);
    /* subtle depth */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}


.landing-wrapper {
    display: flex;
    /* vertically aligns things at the centre */
    align-items: center;
    /* note: space-between pushes two sides apart */
    /* justify-content: space-between; */
    justify-content: flex-start;
    /* pack items close to start */
    /* for spacing between text and image */
    /* gap: 0.1rem; */
    gap: 3rem;
    /* much more space between text and image */
    margin-top: 1rem;
    flex-wrap: wrap;
    /* allows stacking on small screens */
}

/* make text and image each take some space */
.landing-text {
    flex: 1;
}

/* limit image size and align right */
.landing-image img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 50px;
    object-fit: cover;

    object-fit: cover;
    display: block;

    /* adjust margin */
    margin-top: auto;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: 5rem;
}


/* (homepage) image emoji css start */
/* container */
.landing-image {
    position: relative;
    display: inline-block;
    /* allow emojis outside */
    overflow: visible;
}

/* floating emojis */
.emoji {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Positions */
.emoji1 {
    top: 5%;
    left: 10%;
}

.emoji2 {
    top: 15%;
    right: 12%;
}

.emoji3 {
    bottom: 15%;
    left: 20%;
}

.emoji4 {
    bottom: 22%;
    right: 1%;
}

.emoji5 {
    bottom: 3%;
    left: 5%;
}

.emoji6 {
    top: 4%;
    left: 80%;
}

.emoji7 {
    top: 12%;
    left: 5%;
}

.emoji8 {
    bottom: 14%;
    left: 20%;
}

.emoji9 {
    bottom: 22%;
    right: 1%;
}

.emoji10 {
    bottom: 28%;
    left: 4%;
}

/* (homepage) image emoji css end */

/* Hover: fade in + float + rotate */
.landing-image:hover .emoji {
    opacity: 1;
    animation: float 3s ease-in-out infinite, rotate 18s linear infinite;
}

/* Float up and down */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Slow rotation */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Image zoom on hover (optional) */
.landing-image:hover img {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 150, 255, 0.2);
}

/* (homepage) image emoji css end */


.about-image img {
    margin-bottom: 4rem;
    margin-right: 2rem;
}

/* brief about */
.short-about {
    margin-bottom: 5px;
}

.dev-list {
    display: flex;
    /* allow list to wrap*/
    flex-wrap: wrap;
    justify-content: center;
    /* for small devices */
    gap: 2rem;
    /* left, right, and bottom margins are 25px, top is 38px */
    margin: 38px 25px;

    color: var(--accent);
}

.dev-desc {
    /* each item can adjust (shrink/grow), min width of 150px */
    flex: 1 1 150px;
    /* keeps item from getting to wide */
    max-width: 200px;
    display: flex;
    flex-direction: column;
    /* centers icon and text horizontally */
    align-items: center;
    /* centers text */
    text-align: center;
}

.dev-desc-text {
    /* margin-right: 10rem; */
    margin: 0;
}

#view-more-about-button {
    margin-top: 0rem;
}

/* about page */
.experience-wrapper {
    display: flex;
    /* stacks vertically, default value is row */
    flex-direction: column;
    gap: 2rem;

    padding-left: 2rem;
    padding-bottom: 1rem;
    padding-right: 3rem;
    padding-top: 0.5rem;
}

.experience-card {
    display: flex;
    flex-direction: column;
}

.experience-title {
    display: flex;
    gap: 1rem;
}

.experience-title h3 a {
    color: #81ca14;
}

#about-page-about-section h2,
#experience h2 {
    color: var(--accent);
}

.experience-title h3 {
    color: var(--experience-title-about-page);
}

.projects-showcase {
    /* arrange cards in a row */
    display: flex;
    /* space between cards */
    gap: 20px;
    /* wrap to next line if screen dimension is small */
    flex-wrap: wrap;

    justify-content: center;
    /* prevent cards in same row from stretching */
    align-items: flex-start;
}

/* Homepage project showcase */
.homepage .projects-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    /* cards in the same row match tallest */
    align-items: stretch;
}

.project-card {
    /* grow/shrink, base 300px */
    flex: 1 1 300px;
    /* avoid getting too small */
    min-width: 250px;
    /* avoid getting too big */
    max-width: 400px;
    padding: 20px;
    border-radius: 10px;
    background-color: #ECE6DB;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: var(--text);
    transition: transform 0.2s, background-color 0.3s;

    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card.hidden {
    /* fully remove from layout */
    display: none !important;
    opacity: 0;
    transform: scale(0.95);
    /* so you can’t click hidden cards */
    pointer-events: none;
}


[data-theme="dark"] .project-card {
    background-color: #444B52;
    color: var(--text);
}

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

.homepage .project-card {
    /* grow/shrink */
    flex: 1 1 300px;
    min-width: 250px;
    max-width: 400px;
    display: flex;
    /* content flows properly */
    flex-direction: column;
    padding: 20px;
    border-radius: 10px;
    background-color: #ECE6DB;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.status-badge {
    /* prevents stretching, fits content */
    display: inline-flex;

    /* vertical centering */
    align-items: center;

    /* horizontal centering inside badge */
    justify-content: center;

    /* slightly smaller for better fit on mobile */
    font-size: 0.9rem;
    font-weight: bold;
    /* adjust for visual balance */
    padding: 4px 10px;
    border-radius: 12px;

    /* small spacing, no huge fixed margin */
    /* top/right/bottom/left */
    margin: 0 0.5rem 0.5rem 0;

    /* prevents text from breaking */
    white-space: nowrap;
}

.status-badge.completed {
    background-color: var(--accent);
    color: #F9F6EF;
}

.status-badge.ongoing {
    background: var(--primary);
    color: #F9F6EF;
}

.status-badge.learning {
    background: var(--neon-green);
    color: #3A3A3A;
}

#note {
    font-size: 1.1rem;
    font-style: italic;
    margin-top: 10px;
}

/* project link (homepage) */
#project-github-link a {
    /* pick a theme color */
    color: var(--project-link-hover);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

#project-github-link a:hover {
    color: var(--highlight-colour)
}

/* project transition from homepage to projects.html */
.project-card h3 a {
    /* Keep text color consistent */
    color: inherit;
    /* Remove underline */
    text-decoration: none;
    /* Remove default focus outline */
    outline: none;
    /* Optional: smooth color change on hover */
    transition: color 0.2s ease;
}

.project-card h3 a:focus,
.project-card h3 a:active {
    /* Prevent flashing on click */
    outline: none;
    /* Keep color same when clicked */
    color: inherit;
}

/* accessibility focus */
.project-card h3 a:focus {
    text-decoration: underline;
    outline: none;
}

.project-card h3,
.project-card .status-badges-container {
    display: flex;
    /* space between badges */
    gap: 0.5rem;
    /* wrap if needed on small screens */
    flex-wrap: wrap;
}




/* projects page */
.projects-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.project-card {
    width: 300px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.3s;
    color: var(--text);
    /* min-height: 180px; */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.project-link {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
}

[data-theme="dark"] .project-card {
    /* subtle dark card background */
    background-color: #444B52;
    color: var(--text);
}

[data-theme="dark"] .project-link {
    color: var(--accent);
}

/* expandable project card css (projects.html) */
.full-project-card-content {
    display: none;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
    margin-top: 0.5rem;
    font-weight: 900;
    font-size: 1.2rem;
}

.read-more-btn:hover {
    /* text-decoration: underline; */
    color: var(--highlight-colour);
}



/* misc */
#email-address {
    color: #F5A623;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;

    /* adjust position to be slightly above the logo */
    /* moves button upward relative to the normal position */
    position: relative;
    top: -8px;
    /* keeps it from clashing/bumping the (text) logo */
    margin-right: 8px;
}

#theme-toggle:hover {
    color: var(--accent);
    /* tiny lift on hover for visual feedback*/
    transform: translateY(-2px);
    transition: transform 0.2s ease, color 0.2s ease;
}

#intern-link {
    text-decoration: none;
    color: var(--highlight-colour);
}

#intern-link:hover {
    color: var(--neon-green);
}

body,
.project-card,
.status-badge,
button,
nav,
footer {
    transition: background-color 0.4s ease, color 0.4s ease;
}


.socials {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    margin-left: 1.5rem;
    margin-right: 1.5rem;

    cursor: pointer;
}

.socials a {
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;

    transition: background-color 0.3s ease;
    text-decoration: none;
}

.socials svg {
    stroke: var(--text);
}

.socials a:hover {
    background-color: var(--accent-hover);
}

.socials svg:hover {
    stroke: var(--svg-icon-hover);
}

.filter-buttons {
    margin-bottom: 20px;
    text-align: center;
}

.filter-btn {
    background: var(--secondary);
    color: var(--text);
    border: none;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.filter-btn:hover {
    background: var(--land-btn-secondary-hover);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
}



#companion {
    position: fixed;
    top: 100px;
    left: 100px;
    width: 110px;
    height: auto;
    cursor: grab;
    transition: transform 0.2s, filter 0.2s;
    z-index: 9999;
    user-select: none;
}

#companion.dragging {
    cursor: grabbing;
}


/* footer */
footer {
    margin-top: auto;
    width: 100%;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    font-size: 18px;
    text-align: center;
    padding: 5px;
}


/* media queries */
/* laptop */
@media (max-width: 1366px) {
    html {
        font-size: 75%;
    }
}

/* tablet */
@media (max-width: 768px) {
    html {
        font-size: 62.5%;
    }

    /* landing page image adjust */
    .landing-image img {
        max-width: 225px;
        width: 100%;
        height: auto;
        border-radius: 50px;
        object-fit: cover;

        /* adjust margin */
        margin-top: auto;
        margin-bottom: 2rem;
        margin-left: auto;
        margin-right: 2rem;
    }

    /* sidebar menu  */
    #hamburger-menu {
        display: inline-block;
    }

    .navbar .navbar-nav {
        display: flex;
        flex-direction: column;
        /* stack vertically */
        position: absolute;
        top: 100%;
        right: -100%;
        /* background-color: #D4B77B; */
        background-color: #beb197;
        width: 30rem;
        height: 100vh;
        transition: 0.3s;
    }

    .navbar .navbar-nav.active {
        right: 0;
    }

    .navbar .navbar-nav a {
        /* color: ; */
        display: block;
        margin: 1.5rem;
        padding: 0.5rem;
        font-size: 2rem;
    }

    [data-theme="dark"] .navbar .navbar-nav {
        background-color: #2e3b4e;
    }

    [data-theme="dark"] .navbar .navbar-nav a:hover {
        color: var(--secondary);
    }

}

/* mobile phone */
@media (max-width: 450px) {
    html {
        font-size: 55%;
    }

    .landing-wrapper {
        /* stack vertically */
        flex-direction: column;
        /* center text and image */
        align-items: center;
        /* spacing between text and image */
        gap: 2rem;
        text-align: center;
    }

    .landing-image img {
        max-width: 180px;
        margin: 0 auto 2rem auto;
        /* shrink further for small screens */
    }
}

/* media queries for dev list in landing page */
/* for tablets and larger devices */
@media (min-width: 768px) {
    .dev-list {
        /* keep in one row */
        flex-wrap: nowrap;
        gap: 10rem;
    }
}

/* media queries end*/