/* ============================================================
   Krishna Vamsi — Portfolio
   Animated "world" UI: glassmorphism + gradients + 3D particles
   ============================================================ */

:root {
    --bg:          #05050a;
    --bg-soft:     #0b0b14;
    --surface:     rgba(255, 255, 255, 0.04);
    --surface-2:   rgba(255, 255, 255, 0.08);
    --border:      rgba(255, 255, 255, 0.08);
    --border-2:    rgba(255, 255, 255, 0.14);
    --text:        #eef0f4;
    --text-dim:    #9aa0ae;
    --text-muted:  #676b78;

    --accent:      #6aa7ff;   /* blue */
    --accent-2:    #b26bff;   /* purple */
    --accent-3:    #5df0c2;   /* mint */
    --accent-warm: #ffb86a;   /* amber */

    --grad-1: linear-gradient(135deg, #6aa7ff 0%, #b26bff 50%, #5df0c2 100%);
    --grad-2: linear-gradient(120deg, #ffb86a 0%, #ff6ab2 60%, #b26bff 100%);

    --radius-sm: 10px;
    --radius:    18px;
    --radius-lg: 28px;

    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-in:  cubic-bezier(.6, 0, .3, 1);

    --font-sans: 'Space Grotesk', system-ui, sans-serif;
    --font-disp: 'Syne', 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --max: 1280px;
    --pad: clamp(20px, 4vw, 56px);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; color: inherit; cursor: none; }
ul { list-style: none; }
::selection { background: rgba(106, 167, 255, .3); color: #fff; }

/* ---------- Background layers ---------- */
.bg-grid {
    position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 80%);
}
.bg-gradient {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(60% 50% at 20% 20%, rgba(106,167,255,.25), transparent 60%),
        radial-gradient(55% 45% at 80% 30%, rgba(178,107,255,.22), transparent 65%),
        radial-gradient(60% 50% at 50% 90%, rgba(93,240,194,.12), transparent 70%);
    filter: blur(40px);
    animation: bg-shift 28s ease-in-out infinite alternate;
}
@keyframes bg-shift {
    0%   { transform: translate(-3%, -2%) scale(1);   }
    50%  { transform: translate(4%, 3%)   scale(1.1); }
    100% { transform: translate(-2%, 2%)  scale(1);   }
}
#world-canvas {
    position: fixed; inset: 0; z-index: -1;
    width: 100vw; height: 100vh; pointer-events: none;
}

/* ---------- Loader ---------- */
.loader {
    position: fixed; inset: 0; z-index: 1000;
    background: var(--bg);
    display: grid; place-items: center;
    transition: opacity .7s var(--ease-out), visibility .7s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__inner { text-align: center; width: min(560px, 80vw); }
.loader__name {
    font-family: var(--font-disp);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: .02em;
    display: flex; justify-content: center; flex-wrap: wrap; gap: .04em;
    margin-bottom: 32px;
}
.loader__name span {
    display: inline-block;
    background: var(--grad-1);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0; transform: translateY(40px);
    animation: letter-in .6s var(--ease-out) forwards;
}
.loader__name span.sp { width: .6em; }
.loader__name span:nth-child(1){animation-delay:.05s}.loader__name span:nth-child(2){animation-delay:.1s}
.loader__name span:nth-child(3){animation-delay:.15s}.loader__name span:nth-child(4){animation-delay:.2s}
.loader__name span:nth-child(5){animation-delay:.25s}.loader__name span:nth-child(6){animation-delay:.3s}
.loader__name span:nth-child(7){animation-delay:.35s}.loader__name span:nth-child(8){animation-delay:.4s}
.loader__name span:nth-child(9){animation-delay:.45s}.loader__name span:nth-child(10){animation-delay:.5s}
.loader__name span:nth-child(11){animation-delay:.55s}.loader__name span:nth-child(12){animation-delay:.6s}
.loader__name span:nth-child(13){animation-delay:.65s}.loader__name span:nth-child(14){animation-delay:.7s}
@keyframes letter-in {
    to { opacity: 1; transform: translateY(0); }
}
.loader__bar {
    height: 2px; width: 100%;
    background: var(--border);
    border-radius: 2px; overflow: hidden;
    margin-bottom: 14px;
}
.loader__bar-fill {
    height: 100%;
    background: var(--grad-1);
    width: 0%;
    animation: bar 1.8s var(--ease-out) .4s forwards;
}
@keyframes bar { to { width: 100%; } }
.loader__status {
    font-family: var(--font-mono);
    font-size: 12px; letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.loader__status .dots::after {
    content: '';
    animation: dots 1.4s steps(4) infinite;
}
@keyframes dots {
    0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}
}

/* ---------- Custom cursor ---------- */
.cursor, .cursor-ring {
    position: fixed; top: 0; left: 0;
    pointer-events: none; z-index: 999;
    border-radius: 50%;
    will-change: transform;
    mix-blend-mode: difference;
}
.cursor {
    width: 8px; height: 8px;
    background: #fff;
    transform: translate(-50%, -50%);
    transition: transform .15s var(--ease-out), width .2s, height .2s, background .2s;
}
.cursor-ring {
    width: 38px; height: 38px;
    border: 1.5px solid rgba(255,255,255,.5);
    transform: translate(-50%, -50%);
    transition: transform .3s var(--ease-out), width .25s, height .25s, border-color .25s, background .25s;
}
.cursor.is-hover  { width: 0; height: 0; }
.cursor-ring.is-hover {
    width: 70px; height: 70px;
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.9);
}
@media (pointer: coarse) {
    body { cursor: auto; }
    .cursor, .cursor-ring { display: none; }
    button, a { cursor: pointer; }
}

/* ---------- Nav ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px var(--pad);
    transition: backdrop-filter .3s, background .3s, padding .3s;
}
.nav.is-scrolled {
    background: rgba(5,5,10,.65);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    padding: 14px var(--pad);
    border-bottom: 1px solid var(--border);
}
.nav__logo {
    font-family: var(--font-disp);
    font-weight: 800; font-size: 20px;
    letter-spacing: .02em;
    display: flex; align-items: center; gap: 8px;
}
.nav__logo-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-3);
    box-shadow: 0 0 12px var(--accent-3);
    animation: pulse 2s ease-in-out infinite;
}
.nav__logo-slash {
    color: var(--accent);
    font-weight: 400;
    margin: 0 2px;
}
.nav__links {
    display: flex; gap: 32px;
    font-size: 14px;
}
.nav__links a {
    display: inline-flex; gap: 8px;
    padding: 6px 0;
    color: var(--text-dim);
    position: relative;
    transition: color .3s;
}
.nav__links a span {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
}
.nav__links a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 1px; background: var(--grad-1); transform: scaleX(0);
    transform-origin: right; transition: transform .4s var(--ease-out);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    font-size: 13px; font-weight: 500;
    transition: background .3s, transform .3s;
}
.nav__cta svg { width: 14px; height: 14px; transition: transform .3s; }
.nav__cta:hover { background: rgba(255,255,255,.14); }
.nav__cta:hover svg { transform: translateX(3px); }

.nav__toggle { display: none; }

@media (max-width: 900px) {
    .nav__links { display: none; }
    .nav__cta { display: none; }
    .nav__toggle {
        display: flex; flex-direction: column; gap: 5px;
        padding: 10px; border-radius: 8px;
        background: var(--surface-2); border: 1px solid var(--border);
    }
    .nav__toggle span {
        display: block; width: 20px; height: 1.5px;
        background: #fff; transition: transform .3s, opacity .3s;
    }
}

/* ---------- Section layout ---------- */
section {
    position: relative;
    padding: clamp(80px, 12vw, 140px) var(--pad);
    max-width: var(--max);
    margin: 0 auto;
}
.section__header {
    margin-bottom: clamp(40px, 6vw, 72px);
    max-width: 780px;
}
.section__badge {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 14px; border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px; letter-spacing: .08em;
    color: var(--text-dim);
    margin-bottom: 20px;
}
.section__badge span {
    color: var(--accent);
    font-weight: 600;
}
.section__badge--center { margin-left: auto; margin-right: auto; display: inline-flex; }
.section__title {
    font-family: var(--font-disp);
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.02em;
}
.hero__gradient {
    background: var(--grad-1);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: grad-slide 8s linear infinite;
}
@keyframes grad-slide {
    to { background-position: -200% 0; }
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding-top: calc(clamp(80px, 12vw, 140px) + 40px);
    padding-bottom: 80px;
    max-width: none;
}
.hero__container {
    max-width: var(--max);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--pad);
    position: relative;
    z-index: 2;
}
.hero__bg-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 80vmin; height: 80vmin;
    transform: translate(-50%, -50%);
    border: 1px solid var(--border);
    border-radius: 50%;
    pointer-events: none; z-index: 1;
    opacity: .6;
    animation: spin-slow 60s linear infinite;
}
.hero__bg-ring::before, .hero__bg-ring::after {
    content: ''; position: absolute; inset: 0;
    border-radius: 50%;
    border: 1px dashed var(--border-2);
}
.hero__bg-ring::before { inset: 30px; }
.hero__bg-ring::after  { inset: 80px; border-style: solid; }
.hero__bg-ring--2 {
    width: 120vmin; height: 120vmin;
    border-color: rgba(178,107,255,.08);
    animation-direction: reverse;
    animation-duration: 90s;
}
@keyframes spin-slow { to { transform: translate(-50%, -50%) rotate(360deg); } }

