/* ============================================
   VARIABLES & BASE
   ============================================ */
:root {
    --color-bg: #0a0a0b;
    --color-bg-elevated: #111113;
    --color-bg-card: #161618;
    --color-border: #252528;
    --color-text: #e8e8ed;
    --color-text-muted: #8b8b94;
    --color-text-subtle: #5c5c66;
    --color-accent: #6366f1;
    --color-accent-glow: rgba(99, 102, 241, 0.4);
    --color-success: #22c55e;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background effects */
.noise {
    position: fixed;
    inset: 0;
    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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 1000;
}

.gradient-bg {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.1), transparent);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.nav.scrolled {
    border-bottom-color: var(--color-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-dot {
    color: var(--color-accent);
}

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

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-links a.nav-tools {
    color: var(--color-accent);
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--color-accent);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-links a.nav-tools:hover {
    background: var(--color-accent);
    color: white;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.accent {
    color: var(--color-accent);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 8rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-title .line {
    display: block;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-text-subtle);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s var(--ease-out-expo);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
    box-shadow: 0 0 20px var(--color-accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 30px var(--color-accent-glow);
}

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

.btn-secondary:hover {
    background: var(--color-bg-card);
    border-color: var(--color-text-subtle);
}

/* Terminal */
.hero-visual {
    display: flex;
    justify-content: center;
}

.terminal {
    width: 100%;
    max-width: 480px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.2);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
    margin-left: auto;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--color-text-subtle);
}

.terminal-body {
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.terminal-line {
    color: var(--color-text);
}

.terminal-output {
    color: var(--color-text-muted);
    padding-left: 1rem;
}

.prompt {
    color: var(--color-accent);
    margin-right: 0.5rem;
}

.success {
    color: var(--color-success);
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Terminal typing animation */
.terminal-line, .terminal-output {
    opacity: 0;
    transform: translateY(5px);
}

.typing-1 { animation: typeIn 0.3s var(--ease-out-expo) 0.5s forwards; }
.typing-2 { animation: typeIn 0.3s var(--ease-out-expo) 1s forwards; }
.typing-3 { animation: typeIn 0.3s var(--ease-out-expo) 1.2s forwards; }
.typing-4 { animation: typeIn 0.3s var(--ease-out-expo) 1.4s forwards; }
.typing-5 { animation: typeIn 0.3s var(--ease-out-expo) 1.6s forwards; }
.typing-6 { animation: typeIn 0.3s var(--ease-out-expo) 2.2s forwards; }
.typing-7 { animation: typeIn 0.3s var(--ease-out-expo) 2.8s forwards; }
.typing-8 { animation: typeIn 0.3s var(--ease-out-expo) 3.2s forwards; }

@keyframes typeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ABOUT
   ============================================ */
.about-content {
    max-width: 700px;
}

.about-content .lead {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.about-content p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s var(--ease-out-expo);
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.skill-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ============================================
   HIGHLIGHTS
   ============================================ */
.highlights-list {
    max-width: 700px;
}

.highlight-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.highlight-item:last-child {
    border-bottom: none;
}

.highlight-marker {
    width: 12px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 50%;
    margin-top: 0.4rem;
    flex-shrink: 0;
    box-shadow: 0 0 12px var(--color-accent-glow);
}

.highlight-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.highlight-content p {
    color: var(--color-text-muted);
}

/* ============================================
   EXPERIENCE
   ============================================ */
.timeline {
    position: relative;
    max-width: 800px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-accent), var(--color-border));
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 3rem;
}

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

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0.3rem;
    width: 12px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--color-accent-glow);
}

.timeline-marker.past {
    background: var(--color-border);
    box-shadow: none;
}

.timeline-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s var(--ease-out-expo);
}

.timeline-content:hover {
    border-color: var(--color-accent);
}

.timeline-content.faded {
    background: transparent;
    border-color: transparent;
}

.timeline-content.faded:hover {
    border-color: var(--color-border);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.timeline-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 500;
}

.timeline-company {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.timeline-details {
    list-style: none;
}

.timeline-details li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.timeline-details li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-text-subtle);
}

.timeline-summary {
    color: var(--color-text-subtle);
    font-size: 0.95rem;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-content {
    max-width: 500px;
}

.contact-lead {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.2s var(--ease-out-expo);
}

.contact-link:hover {
    border-color: var(--color-accent);
    transform: translateX(4px);
}

.contact-icon {
    font-size: 1.25rem;
}

.contact-location {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-subtle);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 2rem;
    border-top: 1px solid var(--color-border);
}

.footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-text {
    color: var(--color-text-subtle);
    font-size: 0.9rem;
}

.footer-divider {
    color: var(--color-border);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s var(--ease-out-expo) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out-expo);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 6rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .terminal {
        max-width: 400px;
    }
    
    .nav-links {
        display: none;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 5rem 0;
    }
    
    .hero {
        padding: 5rem 1rem 3rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-header {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .hero-cta {
        flex-direction: column;
    }
}
