/* ============================================================
   TOKENS
   ============================================================ */
:root {
    --bg:           #080808;
    --text:         #f0f0f0;
    --sub:          #999999;
    --sub2:         #bbbbbb;
    --dim:          #555555;
    --muted:        #333333;
    --glass-bg:     rgba(255,255,255,0.04);
    --glass-border: rgba(255,255,255,0.09);
    --blur:         blur(20px);
    --green:        #00ff9d;
    --ease:         cubic-bezier(0.25,0.8,0.25,1);
    --spring:       cubic-bezier(0.16,1,0.3,1);
    --t:            0.3s;
    --tf:           0.15s;
}

* { margin:0; padding:0; box-sizing:border-box; cursor:none; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 52px; /* top-bar height */
}

/* ============================================================
   BACKGROUND
   ============================================================ */
#aurora {
    position: fixed; inset: 0;
    z-index: -3; pointer-events: none;
}

.bg-noise {
    position: fixed; inset: 0;
    z-index: -1; pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    animation: noise 0.5s steps(1) infinite;
}
@keyframes noise {
    0%  { background-position: 0 0; }
    25% { background-position: -14px 9px; }
    50% { background-position: 12px -8px; }
    75% { background-position: -8px 16px; }
   100% { background-position: 0 0; }
}

.scanlines {
    position: fixed; inset: 0;
    z-index: 1; pointer-events: none;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0,0,0,0.022) 2px, rgba(0,0,0,0.022) 4px
    );
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(8,8,8,0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    z-index: 1000;
}

/* Profile left */
.tb-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.tb-avatar-wrap {
    position: relative;
    width: 30px; height: 30px;
    flex-shrink: 0;
}

.tb-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255,255,255,0.14);
    display: block;
}

.tb-online-dot {
    position: absolute;
    bottom: 0; right: -1px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--bg);
    box-shadow: 0 0 6px rgba(0,255,157,0.5);
}

.tb-info {
    display: flex;
    align-items: baseline;
    gap: 0;
}

.tb-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
}

.tb-tag {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    color: var(--dim);
}

/* Stats right */
.tb-stats {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    color: var(--dim);
}

.tb-icon { margin-right: 0.25rem; font-size: 0.7rem; }
.tb-sep  { opacity: 0.3; }

/* ============================================================
   CURSOR — ROTATING RETICLE
   ============================================================ */
.cursor-dot {
    position: fixed; top:0; left:0;
    width: 4px; height: 4px;
    background: var(--text);
    border-radius: 50%;
    transform: translate(-50%,-50%);
    z-index: 9999;
    pointer-events: none;
}

.cursor-outer {
    position: fixed; top:0; left:0;
    z-index: 9998; pointer-events: none;
}

.cursor-sizer {
    width: 42px; height: 42px;
    margin: -21px 0 0 -21px;
    transition: transform 0.25s var(--ease);
}

.cursor-ring {
    width:100%; height:100%;
    position: relative;
    animation: c-spin 4s linear infinite;
}

.c-tl,.c-tr,.c-bl,.c-br {
    position: absolute;
    width: 10px; height: 10px;
}
.c-tl { top:0;    left:0;  border-top:  1.5px solid rgba(255,255,255,0.8); border-left:  1.5px solid rgba(255,255,255,0.8); }
.c-tr { top:0;    right:0; border-top:  1.5px solid rgba(255,255,255,0.8); border-right: 1.5px solid rgba(255,255,255,0.8); }
.c-bl { bottom:0; left:0;  border-bottom:1.5px solid rgba(255,255,255,0.8);border-left:  1.5px solid rgba(255,255,255,0.8); }
.c-br { bottom:0; right:0; border-bottom:1.5px solid rgba(255,255,255,0.8);border-right: 1.5px solid rgba(255,255,255,0.8); }

@keyframes c-spin { from{transform:rotate(0)}  to{transform:rotate(360deg)} }

