/* =========================================================
   FIADH ALBA
   ========================================================= */


:root {

--background: #eeece2;
--surface: #f7f4e9;
--surface-soft: #e2dfd3;

    --text: #252a27;
    --muted: #737872;

    --forest: #1f5e3b;
    --forest-dark: #17462c;

    --slate: #38434a;
    --heather: #6b4e8e;
    --gold: #c9a44c;

    --border: rgba(37, 42, 39, 0.32);

    --shadow:
        0 20px 60px rgba(30, 40, 32, 0.10);

    --transition: 0.35s ease;
}


body.dark-mode {

    --background: #17231d;
    --surface: #213128;
    --surface-soft: #293a2f;

    --text: #f1ede2;
    --muted: #aeb7ae;

    --forest: #2f704a;
    --forest-dark: #1f5235;

    --slate: #536169;
    --heather: #80629a;
    --gold: #c9a44c;

    --border: rgba(241, 237, 226, 0.16);

    --shadow:
        0 20px 70px rgba(0, 0, 0, 0.35);
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    margin: 0;

    min-height: 100vh;

    background: var(--background);

    color: var(--text);

    font-family: "Inter", sans-serif;

    transition:
        background var(--transition),
        color var(--transition);
}





/* =========================================================
   THEME BUTTON
   ========================================================= */


.theme-toggle {

    position: fixed;

    top: 20px;
    right: 20px;

    z-index: 1000;

    width: 46px;
    height: 46px;

    border-radius: 50%;

    border: 1px solid var(--border);

    background: var(--surface);

    color: var(--text);

    cursor: pointer;

    font-size: 18px;

    box-shadow: var(--shadow);

    transition:
        transform .25s ease,
        background var(--transition),
        color var(--transition);
}


.theme-toggle:hover {

    transform:
        rotate(20deg)
        scale(1.08);
}



/* =========================================================
   SECTIONS
   ========================================================= */


.page-section {

    display: none;

    min-height: 100vh;

    padding:
        80px
        30px;
}


.page-section.active {
    display: block;
}



/* =========================================================
   HOME
   ========================================================= */


#home {

    display: none;

    align-items: center;
    justify-content: center;

    min-height: 100vh;

    text-align: center;

    overflow: visible;
}


#home.active {
    display: flex;
}


.home-content {

    width: 100%;

    max-width: 1100px;

    margin: auto;
}



/* =========================================================
   LOGO
   ========================================================= */


.fiadh-logo {

    width: min(550px, 70vw);

    margin:
        0
        auto
        12px;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    position: relative;

    z-index: 5;
}


.fiadh-logo img {

    width: 100%;
    height: auto;

    display: block;

    object-fit: contain;

    filter:
        drop-shadow(
            0 12px 22px rgba(0, 0, 0, .12)
        );

    transform: scale(1);

    transition:
        transform .25s ease,
        filter .4s ease;
}


.fiadh-logo:hover img {

    transform:
        scale(1.025);
}


body.dark-mode .fiadh-logo img {

    filter:
        drop-shadow(
            0 12px 28px rgba(0, 0, 0, .42)
        );
}


/* Easter egg enlargement */

.fiadh-logo.enlarging img {

    transform:
        scale(1.25);
}



/* =========================================================
   HOME TITLE
   ========================================================= */


#siteTitle {

    margin: 0;

    font-family: "Cinzel", serif;

    font-size:
        clamp(
            42px,
            8vw,
            78px
        );

    font-weight: 500;

    letter-spacing: .18em;

    color: var(--text);
}



/* =========================================================
   TAGLINE
   ========================================================= */


.tagline {

    margin:
        15px
        auto
        50px;

    color: var(--muted);

    line-height: 1.8;

    font-size: 15px;
}



/* =========================================================
   HOME CARDS
   ========================================================= */


.home-cards {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;
}


.home-card {

    position: relative;

    min-height: 190px;

    padding:
        30px
        20px;

    background: var(--surface);

    border:
        1px solid var(--border);

    color: var(--text);

    cursor: pointer;

    text-align: center;

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease,
        background var(--transition),
        color var(--transition);
}


.home-card:hover {

    transform:
        translateY(-7px);

    box-shadow:
        var(--shadow);
}


