/* ========== Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========== Custom Properties for Animation ========== */
@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

/* ========== Global ========== */
body {
    font-family: "National Park", sans-serif;
    font-weight: 400;
    font-style: normal;
    background: #cbd4d8;
    color: #242424;
    line-height: 1.8;
    font-size: 1.2rem;
    padding: 1rem;
    overflow-x: hidden;
}

main.content {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

/* Headings */
h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

/* Paragraph Spacing */
p {
    margin-bottom: 1.25rem;
}

/* ========== Navigation ========== */
.top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.top-nav a {
    text-decoration: none;
    color: #66f;
    font-weight: 600;
    transition: color 0.2s;
}

.top-nav a:hover {
    color: #242424;
}

/* ========== Hero ========== */
.hero {
    position: relative;
    text-align: center;
    padding: 5rem 1rem 3rem;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #00a2ff, #ff0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseText 8s linear infinite;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    color: #242424;
}

/* Glowing Blobs */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
}

.hero::before {
    width: 300px;
    height: 300px;
    background: #ff00773a;
    top: -50px;
    left: -50px;
}

.hero::after {
    width: 250px;
    height: 250px;
    background: #00f2ff3a;
    bottom: -40px;
    right: -40px;
}

@keyframes pulseText {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

/* ========== Project Cards ========== */
.project-grid h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.card {
    position: relative;
    width: 100%;
    max-width: 800px;
    /* Wider card */
    height: 200px;
    /* Shorter height */
    margin: 0 auto;
    padding: 3px;
    border-radius: 16px;
    background: transparent;
    text-decoration: none;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card::before,
.card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background-image: conic-gradient(from var(--angle),
            #ff4545, #00ff99, #006aff, #ff0095, #ff4545);
    border-radius: 16px;
    z-index: -2;
    animation: spin 4s linear infinite;
    box-sizing: content-box;
}

.card::before {
    filter: blur(1.5rem);
    opacity: 0.45;
}

.card::after {
    filter: none;
    opacity: 1;
}

.card-content {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    padding: 2rem;
    background: #1a1a2e;
    border-radius: 12px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-content h3 a {
    color: rgb(255, 255, 255);
    text-decoration: underline;
    transition: color 0.2s;
}

.card-content h3 a:hover {
    color: #fff;
}

.card-content p {
    font-size: 1.05rem;
    color: #ddd;
}

@keyframes spin {
    from {
        --angle: 0deg;
    }

    to {
        --angle: 360deg;
    }
}

/* ========== Contact Form ========== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    background: #1a1a2e;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.contact-form label {
    font-weight: bold;
    color: #ccc;
}

.contact-form input,
.contact-form textarea {
    font-family: "Happy Monkey", system-ui;
    font-weight: 400;
    font-style: normal;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #444;
    border-radius: 8px;
    background: #0f0f1b;
    color: #fff;
    width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #66f;
    outline: none;
}

.contact-form button {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #7873f5, #00ffa3);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-form button:hover {
    opacity: 0.9;
}

/* Message banners */
.success,
.error {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: bold;
    text-align: center;
}

.success {
    background-color: #1f5135;
    color: #adf7c6;
}

.error {
    background-color: #511f1f;
    color: #ffaaaa;
}

.glow-emoji {
    display: inline-block;
    animation: glassBlueGlow 2.5s ease-in-out infinite;
    text-shadow:
        0 0 10px rgba(200, 230, 255, 0.7),
        0 0 20px rgba(150, 200, 255, 0.5),
        0 0 40px rgba(132, 212, 255, 0.4),
        0 0 60px rgba(200, 240, 255, 0.3);
}

@keyframes glassBlueGlow {

    0%,
    100% {
        text-shadow:
            0 0 10px rgba(200, 230, 255, 0.7),
            0 0 20px rgba(150, 200, 255, 0.5),
            0 0 40px rgba(132, 212, 255, 0.4),
            0 0 60px rgba(200, 240, 255, 0.3);
    }

    50% {
        text-shadow:
            0 0 4px rgba(200, 230, 255, 0.4),
            0 0 10px rgba(0, 123, 255, 0.3),
            0 0 20px rgba(100, 200, 255, 0.2),
            0 0 30px rgba(200, 240, 255, 0.15);
    }
}

/* ========== Footer ========== */
.footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    text-align: center;
    color: #242424;
}

.footer a {
    color: #66f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #242424;
    text-decoration: underline;
}

/* ========== Responsive Layout ========== */
@media (min-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body {
        padding: 2rem;
    }
}

@media (min-width: 1000px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    body {
        padding: 3rem 6rem;
    }
}

@media (max-width: 768px) {
    .grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }

    .card {
        width: 100%;
        max-width: 100%;
        height: auto;
        flex-direction: column;
        padding: 3px;
    }

    .card-content {
        flex-direction: column;
        padding: 1.5rem;
        height: auto;
        text-align: center;
    }

    .card h3 {
        font-size: 1.25rem;
    }

    .card p {
        font-size: 1rem;
    }
}