.cursor-outer.is-magnetic .cursor-sizer { transform: scale(1.6); }
.cursor-outer.is-magnetic .cursor-ring  { animation-duration: 0.6s; }
.cursor-outer.is-magnetic .c-tl,
.cursor-outer.is-magnetic .c-tr,
.cursor-outer.is-magnetic .c-bl,
.cursor-outer.is-magnetic .c-br {
    border-color: rgba(255,255,255,1);
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.5));
}
.cursor-outer.is-click .cursor-ring { animation-duration: 0.18s; }

/* ============================================================
   GLASS UTILITY
   ============================================================ */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: calc(100vh - 52px);
    position: relative;
    z-index: 2;
    padding: 0 2rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Handle — terminal style */
.hero-eyebrow {
    display: flex;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    letter-spacing: 4px;
    opacity: 0;
    gap: 0;
}
.fonts-loaded .hero-eyebrow { animation: si 0.7s 0.1s var(--spring) forwards; }

.handle-prefix {
    color: var(--dim);
    font-weight: 400;
}

.hero-handle {
    color: var(--sub2);
    font-weight: 600;
    letter-spacing: 5px;
}

.handle-cursor {
    color: var(--sub);
    font-size: 0.85rem;
    animation: blink 1.1s step-end infinite;
    margin-left: 3px;
    line-height: 1;
}

/* Title */
.title {
    font-size: clamp(3.4rem, 9vw, 7.2rem);
    font-weight: 900;
    letter-spacing: -4px;
    line-height: 0.95;
    color: var(--text);
    opacity: 0;
}
.fonts-loaded .title { animation: si 0.85s 0.22s var(--spring) forwards; }
.highlight { position: relative; display: inline-block; }

/* Accent line */
.hero-accent-line {
    width: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
    opacity: 0;
}
.fonts-loaded .hero-accent-line {
    animation: line-g 1.2s 0.9s var(--spring) forwards;
}
@keyframes line-g {
    from { width:0; opacity:0; }
    to   { width:280px; opacity:1; }
}

/* Typewriter */
.typewriter-container {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.05rem;
    color: var(--sub);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
}
.fonts-loaded .typewriter-container { animation: si 0.7s 0.4s var(--spring) forwards; }

.static-prefix { color: var(--dim); }

.typewriter-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.25rem 0.7rem;
    border-radius: 5px;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.typewriter-box:hover {
    border-color: rgba(255,255,255,0.2);
}

.blinking-cursor {
    color: var(--sub);
    animation: blink 0.9s step-end infinite;
    margin-left: 1px;
    font-weight: 300;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* One-liner */
.one-liner {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.78rem;
    color: var(--dim);
    letter-spacing: 0.3px;
    opacity: 0;
    display: flex;
    align-items: center;
    min-height: 1.4em;
}
.fonts-loaded .one-liner { animation: si 0.7s 0.55s var(--spring) forwards; }

.ol-cursor {
    color: var(--muted);
    animation: blink 0.9s step-end infinite;
    margin-left: 1px;
}

/* Scroll down */
.scroll-down {
    position: absolute;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--muted);
    animation: bounce 2.8s ease-in-out infinite;
    transition: color var(--t);
    z-index: 2;
}
.scroll-down span { text-transform: lowercase; }
.scroll-down:hover { color: var(--dim); }

@keyframes bounce {
    0%,100% { transform: translateY(0); }
    45%      { transform: translateY(-10px); }
    65%      { transform: translateY(-4px); }
}

/* Shared entrance */
@keyframes si {
    from { opacity:0; transform:translateY(18px); }
    to   { opacity:1; transform:translateY(0); }
}

/* ============================================================
   GLITCH
   ============================================================ */
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute; top:0; left:0;
    width:100%; height:100%; opacity:0;
}
.glitch-text::before {
    color:#fff; clip-path:polygon(0 0,100% 0,100% 38%,0 38%);
    transform:translate(-3px,0);
}
.glitch-text::after {
    color:#ccc; clip-path:polygon(0 62%,100% 62%,100% 100%,0 100%);
    transform:translate(3px,0);
}
.glitch-text.is-glitching::before,
.glitch-text.is-glitching::after {
    opacity:1; animation:glitch .3s steps(2) forwards;
}
@keyframes glitch {
    0%  { transform:translate(-3px,0); }
    25% { transform:translate(3px,2px);  clip-path:polygon(0 22%,100% 22%,100% 58%,0 58%); }
    50% { transform:translate(-4px,-1px);clip-path:polygon(0 45%,100% 45%,100% 82%,0 82%); }
    75% { transform:translate(2px,1px);  clip-path:polygon(0 8%,100% 8%,100% 32%,0 32%); }
   100% { transform:translate(0); opacity:0; }
}

