/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional Black & White Color Palette */
    --bg-primary: #0a0a0a;
    --bg-secondary: #101010;
    --bg-tertiary: #181818;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #707070;
    --accent-primary: #ffffff;
    --accent-secondary: #e0e0e0;
    --accent-tertiary: #a0a0a0;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #c0c0c0 50%, #808080 100%);
    --accent-glow: 0 0 20px rgba(255, 255, 255, 0.15), 0 0 40px rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.12);
    --border-glow: 0 0 10px rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8);
    --panel-bg: rgba(20, 20, 20, 0.85);
    --panel-border: rgba(255, 255, 255, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'JetBrains Mono', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: pulse 8s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.01) 50%, transparent 100%);
    pointer-events: none;
    z-index: 0;
    animation: scan 12s linear infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

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

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
}

.navbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

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

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

.logo:hover {
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 1rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

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

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

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

/* Navigation Action Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn-primary {
    background: #ffffff;
    border-color: #ffffff;
    color: #0a0a0a;
}

.nav-btn-primary:hover {
    background: #e0e0e0;
    border-color: #e0e0e0;
    color: #0a0a0a;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.02) 50%, transparent 100%);
    animation: gridPulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@keyframes subtleGlow {
    from {
        opacity: 0.9;
    }

    to {
        opacity: 1;
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-block;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: #ffffff;
    color: #0a0a0a;
    border: 1px solid #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
    background: #f0f0f0;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--text-primary);
    margin: 1rem auto 0;
}

/* ============================================
   About Section
   ============================================ */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

.image-glow {
    display: none;
}

@keyframes glow {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.5;
    }
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============================================
   Skills Section
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--panel-bg);
    padding: 2rem;
    border-radius: 2px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
}

.skill-category:hover::before {
    transform: scaleX(1);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.3s;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Projects Section
   ============================================ */
.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--panel-bg);
    padding: 2rem;
    border-radius: 2px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #808080 100%);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--shadow-lg);
}

.project-card:hover::before {
    transform: scaleY(1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    flex: 1;
}

.project-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex: 1;
}

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

.project-tech span {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.project-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    align-self: flex-start;
}

.project-link:hover {
    color: var(--accent-secondary);
    transform: translateX(5px);
}

/* ============================================
   Snippets Section
   ============================================ */
.snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.snippet-card {
    background: var(--panel-bg);
    padding: 2rem;
    border-radius: 2px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.snippet-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.snippet-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--shadow-md);
}

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

