/* ============================================
   lab463 - Main Stylesheet
   Light/Dark Theme Support
   ============================================ */

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

/* Theme Variables */
:root {
    /* Light Theme (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-card: #ffffff;

    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #6c757d;

    --accent-primary: #6366f1;
    --accent-secondary: #818cf8;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --terminal-bg: #1e1e2e;
    --terminal-text: #cdd6f4;
    --terminal-prompt: #a6e3a1;
    --terminal-command: #89b4fa;
    --terminal-success: #a6e3a1;
    --terminal-info: #89dceb;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252542;
    --bg-card: #1a1a2e;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --accent-primary: #818cf8;
    --accent-secondary: #a5b4fc;
    --accent-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);

    --border-color: #334155;
    --border-light: #1e293b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);

    --terminal-bg: #11111b;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

[data-theme="dark"] .navbar {
    background-color: rgba(15, 15, 26, 0.9);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    height: 70px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-left: auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo-img {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-family: var(--font-mono);
}

.logo-text .accent,
.accent {
    color: var(--accent-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-base);
}

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

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

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
}

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

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-fast);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 100px var(--space-lg) var(--space-3xl);
    background: var(--bg-primary);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: left;
}

.hero-logo {
    margin-bottom: var(--space-lg);
}

.hero-logo-img {
    width: 80px;
    height: 80px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-family: var(--font-mono);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.code-bracket {
    color: var(--accent-primary);
    font-weight: 400;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 2px;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--accent-primary);
}

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

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

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

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Terminal Visual */
.hero-visual {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    justify-content: center;
}

.hero-terminal-second {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.terminal {
    width: 100%;
    max-width: 500px;
    background: var(--terminal-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    font-family: var(--font-mono);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
}

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

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    color: var(--terminal-text);
    opacity: 0.6;
    font-size: 0.85rem;
    margin-left: auto;
}

.terminal-body {
    padding: var(--space-lg);
    min-height: 200px;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
}

.terminal-line.output {
    padding-left: var(--space-lg);
}

.prompt {
    color: var(--terminal-prompt);
    font-weight: bold;
}

.command {
    color: var(--terminal-command);
}

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

.info {
    color: var(--terminal-info);
}

.cursor-block {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--terminal-text);
    animation: blink 1s infinite;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
    40% { transform: rotate(45deg) translateY(10px); }
    60% { transform: rotate(45deg) translateY(5px); }
}

/* ============================================
   Sections Common
   ============================================ */
.section {
    padding: var(--space-3xl) 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: var(--space-3xl);
    text-align: center;
}

.code-comment {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

/* ============================================
   About Section
   ============================================ */

/* Hero statement */
.about-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-3xl);
}

.about-lead {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-lead .highlight {
    color: var(--text-primary);
    font-weight: 600;
    position: relative;
}

.about-lead .highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--accent-primary);
    opacity: 0.2;
    z-index: -1;
    border-radius: 2px;
}