.hero__tag {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px; border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 32px;
    backdrop-filter: blur(8px);
}
.hero__tag-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-3);
    box-shadow: 0 0 10px var(--accent-3);
    animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .5; transform: scale(.75); }
}

.hero__title {
    font-family: var(--font-disp);
    font-size: clamp(2.5rem, 9vw, 7rem);
    font-weight: 800;
    line-height: .95;
    letter-spacing: -.03em;
    margin-bottom: 32px;
}
.hero__line {
    display: block; overflow: hidden;
}
.hero__line > span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1.2s var(--ease-out);
}
.is-ready .hero__line:nth-child(1) > span { transform: translateY(0); transition-delay: .1s; }
.is-ready .hero__line:nth-child(2) > span { transform: translateY(0); transition-delay: .25s; }
.is-ready .hero__line:nth-child(3) > span { transform: translateY(0); transition-delay: .4s; }

.hero__subtitle {
    font-family: var(--font-mono);
    font-size: clamp(14px, 1.6vw, 16px);
    color: var(--text-dim);
    margin-bottom: 28px;
}
.hero__role {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.hero__role-prefix { color: var(--accent-3); }
.hero__cursor-blink {
    color: var(--accent-3);
    animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__description {
    max-width: 600px;
    font-size: 17px;
    color: var(--text-dim);
    margin-bottom: 40px;
}
.hero__description strong {
    color: var(--text);
    font-weight: 500;
}

.hero__actions {
    display: flex; gap: 14px; flex-wrap: wrap;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border-radius: 999px;
    font-size: 14px; font-weight: 500;
    transition: transform .3s var(--ease-out), background .3s, border-color .3s;
    position: relative; overflow: hidden;
}
.btn svg { width: 16px; height: 16px; transition: transform .3s; }
.btn--primary {
    background: #fff; color: #05050a;
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--ghost {
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    color: var(--text);
}
.btn--ghost:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.3);
}
.btn--huge {
    padding: 22px 40px;
    font-size: 18px;
    background: var(--grad-1);
    background-size: 200% 200%;
    color: #05050a;
    font-weight: 600;
    animation: grad-slide 6s linear infinite;
}
.btn--huge:hover { transform: translateY(-3px) scale(1.02); }
.btn--huge svg { width: 20px; height: 20px; }

.hero__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    max-width: 820px;
}
.stat__num {
    font-family: var(--font-disp);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -.02em;
    background: var(--grad-1);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 8px;
}
.stat__num span {
    font-size: .6em;
    -webkit-text-fill-color: var(--accent);
}
.stat__label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    line-height: 1.3;
}

