/* ===== Variables ===== */
:root {
    --bg:            #060a12;
    --surface:       rgba(255, 255, 255, 0.028);
    --surface-2:     rgba(255, 255, 255, 0.055);
    --border:        rgba(255, 255, 255, 0.08);
    --border-accent: rgba(96, 165, 250, 0.38);
    --text:          #ffffff;
    --text-muted:    #64748b;
    --text-subtle:   #94a3b8;
    --label:         #60a5fa;
    --accent:        #60a5fa;
    --accent-2:      #a78bfa;
    --accent-light:  #93c5fd;
    --accent-vivid:  #c084fc;
    --accent-dim:    rgba(96, 165, 250, 0.1);
    --ecu-gold:      #FFC72C;
    --teal:          #34d399;
    --green:         #4ade80;
    --font:          'JetBrains Mono', monospace;
    --radius:        8px;
    --radius-lg:     14px;
    --radius-xl:     20px;
}

/* ===== Pong loader ===== */
.pong-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #060a12;
    gap: 1.5rem;
}

.pong-arena {
    position: relative;
    width: 240px;
    height: 130px;
    border: 1px solid #242424;
    border-radius: 4px;
    overflow: hidden;
}

.pong-net {
    position: absolute;
    left: calc(50% - 1px);
    top: 0;
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        #242424 0px, #242424 8px,
        transparent 8px, transparent 16px
    );
}

.pong-paddle--left,
.pong-paddle--right {
    position: absolute;
    width: 4px;
    height: 34px;
    border-radius: 2px;
    background: #a78bfa;
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.7);
    top: calc(50% - 17px);
}

.pong-paddle--left  { left: 8px;  animation: paddle 0.9s ease-in-out infinite alternate; }
.pong-paddle--right { right: 8px; animation: paddle 0.9s ease-in-out infinite alternate-reverse; }

@keyframes paddle {
    from { transform: translateY(-42px); }
    to   { transform: translateY(42px); }
}

.pong-ball-wrap {
    position: absolute;
    inset: 0;
    animation: ball-x 1.1s linear infinite alternate;
}

.pong-ball {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.9);
    left: calc(50% - 4px);
    top: calc(50% - 4px);
    animation: ball-y 0.73s linear infinite alternate;
}

@keyframes ball-x {
    from { transform: translateX(-106px); }
    to   { transform: translateX(106px); }
}

@keyframes ball-y {
    from { transform: translateY(-53px); }
    to   { transform: translateY(53px); }
}

.pong-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 0.05em;
}

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

/* ===== Background — gradient orbs + dot grid ===== */
html {
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 70% 60% at 10% 10%, rgba(96, 165, 250, 0.13) 0%, transparent 100%),
        radial-gradient(ellipse 55% 65% at 90% 85%, rgba(167, 139, 250, 0.1) 0%, transparent 100%);
    min-height: 100%;
}

html::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
    z-index: 0;
}

body {
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    position: relative;
    z-index: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--accent-light);
    text-decoration: none;
}

/* ===== Layout ===== */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.main {
    flex: 1;
    animation: fadeUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.main--full {
    max-width: 1280px;
    padding: 2rem 2rem;
    margin: 0 auto;
    width: 100%;
}

/* ===== Tags ===== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-family: var(--font);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.tag:hover {
    border-color: var(--border-accent);
    color: var(--text);
    text-decoration: none;
}

.tag.accent {
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent);
    border-color: rgba(96, 165, 250, 0.25);
    font-size: 0.78rem;
    padding: 0.35rem 0.9rem;
}

.tag.accent:hover {
    background: rgba(96, 165, 250, 0.18);
    color: var(--accent-light);
    border-color: rgba(96, 165, 250, 0.45);
}

.tag-live {
    background: rgba(96, 165, 250, 0.08);
    color: var(--accent);
    border-color: rgba(96, 165, 250, 0.25);
    text-decoration: none;
}

.tag-live:hover {
    background: rgba(96, 165, 250, 0.16);
    border-color: rgba(96, 165, 250, 0.45);
    color: var(--accent-light);
}

.tag-btn {
    background: none;
    border: 1px solid var(--border-accent);
    cursor: pointer;
    font-family: var(--font);
    font-size: inherit;
}

/* ===== Section utilities ===== */
.section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--label);
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.panel-section { margin-bottom: 2.5rem; }

.status-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 2rem 0;
}

/* ===== Timeline (shared by Experience + Education panels) ===== */
.timeline {
    display: flex;
    flex-direction: column;
}

.timeline-item + .timeline-item { margin-top: 2.25rem; }

.timeline-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 1.25rem;
}

.timeline-year {
    font-size: 0.72rem;
    color: var(--label);
    text-align: right;
    padding-top: 0.25rem;
    line-height: 1.5;
}

.timeline-content {
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0.45rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
}

.timeline-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--label);
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.timeline-org {
    font-size: 0.78rem;
    color: var(--accent-2);
    margin-bottom: 0.65rem;
}

.timeline-detail {
    font-size: 0.78rem;
    color: var(--text-subtle);
    margin-bottom: 0.65rem;
}

.timeline-desc {
    font-size: 0.83rem;
    color: var(--text);
    line-height: 1.8;
}

.timeline-desc ul { margin: 0.25rem 0 0 1.1rem; }
.timeline-desc li  { margin-bottom: 0.3rem; }

@media (max-width: 600px) {
    .timeline-item { grid-template-columns: 68px 1fr; }
}

/* ===== Blazor framework ===== */
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid                              { outline: 1px solid red; }
.validation-message                   { color: red; }

#blazor-error-ui {
    color-scheme: light only;
    background: rgba(6, 10, 18, 0.95);
    color: var(--text);
    border-top: 1px solid #f87171;
    bottom: 0;
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: var(--font);
    font-size: 0.8rem;
    backdrop-filter: blur(12px);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: rgba(248, 113, 113, 0.05);
    border: 1px solid #f87171;
    border-radius: var(--radius);
    padding: 1rem;
    color: #f87171;
    font-family: var(--font);
    font-size: 0.85rem;
}

.blazor-error-boundary::after { content: "An error has occurred." }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-family: var(--font);
    font-size: 0.72rem;
    color: var(--text-muted);
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text::after { content: var(--blazor-load-percentage-text, "Loading"); }

/* ===== BzBento grid ===== */
.portfolio-grid {
    max-width: 960px;
    margin: 0 auto;
    --bzb-card-radius: 14px;
    perspective: 1200px;
}

.portfolio-grid .bzb-item {
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    position: relative;
    z-index: 1;
}

.portfolio-grid .bzb-item:hover {
    transform: translateY(-10px) scale(1.025) translateZ(0) !important;
    box-shadow:
        0 28px 72px rgba(0, 0, 0, 0.75),
        0 0 0 1.5px var(--accent-vivid),
        0 0 22px rgba(192, 132, 252, 0.7),
        0 0 60px rgba(192, 132, 252, 0.25) !important;
    border-color: rgba(192, 132, 252, 0.5) !important;
    z-index: 10;
}

/* ===== Tile base ===== */
.tile-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tile-content--center {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tile-icon { font-size: 2rem; line-height: 1; }
.tile-icon--vivid { filter: brightness(1.8) saturate(1.4); }

.tile-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.tile-sublabel {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.tile-eyebrow {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
}

.tile-eyebrow--title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #ffffff;
    text-transform: none;
}

.tile-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .main--full { padding: 1rem; }

    .portfolio-grid .bzb-item:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}
