/**
 * ============================================================
 * FILE: assets/css/styles.css  —  V3 "Fortress" Hacker Edition
 * PURPOSE: Custom styles that extend Tailwind CSS.
 *          Full hacker/developer aesthetic with:
 *
 *   - Matrix rain canvas support
 *   - Particle network backgrounds
 *   - CRT scanline overlay effect
 *   - Glitch text animation
 *   - Code-style section headers
 *   - Terminal UI components
 *   - Enhanced glassmorphism with neon glow
 *   - Binary/hex decorative elements
 *   - Typewriter cursor effects
 *   - Cyberpunk gradient accents
 *
 * STRUCTURE:
 *   1.  CSS Custom Properties
 *   2.  Base & Global
 *   3.  Scanline & CRT Effects
 *   4.  Glassmorphism Cards
 *   5.  Navigation (hacker style)
 *   6.  Hero Section (matrix, glitch, terminal)
 *   7.  Section Headers (command-line style)
 *   8.  Skill Cards
 *   9.  Timeline (cyber)
 *  10.  Education
 *  11.  Publications
 *  12.  Contact Form (hacker terminal)
 *  13.  Glitch Effects
 *  14.  Custom Animations
 *  15.  Scroll & Utility
 *  16.  Code Decorations
 *  17.  Reduced Motion
 * ============================================================
 */

/* ==========================================================
   1. CSS CUSTOM PROPERTIES
   ========================================================== */
:root {
    --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.4), 0 0 40px rgba(6, 182, 212, 0.1);
    --glow-purple: 0 0 20px rgba(168, 85, 247, 0.4), 0 0 40px rgba(168, 85, 247, 0.1);
    --glow-green: 0 0 20px rgba(0, 255, 65, 0.3), 0 0 40px rgba(0, 255, 65, 0.1);
    --glow-red: 0 0 15px rgba(255, 62, 62, 0.3);
    --glass-bg: rgba(10, 15, 30, 0.7);
    --glass-border: rgba(6, 182, 212, 0.08);
    --glass-bg-light: rgba(255, 255, 255, 0.7);
    --glass-border-light: rgba(148, 163, 184, 0.2);
    --matrix-green: #00ff41;
    --terminal-bg: rgba(5, 10, 20, 0.95);
    --scanline-color: rgba(0, 255, 65, 0.02);
}

/* ==========================================================
   1b. LIGHT THEME — Real-time fallback overrides
   Ensures theme switch works dynamically even if Tailwind CDN's
   custom `light:` variant doesn't re-evaluate on class toggle.
   These rules use html.light (set by JS on <html>) to guarantee
   all major elements update immediately.
   ========================================================== */

/* --- CSS Custom Properties swap --- */
html.light {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(148, 163, 184, 0.2);
    --terminal-bg: rgba(15, 23, 42, 0.95);
    --scanline-color: transparent;
    --matrix-green: #00b850;
}

/* --- Body --- */
html.light body,
body.light {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

/* --- Section backgrounds --- */
html.light #hero > .hero-grid-bg,
html.light .hero-grid-bg {
    background-color: #f8fafc;
}

html.light section#skills,
html.light section#education,
html.light section#contact {
    background-color: #f8fafc;
}

html.light section#about,
html.light section#experience,
html.light section#publications {
    background-color: #ffffff;
}

/* --- Footer --- */
html.light footer {
    background-color: #f8fafc;
    border-top-color: #e2e8f0;
}

/* --- Canvas --- */
html.light #matrix-canvas {
    opacity: 0.03;
}

/* --- Section headings & key text --- */
html.light section h2,
html.light section h3 {
    color: #0f172a;
}

html.light footer a[href="#hero"] {
    color: #0f172a;
}

/* --- Toggle button --- */
html.light #theme-toggle {
    border-color: #cbd5e1;
    background-color: rgba(255, 255, 255, 0.5);
    color: #64748b;
}

html.light #mobile-menu-btn {
    border-color: #cbd5e1;
    background-color: rgba(255, 255, 255, 0.5);
    color: #64748b;
}

/* --- Nav brand text --- */
html.light header .text-slate-100,
html.light header span.text-slate-100 {
    color: #1e293b;
}

/* --- Nav links --- */
html.light .nav-link-anim {
    color: #64748b;
}

/* --- Form inputs --- */
html.light .form-input-glow {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
}

/* --- Skill pills --- */
html.light .skill-pill {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #334155;
}