.hero__scroll {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--text-dim);
}
.hero__scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, var(--text-dim), transparent);
    position: relative; overflow: hidden;
}
.hero__scroll-line::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
    animation: scroll-trickle 2s var(--ease-out) infinite;
}
@keyframes scroll-trickle {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.hero__side {
    position: absolute;
    top: 50%; transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--text-muted);
    display: flex; gap: 30px;
}
.hero__side--left  { left: -40px; }
.hero__side--right { right: -40px; }
.hero__side a:hover { color: var(--text); }
@media (max-width: 1200px) { .hero__side { display: none; } }

@media (max-width: 720px) {
    .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* ---------- About ---------- */
.about__grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 48px;
}
.about__lead {
    font-size: clamp(18px, 2.1vw, 22px);
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.5;
}
.about__text p {
    color: var(--text-dim);
    margin-bottom: 16px;
}
.about__text strong { color: var(--text); font-weight: 500; }
.about__text em { font-style: normal; color: var(--accent); }

.about__chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 24px;
}
.chip {
    padding: 6px 14px; border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    transition: background .3s, color .3s, transform .3s;
}
.chip:hover {
    background: var(--grad-1);
    color: #fff; border-color: transparent;
    transform: translateY(-2px);
}

.about__card {
    position: relative;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.02) 100%);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    overflow: hidden;
}
.about__card-glow,
.tl-item__card-glow,
.skill-card__glow,
.impact__card-glow {
    position: absolute;
    width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(106,167,255,.35), transparent 70%);
    filter: blur(40px);
    pointer-events: none; opacity: 0;
    transition: opacity .4s;
    transform: translate(-50%, -50%);
}
.about__card:hover .about__card-glow,
.tl-item__card:hover .tl-item__card-glow,
.skill-card:hover .skill-card__glow,
.impact__card:hover .impact__card-glow {
    opacity: 1;
}

