/* ==========================================================================
   INDEX PAGE
   Aaron J Scott Portfolio
   ========================================================================== */


/* ==========================================================================
   1. INDEX BENTO GRID
   ========================================================================== */

.grid-container {
    width: 100%;
    max-width: 1450px;
    margin: 40px auto;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    grid-template-areas:
        "intro        intro        status"
        "football     spotify      project"
        "templates    spotify      project"
        "foundations  foundations  foundations";

    /*
       Featured Projects now spans the same two middle rows as Spotify,
       giving both projects enough vertical space.

       Professional Foundations sits across the full bottom row.
    */
    grid-template-rows:
        auto
        250px
        minmax(360px, auto)
        auto;

    gap: 25px;
    align-items: stretch;
}


/* Explicit grid positioning */

.card-intro {
    grid-area: intro;
}

.card-status {
    grid-area: status;
}

.card-football {
    grid-area: football;
}

.card-spotify {
    grid-area: spotify;
}

.card-project {
    grid-area: project;
}

.card-templates {
    grid-area: templates;
}

.card-foundations {
    grid-area: foundations;
}


/* ==========================================================================
   2. SHARED INDEX CARD STYLING
   ========================================================================== */

.grid-container > section {
    min-width: 0;

    border-radius: 30px;
    box-shadow: var(--box-shadow);
}


/* ==========================================================================
   3. INTRO / HERO CARD
   ========================================================================== */

.card-intro {
    background-color: var(--card-white);
    padding: 40px;
}

.intro-content {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;
}

.intro-text {
    flex: 2;
    min-width: 0;
}

.intro-text h1 {
    margin: 0 0 20px;

    color: var(--text-main);

    font-size: 42px;
    line-height: 1.15;
}

.intro-text p {
    margin: 0;

    color: var(--text-muted);

    font-size: 18px;
    line-height: 1.6;
}

