/* ============================================
   SHUBHAM GUPTA - SYSTEMS ENGINEER PORTFOLIO
   Light/Dark Mode with Toggle
   ============================================ */

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

:root {
    /* Fonts */
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Accent Colors (shared) */
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    
    /* Light Mode (Default) */
    --bg-primary: #f5f7fa;       /* cool off-white — not stark white */
    --bg-secondary: #eef1f5;     /* slate-100 toned — distinct sections */
    --bg-tertiary: #e2e8f0;      /* slate-200 — clear tertiary separation */
    --bg-card: #ffffff;          /* cards stay white — creates elevation */

    --text-primary: #0f172a;     /* slate-900 */
    --text-secondary: #475569;   /* slate-600 */
    --text-muted: #64748b;       /* slate-500 */

    --accent-primary: var(--cyan-600);
    --accent-secondary: var(--blue-600);

    --border-color: rgba(15, 23, 42, 0.1);   /* slate-based — visible on gray bg */
    --border-glow: rgba(6, 182, 212, 0.3);

    --gradient-primary: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
    --gradient-dark: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));

    --shadow-glow: 0 4px 20px rgba(6, 182, 212, 0.12);
    --shadow-glow-strong: 0 8px 40px rgba(6, 182, 212, 0.18);
    --shadow-soft: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.06);

    --code-bg: #e8edf3;
    --matrix-opacity: 0.025;
    --nav-bg: rgba(245, 247, 250, 0.92);
    --nav-scrolled-bg: rgba(245, 247, 250, 0.97);
    --radius: 12px;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #080f1e;       /* richer deep navy — less harsh than pure black */
    --bg-secondary: #0f172a;     /* slate-900 */
    --bg-tertiary: #1a2540;      /* mid-depth layer */
    --bg-card: #141e30;          /* lifted card vs primary — visible separation */

    --text-primary: #f1f5f9;     /* slate-100 */
    --text-secondary: #94a3b8;   /* slate-400 */
    --text-muted: #64748b;       /* slate-500 */

    --accent-primary: var(--cyan-400);
    --accent-secondary: var(--blue-600);

    --border-color: rgba(34, 211, 238, 0.12);
    --border-glow: rgba(34, 211, 238, 0.3);

    --gradient-primary: linear-gradient(135deg, var(--cyan-400), var(--blue-600));
    --gradient-dark: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));

    --shadow-glow: 0 0 30px rgba(34, 211, 238, 0.15);
    --shadow-glow-strong: 0 0 50px rgba(34, 211, 238, 0.25);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);

    --code-bg: #1a2540;
    --matrix-opacity: 0.05;
    --nav-bg: rgba(8, 15, 30, 0.88);
    --nav-scrolled-bg: rgba(8, 15, 30, 0.97);
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

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

/* Matrix Background Canvas */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: var(--matrix-opacity);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

nav.scrolled {
    background: var(--nav-scrolled-bg);
    box-shadow: var(--shadow-soft);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
    /* Invert light logo for light mode */
    filter: invert(1) brightness(0.9);
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

/* Show original logo in dark mode */
[data-theme="dark"] .logo-img {
    filter: none;
}

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

/* Hide mobile social links on desktop */
.mobile-social-links {
    display: none;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--cyan-400);
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
}

.menu-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--cyan-400);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--cyan-400);
    left: 0;
}

.menu-icon::before {
    top: -6px;
}

.menu-icon::after {
    top: 6px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        var(--bg-primary);
}

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

.hero-text {
    position: relative;
}

.terminal-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
    margin-bottom: 0;
}

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

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #eab308; }
.terminal-dot.green { background: #22c55e; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.typing-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 0 8px 0 0;
    margin-bottom: 1.5rem;
}

.prompt {
    color: var(--cyan-400);
}

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

.hero-text h1 {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.glitch {
    position: relative;
}

.tagline {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--cyan-400);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--blue-600);
}

.hero-text .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

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

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

.btn-primary:hover {
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: rgba(34, 211, 238, 0.1);
    box-shadow: var(--shadow-glow);
}

.btn-icon {
    font-size: 0.8rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    transition: opacity 0.3s ease;
}

