/* ============================================
   CSS Variables for Modern AI 2025 Theme
   Futuristic color palette inspired by AI/ML design trends
   ============================================ */
:root {
    /* Dark mode colors (default) - AI/Tech 2025 */
    --bg-color: #0a0e27;
    --text-color: #e0e7ff;
    --accent-color: #00d4ff;
    --accent-hover: #a78bfa;
    --secondary-text: #6366f1;
    --border-color: #1e293b;
    --prompt-color: #22d3ee;
    --link-color: #00d4ff;
    
    /* Typography */
    --font-mono: 'Ubuntu Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    --line-height: 1.6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* Light mode - Modern AI light theme */
@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #f8fafc;
        --text-color: #1e293b;
        --accent-color: #0ea5e9;
        --accent-hover: #8b5cf6;
        --secondary-text: #6366f1;
        --border-color: #cbd5e1;
        --prompt-color: #06b6d4;
        --link-color: #0ea5e9;
    }
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark light;
}

body {
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: var(--line-height);
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: var(--spacing-lg);
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   Accessibility Utilities
   ============================================ */
.visually-hidden {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: -10000px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background: var(--accent-color);
    color: white;
    padding: var(--spacing-sm);
    text-decoration: none;
    font-weight: bold;
    z-index: 100;
}

.skip-link:focus {
    position: fixed;
    left: var(--spacing-sm);
    top: var(--spacing-sm);
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    outline: 3px solid var(--text-color);
    outline-offset: 2px;
}

/* ============================================
   Focus Indicators
   ============================================ */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Remove focus outline from main content when clicked */
main:focus {
    outline: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-xs);
}

h2 {
    font-size: 1.75rem;
    color: var(--accent-color);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.25rem;
    color: var(--prompt-color);
    margin-bottom: var(--spacing-xs);
}

p {
    margin-bottom: var(--spacing-sm);
}

/* ============================================
   Header
   ============================================ */
header {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

header h1::before {
    content: '$ ';
    color: var(--prompt-color);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-left: 1.5rem;
}

/* ============================================
   Main Content
   ============================================ */
.container {
    flex: 1;
}

main {
    outline: none;
}

section {
    margin-bottom: var(--spacing-xl);
    position: relative;
}

section h2::before {
    content: '> ';
    color: var(--prompt-color);
    margin-right: var(--spacing-xs);
}

/* ============================================
   Contact List - Tree Style
   ============================================ */
.contact-tree {
    list-style: none;
    margin-top: var(--spacing-md);
    font-family: var(--font-mono);
    line-height: 1.8;
}

.contact-tree li {
    margin: 0;
    padding: 0;
    position: relative;
}

.contact-tree a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-tree .tree-branch::before {
    content: '├── ';
    color: var(--secondary-text);
    margin-right: var(--spacing-xs);
}

.contact-tree .tree-last::before {
    content: '└── ';
    color: var(--secondary-text);
    margin-right: var(--spacing-xs);
}

/* ============================================
   Links
   ============================================ */
a {
    color: var(--text-color);
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

a:active {
    color: var(--text-color);
}

/* Icon styling for all links */
.icon {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    margin-right: 0.25rem;
}

/* ============================================
   Footer
   ============================================ */
footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--border-color);
    text-align: center;
    color: var(--secondary-text);
    font-size: 0.9rem;
}

footer p::before {
    content: '# ';
    color: var(--secondary-text);
}


.ai-text {
    background: linear-gradient(135deg, #00d4ff 0%, #a78bfa 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

@keyframes ai-glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: var(--spacing-md);
        font-size: 14px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: var(--spacing-sm);
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
}

/* ============================================
   High Contrast Mode Support
   ============================================ */
@media (prefers-contrast: high) {
    *:focus {
        outline: 3px solid currentColor;
        outline-offset: 3px;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
        padding: 0;
    }
    
    header h1::after {
        display: none;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