.intro-image {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-image img {
    display: block;

    width: 200px;
    height: 200px;

    object-fit: cover;

    border: 5px solid var(--primary-colour);
    border-radius: 50%;

    box-shadow: var(--box-shadow);
}


/* ==========================================================================
   4. AVAILABILITY / STATUS CARD
   ========================================================================== */

.card-status {
    background-color: var(--card-white);
    padding: 30px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-status h2 {
    margin: 0;

    color: var(--text-main);
}

.availability-list {
    list-style: none;

    padding: 0;
    margin: 20px 0;
}

.availability-list li {
    display: flex;
    align-items: center;

    gap: 15px;

    margin-bottom: 15px;

    color: var(--text-main);

    font-size: 15px;
    line-height: 1.4;
}

.availability-list li:last-child {
    margin-bottom: 0;
}

.availability-list li i {
    width: 25px;

    flex-shrink: 0;

    color: var(--primary-colour);

    font-size: 18px;
    text-align: center;
}


/* Hire Me button */

.btn-hire-me {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 0.5rem;

    width: fit-content;

    padding: 0.75rem 1.25rem;

    background-color: var(--primary-colour);
    color: #ffffff;

    border: none;
    border-radius: 8px;

    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease-in-out,
        transform 0.15s ease-in-out;
}

.btn-hire-me:hover {
    background-color: var(--primary-hover-colour);

    transform: translateY(-2px);
}

.btn-hire-me:focus-visible {
    outline: 3px solid var(--primary-colour);
    outline-offset: 3px;
}


/* ==========================================================================
   5. FOOTBALL CARD
   ========================================================================== */

.card-football {
    /*
       Football now fills its controlled 250px grid row.

       This gives the widget more breathing room without allowing
       Spotify to create a huge empty area underneath it.
    */
    height: 100%;
    min-height: 0;
    align-self: stretch;

    background-color: var(--card-white);
    padding: 20px;

    display: flex;
    flex-direction: column;

    transition: transform 0.3s ease;
}

.card-football:hover {
    transform: translateY(-5px);
}

.card-football .card-content {
    height: auto;
}


/* Team selector */

.team-switcher {
    display: flex;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 8px;
}

.btn-team {
    flex: 1;

    padding: 10px 5px;

    border: none;
    border-radius: 12px;

    color: #ffffff;

    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-dufc {
    background-color: #ff6601;
}

.btn-nufc {
    background-color: #000000;

    border: 1px solid #d4af37;
}

.btn-fcb {
    background-color: #a50044;
}

.btn-team:hover {
    transform: scale(1.05);

    filter: brightness(1.2);

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


/* Football card header */

.card-football .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;
}

.card-football .history-title {
    margin: 0;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* Match status */

#match-status {
    padding: 4px 8px;

    background: rgba(233, 30, 99, 0.1);
    color: #e91e63;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.live-pulse {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* Match */

#match-container {
    transition: opacity 0.4s ease;
}

.match-info-top {
    margin-bottom: 15px;

    color: var(--text-muted);

    font-size: 12px;
    text-align: center;
}

.card-football .scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 8px 0;
}

.team {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 12px;
}

.logo-wrapper {
    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-wrapper img {
    display: block;

    width: 50px;
    height: 50px;

    margin: 0 auto;

    object-fit: contain;
}

.team span {
    color: var(--text-main);

    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.score-display {
    display: flex;
    align-items: center;

    gap: 15px;

    color: var(--text-main);

    font-size: 38px;
    font-weight: 900;
}

.score-display .divider {
    color: var(--text-muted);

    font-size: 22px;

    opacity: 0.5;
}


/* ==========================================================================
   6. SPOTIFY CARD
   ========================================================================== */

.card-spotify {
    background-color: var(--primary-colour);
    color: var(--card-white);

    padding: 25px;

    display: flex;
    flex-direction: column;

    min-height: 0;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

.card-spotify:hover {
    transform: translateY(-5px);

    background-color: var(--primary-hover-colour);
}


/* Now Playing */

.card-spotify > span {
    display: block;

    margin-bottom: 15px;

    color: rgba(255, 255, 255, 0.7);

    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}


/* Album artwork */

#track-art {
    display: block;

    width: 100%;
    max-width: 220px;

    aspect-ratio: 1 / 1;

    margin-bottom: 20px;

    object-fit: cover;

    border-radius: 15px;

    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}


/* Track information */

#track-title {
    margin: 0;

    color: var(--card-white);

    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

#track-artist {
    margin: 6px 0 20px;

    color: rgba(255, 255, 255, 0.9);

    font-size: 15px;
}


/* Progress */

.progress-container {
    width: 100%;
    height: 5px;

    margin: 10px 0;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.2);

    border-radius: 10px;
}

#progress-bar {
    width: 0%;
    height: 100%;

    background: var(--primary-shadow-colour);

    border-radius: 10px;

    transition: width 1s linear;
}

.time-info {
    display: flex;
    justify-content: space-between;

    margin-top: 8px;

    color: var(--card-white);

    font-family: monospace;
    font-size: 11px;
}


/* Recently played */

.history-section {
    margin-top: 40px;
}

.card-spotify .history-title {
    display: block;

    margin-bottom: 15px;

    color: rgba(255, 255, 255, 0.7);

    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.history-item {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 12px;
    padding: 8px;

    background: rgba(255, 255, 255, 0.05);

    border-radius: 12px;

    transition: background-color 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.15);

    cursor: pointer;
}

.history-item img {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    object-fit: cover;

    border-radius: 8px;
}

.history-info {
    min-width: 0;
}

.history-info p {
    margin: 0;

    color: var(--card-white);

    font-size: 13px;
    font-weight: 500;
}

.h-artist {
    color: rgba(255, 255, 255, 0.8) !important;

    font-size: 11px !important;
}


/* ==========================================================================
   7. FEATURED PROJECTS CARD
   ========================================================================== */

.card-project {
    background-color: var(--card-white);
    padding: 30px;
}


/*
   Temporary compatibility for the inner .card currently
   inside the Featured Projects section.
*/

.card-project > .card {
    height: auto;

    padding: 0;

    background: transparent;

    border-radius: 0;

    box-shadow: none;
}

.card-project h2 {
    margin: 0;

    color: var(--text-main);
}

.card-project h3 {
    margin: 0;

    color: var(--text-main);
}

.card-project img {
    display: block;

    width: 100%;
    height: 200px;

    margin: 15px 0;

    object-fit: contain;
    object-position: center;

    background: transparent;
}


/* Project links */

.project-action {
    margin-top: 20px;
}

.btn-text {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    margin-top: 10px;

    color: var(--primary-colour);

    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;

    transition:
        gap 0.2s ease,
        color 0.2s ease;
}

.btn-text i {
    font-size: 12px;
}

.btn-text:hover {
    gap: 12px;

    color: var(--text-main);
}


/* ==========================================================================
   8. CUSTOM WEB TEMPLATES CARD
   ========================================================================== */

.card-templates {
    /*
       Templates fills the lower grid row.

       The content itself stays at the top of the card so additional
       template information can be added underneath later.
    */
    height: 100%;
    min-height: 0;

    background-color: var(--card-white);

    padding: 30px;

    display: flex;
    flex-direction: column;

    transition: transform 0.3s ease;

}

.template-image {
    display: block;

    width: 100%;
    max-width: 320px;
    height: 180px;

    margin: 20px auto 0;

    object-fit: contain;
    object-position: center;

    border-radius: 15px;
}

.card-templates:hover {
    transform: translateY(-5px);
}

.card-templates .card-content {
    display: flex;
    flex-direction: column;

    height: auto;
    min-height: 0;
}

.card-templates h2 {
    margin: 0 0 12px;

    color: var(--text-main);
}

.card-templates p {
    margin: 0;

    color: var(--text-main);

    font-size: 15px;
    line-height: 1.6;
}


/*
   Keep Gumroad link close to the description.

   It is deliberately NOT pushed to the bottom of the card.
*/

.card-templates .project-action {
    margin-top: 20px !important;
    padding-top: 0;
}


/* ==========================================================================
   9. PROFESSIONAL FOUNDATIONS CARD
   ========================================================================== */

.card-foundations {
    background-color: var(--card-white);

    padding: 30px;
}

.card-foundations h2 {
    margin: 0 0 20px;

    color: var(--text-main);
}

.foundation-item {
    display: flex;
    align-items: flex-start;

    gap: 25px;

    margin-bottom: 30px;
}

.foundation-item:last-child {
    margin-bottom: 0;
}

.icon-box {
    width: 55px;
    height: 55px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--card-white);
    color: var(--primary-colour);

    border: 2px solid var(--primary-colour);
    border-radius: 15px;

    font-size: 22px;
}

