/* ------------- GLOBAL STYLES ---------------- */
:root {
    --primary-bg: #000000;
    --primary-bg-gradient: linear-gradient(45deg, rgba(0, 0, 0, 1) 0%, rgba(38, 38, 38, 1) 50%, rgba(0, 0, 0, 1) 100%);
    --secondary-bg: #FFFFFF;
    --secondary-bg-gradient: linear-gradient(45deg, rgba(255, 255, 255, 1) 0%, rgba(238, 238, 238, 1) 50%, rgba(255, 255, 255, 1) 100%);
    --primary-font: 'Open Sans', Arial, Helvetica, sans-serif;
    --text-color: #E0E0E0;
    --secondary-text-color: #000000;
    --accent: #3B82F6;
    --header-height: 64px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--primary-font);
    line-height: 1.6;
    background: var(--primary-bg);
    background: var(--primary-bg-gradient);
    min-height: 100vh;
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* -------------- END OF GLOBAL STYLES -------------- */

/* ------------- HEADER & NAVIGATION STYLES ---------------- */

header {
    color: var(--text-color);
    padding: 1rem 0;
    background: transparent;
}

nav[aria-label] ul {
    list-style: none;
    display: flex;
    justify-content: end;
    padding: 0.5em 0;
    margin: 0;
    margin-right: 15px;
    background-color: var(--secondary-bg);
    border-radius: 20px;
    width: fit-content;
    margin-left: auto;
    gap: 15px;
}

nav[aria-label] ul li {
    margin: 0;
}

nav[aria-label] ul li a {
    color: var(--secondary-text-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    padding: 0.5em 0.5em;
    border-radius: 4px;
    white-space: nowrap;
}

nav[aria-label] ul li a[aria-current="page"],
nav[aria-label] ul li a.active {
    color: var(--accent);
    background: #3b83f61e;
    border-radius: 20px;
}

nav[aria-label] ul li a:focus {
   outline: 2px solid var(--accent);
    border-radius: 20px;
}

nav[aria-label] ul li a:hover {
    color: var(--accent);
}

@media (max-width: 990px) {
    nav[aria-label] ul {
        justify-content: center;
        margin-right: auto;
        margin-left: auto;
    }
}

/* -------------- END OF HEADER & NAVIGATION STYLES -------------- */

/* ------------------------ HOME STYLES ------------------------- */
main {
    color: var(--text-color);
    flex: 1;
    padding: 2rem 0;
}

main h1 {
    margin: 0 0 50px 0;
    padding-right: 20px;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -1px;
}

section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -1px;
}

#name-title-graphic {
    margin: 10rem auto auto auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

#cube-canvas {
    margin: 0;
    width: 350px;
    height: 200px;
}

