:root {
    --bg: #06060a;
    --bg-card: #0c0c12;
    --bg-card-hover: #101018;
    --purple: #a855f7;
    --purple-dim: #7c3aed;
    --purple-bright: #c084fc;
    --purple-glow: #a855f740;
    --cyan: #22d3ee;
    --green: #10b981;
    --text: #f1f5f9;
    --text-dim: #64748b;
    --text-muted: #475569;
    --border: #ffffff10;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection { background: var(--purple); color: var(--bg); }

/* Canvas Background */
#network-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
}

/* Intro */
.intro {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}
.intro.hidden { opacity: 0; visibility: hidden; }

.intro-content { font-family: 'Fira Code', monospace; }
.intro-line {
    display: block;
    font-size: 0.9rem;
    color: var(--text-dim);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}
.intro-line.visible { opacity: 1; transform: translateX(0); }
.intro-line.success { color: var(--green); }

.intro-loader {
    margin-top: 1.5rem;
    width: 250px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--purple-dim), var(--purple));
    transition: width 0.2s;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3rem;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(6, 6, 10, 0.85);
    border-bottom: 1px solid var(--border);
}

.nav-logo { font-family: 'Fira Code', monospace; font-size: 1.2rem; font-weight: 600; }
.logo-bracket { color: var(--purple); }
.logo-text {
    background: linear-gradient(135deg, var(--purple-bright), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 2.5rem; }
.nav-links a {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--purple);
    transition: width 0.3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--purple-bright); }
.nav-links a.active::after { width: 100%; }

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--green);
}
.status-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--green);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero-content { text-align: center; max-width: 800px; }

/* Terminal Window */
.terminal-window {
    background: rgba(12, 12, 18, 0.95);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.1),
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(168, 85, 247, 0.1);
    margin-bottom: 2rem;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}
.terminal-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.terminal-dots .dot.red { background: #ef4444; }
.terminal-dots .dot.yellow { background: #eab308; }
.terminal-dots .dot.green { background: #22c55e; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.terminal-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
}
.status-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-dim);
}
.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}
.status-indicator.online {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: pulse 2s infinite;
}
.ping-display {
    color: var(--green);
}

.terminal-body {
    padding: 2rem 2.5rem 2.5rem;
}

.hero-terminal {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.terminal-prompt { color: var(--purple); }
.terminal-cmd { color: var(--text); }
.terminal-cursor { color: var(--purple); animation: blink 1s step-end infinite; }

/* Glitch Effect */
.hero-name {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-name.glitch {
    position: relative;
    animation: glitch-skew 4s infinite linear alternate-reverse;
}
.hero-name.glitch::before,
.hero-name.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.hero-name.glitch::before {
    color: var(--cyan);
    animation: glitch-effect 3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    transform: translate(-2px);
    opacity: 0.8;
}
.hero-name.glitch::after {
    color: var(--purple-bright);
    animation: glitch-effect 2s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    transform: translate(2px);
    opacity: 0.8;
}

@keyframes glitch-effect {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    20% { transform: skew(0deg); }
    21% { transform: skew(1deg); }
    22% { transform: skew(0deg); }
    80% { transform: skew(0deg); }
    81% { transform: skew(-1deg); }
    82% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

.hero-role {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.role-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid var(--purple-dim);
    border-radius: 6px;
    color: var(--purple-bright);
}
.role-at { color: var(--text-muted); }
.role-company { color: var(--cyan); font-weight: 500; }

.hero-bio {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
}
.highlight { color: var(--purple-bright); }

/* Metrics */
.hero-metrics {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.metric {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(168, 85, 247, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
}
.metric:hover {
    border-color: var(--purple-dim);
    background: rgba(168, 85, 247, 0.1);
    transform: translateY(-2px);
}
.metric-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple);
    background: rgba(168, 85, 247, 0.1);
    border-radius: 8px;
}
.metric-icon svg {
    width: 22px;
    height: 22px;
}
.metric-content {
    text-align: left;
}
.metric-value {
    font-family: 'Fira Code', monospace;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
}
.metric-suffix {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--purple);
}
.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

/* Scroll Cue */
.scroll-cue {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: 'Fira Code', monospace;
}
.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--purple), transparent);
    animation: scroll-pulse 2s infinite;
}

/* Sections */
.section {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3rem;
}
.section-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--purple);
    display: block;
    margin-bottom: 0.5rem;
}
.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.section-desc {
    color: var(--text-dim);
    font-size: 1rem;
}

/* Career Tracks */
.career-track {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}
.career-track.visible {
    opacity: 1;
    transform: translateY(0);
}

