@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
    --bg: #020617;
    --bg-card: rgba(15, 23, 42, 0.96);
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --accent-soft: rgba(56, 189, 248, 0.25);
    --accent-green: #22c55e;
    --accent-pink: #ec4899;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --border-subtle: rgba(148, 163, 184, 0.45);
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.85);
    --radius-lg: 20px;
}

/* Reset / base */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    background: radial-gradient(circle at top, #0f172a 0, #020617 55%, #000 100%);
    color: var(--text-main);
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Animated background blobs */

.bg-gradient {
    position: fixed;
    inset: auto;
    filter: blur(100px);
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
    animation: drift 18s ease-in-out infinite alternate;
}

.bg-gradient--one {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, var(--accent-strong) 0, transparent 70%);
    top: -140px;
    right: -80px;
}

.bg-gradient--two {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--accent-green) 0, transparent 70%);
    bottom: -160px;
    left: -130px;
    animation-delay: -6s;
}

@keyframes drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(20px, -10px, 0) scale(1.05);
    }
}

/* Page container */

.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    padding: 2.5rem 1.5rem 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.9rem;
    animation: page-enter 0.6s ease-out;
    transform-origin: 50% 20%;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Header */

.page-header {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.24rem 0.8rem 0.24rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: radial-gradient(
        circle at top left,
        rgba(56, 189, 248, 0.18),
        rgba(15, 23, 42, 0.9)
    );
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition:
        border-color 160ms ease-out,
        background 160ms ease-out,
        transform 120ms ease-out,
        color 160ms ease-out;
}

.brand-link:hover {
    border-color: rgba(56, 189, 248, 0.9);
    background: radial-gradient(
        circle at top left,
        rgba(56, 189, 248, 0.22),
        rgba(15, 23, 42, 0.98)
    );
    transform: translateY(-1px);
    color: #e5f4ff;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent-strong);
    box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.3);
    animation: pulse-dot 1.9s ease-out infinite;
}

@keyframes pulse-dot {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.3);
    }
    60% {
        transform: scale(1.14);
        box-shadow: 0 0 0 12px rgba(56, 189, 248, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.3);
    }
}

.brand-text {
    font-weight: 600;
}

.brand-tag {
    font-size: 0.75rem;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    background: rgba(15, 23, 42, 0.85);
}

.page-eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(148, 163, 184, 0.95);
}

.page-header h1 {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    line-height: 1.1;
}

.page-subtitle {
    font-size: 0.93rem;
    color: var(--text-muted);
}

/* Project CTA */

.project-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 0.3rem;
}

.project-cta-main {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-cta-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-cta-secondary {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
}

/* Link chips */

.link-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
    transition:
        border-color 160ms ease-out,
        background 160ms ease-out,
        transform 120ms ease-out,
        box-shadow 160ms ease-out,
        opacity 160ms ease-out;
}

.link-chip:hover {
    border-color: rgba(56, 189, 248, 0.9);
    background: radial-gradient(
        circle at top left,
        rgba(56, 189, 248, 0.16),
        rgba(15, 23, 42, 0.98)
    );
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.95);
    opacity: 1;
}

.chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
}

.chip-dot--pink {
    background: var(--accent-pink);
    box-shadow: 0 0 0 6px rgba(236, 72, 153, 0.35);
}

.chip-dot--blue {
    background: var(--accent-strong);
    box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.35);
}

/* Documents grid */

.documents {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
}

