/* 
 * 2026 DESIGN SYSTEM: SPACE-GLASS EMERALD & TEAL Theme
 */

:root {
    /* Colors */
    --space-bg: #030805;
    --space-bg-rgb: 3, 8, 5;
    --glass-bg: rgba(6, 18, 12, 0.4);
    --glass-border: rgba(52, 211, 153, 0.1);
    --glass-border-hover: rgba(52, 211, 153, 0.25);
    --glass-highlight: rgba(52, 211, 153, 0.08);
    --accent-emerald: #34d399;
    --accent-teal: #2dd4bf;
    --accent-glow: rgba(52, 211, 153, 0.25);
    
    --text-primary: #ecfdf5;
    --text-secondary: rgba(236, 253, 245, 0.65);
    --text-muted: rgba(236, 253, 245, 0.4);
    
    /* Typography */
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    --spring-physics: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
    background-color: var(--space-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--space-bg);
}
::-webkit-scrollbar-thumb {
    background: rgba(52, 211, 153, 0.15);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 211, 153, 0.4);
}

/* Custom Selection */
::selection {
    background: rgba(52, 211, 153, 0.2);
    color: var(--accent-emerald);
}

/* 1. Fine Analog Noise Texture overlay */
.grain-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 2. Interactive Custom Cursor (Only on Desktop pointer devices) */
@media (hover: hover) and (pointer: fine) {
    body {
        cursor: none;
    }
    .cursor-outer {
        position: fixed;
        width: 32px;
        height: 32px;
        border: 1px solid var(--accent-emerald);
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000;
        transform: translate(-50%, -50%);
        transition: width var(--transition-fast), height var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
    }
    .cursor-inner {
        position: fixed;
        width: 6px;
        height: 6px;
        background-color: var(--accent-emerald);
        border-radius: 50%;
        pointer-events: none;
        z-index: 10001;
        transform: translate(-50%, -50%);
        transition: transform 0.05s ease-out;
    }
    /* Cursor States */
    body.cursor-hovering .cursor-outer {
        width: 48px;
        height: 48px;
        background-color: rgba(52, 211, 153, 0.08);
        border-color: var(--accent-teal);
    }
    body.cursor-clicking .cursor-outer {
        width: 24px;
        height: 24px;
        background-color: rgba(52, 211, 153, 0.2);
    }
}

/* 3. Deep Aurora Mesh Background */
.aurora-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #030d07 0%, #010402 100%);
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: auroraDrift 25s infinite alternate ease-in-out;
}
.orb-1 {
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(16,185,129,0.4) 0%, rgba(6,78,59,0) 70%);
    top: -15%; left: -15%;
}
.orb-2 {
    width: 40vw; height: 40vw;
    background: radial-gradient(circle, rgba(45,212,191,0.3) 0%, rgba(13,148,136,0) 70%);
    bottom: -10%; right: -10%;
    animation-delay: -6s;
}
.orb-3 {
    width: 45vw; height: 45vw;
    background: radial-gradient(circle, rgba(4,120,87,0.2) 0%, rgba(2,44,34,0) 70%);
    top: 35%; left: 35%;
    animation-delay: -12s;
}
@keyframes auroraDrift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(6vw, 8vh) scale(1.15); }
    100% { transform: translate(-3vw, -5vh) scale(0.9); }
}

/* 4. Interactive Particle Canvas overlay */
.particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* 5. Floating Nav Bar */
.nav-bar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 100;
    height: 70px;
    background: rgba(3, 8, 5, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-container {
    max-width: 1000px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}
.nav-logo .highlight {
    color: var(--accent-emerald);
}

.nav-widgets {
    display: flex;
    align-items: center;
    gap: 16px;
}
.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(52, 211, 153, 0.05);
    border: 1px solid rgba(52, 211, 153, 0.1);
    padding: 6px 12px;
    border-radius: 99px;
}
.status-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: pulseGlow 2s infinite ease-in-out;
}
@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

.cmd-trigger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 99px;
    cursor: pointer;
    transition: var(--transition-fast);
}
.cmd-trigger-btn:hover {
    border-color: var(--glass-border-hover);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.search-icon {
    width: 14px;
    height: 14px;
}
.kbd-key {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.7rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

/* 6. Main Layout Structure */
.main-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 24px 80px;
    position: relative;
    z-index: 10;
}

/* 7. Premium Glassmorphic Component Base */
.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal);
}