.track-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.track-company h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.track-duration {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.track-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    background: var(--border);
    color: var(--text-dim);
}
.track-badge.current {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--green);
    color: var(--green);
}

.track-timeline {
    position: relative;
    padding-left: 1.5rem;
}
.track-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--purple), var(--purple-dim), var(--border));
}

.track-role {
    position: relative;
    padding-bottom: 1.5rem;
}
.track-role:last-child { padding-bottom: 0; }

.role-marker {
    position: absolute;
    left: -1.5rem;
    top: 6px;
    width: 10px;
    height: 10px;
    background: var(--bg-card);
    border: 2px solid var(--purple-dim);
    border-radius: 50%;
    transform: translateX(-4px);
}
.track-role.current .role-marker {
    background: var(--purple);
    border-color: var(--purple);
    box-shadow: 0 0 10px var(--purple-glow);
}

.role-content { padding-left: 1rem; }
.role-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.role-header h4 {
    font-size: 1rem;
    font-weight: 500;
}
.track-role.current .role-header h4 { color: var(--purple-bright); }

.role-date {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.role-content > p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.role-tags span {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 4px;
    color: var(--purple-bright);
}

/* Other Roles */
.other-roles {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}
.other-roles.visible { opacity: 1; transform: translateY(0); }

.other-roles h3 {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.other-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.other-role {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    transition: border-color 0.3s;
}
.other-role:hover { border-color: var(--purple-dim); }

.other-role-title {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.other-role-company {
    display: block;
    font-size: 0.85rem;
    color: var(--cyan);
    margin-bottom: 0.25rem;
}
.other-role-date {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}
.skills-grid.visible { opacity: 1; transform: translateY(0); }

.skill-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.skill-group:hover {
    border-color: var(--purple-dim);
    background: var(--bg-card-hover);
}

.skill-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.skill-icon {
    width: 32px;
    height: 32px;
    color: var(--purple);
}
.skill-icon svg { width: 100%; height: 100%; }

.skill-group h3 {
    font-size: 1rem;
    font-weight: 500;
}
.skill-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.skill-item {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
    background: var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    transition: all 0.2s;
}
.skill-item:hover {
    background: rgba(168, 85, 247, 0.2);
    color: var(--purple-bright);
}
.skill-item.primary {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--purple-bright);
}

/* Certifications */
.certifications {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}
.certifications.visible { opacity: 1; transform: translateY(0); }

.certifications h3 {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.cert-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.cert-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    transition: border-color 0.3s;
}
.cert-badge:hover { border-color: var(--purple-dim); }

.cert-icon {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    color: var(--green);
    font-weight: 600;
}
.cert-name { display: block; font-weight: 500; }
.cert-issuer { font-size: 0.8rem; color: var(--text-dim); }

/* Contact */
.contact-content {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}
.contact-content.visible { opacity: 1; transform: translateY(0); }

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    min-width: 180px;
    transition: all 0.3s ease;
}
.contact-card:hover {
    border-color: var(--purple);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.15);
}

.contact-icon {
    width: 36px;
    height: 36px;
    color: var(--purple);
    margin-bottom: 0.75rem;
}
.contact-icon svg { width: 100%; height: 100%; }

.contact-type {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--purple);
    margin-bottom: 0.25rem;
}
.contact-value {
    font-size: 0.9rem;
    color: var(--text);
}

.contact-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.contact-location svg {
    width: 18px;
    height: 18px;
    color: var(--purple);
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
@keyframes scroll-pulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.5; transform: scaleY(0.8); }
}

/* Responsive */
@media (max-width: 768px) {
    .nav { padding: 1rem 1.5rem; }
    .nav-links, .nav-status { display: none; }

    .terminal-window { margin: 0 -0.5rem; border-radius: 8px; }
    .terminal-body { padding: 1.5rem 1.25rem; }
    .terminal-status { display: none; }
    .terminal-title { text-align: left; margin-left: 1rem; }

    .hero-name { font-size: clamp(1.8rem, 7vw, 3rem); }
    .hero-name.glitch::before,
    .hero-name.glitch::after { display: none; }

    .hero-metrics { gap: 1rem; }
    .metric { padding: 0.75rem 1rem; gap: 0.75rem; }
    .metric-icon { width: 32px; height: 32px; }
    .metric-icon svg { width: 18px; height: 18px; }
    .metric-value { font-size: 1.5rem; }

    .section { padding: 4rem 1.5rem; }

    .role-header { flex-direction: column; align-items: flex-start; }

    .contact-cards { flex-direction: column; align-items: center; }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }
