@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Dark Theme */
    --dark-bg: #0a0e1a;
    --dark-surface: #141824;
    --dark-elevated: #1e2330;
    --dark-text: #e2e8f0;
    --dark-text-dim: #94a3b8;
    --dark-accent-1: #60a5fa;
    --dark-accent-2: #a78bfa;
    --dark-accent-3: #f59e0b;
    --dark-accent-4: #10b981;
    --dark-accent-5: #ef4444;
    --dark-border: #2d3548;
    
    /* Light Theme */
    --light-bg: #f8fafc;
    --light-surface: #ffffff;
    --light-elevated: #f1f5f9;
    --light-text: #1e293b;
    --light-text-dim: #64748b;
    --light-accent-1: #2563eb;
    --light-accent-2: #7c3aed;
    --light-accent-3: #ea580c;
    --light-accent-4: #059669;
    --light-accent-5: #dc2626;
    --light-border: #e2e8f0;
}

/* Theme Classes */
.dark-theme {
    --bg: var(--dark-bg);
    --surface: var(--dark-surface);
    --elevated: var(--dark-elevated);
    --text: var(--dark-text);
    --text-dim: var(--dark-text-dim);
    --accent-1: var(--dark-accent-1);
    --accent-2: var(--dark-accent-2);
    --accent-3: var(--dark-accent-3);
    --accent-4: var(--dark-accent-4);
    --accent-5: var(--dark-accent-5);
    --border: var(--dark-border);
}

.light-theme {
    --bg: var(--light-bg);
    --surface: var(--light-surface);
    --elevated: var(--light-elevated);
    --text: var(--light-text);
    --text-dim: var(--light-text-dim);
    --accent-1: var(--light-accent-1);
    --accent-2: var(--light-accent-2);
    --accent-3: var(--light-accent-3);
    --accent-4: var(--light-accent-4);
    --accent-5: var(--light-accent-5);
    --border: var(--light-border);
}

/* ==================== BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: rotate(180deg) scale(1.1);
    border-color: var(--accent-1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ==================== BACKGROUND ==================== */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-1);
    top: -250px;
    right: -150px;
    animation: float1 20s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    bottom: -200px;
    left: -100px;
    animation: float2 25s ease-in-out infinite;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: var(--accent-3);
    top: 50%;
    left: 40%;
    animation: float3 30s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(80px, -60px) rotate(180deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-70px, 50px) rotate(-180deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -80px) scale(1.1); }
}

/* ==================== CONTENT WRAPPER ==================== */
.content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 24px 80px;
}

/* ==================== HERO ==================== */
.hero {
    text-align: center;
    padding: 60px 0 100px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-4);
    letter-spacing: 0.5px;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-4);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-title {
    font-size: clamp(3.5rem, 12vw, 8rem);
    font-weight: 800;
    line-height: 0.95;
    margin-bottom: 24px;
    color: var(--text);
}

.title-word {
    display: block;
    animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.title-word:nth-child(1) { animation-delay: 0.2s; }
.title-word:nth-child(2) { animation-delay: 0.35s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-dim);
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease 0.5s backwards;
}

.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.7s backwards;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--accent-1);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.social-btn svg {
    color: var(--accent-1);
}

/* ==================== SECTION HEADERS ==================== */
.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.section-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-dim);
    opacity: 0.3;
    line-height: 1;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--border), transparent);
}

/* ==================== TERMINAL CALLOUT ==================== */
.terminal-callout {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    padding: 28px 32px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: slideInDown 0.8s ease backwards;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.callout-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    color: white;
}

.callout-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    animation: bounce 2s ease-in-out infinite;
}

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

.callout-text strong {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.callout-text p {
    font-size: 1rem;
    opacity: 0.95;
    line-height: 1.5;
}

.callout-arrow {
    text-align: center;
    font-size: 2rem;
    color: white;
    margin-top: 10px;
    animation: bounceArrow 1.5s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ==================== TERMINAL ==================== */
.terminal-section {
    margin-bottom: 100px;
}

.terminal-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

.terminal-box {
    background: var(--surface);
    border: 2px solid var(--accent-1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(96, 165, 250, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.15);
    animation: terminalGlow 3s ease-in-out infinite;
    position: relative;
}

@keyframes terminalGlow {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(96, 165, 250, 0.3),
            0 10px 40px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(96, 165, 250, 0.5),
            0 0 100px rgba(96, 165, 250, 0.2),
            0 10px 40px rgba(0, 0, 0, 0.15);
    }
}

.terminal-box::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2), var(--accent-3), var(--accent-1));
    border-radius: 12px;
    z-index: -1;
    opacity: 0.4;
    animation: borderSpin 6s linear infinite;
    filter: blur(12px);
}

@keyframes borderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.terminal-header {
    background: var(--elevated);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--accent-1);
}

.window-buttons {
    display: flex;
    gap: 8px;
}

.window-buttons span {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.window-buttons span:hover {
    transform: scale(1.2);
    filter: brightness(1.3);
}

.btn-red { 
    background: var(--accent-5); 
    box-shadow: 0 0 8px var(--accent-5);
}
.btn-yellow { 
    background: var(--accent-3); 
    box-shadow: 0 0 8px var(--accent-3);
}
.btn-green { 
    background: var(--accent-4); 
    box-shadow: 0 0 8px var(--accent-4);
}

.terminal-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-1);
}

.tab-icon {
    font-size: 1.1rem;
}

.terminal-body {
    padding: 24px;
    min-height: 450px;
    max-height: 550px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    position: relative;
}

.terminal-body::-webkit-scrollbar { width: 10px; }
.terminal-body::-webkit-scrollbar-track { background: var(--surface); }
.terminal-body::-webkit-scrollbar-thumb { 
    background: var(--border); 
    border-radius: 5px; 
}
.terminal-body::-webkit-scrollbar-thumb:hover { 
    background: var(--accent-1); 
}

/* Scanline Effect */
.terminal-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

#terminalOutput {
    margin-bottom: 16px;
}

.output-line {
    margin-bottom: 12px;
    opacity: 0;
    animation: fadeInLine 0.3s ease forwards;
}

@keyframes fadeInLine {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cmd-echo {
    color: var(--accent-1);
    font-weight: 600;
    margin-bottom: 6px;
}

.cmd-result {
    color: var(--text);
    line-height: 1.8;
    margin-left: 20px;
}

.cmd-result a {
    color: var(--accent-3);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.cmd-result a:hover {
    color: var(--accent-1);
}

.error-msg {
    color: var(--accent-5);
}

.success-msg {
    color: var(--accent-4);
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt {
    color: var(--accent-2);
    font-weight: 700;
    font-size: 1.2rem;
    animation: promptPulse 2s ease-in-out infinite;
}

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

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    caret-color: var(--accent-1);
}

.terminal-input::placeholder {
    color: var(--text-dim);
}

/* ==================== COMMAND SIDEBAR ==================== */
.command-sidebar {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.command-sidebar:hover {
    border-color: var(--accent-2);
    box-shadow: 0 8px 32px rgba(167, 139, 250, 0.15);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-2);
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.sidebar-icon {
    font-size: 1.1rem;
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cmd-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cmd-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-1);
    transition: left 0.3s ease;
    z-index: -1;
}

.cmd-button:hover::before {
    left: 0;
}

.cmd-button:hover {
    color: white;
    border-color: var(--accent-1);
    transform: translateX(6px);
}

.cmd-icon {
    font-size: 1.1rem;
}

/* ==================== INFO SECTION ==================== */
.info-section {
    margin-bottom: 100px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-1);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.card-large {
    grid-column: span 2;
}

.card-highlight {
    border-color: var(--accent-2);
    background: linear-gradient(135deg, var(--surface), var(--elevated));
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-icon {
    font-size: 1.8rem;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.card-content ul {
    list-style: none;
    padding: 0;
}

.card-content li {
    padding: 6px 0;
    color: var(--text);
    position: relative;
    padding-left: 20px;
}

.card-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-3);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    background: var(--elevated);
    color: var(--accent-3);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
}

/* ==================== RESUME SECTION ==================== */
.resume-section {
    margin-bottom: 100px;
}

.resume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.resume-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.resume-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.1), transparent);
    transition: left 0.5s ease;
}

.resume-card:hover::before {
    left: 100%;
}

.resume-card:hover {
    border-color: var(--accent-1);
    transform: translateX(12px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
}

.resume-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-1);
    flex-shrink: 0;
}

.resume-content {
    flex: 1;
}

.resume-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.resume-content p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.resume-arrow {
    font-size: 2rem;
    color: var(--accent-1);
    transition: transform 0.3s ease;
}

.resume-card:hover .resume-arrow {
    transform: translateX(8px);
}

/* ==================== FOOTER ==================== */
.footer {
    margin-top: 80px;
}

.footer-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin-bottom: 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .terminal-layout {
        grid-template-columns: 1fr;
    }
    
    .command-sidebar {
        order: 2;
    }
    
    .command-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .cmd-button {
        flex: 1 1 calc(50% - 4px);
    }

    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .card-large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 40px 16px 60px;
    }

    .hero {
        padding: 40px 0 80px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .social-links {
        flex-direction: column;
    }

    .social-btn {
        justify-content: center;
        width: 100%;
    }

    .section-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .terminal-body {
        min-height: 350px;
        max-height: 450px;
        padding: 16px;
    }

    .callout-content {
        flex-direction: column;
        text-align: center;
    }

    .info-grid,
    .resume-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .cmd-button {
        flex: 1 1 100%;
    }
}