/* 8. Hero Profile Section */
.hero-card {
    padding: 48px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(52, 211, 153, 0.05);
    border: 1px solid rgba(52, 211, 153, 0.15);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-emerald);
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.gradient-text {
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-emerald) 70%, var(--accent-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--text-secondary);
    max-w: 640px;
    margin-bottom: 36px;
}
.hero-actions {
    display: flex;
    gap: 16px;
    width: 100%;
}

/* Glowing text shadows */
.text-glow {
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
}

/* Interactive Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    outline: none;
}
.btn-icon {
    width: 18px;
    height: 18px;
}
.btn-primary {
    background: var(--accent-emerald);
    color: #01130a;
    border: 1px solid var(--accent-emerald);
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.2);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(52, 211, 153, 0.4);
    background: #4ef0b6;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
}

/* 9. Live Activity Status Panel */
.activity-section {
    padding: 20px 24px;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.activity-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.activity-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: statusPulse 1.5s infinite;
}
@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.activity-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    margin-left: 32px;
}
.activity-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(52, 211, 153, 0.05);
    color: var(--accent-emerald);
}
.status-cd-icon {
    width: 20px;
    height: 20px;
}
.spinner {
    animation: spin 6s linear infinite;
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}
.activity-details {
    display: flex;
    flex-direction: column;
}
.activity-title {
    font-size: 0.95rem;
}
.activity-sub {
    color: var(--text-muted);
}

/* 10. General Section Headers */
.section-container {
    margin-bottom: 64px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

/* Tag Filtering Buttons */
.tag-filters {
    display: flex;
    gap: 8px;
}
.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}
.filter-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}
.filter-btn.active {
    background: rgba(52, 211, 153, 0.1);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.1);
}

/* 11. Projects Grid & 3D Tilt Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
.project-card {
    padding: 32px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}
.project-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Interactive Card Mouse Glow Track */
.project-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(52, 211, 153, 0.06), transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    transform: translateZ(20px);
}
.project-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}
.project-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.15);
    color: var(--accent-emerald);
    padding: 3px 8px;
    border-radius: 6px;
}
.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
    transform: translateZ(10px);
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    transform: translateZ(15px);
}
.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-teal);
    opacity: 0.8;
}

/* 12. Writing List Layout */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.blog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    text-decoration: none;
}
@media (max-width: 640px) {
    .blog-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
.blog-item:hover {
    transform: translateX(4px);
    border-color: var(--glass-border-hover);
    background: rgba(6, 18, 12, 0.6);
}
.blog-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.blog-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition-fast);
}
.blog-item:hover .blog-title {
    color: var(--accent-emerald);
}
.blog-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.blog-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .blog-meta {
        align-items: flex-start;
        flex-direction: row;
        gap: 12px;
    }
}
.blog-date {
    color: var(--text-secondary);
}
.blog-read-time {
    color: var(--text-muted);
}

/* 13. Footer Styling */
.footer {
    margin-top: 96px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.footer-links {
    display: flex;
    gap: 24px;
}
.footer-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-fast);
}
.footer-link:hover {
    color: var(--accent-emerald);
}
.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 14. Command Palette & Contact Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 1000;
    background: rgba(3, 8, 5, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    padding: 24px;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    width: 100%;
    max-width: 580px;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modal Search Header */
.modal-search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--glass-border);
}
.modal-search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}
#modal-search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
}
#modal-search-input::placeholder {
    color: var(--text-muted);
}
.modal-close-hint {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
}

/* Modal Search Results list */
.modal-results {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}
.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}
.result-item:hover, .result-item.selected {
    background: rgba(52, 211, 153, 0.08);
    color: var(--accent-emerald);
}
.result-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.result-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}
.result-title {
    font-weight: 500;
    font-size: 0.95rem;
}
.result-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 6px;
}

/* Modal Footer hints */
.modal-footer {
    border-top: 1px solid var(--glass-border);
    padding: 12px 24px;
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.kbd-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Contact form modal */
.contact-card {
    padding: 40px;
    max-width: 520px;
}
.contact-header {
    margin-bottom: 24px;
}
.contact-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.contact-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-group input, .form-group textarea {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.15);
    background: rgba(255, 255, 255, 0.04);
}
.contact-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}