/* .data-pending — handled in UX Fixes section below */

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan-400);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Hero Visual - System Diagram */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.system-diagram {
    position: relative;
    width: 400px;
    height: 400px;
}

.node-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--cyan-400);
    object-fit: cover;
    box-shadow: var(--shadow-glow-strong);
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed var(--border-glow);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.orbit-1 {
    width: 220px;
    height: 220px;
    animation-duration: 15s;
}

.orbit-2 {
    width: 300px;
    height: 300px;
    animation-duration: 25s;
    animation-direction: reverse;
}

.orbit-3 {
    width: 380px;
    height: 380px;
    animation-duration: 35s;
}

.satellite {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border: 1px solid var(--cyan-400);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-400);
    font-size: 1.2rem;
    animation: counter-rotate 20s linear infinite;
    box-shadow: var(--shadow-glow);
}

.orbit-1 .satellite {
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    animation-duration: 15s;
}

.orbit-2 .satellite {
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    animation-duration: 25s;
    animation-direction: reverse;
}

.orbit-3 .satellite {
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    animation-duration: 35s;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes counter-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}


/* ============================================
   SECTIONS - GENERAL
   ============================================ */
.main-content {
    background: var(--bg-primary);
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--cyan-400);
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.code-file {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.code-lang {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 4px;
}

.code-content {
    padding: 24px;
}

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

.about-text:last-child {
    margin-bottom: 0;
}

.highlight-cyan {
    color: var(--cyan-400);
    font-weight: 500;
}

.highlight-blue {
    color: var(--blue-500);
    font-weight: 500;
}

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

.about-philosophy {
    padding-top: 1rem;
}

.philosophy-title {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--cyan-400);
    margin-bottom: 1.5rem;
}

.philosophy-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.philosophy-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.philosophy-item:hover {
    border-color: var(--cyan-400);
    box-shadow: var(--shadow-glow);
    transform: translateX(5px);
}

.philosophy-icon {
    width: 40px;
    height: 40px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-400);
    margin-bottom: 1rem;
}

.philosophy-item h4 {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.philosophy-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

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

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

.project-signal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-signal.efficiency {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.2), transparent);
    color: var(--cyan-400);
}

.project-signal.responsibility {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
    color: var(--blue-500);
}

.project-signal.engineering {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.2), transparent);
    color: #a855f7;
}

.project-signal.infrastructure {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.2), transparent);
    color: #22c55e;
}

.project-signal.data-viz {
    background: linear-gradient(90deg, rgba(251, 146, 60, 0.2), transparent);
    color: #fb923c;
}

.project-signal.ml-app {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.2), transparent);
    color: #ec4899;
}

.project-signal.learning {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), transparent);
    color: #6366f1;
}

.project-signal.automation {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.2), transparent);
    color: #14b8a6;
}

.project-signal.business {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.2), transparent);
    color: #f59e0b;
}

.project-signal.cv-signal {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.2), transparent);
    color: #ec4899;
}

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

.project-icon {
    width: 50px;
    height: 50px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-400);
    font-size: 1.2rem;
}

.project-meta {
    text-align: right;
}

.project-role {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-award {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.project-institution {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--blue-500);
    margin-top: 4px;
}

.project-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.project-stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #fbbf24;
    margin-top: 4px;
}

.project-event {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.project-title {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-oneliner {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--cyan-400);
    margin-bottom: 1rem;
    font-style: italic;
}

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

.project-metrics {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
}

.metric {
    text-align: center;
    flex: 1;
}

.metric-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cyan-400);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    border-color: var(--cyan-400);
    color: var(--cyan-400);
}

.project-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan-400);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

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

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

.category-header {
    margin-bottom: 1.5rem;
}

.category-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.category-header h3 {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 8px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: var(--cyan-400);
    color: var(--cyan-400);
    transform: translateY(-2px);
}

/* ============================================
   EDUCATION SECTION
   ============================================ */
.education-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 3rem;
    align-items: center;
    position: relative;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.education-card:hover {
    border-color: var(--cyan-400);
    box-shadow: var(--shadow-glow);
}

.university-emblem {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emblem-text {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bg-primary);
}

.psu-logo-about {
    width: 100px;
    height: auto;
    border-radius: 8px;
}

.university-name {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.honors-program {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--cyan-400);
    margin-bottom: 1rem;
}