.music-card:hover {
    border-color: #8b1e2d;
}


.games-card:hover {
    border-color: var(--forest);
}


.projects-card:hover {
    border-color: var(--heather);
}


.about-card:hover {
    border-color: var(--gold);
}


.card-number {

    position: absolute;

    top: 12px;
    left: 15px;

    font-size: 10px;

    color: var(--muted);

    letter-spacing: .15em;
}


.card-icon {

    display: block;

    font-size: 30px;

    margin:
        10px
        0
        15px;
}


.home-card h2 {

    margin:
        0
        0
        10px;

    font-family: "Cinzel", serif;

    font-weight: 500;
}


.home-card p {

    margin: 0;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;
}



/* =========================================================
   BACK BUTTON
   ========================================================= */


.back-button {

    position: fixed;

    top: 20px;
    left: 20px;

    z-index: 900;

    padding:
        12px
        18px;

    background: var(--surface);

    border:
        1px solid var(--border);

    color: var(--text);

    font-size: 11px;

    letter-spacing: .08em;

    cursor: pointer;

    box-shadow:
        var(--shadow);

    transition:
        background var(--transition),
        color var(--transition),
        transform .25s ease;
}


.back-button:hover {

    transform:
        translateX(-4px);
}



/* =========================================================
   SECTION CONTENT
   ========================================================= */


.section-content {

    max-width: 1000px;

    margin: 0 auto;

    padding-top: 200px;
}


.section-heading {

    margin-bottom: 55px;
}


.section-label {

    display: block;

    margin-bottom: 10px;

    color: var(--forest);

    font-size: 11px;

    letter-spacing: .2em;
}


.section-heading h2 {

    margin: 0;

    font-family: "Cinzel", serif;

    font-size:
        clamp(
            38px,
            7vw,
            65px
        );

    font-weight: 500;
}


.section-heading p {

    color: var(--muted);

    margin-top: 10px;
}



/* =========================================================
   MUSIC
   ========================================================= */


.subheading {

    font-family: "Cinzel", serif;

    font-size: 15px;

    font-weight: 500;

    letter-spacing: .15em;

    margin:
        45px
        0
        15px;
}


.music-list {

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.music-item {

    display: flex;

    align-items: center;

    gap: 18px;

    padding: 10px;

    background: var(--surface);

    border:
        1px solid var(--border);

    cursor: pointer;

    transition:
        transform .25s ease,
        border-color .25s ease,
        background var(--transition);
}


.music-item:hover {

    transform:
        translateX(5px);

    border-color:
        var(--forest);
}


.music-item img {

    width: 70px;
    height: 70px;

    object-fit: cover;
}


.music-info {

    flex: 1;
}


.music-info h3 {

    margin:
        0
        0
        6px;

    font-family: "Cinzel", serif;

    font-weight: 500;
}


.music-info span,
.album-info span {

    color: var(--muted);

    font-size: 10px;

    letter-spacing: .15em;
}


.play-track {

    width: 42px;
    height: 42px;

    border-radius: 50%;

    border:
        1px solid var(--border);

    background: transparent;

    color: var(--text);

    cursor: pointer;
}


.play-track:hover {

    background:
        var(--forest);

    color: white;
}



/* =========================================================
   ALBUM
   ========================================================= */


.album-container {

    border:
        1px solid var(--border);

    background:
        var(--surface);
}


.album-header {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 18px;

    padding: 12px;

    border: 0;

    background: transparent;

    color: var(--text);

    cursor: pointer;

    text-align: left;
}


.album-art-small {

    width: 70px;
    height: 70px;

    flex-shrink: 0;
}


.album-placeholder {

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        var(--surface-soft);

    color:
        var(--forest);

    font-size: 25px;
}


.album-info {

    flex: 1;
}


.album-info h3 {

    margin:
        0
        0
        6px;

    font-family: "Cinzel", serif;

    font-weight: 500;
}


.album-arrow {

    font-size: 25px;

    transition:
        transform .3s ease;
}


.album-container.expanded
.album-arrow {

    transform:
        rotate(90deg);
}


.album-tracks {

    display: none;

    padding:
        0
        20px
        20px;
}


.album-container.expanded
.album-tracks {

    display: block;
}


.coming-soon {

    color: var(--muted);

    font-size: 13px;
}



/* =========================================================
   GAMES
   ========================================================= */


.game-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 20px;
}