/* Mission/Vision/Approach cards */
.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.about-card {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.about-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-card-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.about-card-content {
    flex: 1;
}

.about-card-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.about-card-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Core values highlights */
.about-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.highlight-item:hover {
    background: var(--bg-secondary);
}

.highlight-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.highlight-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.highlight-content {
    display: flex;
    flex-direction: column;
}

.highlight-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.highlight-value {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Quote section */
.about-quote {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.about-quote blockquote {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.8;
    position: relative;
    padding: var(--space-lg) 0;
}

.quote-mark {
    font-size: 3rem;
    color: var(--accent-primary);
    opacity: 0.3;
    font-style: normal;
    line-height: 0;
    vertical-align: middle;
}

/* Legacy stat cards (kept for compatibility) */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: 1.1rem;
}

.about-stats {
    display: grid;
    gap: var(--space-lg);
}

.stat-card {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.stat-icon {
    margin-bottom: var(--space-md);
}

.stat-icon svg {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: var(--space-xs);
}

/* ============================================
   Services Section
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.service-card {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.service-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.service-content {
    flex: 1;
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.service-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.active {
    background: var(--accent-primary);
    animation: pulse 2s infinite;
}

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

.status-dot.live {
    background: #22c55e;
}

.status-dot.in-progress {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

.service-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.service-link-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.service-link-item:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
}

.service-link-item svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ============================================
   Projects Section
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.project-card {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.project-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.project-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.project-meta {
    flex: 1;
}

.project-name {
    font-size: 1.25rem;
    margin: 0 0 2px;
}

.project-type {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.project-badge.live {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.stack-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: auto;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    font-weight: 500;
}

.project-link.primary {
    background: var(--accent-primary);
    color: #fff;
}

.project-link.primary:hover {
    opacity: 0.85;
}

.project-link.secondary {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.project-link.secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.project-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.project-card:nth-child(1) { transition-delay: 0s; }
.project-card:nth-child(2) { transition-delay: 0.1s; }

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Tech Stack Section
   ============================================ */
.tech-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.tech-category {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.tech-category-title {
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-lg);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tech-item {
    background: var(--bg-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.tech-item:hover {
    background: var(--accent-primary);
    color: white;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

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

.contact-link:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Dexter Easter Egg */
.contact-dexter {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px dashed var(--border-color);
}

.dexter-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    max-width: 500px;
    margin: 0 auto;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.dexter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8B0000 0%, #DC143C 100%);
}

.dexter-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: #DC143C;
}

.dexter-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dexter-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.dexter-content {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
}

.dexter-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dexter-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin: var(--space-xs) 0;
}

.dexter-email {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #DC143C;
    transition: color var(--transition-fast);
}

.dexter-email:hover {
    color: #8B0000;
}

.dexter-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: rgba(139, 0, 0, 0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    color: #8B0000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

[data-theme="dark"] .dexter-badge {
    background: rgba(220, 20, 60, 0.15);
    color: #DC143C;
}

/* Responsive */
@media (max-width: 480px) {
    .dexter-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-xl);
    }

    .dexter-card::before {
        width: 100%;
        height: 4px;
        top: 0;
        left: 0;
    }

    .dexter-content {
        text-align: center;
    }

    .dexter-badge {
        position: static;
        margin-top: var(--space-md);
        flex-direction: row;
        gap: var(--space-xs);
    }
}

/* ============================================
   Build Log / Announcements
   ============================================ */

.build-log-body {
    padding: var(--space-lg);
    font-size: 0.85rem;
    line-height: 1.8;
    max-height: 340px;
    overflow-y: hidden;
}

.build-log-body.bl-animating {
    overflow-y: hidden;
}

.build-log-body.bl-scrollable {
    overflow-y: auto;
}

/* Custom scrollbar - left side */
.build-log-body.bl-scrollable {
    direction: rtl;
}

.build-log-body.bl-scrollable > * {
    direction: ltr;
}

.build-log-body.bl-scrollable::-webkit-scrollbar {
    width: 4px;
}

.build-log-body.bl-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.build-log-body.bl-scrollable::-webkit-scrollbar-thumb {
    background: rgba(166, 227, 161, 0.3);
    border-radius: 2px;
}

.build-log-body.bl-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(166, 227, 161, 0.6);
}

/* Build log lines */
.bl {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    font-size: 0.8rem;
    color: var(--terminal-text);
    opacity: 0.85;
}

.bl-blank {
    height: 0.5em;
}

.bl-detail {
    opacity: 0.7;
    font-size: 0.75rem;
}

.dim {
    opacity: 0.4;
}

.bl-link {
    color: var(--terminal-command);
    text-decoration: none;
    border-bottom: 1px dotted rgba(137, 180, 250, 0.3);
    transition: color 0.2s, border-color 0.2s;
}

.bl-link:hover {
    color: #b4d0fb;
    border-bottom-color: rgba(137, 180, 250, 0.7);
}

.build-status-inline {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.status-pass {
    background: rgba(166, 227, 161, 0.15);
    color: var(--terminal-success);
}

.status-fail {
    background: rgba(243, 139, 168, 0.15);
    color: #f38ba8;
}

.status-running {
    background: rgba(249, 226, 175, 0.15);
    color: #f9e2af;
}

.build-step {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    padding: 2px 0;
    padding-left: var(--space-md);
}

.step-icon {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.step-icon.success {
    color: var(--terminal-success);
}

.step-icon.fail {
    color: #f38ba8;
}

.step-icon.running {
    color: #f9e2af;
}

.step-text {
    color: var(--terminal-text);
    opacity: 0.8;
    font-size: 0.8rem;
}

.step-target {
    color: var(--terminal-command);
    font-weight: 600;
}

.build-id {
    color: var(--terminal-success);
    opacity: 0.6;
    font-size: 0.75rem;
    min-width: 82px;
}

/* Responsive build log */
@media (max-width: 480px) {
    .build-log-body {
        padding: var(--space-md);
        max-height: 280px;
    }

    .bl {
        font-size: 0.7rem;
    }

    .bl-detail {
        font-size: 0.65rem;
    }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: var(--space-lg) 0 var(--space-sm);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
    margin-bottom: var(--space-sm);
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.footer-logo-img {
    width: 32px;
    height: 32px;
}

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

.footer-experiment {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: var(--space-sm);
}

.footer-experiment a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-experiment a:hover {
    color: var(--text-primary);
}

.footer-experiment-icon {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
}

.footer-experiment-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-experiment-mobile {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.footer-experiment-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.code-inline {
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-tagline {
        justify-content: center;
    }

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

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .about-highlights {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 100px var(--space-md) var(--space-2xl);
    }

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

    .terminal {
        max-width: 100%;
    }

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

    .about-cards {
        grid-template-columns: 1fr;
    }

    .about-highlights {
        padding: var(--space-lg);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer-experiment-desktop {
        display: none;
    }

    .footer-experiment-mobile {
        display: flex;
    }
}

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

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

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

    .tech-categories {
        grid-template-columns: 1fr;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    .about-quote blockquote {
        font-size: 1rem;
    }

    .quote-mark {
        font-size: 2rem;
    }

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

    .contact-link {
        width: 100%;
        justify-content: center;
    }

    /* Compact About Cards (Mission/Vision/Approach) */
    .about-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-md);
        text-align: left;
        padding: var(--space-lg);
    }

    .about-card-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        margin: 0;
    }

    .about-card-icon svg {
        width: 22px;
        height: 22px;
    }

    .about-card-content {
        flex: 1;
    }

    .about-card-title {
        font-size: 1.1rem;
        margin-bottom: var(--space-sm);
    }

    .about-card-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* Compact Service Cards (What We Build) */
    .service-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-md);
        text-align: left;
        padding: var(--space-lg);
    }

    .service-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        margin: 0;
    }

    .service-icon svg {
        width: 22px;
        height: 22px;
    }

    .service-content {
        flex: 1;
    }

    .service-title {
        font-size: 1.1rem;
        margin-bottom: var(--space-sm);
    }

    .service-description {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: var(--space-md);
    }

    .service-status {
        font-size: 0.8rem;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.hero-visual {
    animation: fadeInUp 0.8s ease-out;
}

.hero-visual {
    animation-delay: 0.2s;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays for cards */
.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.3s; }
.service-card:nth-child(5) { transition-delay: 0.4s; }
.service-card:nth-child(6) { transition-delay: 0.5s; }

.stat-card:nth-child(1) { transition-delay: 0s; }
.stat-card:nth-child(2) { transition-delay: 0.1s; }
.stat-card:nth-child(3) { transition-delay: 0.2s; }

.about-card:nth-child(1) { transition-delay: 0s; }
.about-card:nth-child(2) { transition-delay: 0.15s; }
.about-card:nth-child(3) { transition-delay: 0.3s; }

.highlight-item:nth-child(1) { transition-delay: 0s; }
.highlight-item:nth-child(2) { transition-delay: 0.1s; }
.highlight-item:nth-child(3) { transition-delay: 0.2s; }
.highlight-item:nth-child(4) { transition-delay: 0.3s; }

.tech-category:nth-child(1) { transition-delay: 0s; }
.tech-category:nth-child(2) { transition-delay: 0.1s; }
.tech-category:nth-child(3) { transition-delay: 0.2s; }
.tech-category:nth-child(4) { transition-delay: 0.3s; }

/* Active nav link style */
.nav-link.active {
    color: var(--accent-primary);
}

.nav-link.active::after {
    width: 100%;
}

/* Navbar scrolled state */
.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

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

    html {
        scroll-behavior: auto;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}