/* ============================================================
   MARQUEE BAND
   ============================================================ */
.marquee-band {
    width: 100%;
    overflow: hidden;
    border-top:    1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0.75rem 0;
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
}

.marquee-track {
    display: inline-flex;
    white-space: nowrap;
    animation: marquee-scroll 28s linear infinite;
}

.marquee-track span {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 5px;
    color: rgba(255,255,255,0.18);
    text-transform: uppercase;
    font-style: italic;
    flex-shrink: 0;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal-item {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--spring), transform 0.7s var(--spring);
}
.reveal-item:nth-child(2) { transition-delay: 0.08s; }
.reveal-item:nth-child(3) { transition-delay: 0.16s; }
.reveal-item:nth-child(4) { transition-delay: 0.24s; }
.reveal-item.is-visible   { opacity:1; transform:translateY(0); }

.skills-tags .tag {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    transition: opacity 0.38s ease, transform 0.38s ease,
                color var(--tf), border-color var(--tf), background var(--tf), box-shadow var(--tf);
}
.skills-tags.is-visible .tag                  { opacity:1; transform:translateY(0) scale(1); }
.skills-tags.is-visible .tag:nth-child(1)     { transition-delay:0.03s; }
.skills-tags.is-visible .tag:nth-child(2)     { transition-delay:0.06s; }
.skills-tags.is-visible .tag:nth-child(3)     { transition-delay:0.09s; }
.skills-tags.is-visible .tag:nth-child(4)     { transition-delay:0.12s; }
.skills-tags.is-visible .tag:nth-child(5)     { transition-delay:0.15s; }
.skills-tags.is-visible .tag:nth-child(6)     { transition-delay:0.18s; }
.skills-tags.is-visible .tag:nth-child(7)     { transition-delay:0.21s; }
.skills-tags.is-visible .tag:nth-child(8)     { transition-delay:0.24s; }
.skills-tags.is-visible .tag:nth-child(9)     { transition-delay:0.27s; }
.skills-tags.is-visible .tag:nth-child(10)    { transition-delay:0.30s; }

/* ============================================================
   ABOUT
   ============================================================ */
.about {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 2rem;
    position: relative;
    z-index: 2;
}

.about-inner {
    width: 100%;
    max-width: 900px;
}

/* Header */
.about-header {
    margin-bottom: 3.5rem;
    border-left: 2px solid rgba(255,255,255,0.1);
    padding-left: 1.25rem;
}

.about-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 2.5px;
    color: var(--dim);
    display: block;
    margin-bottom: 0.4rem;
}

.about-title {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text);
    line-height: 1;
}

/* Body grid: bio (wider) + side (narrower) */
.about-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-bio p {
    font-size: 0.97rem;
    line-height: 1.9;
    color: var(--sub);
    margin-bottom: 1.1rem;
}
.about-bio p:last-child { margin-bottom: 0; }
.about-bio em { color: var(--text); font-style: normal; font-weight: 600; }

.about-side {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Skills */
.skills-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--dim);
    margin-bottom: 0.85rem;
    display: block;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    padding: 0.28rem 0.7rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: var(--sub);
    letter-spacing: 0.3px;
    transition: color var(--tf), border-color var(--tf), background var(--tf), box-shadow var(--tf);
}
.tag:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 10px rgba(255,255,255,0.05);
}

/* Social links — gradient on hover */
.about-links { display: flex; flex-direction: column; }