.terminal-window {
    position: relative;
    border-bottom: solid grey 3px;
    border-left: solid grey 3px;
    border-right: solid grey 3px;
    border-top: solid grey 17px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.close-button,
.maximize-button,
.minimize-button {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 10px;
    z-index: 2;
    top: -14px;
}

.close-button {
    background-color: #FF605C;
    left: 3px;
}

.maximize-button {
    background-color: #FFBD44;
    left: 21px;
}

.minimize-button {
    background-color: #00CA4E;
    left: 41px;
}

.close-button:hover {
    background-color: #dd5452;
}

.maximize-button:hover {
    background-color: #cb9839;
}

.minimize-button:hover {
    background-color: #00ad42;
}

.under-construction {
    color: var(--text-color);
    display: flex;
    align-items: center;
    margin: 0 auto;
    flex-direction: column;
    margin-top: 5rem;
}

img.construction-line {
    width: 100%;
    max-width: 500px;
    height: auto;
}

.construction-message-container {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 3rem;
}

.construction-message {
    display: flex;
    text-align: center;
    color: var(--text-color);
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .construction-message-container {
        gap: 1rem;
    }
}

/* -------------- END OF HOME STYLES -------------- */

/* ------------- INFO CARDS STYLES ---------------- */
/*
#info-cards {
    margin: 8rem auto 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 160px);
    gap: 3rem;
    justify-content: center;
    color: black;
}

.cards {
    width: 160px;
    min-width: 160px;
    height: 160px;
    min-height: 160px;
    background-color: #E0E0E0;
    border: solid black 2px;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    transition: transform 0.3s;
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
}

#card1 {
    animation-delay: 0.2s;
}

#card2 {
    animation-delay: 0.4s;
}

#card3 {
    animation-delay: 0.6s;
}

#card4 {
    animation-delay: 0.8s;
}

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

.cards h2,
.cards p {
    margin: 0 auto;
    text-align: center;
}

.cards img {
    width: 56px;
    height: 56px;
    margin: 10px auto 0 auto;
}
*/
/* -------------- END OF INFO CARDS STYLES -------------- */

/* ------------- FOOTER STYLES ---------------- */
footer {
    text-align: center;
    padding: 10px 0;
    color: #fff;
    font-size: 0.75rem;
    width: 100%;
    margin-top: auto;
    background: transparent;
}

footer .container {
    position: relative;
    min-height: 30px;
    align-items: center;
}

.links {
    position: absolute;
    bottom: 5px;
    left: 2rem;
    display: flex;
    gap: 15px;
}

.links a:focus img,
.links a:hover img {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    filter: brightness(1.2);
    border-radius: 5px;
}

.links img {
    margin-right: 0;
    width: 28px;
    height: 28px;
    vertical-align: middle;
    transition: filter 0.1s, outline 0.1s;
}

canvas {
    display: block;
}

@media (max-width: 550px) {
    footer .copyright {
        text-align: right;
    }
}

/* -------------- END OF FOOTER STYLES -------------- */

/* ------------- RESPONSIVE & MEDIA QUERIES ---------------- */
@media (min-width: 871px) {
    #info-cards {
        grid-template-columns: repeat(4, 160px);
        gap: 5rem;
    }
}

@media (max-width: 870px) {
    #info-cards {
        margin: 4rem auto 0 auto;
        gap: 3rem;
    }

    #name-title-graphic {
        flex-direction: column;
        margin-top: 4rem;
    }

    nav[aria-label] ul {
        justify-content: center;
    }

    main h1 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 0.5rem;
    }

    #name-title-graphic {
        flex-direction: column;
        margin-top: 2rem;
    }

    main h1 {
        font-size: 1.5rem;
        padding-right: 0;
    }

    #cube-canvas {
        width: 100%;
        height: 120px;
    }
}

/* -------------- END OF RESPONSIVE & MEDIA QUERIES -------------- */

/* ------------- ANIMATION KEYFRAMES ---------------- */
@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------- END OF ANIMATION KEYFRAMES -------------- */

/* -------------- PORTFOLIO PAGE STYLES ------------------ */

#portfolio-header {
    text-align: center;
}

#portfolio-projects {
    max-width: 625px; /* or 100%, but with a px max for large screens */
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem; /* add horizontal padding for small screens */
    box-sizing: border-box;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin: 2rem 0 0 0; /* only top margin */
    width: 100%;
    justify-items: center; /* center cards in their columns */
}

.project-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.project-card:hover, .project-card:focus {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 6px 24px rgba(0,0,0,0.14);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.card-content {
    padding: 1rem;
}

.card-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.card-desc {
    margin: 0;
    font-size: 1rem;
    color: #555;
}

/* --------------- END OF PORTFOLIO PAGE STYLES --------------- */

/* --------------- SKILLS PAGE STYLES ---------------- */
#skills-section {
    display: flex;
    justify-content: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding-right: 200px;
    /* This shifts both containers left */
}

.logos-container {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin-top: 40px;
}

.logo {
    width: 154px;
    height: 154px;
    opacity: 0;
    animation: slideIn 0.8s ease-out forwards;
}

.logo:nth-child(1) {
    animation-delay: 0.2s;
}

.logo:nth-child(2) {
    animation-delay: 0.4s;
}

.logo:nth-child(3) {
    animation-delay: 0.6s;
}

.p-container {
    color: black;
    width: 550px;
}

.p-card1 {
    background-color: #fff;
    border-radius: 20px;
    min-height: 130px;
    height: auto;
    border: solid black 2px;
    margin-bottom: 60px;
    margin-top: 40px;
    padding: 20px;
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
    animation-delay: 0.8s;
}

.p-card2 {
    padding: 20px;
    background-color: #fff;
    border-radius: 20px;
    min-height: 250px;
    height: auto;
    border: solid black 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
    animation-delay: 1s;
}