@media (min-width: 880px) {
    .documents {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Cards */

.doc-card {
    position: relative;
    background: linear-gradient(135deg, var(--bg-card), rgba(15, 23, 42, 0.9));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 1.35rem 1.3rem 1.5rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transform: translateY(0) translateZ(0);
    transition:
        transform 160ms ease-out,
        box-shadow 160ms ease-out,
        border-color 160ms ease-out,
        background 160ms ease-out;
    animation: card-enter 0.55s ease-out both;
}

.documents .doc-card:nth-child(1) {
    animation-delay: 0.08s;
}
.documents .doc-card:nth-child(2) {
    animation-delay: 0.16s;
}
.documents .doc-card:nth-child(3) {
    animation-delay: 0.24s;
}
.documents .doc-card:nth-child(4) {
    animation-delay: 0.32s;
}

/* Glow layer */

.doc-glow {
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(
        from 210deg,
        rgba(56, 189, 248, 0),
        rgba(56, 189, 248, 0.7),
        rgba(56, 189, 248, 0)
    );
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    transition: opacity 200ms ease-out;
}

.doc-glow-blue {
    background: conic-gradient(
        from 210deg,
        rgba(56, 189, 248, 0),
        rgba(129, 140, 248, 0.85),
        rgba(56, 189, 248, 0)
    );
}

.doc-glow-green {
    background: conic-gradient(
        from 220deg,
        rgba(34, 197, 94, 0),
        rgba(34, 197, 94, 0.7),
        rgba(34, 197, 94, 0)
    );
}

.doc-glow-mixed {
    background: conic-gradient(
        from 220deg,
        rgba(236, 72, 153, 0),
        rgba(236, 72, 153, 0.8),
        rgba(56, 189, 248, 0.7),
        rgba(236, 72, 153, 0)
    );
}

.doc-card:hover .doc-glow {
    opacity: 0.75;
}

/* Card hover motion */

.doc-card:hover {
    transform: translateY(-4px) rotate3d(1, -1, 0, 4deg);
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.95);
}

/* Card variants */

.doc-card--blue h2 {
    color: #e5edff;
}

.doc-card--app h2 {
    color: #bbf7d0;
}

.doc-card--intros h2 {
    color: #fce7f3;
}

/* Tags */

.doc-tag {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.7);
    background: radial-gradient(
        circle at top left,
        rgba(251, 191, 36, 0.09),
        rgba(15, 23, 42, 0.95)
    );
    color: #eab308;
    position: relative;
    z-index: 1;
}

.doc-tag-blue {
    border-color: rgba(56, 189, 248, 0.7);
    color: var(--accent);
    background: radial-gradient(
        circle at top left,
        rgba(56, 189, 248, 0.12),
        rgba(15, 23, 42, 0.95)
    );
}

.doc-tag-green {
    border-color: rgba(34, 197, 94, 0.8);
    color: #4ade80;
    background: radial-gradient(
        circle at top left,
        rgba(34, 197, 94, 0.16),
        rgba(15, 23, 42, 0.95)
    );
}

.doc-tag-pink {
    border-color: rgba(236, 72, 153, 0.8);
    color: #f9a8d4;
    background: radial-gradient(
        circle at top left,
        rgba(236, 72, 153, 0.16),
        rgba(15, 23, 42, 0.95)
    );
}

/* Headings & text */

.doc-card h2 {
    font-size: 1.05rem;
    line-height: 1.25;
    position: relative;
    z-index: 1;
}

.doc-desc {
    font-size: 0.86rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Meta list */

.doc-meta {
    list-style: none;
    font-size: 0.82rem;
    color: #cbd5f5;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-left: 0;
    margin-top: 0.1rem;
    position: relative;
    z-index: 1;
}

.doc-meta li::before {
    content: "•";
    margin-right: 0.35rem;
    color: rgba(148, 163, 184, 0.9);
}

/* Buttons */

.doc-actions {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.58rem 0.95rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 160ms ease-out,
        border-color 160ms ease-out,
        transform 120ms ease-out,
        box-shadow 120ms ease-out,
        color 160ms ease-out;
}

/* bigger hero button */
.btn-lg {
    padding-inline: 1.3rem;
}

/* Primary */

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-color: rgba(56, 189, 248, 0.9);
    color: #0b1220;
    box-shadow: 0 14px 35px rgba(8, 47, 73, 0.8);
    overflow: hidden;
}

.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 0,
        rgba(255, 255, 255, 0.18) 40%,
        transparent 80%
    );
    transform: translateX(-120%);
    transition: transform 320ms ease-out;
}

.btn-primary:hover::before {
    transform: translateX(0);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 45px rgba(8, 47, 73, 0.95);
}

/* Secondary */

.btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.7);
    color: var(--text-main);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    border-color: rgba(148, 163, 184, 1);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.9);
}

/* Hero icon circle */

.btn-icon-circle {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    background: rgba(15, 23, 42, 0.95);
    color: #e5f4ff;
}

/* Badge */

.badge {
    font-size: 0.7rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.96);
    color: #bae6fd;
    border: 1px solid rgba(8, 47, 73, 0.8);
}

.badge-ghost {
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.6);
}

/* Footnote inside cards */

.doc-footnote {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Animations */

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Footer */

.page-footer {
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mono {
    font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
        "Courier New", monospace;
}

/* Small screens */

@media (max-width: 600px) {
    .page {
        padding-inline: 1.1rem;
    }

    .doc-card {
        padding-inline: 1.1rem;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    .brand-row {
        gap: 0.5rem;
    }

    .brand-tag {
        display: none;
    }

    .project-cta {
        flex-direction: column;
    }

    .project-cta-secondary {
        width: 100%;
    }
}
