/* ============================================
   HOME — Single Viewport. No Scroll.
   Dune aesthetic: dark, cinematic, modular.
   ============================================ */

/* ── ENTRANCE ANIMATIONS ── */
@keyframes dune-emerge {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0);    }
}

@keyframes dune-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── VIEWPORT SHELL ── */
.viewport {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-rows: 60px 1fr 44px;
    position: relative;
    background:
        radial-gradient(ellipse at 75% -5%,  rgba(196, 148, 26, 0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 5%  95%,  rgba(30, 96, 117, 0.08)  0%, transparent 40%),
        radial-gradient(ellipse at 50% 60%,  rgba(22, 16, 9, 0.4)     0%, transparent 70%),
        var(--deep);
}

/* No full-width decorative lines — arcs live in hero-side only */

/* ── TOP BAR ── */
.topbar {
    grid-row: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
    border-bottom: 1px solid var(--glass-border-dim);
    position: relative;
    z-index: 10;
    animation: dune-fade 0.8s ease 0.1s both;
}

.identity-sigil {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--spice);
    text-transform: uppercase;
    transition: opacity 0.25s ease;
}

.identity-sigil:hover { opacity: 0.7; }

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-trigger {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.25s ease;
    padding: 0;
    position: relative;
}

.nav-trigger::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--spice);
    transition: width 0.3s ease;
}

.nav-trigger:hover,
.nav-trigger.active {
    color: var(--text-primary);
}

.nav-trigger:hover::after,
.nav-trigger.active::after {
    width: 100%;
}

/* ── MAIN STAGE ── */
.main-stage {
    grid-row: 2;
    display: grid;
    grid-template-columns: 56% 44%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ── HERO SIDE ── */
.hero-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem 0 3rem;
    position: relative;
}

/* Outer dune ridge — large arc, mostly off-screen left */
.hero-side::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    border: 1px solid rgba(196, 148, 26, 0.05);
    left: -320px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
}

/* Inner dune ridge — tighter arc, slightly offset for layered depth */
.hero-side::after {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    border: 1px solid rgba(196, 148, 26, 0.035);
    left: -230px;
    top: 50%;
    transform: translateY(-46%);
    pointer-events: none;
    z-index: 0;
}

.hero-role {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--spice);
    margin-bottom: 1.25rem;
    opacity: 0.85;
    animation: dune-emerge 0.9s var(--ease-out) 0.35s both;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 8.5vw, 10.5rem);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 1.75rem;
    animation: dune-emerge 1s var(--ease-out) 0.5s both;
    /* Faint warm glow in the letterforms */
    text-shadow: 0 0 80px rgba(196, 148, 26, 0.12);
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 400px;
    animation: dune-emerge 0.9s var(--ease-out) 0.7s both;
}

/* ── WORK SIDE ── */
.work-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--glass-border-dim);
    padding: 0 3rem 0 3rem;
    animation: dune-emerge 1s var(--ease-out) 0.6s both;
}

.work-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    padding-left: 0.25rem;
}

.work-tiles {
    display: flex;
    flex-direction: column;
}

.work-tile {
    display: grid;
    grid-template-columns: 2.5rem 1fr 4.5rem 1.5rem;
    align-items: center;
    gap: 1.25rem;
    padding: 1.4rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-dim);
    border-bottom: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: background 0.35s ease, border-color 0.35s ease;
}

.work-tile:last-child {
    border-bottom: 1px solid var(--glass-border-dim);
}

/* Left edge accent — grows from bottom on hover */
.work-tile::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2px;
    height: 0;
    background: var(--spice);
    transition: height 0.4s var(--ease-out);
}

.work-tile:hover {
    background: var(--glass-bg-high);
    border-color: var(--glass-border);
}

.work-tile:hover::before {
    height: 100%;
    bottom: auto;
    top: 0;
}

.tile-index {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--spice-dim);
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.tile-body { min-width: 0; }

.tile-name {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 1.8vw, 1.65rem);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.03em;
    transition: color 0.25s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-tile:hover .tile-name {
    color: var(--spice-bright);
}

.tile-type {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text-dim);
    display: block;
    margin-top: 0.2rem;
    font-weight: 300;
    letter-spacing: 0.03em;
}

.tile-preview {
    width: 4.5rem;
    height: 3.2rem;
    overflow: hidden;
    border-radius: 2px;
    flex-shrink: 0;
    border: 1px solid var(--glass-border-dim);
}

.tile-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: grayscale(60%) sepia(12%) brightness(0.8);
    transition: filter 0.4s ease;
}

.work-tile:hover .tile-preview img {
    filter: grayscale(20%) sepia(10%) brightness(0.9);
}