.social-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--sub);
    text-decoration: none;
    font-size: 0.88rem;
    font-family: 'Roboto Mono', monospace;
    transition: color var(--t), padding-left var(--t);
    position: relative;
    overflow: hidden;
}
.about-links .social-link:first-child {
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Gradient sweep on hover */
.social-link::before {
    content: '';
    position: absolute; inset: 0;
    left: -100%;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.01) 60%,
        transparent 100%);
    transition: left 0.35s ease;
}
.social-link:hover::before { left: 0; }

/* Gradient left accent bar */
.social-link::after {
    content: '';
    position: absolute;
    left: 0; top: 12%; height: 76%;
    width: 2px;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.5) 0%,
        rgba(255,255,255,0.1) 100%);
    opacity: 0;
    border-radius: 2px;
    transition: opacity var(--t);
}
.social-link:hover::after { opacity: 1; }

.social-link:hover {
    color: var(--text);
    padding-left: 0.85rem;
}

.social-link i:first-child { width:16px; text-align:center; font-size:0.95rem; flex-shrink:0; }

.social-arrow {
    margin-left: auto;
    font-size: 0.65rem;
    opacity: 0;
    transform: translate(-5px, 5px);
    transition: opacity var(--t), transform var(--t);
}
.social-link:hover .social-arrow { opacity:1; transform:translate(0,0); }

/* ============================================================
   DIVIDERS + SECTION TITLE
   ============================================================ */
.section-title {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--dim);
    text-transform: lowercase;
    margin-bottom: 3.5rem;
}

.section-divider {
    width: 100%;
    max-width: 900px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    margin: 0 auto;
}

/* ============================================================
   PROJECTS / EXPERIENCE
   ============================================================ */
.experience {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    position: relative;
    z-index: 2;
}

.timeline-container { width:100%; max-width:800px; margin-bottom:3rem; }

.timeline-nodes-wrapper {
    position: relative; padding: 2rem 0;
    display: flex; align-items: center;
}

.timeline-line {
    position: absolute; width:100%; height:1px;
    background: var(--glass-border); top:50%; z-index:0;
}

.timeline-nodes {
    display: flex; justify-content: space-between;
    width:100%; z-index:1; position:relative;
}

.node { display:flex; flex-direction:column; align-items:center; gap:0.9rem; position:relative; }

.node-dot {
    width:15px; height:15px; border-radius:50%;
    background: var(--bg);
    border: 2px solid var(--dim);
    transition: all var(--t) var(--ease);
}
.node:hover .node-dot,
.node.active .node-dot {
    background: var(--text);
    border-color: var(--text);
    box-shadow: 0 0 12px rgba(255,255,255,0.25);
}

.node-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    color: var(--dim);
    text-transform: capitalize;
    transition: color var(--t);
}
.node:hover .node-label,
.node.active .node-label { color: var(--sub); }

.timeline-controls {
    display: flex; justify-content: center; align-items: center;
    gap: 0.85rem; margin-top: 2rem;
}

.nav-btn, .view-all-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--sub);
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    transition: all var(--t) var(--ease);
    display: flex; align-items: center; gap: 0.4rem;
}
.nav-btn:hover, .view-all-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.22);
    color: var(--text);
}

.experience-card {
    width:100%; max-width:800px;
    padding: 2rem 2.5rem;
    text-align: center;
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.5s forwards ease-out;
    transition: border-color var(--t), box-shadow var(--t);
}
.experience-card:hover {
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 0 28px rgba(255,255,255,0.03);
}
@keyframes fadeUp { to { opacity:1; transform:translateY(0); } }

.experience-card h3 { font-size:1.45rem; font-weight:700; margin-bottom:0.4rem; }

.exp-meta {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    color: var(--dim);
    margin-bottom: 1rem;
}

.exp-link {
    color: var(--dim);
    text-decoration: none;
    transition: color var(--t);
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.exp-link:hover { color: var(--sub); }

.exp-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--sub);
    margin-bottom: 1.8rem;
}

.exp-pagination {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.5px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .title        { letter-spacing: -2.5px; }
    .about-body   { grid-template-columns: 1fr; gap: 2.5rem; }
    .top-bar      { padding: 0 1.25rem; }
    .tb-stats     { display: none; }
    .typewriter-container { font-size: 0.9rem; }
}