.info {
    min-width: 0;
}

.info h3 {
    margin: 0 0 8px;

    color: var(--primary-colour);

    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.info p {
    margin: 0;

    color: var(--text-main);

    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.info .edu-title {
    margin-bottom: 4px !important;

    font-size: 18px !important;
    font-weight: 700;
}

.info .edu-meta {
    margin-bottom: 8px;

    color: var(--text-muted) !important;

    font-size: 15px !important;
    font-weight: 400 !important;
}


/* Desktop foundations layout */

@media (min-width: 1101px) {

    .card-foundations .card-content {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));

        column-gap: 35px;
        row-gap: 20px;
    }

    .card-foundations h2 {
        grid-column: 1 / -1;

        margin-bottom: 5px;
    }

    .card-foundations .foundation-item {
        margin-bottom: 0;
    }

}


/* ==========================================================================
   10. ACCESSIBILITY MODE - INDEX SPECIFIC
   ========================================================================== */

body.accessible .grid-container > section {
    border: 1px solid #000000;

    box-shadow: none;
}

body.accessible .btn-hire-me:hover,
body.accessible .btn-team:hover {
    background-color: #000000 !important;
    color: #ffffff !important;

    border: 2px solid var(--status-negative) !important;
}

body.accessible .btn-text {
    color: #000000 !important;

    font-weight: 800;
    text-decoration: underline;
}


