/* =========================================================
   THEME
   - Theme variables
   - Fonts
   - Global base
   - Luxury background (non-landing)
   - Page shell + glass panel
   - Blazor error UI
   - Navbar
   - Landing
   - About
   - Tech grid
   - Contact
   - Projects
   - Animations
   - Mobile
========================================================= */

/* =========================
   THEME VARIABLES
========================= */
:root {
    --bg0: #05070d;
    --bg1: #070a12;
    --glass: rgba(0,0,0,.55);
    --glassBorder: rgba(255,255,255,.12);
    --text: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.72);
    --accent: #49f2c2;
}

/* =========================
   FONTS
========================= */
@font-face {
    font-family: "DoctorGlitch";
    src: url("/fonts/DoctorGlitch.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* =========================
   GLOBAL BASE
========================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

h1, h2, h3 {
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

    h1:focus {
        outline: none;
    }

a, .btn-link {
    color: #7fb7ff;
}

code {
    color: #c02d76;
}

/* bootstrap validation (keep if you use it) */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* form-floating placeholder tweaks (keep if you use it) */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =========================
   GLOBAL LUXURY BACKGROUND (NON-LANDING PAGES)
========================= */
body {
    background: radial-gradient(1200px 700px at 20% 10%, rgba(73,242,194,.10), transparent 60%), radial-gradient(900px 600px at 80% 20%, rgba(88,101,242,.10), transparent 55%), radial-gradient(900px 600px at 50% 90%, rgba(255,255,255,.05), transparent 55%), linear-gradient(180deg, var(--bg0), var(--bg1));
    color: var(--text);
}

    /* stars */
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: -2;
        background: radial-gradient(circle, rgba(255,255,255,.20) 1px, transparent 1.2px) 0 0/140px 140px, radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1.2px) 40px 60px/180px 180px, radial-gradient(circle, rgba(255,255,255,.10) 1px, transparent 1.2px) 90px 20px/220px 220px;
        opacity: .35;
    }

    /* vignette */
    body::after {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: -1;
        background: radial-gradient(circle at center, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 75%, rgba(0,0,0,.80) 100%);
    }

/* =========================
   PAGE SHELL + GLASS PANEL (NON-LANDING PAGES)
========================= */
.page-shell {
    min-height: 100vh;
    padding-top: 92px; /* space for fixed navbar */
    padding-bottom: 40px;
}

.page-panel {
    width: min(1100px, 92%);
    margin: 0 auto;
    padding: 28px 26px;
    border-radius: 18px;
    background: var(--glass);
    border: 1px solid var(--glassBorder);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 60px rgba(0,0,0,.55);
}

    .page-panel p {
        color: var(--muted);
    }

    .page-panel h1,
    .page-panel h2,
    .page-panel h3 {
        color: var(--text);
    }

/* =========================
   BLAZOR ERROR UI
========================= */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* =========================
   NAVBAR (TRANSPARENT)
========================= */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Brand shimmer (TEXT ONLY) */
.brand {
    display: inline-block;
    font-family: "JetBrains Mono", 'Inter', system-ui, sans-serif;
    font-size: 32px;
    font-weight: 700;
    text-decoration: none;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient( 110deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,.30) 44%, rgba(255,255,255,1) 50%, rgba(255,255,255,.30) 56%, rgba(255,255,255,.30) 100% );
    background-size: 260% 100%;
    background-position: -130% 0;
    animation: brandShimmer 7s linear infinite;
}

@keyframes brandShimmer {
    to {
        background-position: 130% 0;
    }
}

.burger {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.navlinks {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.navlink {
    font-family: "JetBrains Mono", monospace;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 10px;
}

    .navlink:hover {
        color: #fff;
        background: rgba(255,255,255,.06);
    }

    .navlink.active {
        color: var(--accent);
        background: rgba(73,242,194,.08);
        border: 1px solid rgba(73,242,194,.25);
    }

/* =========================
   LANDING: FIXED 3D + SNAP SCROLL
========================= */
body.landing-lock {
    overflow: hidden !important;
}

    /* replace :has() with this (deployment-safe) */
    body.landing-lock .main-content {
        max-width: none !important;
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

/* fixed 3d background */
.landing {
    position: fixed;
    inset: 0;
    background: #000;
    overflow: hidden;
    z-index: 0;
}

#landingCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.landing::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.15), rgba(0,0,0,0.75));
    pointer-events: none;
    z-index: 1;
}

#landingScroll.landing-scroll {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y proximity;
    scroll-padding-top: 72px;
    scroll-behavior: smooth;
}

    /* hide scrollbar */
    #landingScroll.landing-scroll::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

#landingScroll.landing-scroll {
    scrollbar-width: none;
}

.snap-section {
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding-top: 0;
    padding-bottom: 10vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    box-sizing: border-box;
}

/* panels */
.landing-ui,
.landing-panel {
    width: min(900px, 92%);
    padding: 28px 26px;
    border-radius: 18px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    color: #fff;
    text-align: center;
}

.landing-ui {
    width: min(640px, 92%);
}

    .landing-ui h1 {
        font-size: 44px;
        margin: 0 0 10px;
        font-weight: 700;
    }

    .landing-ui p {
        margin: 0 0 18px;
        opacity: 0.85;
    }

    .landing-ui .btn {
        padding: 10px 18px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.18);
        background: rgba(255,255,255,0.10);
        color: #fff;
    }

        .landing-ui .btn:hover {
            background: rgba(255,255,255,0.18);
        }

        .landing-ui .btn.secondary {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.18);
            opacity: .9;
        }