.about__card-head {
    display: flex; align-items: center; gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.about__avatar {
    position: relative;
    width: 54px; height: 54px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--grad-1);
    font-family: var(--font-disp);
    font-weight: 700;
    color: #05050a;
    flex-shrink: 0;
}
.about__avatar-inner {
    position: relative;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--bg-soft);
    display: grid; place-items: center;
    color: var(--text);
    font-size: 18px;
}
.about__avatar-ring {
    position: absolute; inset: -4px;
    border: 1px dashed var(--accent);
    border-radius: 50%;
    animation: spin-slow 10s linear infinite;
}
.about__name { font-weight: 600; font-size: 15px; }
.about__role { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.about__status {
    margin-left: auto;
    display: flex; align-items: center; gap: 6px;
    font-family: var(--font-mono); font-size: 11px;
    color: var(--accent-3);
}
.pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-3);
    box-shadow: 0 0 8px var(--accent-3);
    animation: pulse 1.5s ease-in-out infinite;
}

.about__meta {
    display: grid; gap: 10px;
    margin-bottom: 20px;
}
.about__meta li {
    display: flex; justify-content: space-between;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.about__meta li span { color: var(--text-muted); }
.about__meta li strong { font-weight: 500; color: var(--text); }

.about__console {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.about__console-head {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    background: #0a0a0f;
    border-bottom: 1px solid var(--border);
}
.about__console-head span {
    width: 10px; height: 10px; border-radius: 50%;
    background: #3a3a42;
}
.about__console-head span:nth-child(1) { background: #ff5f57; }
.about__console-head span:nth-child(2) { background: #ffbd2e; }
.about__console-head span:nth-child(3) { background: #28c840; }
.about__console-head em {
    margin-left: auto;
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 11px; color: var(--text-muted);
}
.about__console-body {
    padding: 18px 20px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text);
    overflow-x: auto;
}
.tk-k { color: var(--accent);   }
.tk-s { color: var(--accent-3); }
.tk-p { color: var(--accent-2); }

@media (max-width: 900px) {
    .about__grid { grid-template-columns: 1fr; }
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    padding-left: 0;
}
.timeline__line {
    position: absolute;
    left: 50%; top: 20px; bottom: 20px;
    width: 1px;
    background: var(--border);
    transform: translateX(-.5px);
}
.timeline__progress {
    position: absolute; top: 0; left: 0; right: 0;
    height: 0;
    background: var(--grad-1);
    box-shadow: 0 0 12px var(--accent);
}
.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    align-items: start;
}
.tl-item:nth-child(odd) .tl-item__meta { text-align: right; grid-column: 1; }
.tl-item:nth-child(odd) .tl-item__card { grid-column: 2; }
.tl-item:nth-child(even) .tl-item__meta { text-align: left; grid-column: 2; order: 2; }
.tl-item:nth-child(even) .tl-item__card { grid-column: 1; order: 1; }

.tl-item__dot {
    position: absolute;
    left: 50%; top: 22px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(106,167,255,.15);
}
.tl-item__dot::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}
.tl-item__meta {
    display: flex; flex-direction: column; gap: 4px;
    padding-top: 20px;
}
.tl-item__date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
}
.tl-item__loc {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.tl-item__card {
    position: relative;
    padding: 28px;
    background: linear-gradient(140deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: transform .4s var(--ease-out), border-color .4s;
}
.tl-item__card:hover { border-color: var(--border-2); }
.tl-item__head { margin-bottom: 12px; }
.tl-item__head h3 {
    font-family: var(--font-disp);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.tl-item__company {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
}
.tl-item__summary {
    color: var(--text-dim);
    margin-bottom: 14px;
    line-height: 1.6;
}
.tl-item__bullets {
    display: grid; gap: 8px;
    margin-bottom: 18px;
    padding-left: 0;
}
.tl-item__bullets li {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.55;
}
.tl-item__bullets li::before {
    content: '';
    position: absolute; left: 0; top: 8px;
    width: 10px; height: 2px;
    background: var(--accent);
    border-radius: 2px;
}
.tl-item__bullets li strong { color: var(--text); font-weight: 500; }

.tl-item__tags {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.tl-item__tags span {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
}

@media (max-width: 900px) {
    .timeline__line { left: 8px; }
    .tl-item {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-left: 36px;
    }
    .tl-item:nth-child(odd) .tl-item__meta,
    .tl-item:nth-child(even) .tl-item__meta {
        grid-column: 1; order: 0; text-align: left;
    }
    .tl-item:nth-child(odd) .tl-item__card,
    .tl-item:nth-child(even) .tl-item__card {
        grid-column: 1; order: 1;
    }
    .tl-item__dot { left: 8px; top: 24px; }
}

/* ---------- Skills ---------- */
.skills__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}
.skill-card {
    position: relative;
    padding: 28px;
    background: linear-gradient(140deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: transform .3s;
}
.skill-card__icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    display: grid; place-items: center;
    margin-bottom: 20px;
    color: var(--accent);
}
.skill-card__icon svg { width: 24px; height: 24px; }
.skill-card h3 {
    font-family: var(--font-disp);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}
.skill-card__tags {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.skill-card__tags span {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    transition: background .3s, color .3s, border-color .3s;
}
.skill-card__tags span:hover {
    background: var(--accent);
    color: #05050a;
    border-color: var(--accent);
}

@media (max-width: 900px) {
    .skills__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .skills__grid { grid-template-columns: 1fr; }
}

/* ---------- Certs ---------- */
.certs {
    margin-top: 40px;
    padding: 28px;
    background: linear-gradient(140deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.certs__title {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-disp);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 18px;
    color: var(--text);
}
.certs__title svg { width: 18px; height: 18px; color: var(--accent-warm); }
.certs__track {
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
.certs__row {
    display: flex; gap: 12px;
    width: max-content;
    animation: marquee 45s linear infinite;
}
.cert {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-dim);
    white-space: nowrap;
}
@keyframes marquee {
    to { transform: translateX(-50%); }
}
.certs:hover .certs__row { animation-play-state: paused; }

/* ---------- Impact ---------- */
.impact__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.impact__card {
    position: relative;
    padding: 28px;
    background: linear-gradient(140deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    min-height: 220px;
}
.impact__card--feature {
    grid-column: span 2;
    min-height: 280px;
    background: linear-gradient(140deg, rgba(106,167,255,.1), rgba(178,107,255,.1));
    border-color: rgba(106,167,255,.25);
}
.impact__badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--grad-1);
    color: #05050a;
    font-family: var(--font-mono);
    font-size: 11px; font-weight: 700;
    letter-spacing: .12em;
    border-radius: 6px;
    margin-bottom: 18px;
}
.impact__card h3 {
    font-family: var(--font-disp);
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 700;
    margin-bottom: 12px;
    max-width: 360px;
}
.impact__card h4 {
    font-family: var(--font-disp);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}
.impact__card p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.6;
}
.impact__date {
    display: block;
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}
.impact__metric {
    font-family: var(--font-disp);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    background: var(--grad-1);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    line-height: 1;
    letter-spacing: -.03em;
}
.impact__metric span {
    font-size: .5em;
    -webkit-text-fill-color: var(--accent);
}

@media (max-width: 900px) {
    .impact__grid { grid-template-columns: 1fr 1fr; }
    .impact__card--feature { grid-column: span 2; }
}
@media (max-width: 600px) {
    .impact__grid { grid-template-columns: 1fr; }
    .impact__card--feature { grid-column: span 1; }
}

/* ---------- Contact ---------- */
.contact {
    text-align: center;
    padding-bottom: 0;
    overflow: hidden;
    max-width: none;
    margin: 0;
    padding-left: 0; padding-right: 0;
}
.contact__container {
    max-width: var(--max);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--pad);
    position: relative;
    z-index: 2;
}
.contact__bg {
    position: absolute;
    top: 50%; left: 50%;
    width: 120vmin; height: 120vmin;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at center, rgba(106,167,255,.15), transparent 50%),
        conic-gradient(from 0deg, rgba(106,167,255,.08), rgba(178,107,255,.08), rgba(93,240,194,.08), rgba(106,167,255,.08));
    border-radius: 50%;
    pointer-events: none;
    animation: spin-slow 30s linear infinite;
    filter: blur(20px);
}
.contact__title {
    font-family: var(--font-disp);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    margin-bottom: 20px;
}
.contact__sub {
    max-width: 580px;
    margin: 0 auto 48px;
    color: var(--text-dim);
    font-size: 17px;
}
.contact__links {
    display: grid;
    gap: 12px;
    max-width: 540px;
    margin: 0 auto 48px;
}
.contact__link {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: left;
    transition: background .3s, border-color .3s, transform .3s;
}
.contact__link:hover {
    background: var(--surface-2);
    border-color: var(--border-2);
    transform: translateY(-2px);
}
.contact__link-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.contact__link-val { font-size: 15px; font-weight: 500; }
.contact__link svg { width: 16px; height: 16px; color: var(--accent); transition: transform .3s; }
.contact__link:hover svg { transform: translate(3px, -3px); }

.contact__cta { margin-top: 48px; padding-bottom: 80px; }

.footer {
    border-top: 1px solid var(--border);
    padding: 24px var(--pad);
    margin-top: 60px;
}
.footer__row {
    max-width: var(--max);
    margin: 0 auto;
    display: flex; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Reveal animations ---------- */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal-up.is-visible {
    opacity: 1; transform: translateY(0);
}
.reveal-mask { overflow: hidden; display: inline-block; }
.reveal-mask > span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1.1s var(--ease-out);
}
.reveal-mask.is-visible > span { transform: translateY(0); }
.reveal-mask > span:nth-child(2) { transition-delay: .15s; }
.reveal-mask > span:nth-child(3) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