/* ==========================================================================
   11. TABLET
   ========================================================================== */

@media (max-width: 1100px) {

    .grid-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        grid-template-areas:
            "intro        intro"
            "status       football"
            "spotify      project"
            "templates    templates"
            "foundations  foundations";

        grid-template-rows: auto;

        gap: 20px;
    }

    .card-football {
        height: auto;

        align-self: stretch;
    }

    .card-templates {
        height: auto;
        min-height: 300px;
    }

    .intro-text h1 {
        font-size: 38px;
    }

    .intro-image img {
        width: 180px;
        height: 180px;
    }

}


/* ==========================================================================
   12. MOBILE
   ========================================================================== */

@media (max-width: 768px) {

    .grid-container {
        display: flex;
        flex-direction: column;

        width: 100%;

        margin: 20px auto;

        gap: 15px;
    }


    /* Intro */

    .card-intro {
        padding: 25px;
    }

    .intro-content {
        flex-direction: column-reverse;

        gap: 20px;

        text-align: center;
    }

    .intro-image img {
        width: 150px;
        height: 150px;
    }

    .intro-text h1 {
        font-size: 32px;
    }

    .intro-text p {
        font-size: 16px;
    }


    /* Status */

    .card-status {
        padding: 25px;
    }


    /* Football */

    .card-football {
        width: 100%;
        height: auto;

        align-self: stretch;
    }

    .score-display {
        gap: 8px;

        font-size: 30px;
    }

    .logo-wrapper {
        width: 55px;
        height: 55px;
    }

    .logo-wrapper img {
        width: 45px;
        height: 45px;
    }


    /* Spotify */

    .card-spotify {
        min-height: auto;
    }

    #track-art {
        max-width: 180px;
    }


    /* Projects */

    .card-project {
        padding: 25px;
    }

    .card-project img {
        height: auto;

        aspect-ratio: 16 / 9;
    }


    /* Templates */

    .card-templates {
        height: auto;
        min-height: 280px;

        padding: 30px 25px;
    }


    /* Foundations */

    .card-foundations {
        padding: 25px;
    }

    .foundation-item {
        gap: 18px;
    }

    .icon-box {
        width: 48px;
        height: 48px;

        font-size: 19px;
    }

    .info h3 {
        font-size: 14px;

        letter-spacing: 1.5px;
    }

}


/* ==========================================================================
   13. SMALL MOBILE
   ========================================================================== */

@media (max-width: 480px) {

    .grid-container > section {
        border-radius: 22px;
    }

    .card-intro,
    .card-status,
    .card-project,
    .card-foundations {
        padding: 22px;
    }

    .card-football {
        padding: 18px;
    }

    .card-spotify {
        padding: 22px;
    }

    .card-templates {
        padding: 25px 22px;
    }


    /* Football controls */

    .team-switcher {
        gap: 7px;
    }

    .btn-team {
        padding: 9px 4px;

        font-size: 10px;

        border-radius: 9px;
    }

    .card-football .scoreboard {
        gap: 6px;
    }

    .team {
        gap: 8px;
    }

    .team span {
        font-size: 12px;
    }

    .score-display {
        gap: 5px;

        font-size: 26px;
    }

    .score-display .divider {
        font-size: 17px;
    }

    .logo-wrapper {
        width: 45px;
        height: 45px;
    }

    .logo-wrapper img {
        width: 40px;
        height: 40px;
    }


    /* Foundations */

    .foundation-item {
        gap: 14px;

        margin-bottom: 25px;
    }

    .icon-box {
        width: 44px;
        height: 44px;

        border-radius: 12px;

        font-size: 17px;
    }

    .info h3 {
        font-size: 13px;
    }

    .info p {
        font-size: 14px;
    }

}