.degree-info {
    margin-bottom: 1.5rem;
}

.degree {
    font-size: 1rem;
    color: var(--text-secondary);
}

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

.education-stats {
    display: flex;
    gap: 2rem;
}

.edu-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    min-width: 100px;
}

.edu-stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cyan-400);
}

.edu-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.circuit-pattern {
    width: 150px;
    height: 150px;
    background: 
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px),
        linear-gradient(0deg, var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    border-radius: 8px;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    background: 
        radial-gradient(ellipse at 30% 80%, rgba(34, 211, 238, 0.05) 0%, transparent 50%),
        var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.terminal-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.terminal-line {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.json-output {
    padding-left: 1rem;
    line-height: 1.8;
}

.json-output p {
    color: var(--text-secondary);
}

.json-key {
    color: var(--cyan-400);
}

.json-value {
    color: #a3e635;
}

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

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    border-color: var(--cyan-400);
    color: var(--cyan-400);
    transform: translateX(5px);
    box-shadow: var(--shadow-glow);
}

.contact-link i {
    font-size: 1.2rem;
    color: var(--cyan-400);
}

.contact-form-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.label-icon {
    color: var(--cyan-400);
    margin-right: 4px;
}

.form-group input,
.form-group textarea {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cyan-400);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
}

.footer-logo .logo-img {
    height: 36px;
    width: auto;
    transition: filter 0.3s ease;
    /* Invert light logo for light mode */
    filter: invert(1) brightness(0.9);
}