.game-card {

    background:
        var(--surface);

    border:
        1px solid var(--border);

    overflow: hidden;

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        background var(--transition);
}


.game-card:hover {

    transform:
        translateY(-5px);

    box-shadow:
        var(--shadow);
}


.game-image {
    width: 100%;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}


.game-image img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}


.placeholder-image {

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        var(--surface-soft);

    color:
        var(--muted);

    font-family: "Cinzel", serif;

    font-size: 60px;
}


.game-card-content {

    padding: 25px;
}


.project-status {

    display: block;

    color:
        var(--forest);

    font-size: 10px;

    letter-spacing: .15em;

    margin-bottom: 10px;
}


.game-card h3 {

    margin:
        0
        0
        10px;

    font-family: "Cinzel", serif;

    font-weight: 500;

    font-size: 25px;
}


.game-card p {

    color: var(--muted);

    font-size: 14px;

    line-height: 1.7;
}


.game-card button {

    margin-top: 10px;

    padding:
        10px
        15px;

    border:
        1px solid var(--border);

    background: transparent;

    color: var(--text);

    cursor: pointer;
}


.game-card button:hover {

    background:
        var(--forest);

    color: white;
}



/* =========================================================
   NATURE QUEST
   ========================================================= */


.project-hero {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 20px;

    align-items: center;

    margin-bottom: 70px;
}


.project-hero img {

    width: 100%;

    display: block;
}


.project-hero h2 {

    margin:
        10px
        0;

    font-family: "Cinzel", serif;

    font-size: 45px;

    font-weight: 500;
}


.project-hero p {

    color: var(--muted);

    line-height: 1.8;
}


.project-details {

    max-width: 700px;
}


.project-details h3 {

    margin-top: 45px;

    font-family: "Cinzel", serif;

    font-size: 15px;

    letter-spacing: .15em;
}


.project-details p,
.project-details li {

    color: var(--muted);

    line-height: 1.8;
}


.project-details ul {

    padding-left: 20px;
}



/* =========================================================
   GALLERY
   ========================================================= */


.screenshot-gallery {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;

    margin-top: 60px;
}


.gallery-image {

    width: 100%;

    cursor: pointer;

    transition:
        transform .3s ease;
}


.gallery-image:hover {

    transform:
        scale(1.02);
}



/* =========================================================
   PROJECTS
   ========================================================= */


.project-list {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 20px;
}


.project-card {

    padding: 30px;

    background:
        var(--surface);

    border:
        1px solid var(--border);

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease,
        background var(--transition);
}


.project-card:hover {

    transform:
        translateY(-5px);

    box-shadow:
        var(--shadow);
}


.project-card h3 {

    margin:
        0
        0
        15px;

    font-family: "Cinzel", serif;

    font-weight: 500;

    color: var(--text);
}


.project-card p {

    color: var(--muted);

    line-height: 1.7;
}



/* =========================================================
   PHOTOGRAPHY & ANIMATION
   ========================================================= */


.visual-card {

    cursor: pointer;
}


.visual-card:hover {

    border-color:
        var(--forest);
}


.visual-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 20px;
}


.visual-subcard {

    cursor: pointer;
}


.visual-subcard:hover {

    border-color:
        var(--forest);
}


.visual-icon {

    display: block;

    font-size: 30px;

    margin-bottom: 20px;
}



/* =========================================================
   ABOUT
   ========================================================= */


.about-content {

    max-width: 700px;
}


.about-content h3 {

    font-family: "Cinzel", serif;

    font-weight: 500;

    font-size: 25px;
}


.about-content p {

    color: var(--muted);

    line-height: 1.9;
}


.aboutme-photo {

    width: 200px;
    height: 200px;

    margin:
        30px
        auto
        50px;

    border-radius: 50%;

    background: var(--surface);

    box-shadow: var(--shadow);

        filter:
        drop-shadow(0 0 2px rgb(255, 255, 255));

    position: relative;

}