.link-btn {
    margin-left: 12px;
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.75);
    text-decoration: underline;
    cursor: pointer;
}

/* remove bullets inside landing panels */
.landing-panel ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.landing-panel li {
    margin: 12px 0;
}

/* =========================
   ABOUT LAYOUT (Landing Page)
========================= */
.about-panel {
    text-align: left;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
    align-items: center;
}

.about-media {
    display: flex;
    justify-content: center;
}

.about-avatar {
    width: min(260px, 70vw);
    height: auto;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    background: rgba(255,255,255,0.04);
}

/* =========================
   TECH GRID (Devicon)
========================= */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    align-items: center;
    justify-items: center;
    margin-top: 18px;
}

.tech-icon {
    font-size: 40px;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

    .tech-icon:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,0.07);
        border-color: rgba(255,255,255,0.14);
    }

/* =========================
   CONTACT PAGE
========================= */
.contact-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0 22px;
}

.contact-card {
    display: block;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    text-decoration: none;
}

    .contact-card:hover {
        background: rgba(255,255,255,0.07);
        border-color: rgba(255,255,255,0.16);
    }

.contact-title {
    color: rgba(255,255,255,.92);
    font-weight: 700;
}

.contact-sub {
    color: rgba(255,255,255,.70);
    font-size: 14px;
    margin-top: 4px;
}

.contact-form {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

.cf-label {
    display: grid;
    gap: 8px;
    color: rgba(255,255,255,.80);
    font-size: 14px;
}

.cf-input,
.cf-textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,.92);
    outline: none;
}

    .cf-input:focus,
    .cf-textarea:focus {
        border-color: rgba(73,242,194,.35);
        box-shadow: 0 0 0 3px rgba(73,242,194,.12);
    }

.cf-button {
    justify-self: start;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,.92);
    cursor: pointer;
}

    .cf-button:hover {
        background: rgba(255,255,255,0.18);
    }

.contact-note {
    margin-top: 14px;
    color: rgba(255,255,255,.70);
}

.contact-toast {
    margin: 12px 0 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
}

    .contact-toast.success {
        border-color: rgba(73,242,194,0.28);
        background: rgba(73,242,194,0.10);
    }

    .contact-toast.error {
        border-color: rgba(255,120,120,.30);
        background: rgba(255,120,120,.10);
    }

/* =========================
   HERO TEXT + TYPING ANIMATION
========================= */
.hero-title {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    font-size: 50px;
    font-weight: 700;
    color: #fff;
    --chars: 14;
    width: 0ch;
    animation: typing 1.8s steps(var(--chars)) forwards;
}

.type-cursor {
    display: inline-block;
    margin-left: 6px;
    opacity: .85;
    animation: blink 0.9s steps(1) infinite;
}

@keyframes typing {
    to {
        width: calc(var(--chars) * 1ch);
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* =========================
   PROJECTS
========================= */
.project {
    text-align: left;
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.10);
}

    .project h3 {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 6px;
    }

/* statuses */
.status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
}

    .status.live {
        color: rgba(73,242,194,.95);
        background: rgba(73,242,194,.10);
        border-color: rgba(73,242,194,.25);
    }

    .status.hold {
        color: rgba(255,255,255,.70);
        background: rgba(255,255,255,.06);
    }

    .status.proto,
    .status.delivered {
        color: rgba(255,255,255,.85);
        background: rgba(255,255,255,.06);
        border-color: rgba(255,255,255,.18);
    }

    .status.delivered {
        color: rgba(127,183,255,.95);
        background: rgba(127,183,255,.10);
        border-color: rgba(127,183,255,.25);
    }

/* project button */
.project .btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,.92);
    text-decoration: none;
}

    .project .btn:hover {
        background: rgba(255,255,255,0.18);
    }

/* nicer project link chip */
.project-links {
    margin: 10px 0 6px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,.92);
    text-decoration: none;
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

    .project-link:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,0.10);
        border-color: rgba(73,242,194,0.35);
    }

    .project-link .dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: rgba(73,242,194,.95);
        box-shadow: 0 0 0 3px rgba(73,242,194,.12);
    }

    .project-link::after {
        content: "↗";
        opacity: .75;
        margin-left: 2px;
    }

/* =========================
   HERO TEXT (Landing)
========================= */
.hero-subtitle {
    margin: 6px 0 12px;
    font-size: 18px;
    font-weight: 600;
    opacity: .95;
}

.hero-desc {
    margin: 0 0 10px;
    opacity: .85;
    line-height: 1.5;
}

.hero-proof {
    margin: 0 0 18px;
    opacity: .75;
    font-size: 14px;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 14px 0 18px;
}

    .hero-highlights span {
        font-family: "JetBrains Mono", monospace;
        font-size: 12px;
        padding: 6px 10px;
        border-radius: 999px;
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.10);
        opacity: .9;
    }

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 720px) {
    .burger {
        display: inline-block;
    }

    .navlinks.collapsed {
        display: none;
    }

    .navlinks.open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding-top: 10px;
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-panel {
        text-align: center;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-links {
        grid-template-columns: 1fr;
    }
}