.tile-arrow {
    font-size: 1rem;
    color: var(--spice-dim);
    transition: transform 0.3s var(--ease-out), color 0.25s ease;
    text-align: right;
}

.work-tile:hover .tile-arrow {
    transform: translateX(5px);
    color: var(--spice);
}

/* ── VIEWPORT FOOTER ── */
.viewport-footer {
    grid-row: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
    border-top: 1px solid var(--glass-border-dim);
    position: relative;
    z-index: 10;
    animation: dune-fade 0.8s ease 1s both;
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.footer-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--spice-dim);
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-status::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--spice);
    animation: pulse-dot 3s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.5; transform: scale(1);   }
    50%       { opacity: 1;   transform: scale(1.3); }
}

/* ── PANEL SYSTEM ── */
.panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 5, 4, 0.70);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
    z-index: 80;
}

.panel-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.panel-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 52%;
    height: 100%;
    background: rgba(13, 9, 5, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 1px solid var(--glass-border);
    box-shadow: -20px 0 60px rgba(6, 5, 4, 0.6),
                inset 1px 0 0 rgba(196, 148, 26, 0.06);
    transform: translateX(100%);
    transition: transform 0.65s var(--ease-io);
    will-change: transform;
    z-index: 90;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-overlay.active {
    transform: translateX(0);
}

/* Non-scrolling header row containing the close button */
.panel-header {
    display: flex;
    justify-content: flex-end;
    padding: 1.5rem 1.75rem 0;
    flex-shrink: 0;
}

.panel-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    border: 1px solid var(--glass-border-dim);
    border-radius: 2px;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    flex-shrink: 0;
}

.panel-close:hover {
    color: var(--text-primary);
    border-color: var(--glass-border);
    background: var(--glass-bg);
}

.panel-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border-dim);
    margin-top: 0;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.25rem 3.5rem 3.5rem;
    scrollbar-gutter: stable;
}

/* Panel scroll styling */
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

/* ── ABOUT PANEL ── */
.about-bio p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 1.25rem;
}

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

.about-education {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-dim);
    border-left: 2px solid var(--spice);
}

.about-education p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-education strong {
    color: var(--spice);
    display: block;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

.hobby-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 2rem;
    border: 1px solid var(--glass-border-dim);
}

.hobby-block {
    padding: 1.25rem;
    background: var(--glass-bg);
}

.hobby-block h4 {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--spice);
    margin-bottom: 0.75rem;
    opacity: 0.85;
}

.hobby-block ul {
    list-style: none;
}

.hobby-block li {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
    padding: 0.2rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.hobby-block li::before {
    content: '';
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--spice-dim);
    flex-shrink: 0;
    display: block;
}

/* ── EXPERIENCE PANEL ── */
.exp-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.exp-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--glass-border-dim);
    position: relative;
}

.exp-item:first-child { padding-top: 0; }
.exp-item:last-child  { border-bottom: none; padding-bottom: 0; }

.exp-item__role {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
}

.exp-item__company {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--spice);
    opacity: 0.8;
    margin-bottom: 0.2rem;
}

.exp-item__date {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.exp-item__desc {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.75;
}

/* ── CONTACT PANEL ── */
.contact-panel-intro {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 2.5rem;
}

.contact-links-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-dim);
    border-bottom: none;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.contact-link-item:last-child { border-bottom: 1px solid var(--glass-border-dim); }

.contact-link-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(196, 148, 26, 0.08), transparent);
    transition: width 0.35s ease;
}

.contact-link-item:hover { border-color: var(--glass-border); }
.contact-link-item:hover::before { width: 100%; }

.contact-link-label {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

.contact-link-value {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
    transition: color 0.25s ease;
}

.contact-link-item:hover .contact-link-value {
    color: var(--spice);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .main-stage {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .viewport {
        height: auto;
        min-height: 100vh;
        overflow: auto;
        grid-template-rows: 60px auto 44px;
    }

    .hero-side {
        padding: 3rem 2rem 2rem;
    }

    .hero-side::before { display: none; }

    .work-side {
        border-left: none;
        border-top: 1px solid var(--glass-border-dim);
        padding: 2rem;
    }

    .panel-overlay {
        width: 100%;
    }

    .topbar { padding: 0 1.5rem; }
    .viewport-footer { padding: 0 1.5rem; }
}

@media (max-width: 600px) {
    .hero-name {
        font-size: clamp(3.5rem, 15vw, 6rem);
    }

    .topbar-nav { gap: 1.5rem; }

    .panel-header { padding: 1.25rem 1.25rem 0; }
    .panel-body   { padding: 1rem 1.5rem 2.5rem; }
}