.snippet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.snippet-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.snippet-lang {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.snippet-card pre {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.snippet-card code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.snippet-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.snippet-link:hover {
    color: var(--accent-secondary);
    transform: translateX(5px);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    background: var(--bg-secondary);
    text-align: center;
}

.contact-intro {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.contact-link:hover::before {
    left: 100%;
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.contact-link svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-primary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

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

/* ============================================
   Vertical Mode Sidebar (Legacy - Hidden)
   ============================================ */
.mode-sidebar {
    display: none;
}

.mode-sidebar.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-100%);
}

.mode-sidebar.hidden::after {
    content: '';
    position: absolute;
    left: -30px;
    top: 0;
    width: 30px;
    height: 100%;
    background: transparent;
    z-index: 1000;
    cursor: pointer;
}

.mode-sidebar.hidden:hover {
    opacity: 1;
    pointer-events: all;
    transform: translateY(-50%) translateX(0);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0.5rem;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 4px 4px 0;
    backdrop-filter: blur(10px);
}

.sidebar-button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 1.5rem 0.75rem;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.65rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.sidebar-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.sidebar-button:hover::before {
    left: 100%;
}

.sidebar-button:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    transform: translateX(3px);
}

.sidebar-icon {
    display: block;
}

.resume-button:hover,
.terminal-button:hover,
.ai-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.terminal-mode .mode-sidebar,
body.ai-mode .mode-sidebar {
    display: none;
}

/* ============================================
   Terminal Mode Styles
   ============================================ */
body.terminal-mode {
    overflow: hidden;
}

body.terminal-mode .main-content {
    display: none;
}

body.terminal-mode .navbar {
    display: none;
}

body.ai-mode {
    overflow: hidden;
}

body.ai-mode .main-content {
    display: none;
}

body.ai-mode .navbar {
    display: none;
}

.ai-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.mode-toggle {
    background: var(--panel-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--border-glow);
    position: relative;
    overflow: hidden;
}

.mode-toggle::before {
    content: '[';
    color: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.mode-toggle::after {
    content: ']';
    color: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.mode-toggle:hover {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--accent-glow);
}

.mode-toggle:hover::before,
.mode-toggle:hover::after {
    opacity: 1;
}

.mode-icon {
    font-size: 1rem;
}

.terminal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #050505;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 9999;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    position: relative;
}

.terminal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

body.terminal-mode .terminal-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.terminal-window {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: 800px;
    background: rgba(10, 10, 10, 0.98);
    border-radius: 4px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.terminal-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.terminal-header {
    background: rgba(20, 20, 20, 0.95);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.terminal-button.close {
    background: #ff5f56;
}

.terminal-button.close:hover {
    background: #e0443e;
    transform: scale(1.1);
}

.terminal-button.minimize {
    background: #ffbd2e;
}

.terminal-button.maximize {
    background: #27c93f;
}

.terminal-title {
    color: #8b949e;
    font-size: 0.85rem;
    flex: 1;
    text-align: center;
}

.terminal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: rgba(5, 5, 5, 0.9);
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #161b22;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

.terminal-line {
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.terminal-prompt {
    color: #ffffff;
    margin-right: 0.5rem;
    font-weight: 500;
}

.terminal-text {
    color: #c0c0c0;
}

.terminal-welcome {
    color: #ffffff;
    font-weight: 500;
}

.terminal-error {
    color: #e06060;
}

.terminal-success {
    color: #90c090;
}

.terminal-info {
    color: #ffffff;
}

.terminal-warning {
    color: #d0a040;
}

.terminal-cursor {
    color: #ffffff;
    animation: blink 1s infinite;
    font-weight: bold;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.terminal-input-container {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(15, 15, 15, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.95rem;
    padding: 0;
    margin-left: 0.5rem;
}

.terminal-input::placeholder {
    color: #484f58;
}

.terminal-command {
    color: #c9d1d9;
    font-weight: 500;
}

.terminal-output {
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid #30363d;
}

.terminal-section {
    margin: 1.5rem 0;
}

.terminal-section-title {
    color: #58a6ff;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.terminal-list {
    list-style: none;
    padding-left: 1.5rem;
}

.terminal-list li {
    margin: 0.5rem 0;
    color: #c9d1d9;
}

.terminal-list li::before {
    content: '▸ ';
    color: #ffffff;
    margin-right: 0.5rem;
}

.terminal-link {
    color: #b0b0b0;
    text-decoration: underline;
    cursor: pointer;
}

.terminal-link:hover {
    color: #ffffff;
}

.terminal-code {
    background: #161b22;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #30363d;
    margin: 0.75rem 0;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    overflow-x: auto;
}

.terminal-code pre {
    margin: 0;
    color: #c9d1d9;
    white-space: pre;
}

.terminal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.terminal-card {
    background: #161b22;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #30363d;
}

.terminal-card-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.terminal-card-content {
    color: #c9d1d9;
    font-size: 0.9rem;
}

/* ============================================
   AI Mode Styles
   ============================================ */
.ai-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #050505;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 9999;
    font-family: 'Inter', 'JetBrains Mono', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

.ai-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

body.ai-mode .ai-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.ai-window {
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 700px;
    background: rgba(10, 10, 10, 0.98);
    border-radius: 4px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.ai-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.ai-header {
    background: rgba(20, 20, 20, 0.95);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.ai-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ai-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.ai-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ai-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ai-mode-toggle:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.ai-mode-toggle.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.toggle-label {
    font-weight: 500;
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.ai-mode-toggle.active .toggle-switch {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s;
}

.ai-mode-toggle.active .toggle-slider {
    left: 22px;
    background: var(--text-primary);
}

.ai-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
    line-height: 1;
}

.ai-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.ai-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: rgba(5, 5, 5, 0.9);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-body::-webkit-scrollbar {
    width: 8px;
}

.ai-body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.ai-body::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.ai-body::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

.ai-message {
    display: flex;
    gap: 0.75rem;
    animation: fadeInUp 0.3s ease;
    max-width: 85%;
}

.ai-message.ai-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-message.ai-assistant {
    align-self: flex-start;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ai-message.ai-user .ai-message-avatar {
    display: none;
}

.ai-message-content {
    background: var(--panel-bg);
    padding: 0.875rem 1.25rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.ai-message.ai-user .ai-message-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-message-text {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.ai-message.ai-user .ai-message-text {
    color: #ffffff;
}

.ai-message-text.ai-error {
    color: #f85149;
}

.ai-link {
    color: #b0b0b0;
    text-decoration: underline;
    cursor: pointer;
}

.ai-link:hover {
    color: #ffffff;
}

.ai-link:hover {
    color: #ffffff;
}

.ai-typing-indicator {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.ai-typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ai-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.ai-input-container {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(15, 15, 15, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
}

.ai-input {
    flex: 1;
    background: rgba(5, 5, 5, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.ai-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

.ai-input::placeholder {
    color: var(--text-tertiary);
}

.ai-send {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s;
    flex-shrink: 0;
}

.ai-send:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.ai-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-send svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-actions {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    body.terminal-mode .terminal-window {
        max-height: 100vh;
        border-radius: 0;
    }

    body.terminal-mode .terminal-container {
        padding: 0;
    }

    body.ai-mode .ai-window {
        max-height: 100vh;
        border-radius: 0;
    }

    body.ai-mode .ai-container {
        padding: 0;
    }

    .ai-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .ai-header-content {
        width: 100%;
        justify-content: space-between;
    }

    .ai-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .ai-mode-toggle {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        justify-content: center;
    }

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

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

    .hero-cta {
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    section {
        padding: 4rem 0;
    }

    .image-wrapper {
        width: 200px;
        height: 200px;
    }

    .about-stats {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}