.aboutme-photo img {

    position: absolute;

    width: 230px;

    max-width: none;

    left: 43%;
    top: 10px;

    transform:
        translateX(-50%);

        filter:
        drop-shadow(0 0 20px rgba(255, 255, 255, 0.493));

    display: block;
}



/* =========================================================
   CONTACT
   ========================================================= */


.contact {

    margin-top: 70px;

    padding-top: 30px;

    border-top:
        1px solid var(--border);
}


.contact h3 {

    font-size: 14px;

    letter-spacing: .15em;
}


.contact-form {

    display: flex;

    flex-direction: column;

    gap: 12px;

    margin-top: 25px;
}


.contact-form input,
.contact-form textarea {

    width: 100%;

    padding:
        14px
        16px;

    border:
        1px solid var(--border);

    background:
        var(--surface);

    color:
        var(--text);

    font-family:
        "Inter",
        sans-serif;

    font-size: 14px;

    outline: none;

    transition:
        border-color .25s ease,
        background var(--transition),
        color var(--transition);
}


.contact-form textarea {

    resize: vertical;
}


.contact-form input:focus,
.contact-form textarea:focus {

    border-color:
        var(--forest);
}


.contact-form input::placeholder,
.contact-form textarea::placeholder {

    color:
        var(--muted);
}


.contact-form button {

    align-self: flex-start;

    padding:
        12px
        18px;

    border:
        1px solid var(--border);

    background:
        transparent;

    color:
        var(--text);

    cursor: pointer;

    font-size: 12px;

    letter-spacing: .08em;

    transition:
        background .25s ease,
        color .25s ease;
}


.contact-form button:hover {

    background:
        var(--forest);

    color:
        white;
}



/* =========================================================
   MINI PLAYER
   ========================================================= */


.mini-player {

    position: fixed;

    left: 50%;
    bottom: 0;

    transform:
        translateX(-50%)
        translateY(calc(100% - 14px));

    width:
        min(
            700px,
            calc(100% - 40px)
        );

    min-height: 76px;

    display: none;

    align-items: center;

    gap: 14px;

    padding:
        10px
        15px;

    background:
        var(--surface);

    border:
        1px solid var(--border);

    box-shadow:
        var(--shadow);

    z-index: 1500;

    transition:
        transform .4s ease,
        background var(--transition);
}


/* Player becomes available after music is played */

.mini-player.visible {

    display: flex;
}


/* Open when hovered */

.mini-player:hover {

    transform:
        translateX(-50%)
        translateY(0);
}


/* Little tab */

.mini-player-tab {

    position: absolute;

    top: -25px;

    left: 50%;

    transform:
        translateX(-50%);

    width: 55px;
    height: 25px;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        var(--surface);

    border:
        1px solid var(--border);

    border-bottom: 0;

    color:
        var(--text);

    cursor: pointer;

    font-size: 16px;

    padding: 0;
}


.mini-player-tab:hover {

    color:
        var(--forest);
}


/* Mobile/manual open state */

.mini-player.open {

    transform:
        translateX(-50%)
        translateY(0);
}


.mini-track-info {

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 160px;

    flex: 1;
}


.mini-album-art {

    width: 50px;
    height: 50px;

    flex-shrink: 0;
}


.mini-album-art img {

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.mini-label {

    display: block;

    color: var(--muted);

    font-size: 8px;

    letter-spacing: .15em;

    margin-bottom: 4px;
}


#miniTrackName {

    display: block;

    font-family: "Cinzel", serif;

    font-size: 14px;
}


.mini-controls {

    display: flex;

    gap: 8px;
}


.mini-controls button {

    width: 38px;
    height: 38px;

    border-radius: 50%;

    border:
        1px solid var(--border);

    background:
        transparent;

    color:
        var(--text);

    cursor: pointer;
}


.mini-controls button:hover {

    background:
        var(--forest);

    color: white;
}


.mini-progress {

    display: flex;

    align-items: center;

    gap: 8px;

    flex: 1;
}


.mini-progress span {

    color: var(--muted);

    font-size: 9px;

    min-width: 32px;
}


#miniProgressBar {

    width: 100%;
}



/* =========================================================
   IMAGE VIEWER
   ========================================================= */


