:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;
    
    --bg-primary: #0a0f0d;
    --bg-secondary: #0f1612;
    --bg-tertiary: #151d18;
    --bg-card: #111916;
    --bg-card-hover: #182420;
    
    --text-primary: #f0fdf4;
    --text-secondary: #a7f3d0;
    --text-muted: #6b8f7a;
    --text-dim: #3d5a4a;
    
    --border-color: #1e3a2f;
    --border-glow: rgba(16, 185, 129, 0.3);
    
    --accent: var(--emerald-500);
    --accent-glow: rgba(16, 185, 129, 0.15);
    --accent-bright: var(--emerald-400);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.15);
    
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --nav-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

::selection {
    background: var(--emerald-600);
    color: var(--text-primary);
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    animation: glowMove 20s ease-in-out infinite alternate;
}

@keyframes glowMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-5%, -5%); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 15, 13, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
}

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

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

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

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

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

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

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

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: calc(var(--nav-height) + 4rem) 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent-glow);
    border: 1px solid var(--border-glow);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--accent);
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

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

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

.hero-title {
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.greeting {
    display: block;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.name {
    display: block;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--emerald-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

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

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

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

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

.btn-secondary:hover {
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

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

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

.stat-label {
    font-size: 0.875rem;
    color: var(--text-dim);
}

.hero-visual {
    display: flex;
    justify-content: center;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.terminal {
    width: 100%;
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

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

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

.btn-close { background: #ff5f57; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #28c840; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 2;
}

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

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

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

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

.section {
    padding: 8rem 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--accent);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 3rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

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

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}

.about-card:hover .card-glow {
    opacity: 1;
}

.avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-400));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
}

.avatar i {
    font-size: 2.5rem;
    color: var(--bg-primary);
}

.avatar-me {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    position: relative;
    background: linear-gradient(180deg, #d4956a 0%, #c8895c 100%);
    border-radius: 50%;
    overflow: hidden;
}

.me-face {
    position: absolute;
    width: 100%;
    height: 100%;
}

.me-hair {
    position: absolute;
    width: 100%;
    height: 40px;
    background: #3d2d20;
    top: 0;
    left: 0;
    border-radius: 50% 50% 0 0;
}

.me-glasses {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    z-index: 5;
}

.me-lens {
    position: absolute;
    width: 20px;
    height: 16px;
    border: 2px solid #1a1a1a;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
}

.me-lens.left {
    left: 0;
}

.me-lens.right {
    right: 0;
}

.me-bridge {
    position: absolute;
    width: 8px;
    height: 2px;
    background: #1a1a1a;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
}

.me-eyes {
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    display: flex;
    justify-content: space-between;
    z-index: 4;
}

.me-eye {
    width: 6px;
    height: 6px;
    background: #2d1f14;
    border-radius: 50%;
    animation: blinkEyes 4s ease-in-out infinite;
}

.me-beard {
    position: absolute;
    width: 60px;
    height: 30px;
    background: #3d2d20;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 30px 30px;
}

.me-smile {
    position: absolute;
    width: 14px;
    height: 6px;
    border-bottom: 2px solid #fff;
    border-radius: 0 0 10px 10px;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.role {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-stat-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

.about-stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.about-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.25rem 0.625rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.about-card:hover .about-tags span {
    border-color: var(--border-glow);
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 1.125rem;
    transition: all 0.3s;
    position: relative;
    z-index: 10;
}

.social-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.projects-grid {
    display: grid;
    gap: 1.5rem;
}

.project-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

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

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    transform: translateX(10px);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card.featured {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: var(--border-glow);
}

.project-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border: 1px solid var(--border-glow);
    border-radius: 14px;
    font-size: 1.75rem;
    color: var(--accent);
    transition: all 0.3s;
}

.project-card:hover .project-icon {
    background: var(--accent);
    color: var(--bg-primary);
    transform: scale(1.05);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

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

.project-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
}

.project-badge.community {
    background: #f59e0b;
    color: #1a1a1a;
}

.project-badge.side {
    background: #8b5cf6;
    color: #fff;
}

.project-description {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

.project-tags span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-dim);
    transition: all 0.3s;
}

.project-card:hover .project-tags span {
    border-color: var(--border-glow);
    color: var(--accent);
}

.project-arrow {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-dim);
    font-size: 1rem;
    transition: all 0.3s;
}

.project-card:hover .project-arrow {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
    transform: translateX(5px);
}

.homelab-hardware {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 3rem 0;
}

.hardware-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1.25rem;
    transition: all 0.3s;
}

.hardware-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.hardware-card.retired {
    opacity: 0.6;
    border-style: dashed;
}

.hardware-card.retired:hover {
    opacity: 0.8;
}

.hardware-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    font-size: 1.25rem;
    color: var(--accent);
    flex-shrink: 0;
}

