﻿:root {
    color-scheme: dark;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #f3f3f3;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.07), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 24%),
        linear-gradient(180deg, #080808 0%, #010101 100%);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.07), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 24%),
        linear-gradient(180deg, #080808 0%, #010101 100%);
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.loading-progress {
    display: none;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.07), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 24%),
        linear-gradient(180deg, #080808 0%, #010101 100%);
}

.loading-screen__mark {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    animation: loadingMarkPulse 1.8s ease-in-out infinite;
}

.loading-screen__line {
    width: min(220px, 52vw);
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.loading-screen__line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, #ffffff 45%, transparent 100%);
    transform: translateX(-100%);
    animation: loadingLineSweep 1.4s ease-in-out infinite;
}

.loading-screen__title {
    margin: 0;
    color: #fff7ef;
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.loading-screen__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@keyframes loadingMarkPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 0 28px rgba(255, 255, 255, 0.08);
    }
}

@keyframes loadingLineSweep {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 8, 8, 0.94);
    color: #f3f3f3;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

#blazor-error-ui .reload {
    margin-left: 8px;
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
}

.site-header {
    position: fixed;
    top: 28px;
    left: 40px;
    z-index: 30;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #f4ece1;
    transition:
        top 0.38s ease,
        left 0.38s ease,
        color 0.38s ease,
        opacity 0.38s ease,
        transform 0.38s ease,
        letter-spacing 0.38s ease,
        font-size 0.38s ease;
}

.site-header.is-panel {
    top: 42px;
    left: 56px;
    color: #d8d8d8;
    font-size: 0.95rem;
    letter-spacing: 0.16em;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    z-index: 20;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 25;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-kicker {
    margin: 0;
    color: #d8d8d8;
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 700;
}

.hero-title {
    max-width: 10ch;
    font-size: clamp(2.5rem, 5.1vw, 3.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin: 0;
    color: #fff7ef;
    text-wrap: balance;
}

.hero-description {
    font-size: 1.125rem;
    color: #bdbdbd;
    line-height: 1.8;
    margin: 0;
    max-width: 500px;
}

.hero-links {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 26;
}

.hero-link {
    color: #e7e7e7;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.hero-link-primary {
    background: #f2f2f2;
    color: #050505;
    border-color: #f2f2f2;
}

.hero-link-primary:hover {
    color: #050505;
    border-color: #ffffff;
    background: #ffffff;
}

.hero-link:hover {
    color: #fff7ef;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.hero-link:focus-visible {
    outline: 2px solid #fff7ef;
    outline-offset: 3px;
}

.hero-contact-status {
    min-height: 1.4rem;
    margin: 4px 0 0;
    color: #bdbdbd;
    font-size: 0.92rem;
}

.hero-right {
    display: flex;
    justify-content: center;
}

.projects-section {
    position: relative;
    z-index: 18;
    padding: 20px 40px 120px;
}

.projects-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(12, 12, 12, 0.96) 0%, rgba(6, 6, 6, 0.98) 100%);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.projects-intro {
    max-width: 720px;
}

.projects-kicker {
    margin: 0 0 10px;
    color: #d5d5d5;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.projects-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    color: #fff7ef;
}

.projects-description {
    margin: 18px 0 0;
    max-width: 620px;
    color: #b8b8b8;
    font-size: 1.02rem;
    line-height: 1.8;
}

.projects-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    min-height: 100%;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.project-card-featured {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 30%),
        rgba(255, 255, 255, 0.04);
}

.project-type {
    margin: 0 0 12px;
    color: #d4d4d4;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.project-name {
    margin: 0;
    color: #fff7ef;
    font-size: 1.32rem;
    line-height: 1.25;
}

.project-copy {
    margin: 14px 0 0;
    color: #c1c1c1;
    line-height: 1.75;
    font-size: 0.98rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.project-tag {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #ebebeb;
    font-size: 0.84rem;
}

.projects-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.projects-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: #f3f3f3;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.projects-action-primary {
    background: #f2f2f2;
    color: #080808;
    border-color: #f2f2f2;
}

.projects-action:hover {
    background: rgba(255, 255, 255, 0.08);
}

.projects-action-primary:hover {
    background: #ffffff;
    color: #050505;
}

.hero-info-card {
    background: rgba(10, 10, 10, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.hero-label {
    margin: 0;
    color: #d0d0d0;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}

.hero-info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff7ef;
    margin: 8px 0 0 0;
}

.hero-profile-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
}

.hero-profile-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-profile-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.hero-profile-key {
    color: #9f9f9f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-profile-value {
    color: #ededed;
    font-size: 1rem;
    line-height: 1.55;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.08);
    color: #ededed;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sphere-body {
    min-height: 200vh;
    position: relative;
}

.sphere-page {
    min-height: 200vh;
}

.sphere-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: calc(24px + min(22vw, 360px) + 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.about-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 24px;
    max-width: 360px;
    width: min(22vw, 360px);
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: stretch;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.about-panel.is-active {
    pointer-events: auto;
}

.about-panel-inner {
    width: 100%;
    height: 100%;
    background: rgba(8, 8, 8, 0.92);
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* FIX: Pushes content top-down so margins work properly */
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow-y: auto; /* FIX: Protects against tall content overflowing the UI */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Custom Scrollbar for panel */
.about-panel-inner::-webkit-scrollbar {
    width: 4px;
}
.about-panel-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}


.about-panel-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    position: relative !important;
}
.about-panel-content .about-label,
.about-panel-content .about-text,
.about-panel-content .contact-links {
    position: relative !important; 
    top: auto !important;
    left: auto !important;
    transform: translateY(0) !important; 
    margin: 0 !important;
}