/* Show original logo in dark mode */
[data-theme="dark"] .footer-logo .logo-img {
    filter: none;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--cyan-400);
    transform: translateY(-3px);
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.code-comment {
    color: var(--text-muted);
}

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

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(34, 211, 238, 0.4);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.profile-image {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .hero-text .description {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .education-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .education-logo {
        display: flex;
        justify-content: center;
    }
    
    .education-stats {
        justify-content: center;
    }
    
    .circuit-pattern {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1rem;
        border: 1px solid var(--border-color);
        border-top: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links .nav-link {
        display: block;
        padding: 0.75rem 1rem;
        text-align: center;
        border-radius: 8px;
    }
    
    .nav-links .nav-link:hover,
    .nav-links .nav-link.active {
        background: var(--bg-tertiary);
    }
    
    /* Mobile nav social links at bottom of menu */
    .mobile-social-links {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        padding: 1rem 0 0.5rem;
        margin-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }
    
    .mobile-social-links a {
        color: var(--text-secondary);
        font-size: 1.25rem;
        transition: color 0.3s ease;
    }
    
    .mobile-social-links a:hover {
        color: var(--accent-primary);
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-showcase {
        grid-template-columns: 1fr;
    }
    
    .skills-matrix {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat-divider {
        display: none;
    }
    
    .project-metrics {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* Selection */
::selection {
    background: rgba(34, 211, 238, 0.3);
    color: var(--text-primary);
}

/* ============================================
   MULTI-PAGE STYLES
   ============================================ */

/* Page Content Wrapper */
.page-content {
    padding-top: 80px;
}

/* Page Header */
.page-header {
    padding: 4rem 0 2rem;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(34, 211, 238, 0.05) 0%, transparent 50%),
        var(--bg-primary);
}

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

.breadcrumb a {
    color: var(--cyan-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-title {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* Preview Section (Home Page) */
.preview-section {
    padding: 4rem 0;
}

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

.preview-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

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

.preview-icon {
    width: 50px;
    height: 50px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-400);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.preview-card h3 {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.preview-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.preview-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--cyan-400);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Currently Working On Section */
.current-work-section {
    border-top: 1px solid var(--border-color);
}

.current-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.current-work-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.2s ease;
}

.current-work-item:hover {
    border-color: var(--cyan-400);
}

.current-work-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

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

.current-work-status {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
    white-space: nowrap;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-paused {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.status-completed {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
}

.current-work-oneliner {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Featured Highlight Section */
.featured-highlight {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.featured-project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.featured-content .project-signal {
    position: relative;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.featured-content .project-title {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.featured-content .project-oneliner {
    font-family: var(--font-mono);
    color: var(--cyan-400);
    margin-bottom: 1rem;
}

.featured-content .project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.featured-content .tech-stack {
    margin-bottom: 2rem;
}

.featured-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
}

.code-window .code-header {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.code-body {
    padding: 20px;
}

.code-body pre {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.code-keyword { color: var(--cyan-400); }
.code-function { color: #a78bfa; }
.code-key { color: var(--blue-500); }
.code-boolean { color: #f472b6; }
.code-number { color: #fbbf24; }
.code-comment { color: var(--text-muted); }

/* About Page Styles */
.about-page-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.about-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

.about-image-container {
    position: relative;
}

.about-page-image {
    width: 100%;
    border-radius: 16px;
    border: 3px solid var(--cyan-400);
    box-shadow: var(--shadow-glow);
}

.image-decoration {
    position: absolute;
    top: -10px;
    left: -10px;
    right: 10px;
    bottom: 10px;
    border: 1px dashed var(--border-glow);
    border-radius: 16px;
    z-index: -1;
}

.about-bio .code-block.large {
    height: 100%;
}

.philosophy-section,
.education-section,
.research-section,
.experience-section,
.current-focus {
    padding-top: 2rem;
}

/* Research Section */
.research-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.research-entry {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: relative;
    border-left: 3px solid var(--cyan-400);
}

.research-entry-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.research-venue-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.research-venue-badge.in-progress {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.research-venue {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.research-venue-full {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.research-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 1rem;
    font-style: italic;
}

.research-contribution-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.research-question {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 0.4rem;
}

.research-contribution-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.research-contribution-list li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 1.1rem;
    position: relative;
}

.research-contribution-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--cyan-400);
    font-size: 0.7rem;
    top: 0.18rem;
}

.research-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.research-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
    margin-left: 0.5rem;
}

.experience-item {
    position: relative;
    padding-bottom: 2rem;
}

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

.experience-marker {
    position: absolute;
    left: -1.875rem;
    top: 0.35rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--cyan-400);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--cyan-400);
}

.experience-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.experience-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin-bottom: 0.6rem;
}

.experience-header h4 {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.experience-company {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cyan-400);
}

.experience-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
    font-family: var(--font-mono);
}

.experience-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.exp-tag {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.section-title-sm {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--cyan-400);
    margin-bottom: 1.5rem;
}

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

.philosophy-item.large {
    padding: 2rem;
}

.philosophy-item.large p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.education-card.large {
    max-width: 100%;
}

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

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

.focus-item:hover {
    border-color: var(--cyan-400);
    box-shadow: var(--shadow-glow);
}

.focus-icon {
    width: 40px;
    height: 40px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-400);
    flex-shrink: 0;
}

.focus-content h4 {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.focus-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Beyond the Resume Section */
.beyond-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.beyond-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.beyond-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.beyond-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 0.9rem;
    margin-top: 2px;
}

.beyond-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.beyond-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Skill tag primary variant */
.skill-tag-primary {
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.35);
    color: var(--accent-primary);
    font-weight: 600;
}

.skill-tag-note {
    font-size: 0.65rem;
    opacity: 0.75;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Projects Page Styles */
.projects-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--cyan-400);
    color: var(--cyan-400);
    background: rgba(34, 211, 238, 0.1);
}

.github-cta {
    text-align: center;
    padding: 3rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.github-cta p {
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Skills Page Styles */
.skills-matrix.large {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.skill-category.large {
    padding: 2.5rem;
}

.skill-category.large .category-header {
    margin-bottom: 1rem;
}

.category-detail {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.skill-projects {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.skill-projects .projects-label {
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.skill-projects a {
    color: var(--cyan-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.skill-projects a:hover {
    color: var(--text-primary);
}

.languages-section,
.tools-section {
    margin-top: 4rem;
}

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

.language-item {
    display: grid;
    grid-template-columns: 120px 1fr 80px;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-secondary);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.language-item:hover {
    border-color: var(--cyan-400);
    box-shadow: var(--shadow-glow);
}

.language-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.language-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.language-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 1s ease;
}

.language-level {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan-400);
    text-align: right;
    white-space: nowrap;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tool-item:hover {
    border-color: var(--cyan-400);
    color: var(--cyan-400);
}

.tool-item i {
    font-size: 1.2rem;
    color: var(--cyan-400);
}

/* Contact Page Styles */
.contact-content.large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info.large {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.terminal-window.large {
    margin-bottom: 0;
}

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

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

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.contact-card:hover {
    border-color: var(--cyan-400);
    box-shadow: var(--shadow-glow);
    transform: translateX(5px);
}

.contact-card-icon {
    width: 50px;
    height: 50px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-400);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-card-content h4 {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact-card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.contact-card-action {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--cyan-400);
    display: flex;
    align-items: center;
    gap: 6px;
}

.availability-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse-status 2s infinite;
}

.status-indicator.online {
    background: #22c55e;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
}

.contact-form-container.large {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h3 {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* AI Assistant Chat Section */
.ai-assistant-section,
.ai-assistant-home {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.ai-assistant-home {
    margin-top: 0;
    border-top: none;
}

.ai-assistant-home .chat-container {
    max-width: 800px;
    margin: 0 auto;
}

.ai-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ai-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.ai-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.chat-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

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

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

.chat-message.bot {
    align-self: flex-start;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.chat-message.bot .message-avatar {
    background: rgba(34, 211, 238, 0.1);
    color: var(--cyan-400);
}

.chat-message.user .message-avatar {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-500);
}

.message-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

.chat-message.user .message-content {
    background: rgba(34, 211, 238, 0.1);
    border-color: var(--cyan-400);
}

.message-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.message-content a {
    color: var(--cyan-400);
    text-decoration: none;
}

.message-content a:hover {
    text-decoration: underline;
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-q {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--cyan-400);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-q:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: var(--cyan-400);
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.chat-input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--cyan-400);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    width: 46px;
    height: 46px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem;
}

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

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

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.email-fallback {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
}

.email-fallback p {
    font-size: 0.85rem;
    color: #fbbf24;
    margin-bottom: 0.75rem;
}

.email-fallback-btn {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 8px 16px;
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid #fbbf24;
    border-radius: 6px;
    color: #fbbf24;
    cursor: pointer;
    transition: all 0.3s ease;
}

.email-fallback-btn:hover {
    background: #fbbf24;
    color: var(--bg-primary);
}

.faq-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

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

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.faq-item h4 {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.faq-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item a {
    color: var(--cyan-400);
    text-decoration: none;
}

.faq-item a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE - MULTI-PAGE
   ============================================ */
@media (max-width: 1024px) {
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-project {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .featured-visual {
        order: -1;
    }
    
    .about-main {
        grid-template-columns: 1fr;
    }
    
    .about-image-container {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .philosophy-grid-large,
    .focus-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-matrix.large {
        grid-template-columns: 1fr;
    }
    
    .contact-content.large {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 0.9rem;
    }
    
    .page-header {
        padding: 2rem 0 1.5rem;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .languages-grid {
        grid-template-columns: 1fr;
    }
    
    .language-item {
        grid-template-columns: 100px 1fr 70px;
        gap: 1rem;
        padding: 1rem;
    }
    
    .language-name {
        font-size: 0.85rem;
    }
    
    .language-level {
        font-size: 0.7rem;
    }
    
    /* Contact page mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form-container {
        order: 1;
    }
    
    .contact-card {
        padding: 1.25rem;
    }
    
    /* Skills page mobile */
    .skill-category {
        padding: 1.25rem;
    }
    
    .category-header h3 {
        font-size: 1.1rem;
    }
    
    .skill-tags {
        gap: 0.5rem;
    }
    
    .skill-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* About page mobile */
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        max-width: 200px;
        margin: 0 auto;
    }
    
    /* Projects page mobile */
    .filter-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .project-card {
        padding: 1.25rem;
    }
    
    .project-card h3 {
        font-size: 1.1rem;
    }
    
    /* Section titles */
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-tag {
        font-size: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-text h1,
    .glitch {
        font-size: 1.75rem !important;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .quick-q {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }
    
    .tech-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ============================================
   NEW STYLES - Hero Enhancements
   ============================================ */

/* Nav Social Links */
.nav-social {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
}

.nav-social-link {
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.nav-social-link:hover {
    color: var(--cyan-400);
    transform: translateY(-2px);
}

/* Hero Education Info */
.hero-education {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.education-main {
    color: var(--cyan-400);
    font-weight: 600;
}

.education-honors {
    color: var(--text-primary);
}

.education-grad {
    color: var(--text-muted);
}

.education-divider {
    color: var(--border-glow);
    opacity: 0.5;
}

/* Availability Badge */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 50px;
    color: #22c55e;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.availability-badge i {
    font-size: 0.9rem;
}

/* Tertiary Button */
.btn-tertiary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-tertiary:hover {
    color: var(--cyan-400);
    border-color: var(--cyan-400);
    background: rgba(34, 211, 238, 0.05);
}

/* Stat Context */
.stat-context {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-family: var(--font-mono);
}

.stat-item[title] {
    cursor: help;
}

/* Research Section Enhancements */
.research-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(34, 211, 238, 0.03);
    border-left: 2px solid var(--cyan-400);
    border-radius: 0 8px 8px 0;
}

.research-meta p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.research-meta i {
    color: var(--cyan-400);
    width: 16px;
    text-align: center;
}

.research-finding {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    margin: 1rem 0;
}

.finding-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #22c55e;
    font-weight: 600;
}

.finding-value {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.research-cta {
    margin-top: 1.5rem;
}

/* Mobile Responsive for New Elements */
@media (max-width: 768px) {
    /* Nav adjustments for mobile */
    .nav-container {
        position: relative;
    }
    
    .nav-social {
        display: none;
    }
    
    .logo-img {
        height: 32px;
    }
    
    /* Hero section mobile */
    .hero-education {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
        font-size: 0.8rem;
    }
    
    .education-divider {
        display: none;
    }
    
    .availability-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-text h1,
    .glitch {
        font-size: 2rem !important;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .description {
        font-size: 0.9rem;
    }
    
    /* Hero stats mobile */
    .hero-stats {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.5rem 0;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .stat-context {
        font-size: 0.6rem;
    }
    
    /* Research section mobile */
    .research-meta {
        padding: 0.75rem;
    }
    
    .research-meta p {
        font-size: 0.8rem;
    }
    
    .research-finding {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .finding-label {
        font-size: 0.75rem;
    }
    
    .finding-value {
        font-size: 0.85rem;
    }
    
    /* CTA buttons mobile */
    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }
    
    /* Featured project mobile */
    .featured-project {
        padding: 1.25rem;
    }
    
    .featured-content {
        padding: 0;
    }
    
    .project-title {
        font-size: 1.25rem;
    }
    
    .project-description {
        font-size: 0.85rem;
    }
    
    /* Preview cards mobile */
    .preview-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .preview-card {
        padding: 1.25rem;
    }
    
    /* Footer mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-logo .logo-img {
        height: 28px;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-text,
    .copyright {
        font-size: 0.8rem;
    }
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: rotate(15deg);
}

.theme-toggle .fa-sun {
    display: none;
}

.theme-toggle .fa-moon {
    display: block;
}

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

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

/* Smooth transitions for theme switching */
body,
nav,
.hero,
.section,
.footer,
.project-card,
.skill-category,
.contact-card,
.preview-card,
.chat-container,
.btn,
.terminal-header,
.code-window {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================================
   LIGHT MODE SPECIFIC ADJUSTMENTS
   ============================================ */

/* Terminal/Code elements in light mode */
.terminal-header {
    background: var(--bg-tertiary);
}

.code-window {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
}

.code-body {
    background: var(--code-bg);
}

/* Cards and containers */
.project-card,
.skill-category,
.preview-card,
.contact-card,
.faq-item,
.philosophy-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

/* Chat container */
.chat-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.chat-message.bot .message-content {
    background: var(--bg-tertiary);
}

.chat-message.user .message-content {
    background: var(--gradient-primary);
}

.chat-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Glitch effect - softer in light mode */
.glitch {
    color: var(--text-primary);
}

/* Hero stats */
.hero-stats {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem 2rem;
}

/* Featured project */
.featured-project {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* Buttons - ensure contrast in light mode */
.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
}

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

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

/* Links */
a {
    color: var(--accent-primary);
}

/* Page header */
.page-header {
    background: var(--bg-secondary);
}

/* Filter buttons */
.filter-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

/* Mobile theme toggle */
@media (max-width: 768px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-left: 0.5rem;
    }
}

/* ============================================
   FLOATING CHAT WIDGET
   ============================================ */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.chat-widget-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chat-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(6, 182, 212, 0.5);
}

.chat-widget-btn.hidden {
    display: none;
}

.chat-widget-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-primary);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.chat-widget-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.chat-widget-window.active {
    display: flex;
}

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

.chat-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gradient-primary);
    color: #ffffff;
}

.chat-widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.95rem;
}

.chat-widget-title i {
    font-size: 1.2rem;
}

.chat-widget-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s ease;
}

.chat-widget-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chat window messages */
.chat-widget-window .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    max-height: 320px;
    background: var(--bg-secondary);
}

.chat-widget-window .chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.chat-widget-window .chat-message.user {
    flex-direction: row-reverse;
}

.chat-widget-window .message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.chat-widget-window .chat-message.user .message-avatar {
    background: var(--gradient-primary);
    color: #ffffff;
}

.chat-widget-window .message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.chat-widget-window .chat-message.bot .message-content {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px 12px 12px 4px;
}

.chat-widget-window .chat-message.user .message-content {
    background: var(--gradient-primary);
    color: #ffffff;
    border-radius: 12px 12px 4px 12px;
}

.chat-widget-window .message-content p {
    margin: 0;
}

.chat-widget-window .quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.chat-widget-window .quick-q {
    padding: 6px 12px;
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
}

.chat-widget-window .quick-q:hover {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

/* Chat input in widget */
.chat-widget-window .chat-input-container {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.chat-widget-window .chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.2s ease;
}

.chat-widget-window .chat-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.chat-widget-window .chat-input::placeholder {
    color: var(--text-muted);
}

.chat-widget-window .chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-widget-window .chat-send-btn:hover {
    transform: scale(1.05);
}

/* Typing indicator */
.chat-widget-window .typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

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

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

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

@keyframes typing {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .chat-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .chat-widget-btn {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
    
    .chat-widget-window {
        width: calc(100vw - 32px);
        max-width: 360px;
        right: 0;
        bottom: 72px;
        max-height: 70vh;
    }
    
    .chat-widget-window .chat-messages {
        max-height: calc(70vh - 140px);
    }
}

/* ============================================
   UX FIXES — Accessibility, Contrast, Responsive
   ============================================ */

/* Fix 1: Skip-to-content link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid var(--accent-primary);
    border-radius: 6px;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* Fix 2: Focus-visible outlines */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
    border-radius: 3px;
}
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

/* Fix 3: Cyan text contrast in light mode
   --cyan-400 (#22d3ee) on light bg = ~2.5:1 (fails WCAG AA)
   Using --accent-primary which is cyan-600 in light, cyan-400 in dark */
:root .tagline,
:root .section-title-sm,
:root .stat-value,
:root .prompt,
:root .nav-links a:hover,
:root .nav-links a.active,
:root .education-main,
:root .experience-company {
    color: var(--accent-primary);
}
/* Dark mode keeps cyan-400 (already set via --accent-primary) */

/* Fix 4: Hero stats — show fallback values during load, subtle pulse only */
.data-pending {
    opacity: 0.55;
    animation: data-pulse 1.8s ease-in-out infinite;
}
@keyframes data-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 0.35; }
}

/* Fix 5: Experience timeline — mobile responsive */
@media (max-width: 768px) {
    .experience-timeline {
        margin-left: 0;
        padding-left: 1rem;
    }
    .experience-marker {
        left: -1.375rem;
    }
    .experience-header {
        flex-direction: column;
        gap: 0.2rem;
    }
    .experience-date {
        margin-left: 0;
        order: 3;
    }
    .experience-company {
        order: 2;
    }
}

/* Experience marker — current role gets a pulsing glow dot */
.experience-marker.current {
    background: var(--cyan-400);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25), 0 0 0 6px rgba(34, 211, 238, 0.1);
    animation: marker-pulse 2.5s ease-in-out infinite;
}
@keyframes marker-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25), 0 0 0 6px rgba(34, 211, 238, 0.1); }
    50% { box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.35), 0 0 0 8px rgba(34, 211, 238, 0.08); }
}