/* --- Coursework tags --- */
html.light .coursework-tag {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

/* --- Experience tags --- */
html.light .exp-tag {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

/* --- Footer social icons --- */
html.light footer a[aria-label] {
    border-color: #e2e8f0;
    background-color: #ffffff;
}

/* --- Timeline line --- */
html.light .timeline-line {
    background: linear-gradient(to bottom, #06b6d4, #8b5cf6, #a855f7, transparent);
    box-shadow: none;
}

/* --- Mobile nav overlay --- */
html.light .mobile-nav-overlay {
    background: rgba(255, 255, 255, 0.98);
}

html.light .mobile-nav-link {
    color: #1e293b;
}

/* --- Stat card label text --- */
html.light .font-mono.text-slate-500,
html.light p.text-slate-500 {
    color: #64748b;
}

/* --- Sub-paragraph text --- */
html.light .text-slate-400 {
    color: #64748b;
}

html.light .text-slate-300 {
    color: #475569;
}

/* ==========================================================
   2. BASE & GLOBAL OVERRIDES
   ========================================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Hacker-style scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #050a14;
}
::-webkit-scrollbar-thumb {
    background: #06b6d4;
    border-radius: 3px;
    box-shadow: 0 0 6px rgba(6, 182, 212, 0.3);
}
::-webkit-scrollbar-thumb:hover {
    background: #22d3ee;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.light ::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.light ::-webkit-scrollbar-thumb {
    background: #64748b;
    box-shadow: none;
}

::selection {
    background: rgba(0, 255, 65, 0.25);
    color: #f1f5f9;
}

.light ::selection {
    background: rgba(6, 182, 212, 0.2);
    color: #0f172a;
}

/* ==========================================================
   3. SCANLINE & CRT EFFECTS
   ========================================================== */

/* CRT scanline overlay — subtle retro monitor feel */
.scanline-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        var(--scanline-color) 2px,
        var(--scanline-color) 4px
    );
    opacity: 0.3;
}

.light .scanline-overlay {
    opacity: 0;
}

/* Screen flicker (very subtle) */
@keyframes screen-flicker {
    0%, 97%, 100% { opacity: 1; }
    98% { opacity: 0.97; }
    99% { opacity: 0.99; }
}

/* ==========================================================
   4. GLASSMORPHISM CARDS (cyberpunk upgraded)
   ========================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Animated border gradient */
.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0), rgba(139, 92, 246, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background 0.4s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.5), rgba(139, 92, 246, 0.5));
}

.glass-card:hover {
    border-color: rgba(6, 182, 212, 0.2);
    box-shadow: var(--glow-cyan);
    transform: translateY(-4px);
}

.light .glass-card {
    background: var(--glass-bg-light);
    border-color: var(--glass-border-light);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.light .glass-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.1);
}

.light .glass-card::before {
    display: none;
}

/* ==========================================================
   5. NAVIGATION (hacker-style)
   ========================================================== */

