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

:root {
    --bg-color: #0a0a0a;
    --bg-secondary: #0f0f0f;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent: #c8ff57;
    --accent-dim: rgba(200, 255, 87, 0.15);
    --accent-glow: rgba(200, 255, 87, 0.4);
    --border-color: #1a1a1a;
    --border-light: #2a2a2a;
    --card-bg: #0f0f0f;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-sans: 'DM Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: default;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Custom Cursor */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: difference;
}

.cursor-dot.hover {
    width: 24px;
    height: 24px;
    background: var(--accent-glow);
}

/* Fixed Nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: var(--border-light);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent);
    letter-spacing: -0.5px;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-logo:hover {
    color: var(--text-primary);
}

.nav-logo:hover::after {
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::before {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.25;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.35; }
}

.hero-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.25; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 600;
    letter-spacing: -3px;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.title-glow {
    position: relative;
    display: inline-block;
    text-shadow: 
        0 0 40px var(--accent-glow),
        0 0 80px var(--accent-glow);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { 
        text-shadow: 
            0 0 40px var(--accent-glow),
            0 0 80px var(--accent-glow);
    }
    100% { 
        text-shadow: 
            0 0 60px var(--accent-glow),
            0 0 120px var(--accent-glow),
            0 0 160px rgba(200, 255, 87, 0.2);
    }
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    min-height: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.tagline-text {
    color: var(--text-primary);
}

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
    font-weight: 600;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 2.5rem;
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--border-color);
    background: var(--accent-dim);
    transition: all 0.3s ease;
}

.hero-location:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-2px);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 1rem 2rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-color);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(200, 255, 87, 0.3);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 0 30px rgba(200, 255, 87, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(200, 255, 87, 0.2);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    border-color: var(--border-color);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.btn-sm:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* Sections Base */
section {
    padding: 8rem 2rem;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 3.5rem;
    color: var(--accent);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    max-width: 200px;
}

/* About Section */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    line-height: 1.8;
    letter-spacing: -0.2px;
    text-wrap: pretty;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stack Section */
.stack-content {
    max-width: 1000px;
    margin: 0 auto;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stack-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.stack-category:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.category-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-title::before {
    content: '▸';
    font-size: 0.7rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: default;
    background: var(--bg-secondary);
}

.tech-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-1px);
}

/* Projects Section */
.projects-content {
    max-width: 900px;
    margin: 0 auto;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--accent);
    transition: height 0.3s ease;
}

.project-card:hover {
    border-color: var(--border-light);
    transform: translateX(4px);
}

.project-card:hover::before {
    height: 100%;
}

.project-status {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border: 1px solid;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.project-status.public {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.project-status.wip {
    color: var(--text-muted);
    border-color: var(--border-light);
    background: rgba(85, 85, 85, 0.1);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    transition: all 0.2s ease;
}

.project-link:hover {
    color: var(--text-primary);
    gap: 0.75rem;
}

.project-link::after {
    content: '→';
    transition: transform 0.2s ease;
}

.project-link:hover::after {
    transform: translateX(4px);
}

.project-link-disabled {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-card.private-info {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(26, 26, 26, 0.5) 100%);
    border-style: dashed;
}

.project-title {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
    transition: background 0.3s ease;
}

.project-card:hover .project-title::after {
    background: var(--accent);
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    max-width: 700px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Timeline Section */
.timeline {
    background: var(--bg-secondary);
}

.timeline-content {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-grid {
    position: relative;
    padding-left: 40px;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Marker dot - sits on the border line */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -49px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover::before {
    background: var(--accent);
    transform: scale(1.2);
}

/* Active/current item - filled green dot */
.timeline-item.current::before {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    animation: markerPulse 2s ease-in-out infinite;
}

@keyframes markerPulse {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 35px var(--accent-glow), 0 0 50px rgba(200, 255, 87, 0.3); }
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.timeline-title {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.timeline-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Contact Section */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    line-height: 1.9;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.contact-card:hover::after {
    transform: scaleX(1);
}

.contact-icon {
    font-size: 1.75rem;
    filter: grayscale(0.3);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.contact-card:hover .contact-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.contact-info {
    flex: 1;
}

.contact-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.contact-card:hover .contact-value {
    color: var(--text-primary);
}

/* Footer */
.footer {
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-content span:last-child {
    color: var(--accent);
}

/* Fade Up Animation */
.fade-up {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-content {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    section {
        padding: 5rem 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stack-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .section-title::after {
        display: none;
    }

    .project-card:hover {
        transform: none;
    }

    .project-card:hover::before {
        height: 3px;
    }
}

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