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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #f5f5f7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;

    background-color: #050608;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(10, 132, 255, 0.5), transparent 42%),
        radial-gradient(circle at 82% 12%, rgba(90, 110, 140, 0.45), transparent 45%),
        radial-gradient(circle at 50% 55%, rgba(20, 60, 130, 0.5), transparent 55%),
        radial-gradient(circle at 88% 85%, rgba(60, 70, 85, 0.4), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(0, 90, 200, 0.35), transparent 40%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Soft grain-free vignette to keep glass cards readable over the brightest blobs */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, transparent 0%, rgba(4, 5, 8, 0.4) 100%);
    pointer-events: none;
    z-index: 0;
}

header, .container {
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin: 60px 0 70px;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.eyebrow {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 18px;
    border-radius: 980px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cfd9ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1200px;
    width: 100%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 26px;
    margin-bottom: 60px;
}

.project-card {
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.project-card h2 {
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

.project-card p {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-card .badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
    padding: 5px 12px;
    border-radius: 980px;
    font-size: 0.8rem;
    margin-right: 8px;
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, #0a84ff 0%, #0066ff 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 980px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, filter 0.25s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    box-shadow: 0 6px 18px rgba(10, 132, 255, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 10px 26px rgba(10, 132, 255, 0.55);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    color: #cfe0ff;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
    transform: translateY(-2px);
}

.links-section {
    text-align: center;
    margin-top: 40px;
}

.links-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin: 0 20px;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.links-section a:hover {
    color: #ffffff;
}

/* About / case-study pages */
.about-hero {
    text-align: center;
    max-width: 720px;
    margin: 50px auto 40px;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 26px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #ffffff;
}

.about-content {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.about-card {
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 34px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-card h2 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.about-card p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.75;
    margin-bottom: 14px;
    font-size: 0.98rem;
}

.about-card p:last-child {
    margin-bottom: 0;
}

.about-card ul {
    margin: 0 0 14px 20px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.8;
    font-size: 0.98rem;
}

.about-card ul li::marker {
    color: #0a84ff;
}

.about-card ul:last-child {
    margin-bottom: 0;
}

.about-cta {
    text-align: center;
    margin: 10px 0 60px;
}

/* Password gate modal */
.gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 8, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 20px;
}

.gate-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gate-modal {
    background: rgba(22, 24, 30, 0.9);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 32px;
    width: min(360px, 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: translateY(10px);
    transition: transform 0.25s ease;
}

.gate-overlay.active .gate-modal {
    transform: translateY(0);
}

.gate-modal h3 {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.gate-modal p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 18px;
}

.gate-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 10px;
    outline: none;
}

.gate-input:focus {
    border-color: #0a84ff;
}

.gate-error {
    color: #ff7b72;
    font-size: 0.82rem;
    min-height: 18px;
    margin-bottom: 8px;
}

.gate-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.gate-actions button {
    border: none;
    border-radius: 980px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}

.gate-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.gate-cancel:hover {
    background: rgba(255, 255, 255, 0.16);
}

.gate-submit {
    background: linear-gradient(135deg, #0a84ff 0%, #0066ff 100%);
    color: #ffffff;
}

.gate-submit:hover {
    filter: brightness(1.08);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    header, .project-card, .about-hero, .about-card {
        animation: none;
    }
    .project-card, .btn, .btn-secondary {
        transition: none;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    header {
        margin: 40px 0 50px;
    }

    .about-card {
        padding: 26px;
    }
}