/* FIX: Section headers styling for EDUCATION, CONTACT, etc. */
.about-label, 
.contact-kicker {
    /* Note: If you still see TWO "EDUCATION" titles after this, change 
       display to 'none !important' to hide the CSS one, OR delete the duplicate in your HTML file */
    display: block !important; 
    position: relative !important;
    margin: 0 !important; /* Stripping margins to let 'gap' handle the spacing */
    line-height: 1.2 !important;
    height: auto !important; /* Prevents the element from collapsing to 0 height */
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #ffffff;
}

/* FIX: Description text styling & animation */
.about-text {
    display: block !important;
    position: relative !important;
    margin: 0 0 16px 0 !important; 
    height: auto !important;
    color: #bebebe;
    line-height: 1.7;
    font-size: 0.98rem;
    
    /* Animation */
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* FIX: Links styling & staggered animation */
.contact-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    position: relative !important;
    margin: 0 !important;
    
    /* Animation */
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease 0.15s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

/* FIX: Unified visibility triggers */
.about-text.is-visible,
.contact-links.is-visible,
.is-visible .about-text,
.is-visible .contact-links {
    opacity: 1;
    transform: translateY(0);
}

.contact-link {
    color: #dcdcdc;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 0.95rem;
}

.contact-link:hover {
    color: #fff7ef;
}

.sphere-text {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: calc(24px + min(22vw, 360px) + 24px);
    display: none;
}

#sphereCanvas {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    cursor: default;
}

.sphere-page.is-panel-mode #sphereCanvas {
    pointer-events: auto;
}

#sphereCanvas.is-interactive {
    cursor: pointer;
}

.cloud-popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 40;
}

.cloud-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.cloud-popup-card {
    width: min(520px, 100%);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 8, 8, 0.92);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.cloud-popup-close {
    margin-left: auto;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #f3f3f3;
    padding: 8px 14px;
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
}

.cloud-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cloud-popup-kicker {
    margin: 18px 0 10px;
    color: #d1d1d1;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.cloud-popup-title {
    margin: 0 0 14px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.1;
    color: #ffffff;
}

.cloud-popup-text {
    margin: 0;
    color: #c3c3c3;
    line-height: 1.75;
    font-size: 1rem;
}

.scroll-space {
    height: 500vh;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .site-header {
        left: 18px;
        top: 16px;
        right: 18px;
        font-size: 0.8rem;
        letter-spacing: 0.1em;
    }

    .site-header.is-panel {
        left: 18px;
        top: 16px;
        font-size: 0.8rem;
        letter-spacing: 0.1em;
    }

    .hero-section {
        min-height: auto;
        padding: 84px 18px 32px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-left {
        gap: 18px;
    }

    .hero-title {
        max-width: none;
        font-size: clamp(2.1rem, 10vw, 2.75rem);
        line-height: 1.08;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.7;
        max-width: none;
    }

    .hero-links {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero-link {
        width: 100%;
        justify-content: center;
        padding: 14px 18px;
        border-radius: 14px;
    }

    .hero-info-card {
        max-width: none;
        padding: 24px 20px;
        border-radius: 24px;
    }

    .hero-profile-value {
        font-size: 0.96rem;
    }

    .projects-section {
        padding: 0 18px 56px;
    }

    .projects-shell {
        padding: 24px;
        border-radius: 22px;
    }

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

    .projects-title {
        font-size: clamp(1.75rem, 8vw, 2.4rem);
    }

    .projects-description,
    .project-copy {
        font-size: 0.96rem;
        line-height: 1.7;
    }

    .project-card {
        padding: 20px;
        border-radius: 20px;
    }

    .projects-actions {
        flex-direction: column;
    }

    .projects-action {
        width: 100%;
        padding: 14px 18px;
    }

    .sphere-body,
    .sphere-page {
        min-height: auto;
    }

    .sphere-body {
        padding: 0 18px 32px;
    }

    .sphere-container {
        position: relative;
        inset: auto;
        left: auto;
        right: auto;
        bottom: auto;
        top: auto;
        height: 48vh;
        min-height: 320px;
        margin: 0;
        border-radius: 28px;
        background:
            radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 52%),
            linear-gradient(180deg, rgba(10, 10, 10, 0.96) 0%, rgba(4, 4, 4, 0.98) 100%);
        border: 1px solid rgba(255, 255, 255, 0.08);
        overflow: hidden;
    }

    .about-panel {
        position: relative;
        width: 100%;
        max-width: none;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        height: auto;
        max-height: none;
        margin: 20px 0 0;
        opacity: 1 !important;
    }

    .about-panel-inner {
        border-radius: 20px;
        padding: 22px 20px;
        max-height: none;
    }

    .about-label,
    .contact-kicker {
        font-size: 0.72rem;
        letter-spacing: 0.18em;
    }

    .about-text,
    .contact-link {
        font-size: 0.94rem;
    }

    .scroll-space {
        height: 80px;
    }

    #sphereCanvas {
        pointer-events: none !important;
    }

    .cloud-popup-card {
        padding: 22px;
        border-radius: 20px;
    }
}