.nav-glass {
    background: rgba(5, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(6, 182, 212, 0.1);
}

.light .nav-glass {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

/* Nav link with bracket hover */
.nav-link-anim {
    position: relative;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
}

.nav-link-anim::before {
    content: '[';
    position: absolute;
    left: 0;
    opacity: 0;
    color: #06b6d4;
    transition: all 0.3s ease;
    transform: translateX(4px);
}

.nav-link-anim::after {
    content: ']';
    position: absolute;
    right: 0;
    opacity: 0;
    color: #06b6d4;
    transition: all 0.3s ease;
    transform: translateX(-4px);
}

.nav-link-anim:hover::before,
.nav-link-anim.active::before {
    opacity: 1;
    transform: translateX(-2px);
}

.nav-link-anim:hover::after,
.nav-link-anim.active::after {
    opacity: 1;
    transform: translateX(2px);
}

.nav-link-anim:hover,
.nav-link-anim.active {
    color: #06b6d4 !important;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Mobile nav overlay */
.mobile-nav-overlay {
    background: rgba(5, 10, 20, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.light .mobile-nav-overlay {
    background: rgba(255, 255, 255, 0.98);
}

/* ==========================================================
   6. HERO SECTION
   ========================================================== */

/* Hero grid background */
.hero-grid-bg {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(6, 182, 212, 0.12) 1px, transparent 0);
    background-size: 30px 30px;
}

.light .hero-grid-bg {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(100, 116, 139, 0.15) 1px, transparent 0);
}

/* Gradient orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}

.gradient-orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.gradient-orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    top: 50%;
    right: -5%;
    animation-delay: -3s;
}

.gradient-orb-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #00ff41, #06b6d4);
    bottom: 10%;
    left: 30%;
    animation-delay: -5s;
}

.light .gradient-orb {
    opacity: 0.15;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(20px, -30px) scale(1.05); }
    50%      { transform: translate(-10px, 20px) scale(0.95); }
    75%      { transform: translate(15px, 10px) scale(1.02); }
}

/* Typed cursor blink */
.typed-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: #00ff41;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursor-blink 0.8s step-end infinite;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

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

/* Hero CTA gradient border */
.btn-gradient-border {
    position: relative;
    background: transparent;
    z-index: 1;
}

.btn-gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Terminal-style code block */
.terminal-window {
    background: var(--terminal-bg);
    border: 1px solid rgba(6, 182, 212, 0.15);
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.08), inset 0 0 60px rgba(0, 0, 0, 0.3);
}

.light .terminal-window {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

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

/* Terminal prompt cursor */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #00ff41;
    animation: cursor-blink 1s step-end infinite;
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
    vertical-align: text-bottom;
}

/* ==========================================================
   7. SECTION HEADERS — Command-line style
   ========================================================== */
.section-cmd {
    font-family: 'JetBrains Mono', monospace;
    position: relative;
}

.section-cmd::before {
    content: '>';
    color: #00ff41;
    margin-right: 0.5rem;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

/* Section divider */
.section-divider-gradient {
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, #06b6d4, #8b5cf6, #00ff41);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* ==========================================================
   8. SKILL CARDS
   ========================================================== */

.skill-icon-wrap {
    transition: all 0.3s ease;
}

.glass-card:hover .skill-icon-wrap {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 12px currentColor);
}

.skill-pill {
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.skill-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.5) !important;
    text-shadow: 0 0 6px rgba(6, 182, 212, 0.3);
}

/* ==========================================================
   9. TIMELINE (cyber style)
   ========================================================== */

.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #00ff41, #06b6d4, #8b5cf6, transparent);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

@media (min-width: 768px) {
    .timeline-line {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-dot {
    position: relative;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(0, 255, 65, 0.3);
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

.exp-tag {
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
}
.exp-tag:hover {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
}

/* ==========================================================
   10. EDUCATION
   ========================================================== */

.thesis-glow {
    position: relative;
    overflow: hidden;
}

.thesis-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.04), transparent);
    animation: thesis-shimmer 3s ease-in-out infinite;
}

@keyframes thesis-shimmer {
    0%   { left: -100%; }
    100% { left: 100%; }
}

.coursework-tag {
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}
.coursework-tag:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.15);
}

/* ==========================================================
   11. PUBLICATIONS
   ========================================================== */

.pub-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

/* ==========================================================
   12. CONTACT FORM (terminal aesthetic)
   ========================================================== */

.form-input-glow {
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
}

.form-input-glow:focus {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15), 0 0 20px rgba(6, 182, 212, 0.08);
    border-color: #06b6d4 !important;
}

.honeypot-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.btn-submit-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================================
   13. GLITCH EFFECTS
   ========================================================== */

/* Main glitch text — used on hero name */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.glitch-text::before {
    color: #ff3e3e;
    animation: glitch-1 3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch-text::after {
    color: #06b6d4;
    animation: glitch-2 3s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
    0%, 92%   { transform: translate(0); }
    93%       { transform: translate(-3px, 1px); }
    94%       { transform: translate(3px, -1px); }
    95%       { transform: translate(-2px, 2px); }
    96%, 100% { transform: translate(0); }
}

@keyframes glitch-2 {
    0%, 90%   { transform: translate(0); }
    91%       { transform: translate(3px, -1px); }
    92%       { transform: translate(-3px, 1px); }
    93%       { transform: translate(2px, -2px); }
    94%, 100% { transform: translate(0); }
}

/* Glitch on hover */
.glitch-hover:hover {
    animation: glitch-shake 0.4s linear;
}

@keyframes glitch-shake {
    0%   { transform: translate(0); }
    20%  { transform: translate(-2px, 1px); }
    40%  { transform: translate(2px, -1px); }
    60%  { transform: translate(-1px, -1px); }
    80%  { transform: translate(1px, 1px); }
    100% { transform: translate(0); }
}

/* ==========================================================
   14. CUSTOM ANIMATIONS
   ========================================================== */

/* Fade in up */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.3s; }

/* Scale in */
.animate-scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Slide in from left */
.animate-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide in from right */
.animate-slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Counter number animation */
@keyframes count-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.count-animate {
    animation: count-up 0.6s ease forwards;
}

/* Floating animation */
@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.animate-float {
    animation: gentle-float 4s ease-in-out infinite;
}

/* Hex border decoration */
.hex-border {
    position: relative;
}

.hex-border::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 4px,
        rgba(6, 182, 212, 0.3) 4px,
        rgba(6, 182, 212, 0.3) 8px
    );
}

/* ==========================================================
   15. SCROLL & UTILITY
   ========================================================== */

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #06b6d4, #8b5cf6, #00ff41);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-text-shift 4s ease infinite;
}

@keyframes gradient-text-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Social icon hover */
.social-icon-hover {
    transition: all 0.3s ease;
}

