/* Container for the overall layout */
body {
    font-family: "Roboto",
        sans-serif;
    padding: 40px;
    background-color: #00ffee;
    margin: 0;
}

/* Header styling */
header {
    text-align: center;
    margin-bottom: 100px;
}

header h1 {
    font-family: "Major Mono Display",
        monospace;
    font-weight: 400;
    font-style: normal;
    font-size: 3rem;
    color: #600078;
    margin: 0;
}

header li {
    display: inline-block;
    margin: 0 15px;
}

header a {
    text-decoration: none;
    color: #fd00a4;
    font-weight: bold;
    transition: color 0.2s;
}

header a:hover {
    color: #600078;
}

/* Hero Section */
#hero {
    color: transparent;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    text-align: center;
    margin-bottom: 100px;
    position: relative;
    overflow: hidden;
    min-height: 640px;
}

#hero h2 {
    color: #fd0094;
}

#hero p {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 12px;
    font-size: 2rem;
    line-height: 1.7;
    white-space: normal;
    transform: none;
    animation: none;
}

.trophy {
    z-index: 999;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) rotate(-10deg);
    opacity: 0.35;
    pointer-events: none;
}

.trophy img {
    width: min(520px, 68vw);
    height: auto;
    max-width: 100%;
}

h2 {
    font-family: "Major Mono Display",
        monospace;
    font-weight: 400;
    font-style: normal;
    font-size: 2.75rem;
    margin-bottom: 100px;
    color: #600078;
}

.projects {
    margin-top: 60px;
    margin-bottom: 90px;
    text-align: center;
}


/* 1. Grid Container Setup */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* The magic line! */
    gap: 30px;
    /* Space between cards */
    max-width: 1200px;
    /* Limits the grid width on huge screens */
    margin: 0 auto;
    /* Centers the whole grid */
}

/* 2. Individual Card Styling */
.card {
    background: #fff;
    border-radius: 12px;
    /* Smooth corners */
    overflow: hidden;
    /* Clips the image and content to the corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    /* Soft shadow */
    transition: all 0.3s ease;
    /* Smooth hover transition */
    display: flex;
    flex-direction: column;
    /* Vertical stacks content inside card */
}

/* Hover effect */
.card:hover {
    transform: translateY(-8px);
    /* Lift the card */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    /* Deepen shadow */
}

/* 3. Image (Figure) Styling */
.card figure {
    margin: 0;
    /* Important: removes default margin */
    padding: 0;
    width: 100%;
}

.card img {
    width: 100%;
    height: 200px;
    /* Fixed height for consistent cards */
    object-fit: cover;
    /* Crops the image rather than stretching it */
    display: block;
    filter: blur(10px);
    /* Initial blur for the image */
    transition: filter 0.3s ease;
}

.card img:hover {
    filter: blur(0);
    /* Clear the blur on hover */
}

.card img:active {
    filter: blur(0);
    /* Clear the blur on click */
}

.card figcaption {
    font-size: 0.8rem;
    color: #777;
    padding: 5px 15px;
    background-color: #f9f9f9;
}

/* 4. Content Area Styling */
.card-content {
    padding: 20px;
    flex-grow: 1;
    /* Pushes footer to the bottom of the card */
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-top: 0;
    color: #fd00a4;
    font-size: 1.4rem;
}

.card-content p {
    color: #666;
    margin-bottom: 25px;
    flex-grow: 1;
    /* Makes the paragraph take up available space */
}

/* 5. Button and Footer Styling */
.btn {
    text-decoration: none;
    background-color: #00ff40;
    color: #600078;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    margin-top: auto;
    /* Ensures button is at the bottom of the content area */
    transition: background 0.2s;
}

.btn:hover {
    background-color: #fd00a4;
}

.card footer {
    border-top: 1px solid #eee;
    padding: 15px 20px;
    background-color: #111;
    font-size: 0.85rem;
    color: #ffc400;
}

/* Skills list styling */
.skills {
    margin-top: 60px;
    margin-bottom: 90px;
    text-align: center;
}

.skills-marquee {
    width: 100%;
}

.skills-row {
    overflow: hidden;
    width: 100%;
    margin: 14px 0;
}

.skills-track {
    list-style: none;
    margin: 0;
    padding: 0;
    width: max-content;
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.skills-row.left .skills-track {
    animation: scroll-left .10s linear infinite;
}

.skills-row.right .skills-track {
    animation: scroll-right .10s linear infinite;
}

.skills-track li {
    flex: 0 0 auto;
    padding: 10px 15px;
    background-color: #00ff40;
    border-radius: 5px;
    color: #600078;
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes scroll-right {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

.glitch-text {
    font-size: .96rem;
    font-weight: bold;
    position: relative;
    display: inline-block;
    animation: jitter 0.1s infinite;
}

@keyframes jitter {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-2px, 2px) skew(5deg);
        color: #ff00c1;
    }

    50% {
        transform: translate(2px, -2px) skew(-5deg);
        color: #00fff9;
    }

    75% {
        transform: translate(-1px, -1px);
    }

    100% {
        transform: translate(1px, 1px);
    }
}

/* Every few seconds, it just disappears */
.glitch-text:nth-child(even) {
    animation: jitter 0.1s infinite, blink 3s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Footer styling */
footer {
    text-align: center;
    margin-top: 60px;
    color: #333;
    font-size: 1.2rem;
}

footer p {
    margin-bottom: 20px;
}

/* Contact Form Button */
.scared-button {
    font-size: 1rem;
    transition: all 0.2s ease;
    padding: 10px 20px;
    background-color: #fd00a4;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

/* When the mouse hovers over it, it jumps away! */
.scared-button:hover:not(.is-caught) {
    transform: translate(24px, -14px) rotate(6deg);
    background-color: #ff0000;
}

.scared-button:active,
.scared-button:focus-visible {
    transform: translate(0, 0) rotate(0deg);
    outline: 2px solid #600078;
    outline-offset: 3px;
}

.scared-button.is-caught {
    transform: translate(0, 0) rotate(0deg);
    background-color: #fd00a4;
}

.scared-button-response {
    min-height: 0;
    margin: 16px auto 0;
    max-width: 540px;
    padding: 0;
    border-radius: 10px;
    border: 2px solid transparent;
    background: transparent;
    color: #600078;
    font-size: 0;
    font-weight: 800;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.scared-button-response.is-visible {
    padding: 14px 16px;
    border-color: #600078;
    background: #fff7cc;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 20px rgba(96, 0, 120, 0.2);
    animation: teapot-pop 0.32s ease;
}

@keyframes teapot-pop {
    0% {
        transform: translateY(10px) scale(0.94);
    }

    60% {
        transform: translateY(-2px) scale(1.02);
    }

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