.p-card2-img-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.p-card2 img {
    width: 70px;
    height: 70px;
    background-color: rgb(177, 177, 177);
    border: solid black 2px;
    border-radius: 20px;
    padding: 5px;
    transition: transform 0.3s;
    margin-left: 15px;
    margin-right: 15px;
}

.p-card2 img:hover {
    transform: translateY(-5px);
    cursor: pointer;
}

@media (max-width: 990px) {
    #skills-section {
        padding-right: 0;
        /* Remove the shift on mobile */
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .logos-container {
        margin: 0;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .p-container {
        width: 90%;
        max-width: 550px;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .p-card1,
    .p-card2 {
        width: 100%;
        box-sizing: border-box;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    .p-card2 img {
        width: 4rem;
        height: 4rem;
        margin-left: 0;
        margin-right: 0;
    }

    .p-card2-img-container {
        gap: 40px;
    }

}

@media (max-width: 610px) {
    .p-card2 img {
        width: 2.8rem;
        height: 2.8rem;
        margin-left: 0;
        margin-right: 0;
    }

    .logo {
        width: 90px;
        height: 90px;
    }

    .p-card2-img-container {
        gap: 20px;
    }
}

@media (max-width: 420px) {
    .p-card2-img-container {
        gap: 4px;
    }
}

@media (max-width: 358px) {
    .p-card2-img-container {
        width: 150px;
        gap: 5px;
    }

    .p-card2 img {
        margin-left: 5px;
        margin-right: 5px;
    }
}

/* -------------- END OF SKILLS PAGE STYLES -------------- */

/* ------------- SERVICES PAGE STYLES ---------------- */
/*
#core-offering {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

#core-offering h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.service-card {
    background-color: #E0E0E0;
    border-radius: 20px;
    padding: 2rem;
    color: black;
    border: solid black 2px;
    position: relative;
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.service-card:nth-child(1) {
    animation-delay: 0.2s;
}

.service-card:nth-child(2) {
    animation-delay: 0.4s;
}

.service-card:nth-child(3) {
    animation-delay: 0.6s;
}

.service-card.featured {
    border-color: #00CA4E;
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background-color: #00CA4E;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
}

.service-card h3 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
}

.service-card .price {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 1rem 0;
    color: #000;
}

.service-card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.service-card ul li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #00CA4E;
}

.card-content {
    flex: 1;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    background-color: #000;
    color: #E0E0E0;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, background-color 0.3s;
    align-self: flex-start;
    margin-top: auto;
}

.cta-button:hover {
    transform: translateY(-2px);
    background-color: #333;
}

.cn-button {
    display: inline-block;
    background-color: #000;
    color: #E0E0E0;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, background-color 0.3s;
    align-self: flex-start;
    margin-top: 30px;
}

.cn-button:hover {
    transform: translateY(-2px);
    background-color: #00CA4E
}
*/
/* -------------- END OF SERVICES PAGE STYLES -------------- */

/* ------------- COMPARISON TABLE STYLES ---------------- */
.table-container {
    margin: 2rem 0;
    overflow-x: auto;
    background-color: #E0E0E0;
    border-radius: 20px;
    padding: 1rem;
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards 0.8s;
}

table {
    width: 100%;
    border-collapse: collapse;
    color: black;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #999;
}

th {
    font-weight: bold;
    background-color: #ccc;
}

tr:last-child td {
    border-bottom: none;
}

/* -------------- END OF COMPARISON TABLE STYLES -------------- */

/* ------------- ADDITIONAL INFO SECTION STYLES ---------------- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.info-card {
    background-color: #E0E0E0;
    border-radius: 20px;
    padding: 1.5rem;
    color: black;
    border: solid black 2px;
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
}

.info-card:nth-child(1) {
    animation-delay: 1s;
}

.info-card:nth-child(2) {
    animation-delay: 1.2s;
}

.info-card:nth-child(3) {
    animation-delay: 1.4s;
}

.info-card:nth-child(4) {
    animation-delay: 1.6s;
}

.info-card h3 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
}

#contact {
    text-align: center;
    margin: 4rem 0;
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards 1.8s;
}

#contact h2 {
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-card.featured {
        transform: none;
    }

    .table-container {
        margin: 2rem -1rem;
        border-radius: 0;
    }

    th,
    td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}