.social-icon-hover:hover {
    color: #00ff41 !important;
    transform: translateY(-3px) scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(0, 255, 65, 0.3));
}

/* Back to top button */
.back-to-top {
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Binary decoration text */
.binary-decoration {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: rgba(6, 182, 212, 0.12);
    user-select: none;
    pointer-events: none;
    line-height: 1.2;
    overflow: hidden;
    white-space: nowrap;
}

.light .binary-decoration {
    color: rgba(100, 116, 139, 0.08);
}

/* Status indicator */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff41;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 65, 0.6); }
    50%      { box-shadow: 0 0 16px rgba(0, 255, 65, 0.8), 0 0 32px rgba(0, 255, 65, 0.3); }
}

/* Command prompt prefix */
.cmd-prefix {
    font-family: 'JetBrains Mono', monospace;
    color: #00ff41;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

/* Neon underline */
.neon-underline {
    text-decoration: none;
    border-bottom: 1px solid rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
}

.neon-underline:hover {
    border-bottom-color: #06b6d4;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* ==========================================================
   16. CODE DECORATIONS
   ========================================================== */

/* Inline code style */
.code-inline {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 4px;
    padding: 0.1em 0.4em;
    font-size: 0.85em;
    color: #06b6d4;
}

.light .code-inline {
    background: rgba(6, 182, 212, 0.06);
    color: #0891b2;
}

/* Code comment style for decorative text */
.code-comment {
    font-family: 'JetBrains Mono', monospace;
    color: rgba(100, 116, 139, 0.5);
    font-size: 0.75rem;
    font-style: italic;
}

.code-comment::before {
    content: '// ';
    color: rgba(100, 116, 139, 0.3);
}

/* ==========================================================
   17. RESPONSIVE ENHANCEMENTS
   ========================================================== */

/* --- Mobile-first base fixes --- */

/* Prevent hover lift on touch devices — avoids sticky transforms */
@media (hover: none) {
    .glass-card:hover {
        transform: none;
    }
}

/* Smaller gradient orbs on mobile */
@media (max-width: 639px) {
    .gradient-orb-1 {
        width: 200px;
        height: 200px;
        filter: blur(60px);
    }
    .gradient-orb-2 {
        width: 160px;
        height: 160px;
        filter: blur(50px);
    }
    .gradient-orb-3 {
        width: 140px;
        height: 140px;
        filter: blur(50px);
    }

    /* Slightly smaller scanline density */
    .scanline-overlay {
        opacity: 0.15;
    }

    /* Tighter terminal dots */
    .terminal-dot {
        width: 8px;
        height: 8px;
    }

    /* Smaller terminal cursor */
    .terminal-cursor {
        width: 6px;
        height: 12px;
    }

    /* Smaller section divider */
    .section-divider-gradient {
        width: 45px;
        height: 2px;
    }

    /* Skill pill base size */
    .skill-pill {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    /* Coursework tag base size */
    .coursework-tag {
        font-size: 0.65rem;
    }

    /* Experience tag size */
    .exp-tag {
        font-size: 0.6rem;
    }

    /* Timeline line positioned left on mobile */
    .timeline-line {
        left: 16px;
    }

    /* Reduce glass card hover glow on small screens */
    .glass-card:hover {
        box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
    }
}

/* Tablet refinements */
@media (min-width: 640px) and (max-width: 1023px) {
    .gradient-orb-1 {
        width: 300px;
        height: 300px;
    }
    .gradient-orb-2 {
        width: 220px;
        height: 220px;
    }
    .gradient-orb-3 {
        width: 180px;
        height: 180px;
    }
}

/* Better focus outlines for all interactive elements */
.glass-card a:focus-visible,
.glass-card button:focus-visible,
.form-input-glow:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* Smooth font rendering across all sizes */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ensure no horizontal overflow on mobile */
html, body {
    overflow-x: hidden;
}

section {
    overflow-x: clip;
}

/* ==========================================================
   18. REDUCED MOTION
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gradient-orb { animation: none; }
    .typed-cursor { animation: none; opacity: 1; }
    .thesis-glow::before { animation: none; }
    .timeline-dot::after { animation: none; }
    .btn-submit-gradient { animation: none; }
    .glitch-text::before,
    .glitch-text::after { animation: none; display: none; }
    .scanline-overlay { display: none; }
    .gradient-text { animation: none; background-size: 100% 100%; }
    .status-dot { animation: none; }

    .animate-fade-up,
    .animate-scale-in,
    .animate-slide-left,
    .animate-slide-right {
        opacity: 1;
        transform: none;
    }

    #matrix-canvas,
    #particle-canvas {
        display: none !important;
    }
}