.hardware-card.retired .hardware-icon {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-dim);
}

.hardware-content h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.hardware-main {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.hardware-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

.hardware-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hardware-list li {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0.25rem 0;
}

.hw-count {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
    margin-right: 0.25rem;
}

.hw-spec {
    font-size: 0.75rem;
    color: var(--text-dim);
}

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

.service-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s;
}

.service-category:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.service-category h3 {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-category h3 i {
    font-size: 1.125rem;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.service-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
}

.service-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(5px);
    border-left: 2px solid var(--accent);
    padding-left: calc(0.75rem - 2px);
}

.service-item:hover .service-name {
    color: var(--accent);
}

.service-item:hover .service-github {
    opacity: 1;
}

.service-name {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
}

.service-github {
    font-size: 0.875rem;
    color: var(--text-dim);
    opacity: 0.5;
    transition: all 0.2s;
}

.service-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.gear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 3rem;
}

.gear-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: all 0.3s;
}

.gear-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.gear-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    font-size: 1.25rem;
    color: var(--accent);
    flex-shrink: 0;
}

.gear-content h4 {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.gear-main {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.gear-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

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

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

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.skill-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

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

.skill-category ul {
    list-style: none;
}

.skill-category li {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

.skill-category li:last-child {
    border-bottom: none;
}

.skill-category:hover li {
    color: var(--text-secondary);
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.family-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s;
}

.family-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.girlfriend-card:hover {
    border-color: #f472b6;
    box-shadow: 0 0 40px rgba(244, 114, 182, 0.15);
}

.person-icon-wrapper {
    position: relative;
    width: 80px;
    height: 95px;
    flex-shrink: 0;
}

.person-icon {
    width: 70px;
    height: 80px;
    position: absolute;
    bottom: 0;
    left: 5px;
    overflow: visible;
}

.person-icon.girlfriend .face {
    width: 50px;
    height: 58px;
    background: linear-gradient(180deg, #e8a87c 0%, #d4956a 100%);
    border-radius: 50% 50% 48% 48%;
    position: absolute;
    top: 18px;
    left: 10px;
    z-index: 2;
}

.hair {
    position: absolute;
    width: 70px;
    height: 90px;
    top: 0;
    left: 0;
    z-index: 1;
}

.hair::before {
    content: '';
    position: absolute;
    width: 70px;
    height: 42px;
    background: linear-gradient(180deg, #c84a31 0%, #b8422b 100%);
    top: 0;
    left: 0;
    border-radius: 50% 50% 30% 30%;
}

.hair-left,
.hair-right {
    position: absolute;
    background: linear-gradient(180deg, #c84a31, #a63c28, #8b3020);
    top: 28px;
}

.hair-left {
    left: -4px;
    width: 24px;
    height: 68px;
    border-radius: 40% 30% 60% 40%;
    animation: hairWaveLeft 3s ease-in-out infinite;
}

.hair-right {
    right: -4px;
    width: 24px;
    height: 64px;
    border-radius: 30% 40% 40% 60%;
    animation: hairWaveRight 3s ease-in-out infinite;
}

.hair-wave-1,
.hair-wave-2 {
    position: absolute;
    background: linear-gradient(180deg, #b8422b, #9a3825);
    top: 32px;
}

.hair-wave-1 {
    left: 10px;
    width: 18px;
    height: 58px;
    border-radius: 50% 30% 60% 40%;
    animation: hairWaveLeft 2.8s ease-in-out infinite;
    animation-delay: 0.3s;
}

.hair-wave-2 {
    right: 10px;
    width: 18px;
    height: 54px;
    border-radius: 30% 50% 40% 60%;
    animation: hairWaveRight 2.8s ease-in-out infinite;
    animation-delay: 0.3s;
}

@keyframes hairWaveLeft {
    0%, 100% { transform: rotate(-1deg) translateX(0); }
    50% { transform: rotate(2deg) translateX(2px); }
}

@keyframes hairWaveRight {
    0%, 100% { transform: rotate(1deg) translateX(0); }
    50% { transform: rotate(-2deg) translateX(-2px); }
}

.face {
    position: relative;
}

.glasses {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    z-index: 5;
}

.lens {
    position: absolute;
    width: 16px;
    height: 15px;
    border: 2.5px solid #4a3525;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.lens.left {
    left: 0;
}

.lens.right {
    right: 0;
}

.bridge {
    position: absolute;
    width: 6px;
    height: 2px;
    background: #4a3525;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.eyes {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    display: flex;
    justify-content: space-between;
    z-index: 4;
}

.eye {
    width: 6px;
    height: 6px;
    background: #4a6fa5;
    border-radius: 50%;
    position: relative;
    animation: blinkEyes 4s ease-in-out infinite;
}

.eye::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    top: 1px;
    left: 1px;
}

@keyframes blinkEyes {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

.smile {
    position: absolute;
    width: 12px;
    height: 6px;
    border: 2px solid #c97878;
    border-top: none;
    border-radius: 0 0 12px 12px;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: #e89090;
}

.cheeks {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    display: flex;
    justify-content: space-between;
    z-index: 3;
}

.cheek {
    width: 8px;
    height: 5px;
    background: rgba(232, 144, 144, 0.5);
    border-radius: 50%;
}

.eyelashes {
    display: none;
}

.lash-group {
    display: none;
}

.lash {
    display: none;
}

.family-content h3,
.cat-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.family-details {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.family-note {
    color: #f472b6;
    font-size: 1.25rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.cat-icon-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.cat-ear {
    position: absolute;
    width: 20px;
    height: 20px;
    top: -6px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transform-origin: bottom center;
    animation: earTwitch 3s ease-in-out infinite;
}

.cat-ear.left {
    left: 6px;
    transform: rotate(-15deg);
    animation-delay: 0s;
}

.cat-ear.right {
    right: 6px;
    transform: rotate(15deg);
    animation-delay: 1.5s;
}

@keyframes earTwitch {
    0%, 90%, 100% { transform: rotate(var(--ear-rotate, 0deg)); }
    93% { transform: rotate(calc(var(--ear-rotate, 0deg) + 10deg)); }
    96% { transform: rotate(calc(var(--ear-rotate, 0deg) - 5deg)); }
}

.cat-ear.left { --ear-rotate: -15deg; }
.cat-ear.right { --ear-rotate: 15deg; }

.cat-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
    position: relative;
}

.cat-icon.black-cat {
    background: #0a0a0a;
    border: 3px solid #222;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.cat-icon-wrapper.black .cat-ear {
    background: #0a0a0a;
    border: 3px solid #222;
    border-bottom: none;
}

.cat-icon.black-cat .cat-eyes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.cat-icon.black-cat .cat-eyes::before,
.cat-icon.black-cat .cat-eyes::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #90EE90;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 6px #90EE90;
}

.cat-icon.black-cat .cat-eyes::before {
    left: 18px;
}

.cat-icon.black-cat .cat-eyes::after {
    right: 18px;
}

.cat-icon.white-cat {
    background: linear-gradient(135deg, #ffffff 0%, #e5e5e5 50%, #9ca3af 100%);
    border: 3px solid #d1d5db;
}

.cat-icon-wrapper.white .cat-ear {
    background: linear-gradient(135deg, #ffffff 0%, #d1d5db 100%);
    border: 3px solid #d1d5db;
    border-bottom: none;
}

.cat-icon.white-cat .cat-eyes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.cat-icon.white-cat .cat-eyes::before,
.cat-icon.white-cat .cat-eyes::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 6px #3b82f6;
}

.cat-icon.white-cat .cat-eyes::before {
    left: 18px;
}

.cat-icon.white-cat .cat-eyes::after {
    right: 18px;
}

.cat-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cat-details {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cat-birthday {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.cat-age {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent);
    margin-top: 0.5rem;
    font-weight: 600;
}

.contact {
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 3rem auto 0;
}

.contact-text {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.contact-links a {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.contact-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.spotify-widget {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: all 0.3s;
    width: 100%;
    text-decoration: none;
    cursor: pointer;
}

.spotify-widget:hover {
    background: var(--bg-card-hover);
    border-color: #1db954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.15);
}

.spotify-widget:hover {
    border-color: #1db954;
    box-shadow: 0 0 20px rgba(29, 185, 84, 0.15);
}

.spotify-widget.hidden {
    display: none;
}

.spotify-widget.playing {
    border-color: #1db954;
}

.spotify-icon {
    font-size: 1.5rem;
    color: #1db954;
    flex-shrink: 0;
}

.spotify-widget.playing .spotify-icon {
    animation: pulse 2s ease-in-out infinite;
}

.spotify-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.spotify-status {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.125rem;
}

.spotify-track {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer-location {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-location i {
    color: var(--accent);
    margin-right: 0.5rem;
}

.footer-quote {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    min-height: 1.5rem;
}

.footer-counter {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: inline-block;
}

.footer-counter #visitor-count {
    color: var(--accent);
    font-weight: 600;
}

}

#world-map .geek-marker {
    animation: pulse 3s ease-in-out infinite;
    cursor: pointer;
}

.world-map-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(rgba(16, 185, 129, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.3;
}

#world-map {
    width: 100%;
    height: auto;
    display: block;
}

#world-map path {
    fill: var(--bg-tertiary);
    stroke: var(--border-color);
    stroke-width: 0.5;
    transition: all 0.3s ease;
    cursor: pointer;
}

#world-map path:hover {
    fill: var(--accent);
    stroke: var(--accent-bright);
    stroke-width: 1;
    filter: drop-shadow(0 0 4px var(--accent-glow));
}

#world-map path.country-highlight {
    fill: var(--accent);
    stroke: var(--accent-bright);
    stroke-width: 1;
    opacity: 0.8;
    animation: countryPulse 2s ease-in-out infinite;
}

#world-map path.country-highlight:hover {
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

#world-map path.country-geek {
    fill: var(--emerald-700);
    stroke: var(--accent);
    stroke-width: 1.5;
    opacity: 0.9;
    animation: geekPulse 3s ease-in-out infinite;
}

#world-map path.country-geek:hover {
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--accent));
}

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

@keyframes geekPulse {
    0%, 100% { opacity: 0.9; filter: drop-shadow(0 0 4px var(--accent)); }
    50% { opacity: 1; filter: drop-shadow(0 0 12px var(--accent)); }
}

}

.top-countries {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.country-item:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.country-name {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-flag {
    font-size: 1.2rem;
}

.country-count {
    color: var(--accent);
    font-weight: 600;
}

.footer p {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-dim);
}

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

.footer-sub {
    margin-top: 0.5rem;
}

.footer-sub i {
    color: var(--accent);
}

.footer-attribution {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 1rem;
    opacity: 0.7;
}

.footer-attribution a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-attribution a:hover {
    color: var(--accent);
}

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

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-subtitle {
        justify-content: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-text {
        text-align: center;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .homelab-hardware {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .project-icon {
        margin: 0 auto;
    }
    
    .project-header {
        justify-content: center;
    }
    
    .project-tags {
        justify-content: center;
    }
    
    .project-arrow {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding-top: calc(var(--nav-height) + 2rem);
    }
    
    .section {
        padding: 5rem 0;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}


.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 13, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    overflow-y: auto;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 1400px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.modal-header h2 i {
    color: var(--accent);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--accent);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.grammar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.grammar-panel h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grammar-panel h3 i {
    color: var(--accent);
}

.grammar-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

.grammar-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.grammar-loading {
    display: none;
    text-align: center;
    color: var(--accent);
    font-family: var(--font-mono);
    margin: 1rem 0;
    font-size: 1rem;
}

.grammar-loading.active {
    display: block;
}

.grammar-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.grammar-btn {
    padding: 1rem 2rem;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grammar-btn:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.grammar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.grammar-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.grammar-btn.secondary:hover {
    background: var(--border-color);
    box-shadow: none;
}

.grammar-info {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

@media (max-width: 968px) {
    .grammar-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-overlay {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

.chat-modal {
    max-width: 1000px;
    height: 80vh;
}

.chat-title-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

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

.status-dot.connected {
    background: var(--accent);
}

.chat-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.3s ease;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: var(--accent);
    color: var(--bg-primary);
}

.message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message-text {
    background: var(--bg-secondary);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message.user .message-text {
    background: var(--accent);
    color: var(--bg-primary);
}

.message-text.typing::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

.chat-input-container {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    background: var(--bg-card);
}

.chat-form {
    margin-bottom: 0.75rem;
}

.chat-input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    max-height: 150px;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.chat-send-btn {
    padding: 1rem 1.5rem;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover:not(:disabled) {
    background: var(--accent-bright);
    transform: translateY(-2px);
}

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

.chat-footer-info {
    text-align: center;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

@keyframes ellipsis {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

@media (max-width: 768px) {
    .chat-modal {
        height: 95vh;
    }
    
    .chat-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.message-text h1,
.message-text h2,
.message-text h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.message-text h1 { font-size: 1.5rem; }
.message-text h2 { font-size: 1.3rem; }
.message-text h3 { font-size: 1.1rem; }

.message-text p {
    margin: 0.75rem 0;
}

.message-text ul,
.message-text ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.message-text li {
    margin: 0.25rem 0;
}

.message-text code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.message-text pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.message-text pre code {
    background: none;
    padding: 0;
}

.message-text strong {
    font-weight: 600;
    color: var(--text-primary);
}

.message-text em {
    font-style: italic;
}

.message-text a {
    color: var(--accent);
    text-decoration: underline;
}

.message-text a:hover {
    color: var(--accent-bright);
}

.message-text blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin: 1rem 0;
    opacity: 0.8;
}

.message.user .message-text code {
    background: rgba(255, 255, 255, 0.2);
}

.message.user .message-text pre {
    background: rgba(255, 255, 255, 0.2);
}

.message.user .message-text strong {
    color: var(--bg-primary);
}

.message.editing-mode {
    opacity: 0.5;
    position: relative;
}

.message.editing-mode::after {
    content: 'Editing...';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
}