.image-viewer {

    position: fixed;

    inset: 0;

    z-index: 2000;

    display: none;

    align-items: center;
    justify-content: center;

    background:
        rgba(0, 0, 0, .9);
}


.image-viewer.active {

    display: flex;
}


.image-viewer img {

    max-width: 85vw;

    max-height: 85vh;

    object-fit: contain;
}


.image-viewer button {

    position: absolute;

    border: 0;

    background: transparent;

    color: white;

    cursor: pointer;

    font-size: 45px;
}


#viewerClose {

    top: 20px;
    right: 30px;
}


#viewerPrevious {

    left: 25px;
}


#viewerNext {

    right: 25px;
}



/* =========================================================
   EASTER EGG
   ========================================================= */


.easter-egg {

    position: fixed;

    inset: 0;

    z-index: 5000;

    display: none;

    align-items: center;
    justify-content: center;

    background:
        var(--background);
}


.easter-egg.active {

    display: flex;

    animation:
        screenShake .5s infinite;
}


.easter-egg-message {

    text-align: center;

    font-family: "Cinzel", serif;
}


.easter-egg-message span {

    display: block;

    font-size: 20px;

    letter-spacing: .3em;
}


.easter-egg-message strong {

    display: block;

    margin-top: 10px;

    font-size:
        clamp(
            45px,
            10vw,
            100px
        );

    letter-spacing: .08em;

    color:
        var(--heather);
}


@keyframes screenShake {

    0% {
        transform: translate(0);
    }

    25% {
        transform: translate(5px, -5px);
    }

    50% {
        transform: translate(-5px, 5px);
    }

    75% {
        transform: translate(5px, 5px);
    }

    100% {
        transform: translate(0);
    }
}



/* =========================================================
   MOBILE
   ========================================================= */


@media (max-width: 800px) {

    .home-cards {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .game-grid,
    .project-list {

        grid-template-columns:
            1fr;
    }


    .visual-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .project-hero {

        grid-template-columns:
            1fr;
    }


    /* Disable hover-opening behaviour on mobile */

    .mini-player:hover {

        transform:
            translateX(-50%)
            translateY(calc(100% - 14px));
    }


    .mini-player.open {

        transform:
            translateX(-50%)
            translateY(0);
    }


    .mini-track-info {

        min-width: 0;

        width: 55%;
    }


    .mini-progress {

        width: 100%;

        order: 3;
    }


    .mini-player {

        min-height: 110px;

        flex-wrap: wrap;

        gap: 8px;

        padding-bottom:
            calc(
                10px +
                env(safe-area-inset-bottom)
            );
    }

}



/* =========================================================
   SMALL MOBILE
   ========================================================= */


@media (max-width: 520px) {

    .page-section {

        padding:
            75px
            18px
            100px;
    }


    .home-cards {

        grid-template-columns:
            1fr 1fr;

        gap: 8px;
    }


    .home-card {

        min-height: 165px;

        padding:
            25px
            12px;
    }


    .home-card p {

        font-size: 11px;
    }


    .fiadh-logo {

        width:
            min(
                300px,
                82vw
            );

        margin-bottom: 5px;
    }


    #siteTitle {

        font-size: 34px;
    }


    .back-button {

        top: 15px;
        left: 15px;

        padding:
            9px
            12px;
    }


    .theme-toggle {

        top: 15px;
        right: 15px;

        width: 46px;
        height: 46px;
    }


    .music-item img {

        width: 58px;
        height: 58px;
    }


    .visual-grid {

        grid-template-columns:
            repeat(2, 1fr);

        gap: 12px;
    }


    .visual-subcard {

        padding:
            25px
            15px;
    }


    .visual-subcard h3 {

        font-size: 20px;
    }


    .visual-subcard p {

        font-size: 12px;
    }


    .mini-player {

        width:
            calc(100% - 20px);
    }

}

/* =========================================================
   CUSTOM CURSOR
   ========================================================= */


/* Normal cursor */

body {

    cursor:
        url("images/cursor.png") 0 0,
        auto;
}


/* Anything clickable */

button,
a,
[onclick],
.music-item,
.fiadh-logo,
.gallery-image,
.album-header {

    cursor:
        url("images/cursor.png") 0 0,
        auto;
}