/* main.css - Global site styles */

:root {
    --color-primary: #0078d4;
    --color-primary-hover: #005a9e;
    --color-primary-faint: rgba(0, 120, 212, 0.1);
    --color-text: #333333;
    --color-text-light: #666666;
    --color-background: #f5f5f5;
    --color-white: #ffffff;
    --color-border: #e0e0e0;
    --color-card: #ffffff;
    --font-primary: 'Roboto', 'Arial', sans-serif;
}

/* Dark mode */
[data-theme="dark"] {
    --color-primary: #4da6ff;
    --color-primary-hover: #80bfff;
    --color-primary-faint: rgba(77, 166, 255, 0.1);
    --color-text: #e0e0e0;
    --color-text-light: #a0a0a0;
    --color-background: #121212;
    --color-white: #1e1e1e;
    --color-border: #333333;
    --color-card: #252525;
}

/* Reserve space for Iconify icons to prevent layout shift */
.iconify {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

/* Hide unresolved Iconify icons if CDN fails to load */
.iconify:not(svg) {
    visibility: hidden;
    width: 0;
    margin: 0;
}

/* Inline SVG skill icons - print only, hidden on web */
.skill-icon {
    display: none;
}

/* Theme-aware icons - show/hide based on theme */
.icon-light-only {
    display: inline;
}
.icon-dark-only {
    display: none;
}
[data-theme="dark"] .icon-light-only {
    display: none;
}
[data-theme="dark"] .icon-dark-only {
    display: inline;
}

/* AWS icon - invert text color in dark mode */
[data-theme="dark"] .aws-icon {
    filter: brightness(1) invert(1) hue-rotate(180deg) saturate(5);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

/* Resume Page Layout */
.resume-page {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Navigation */
.resume-nav {
    margin-bottom: 2rem;
}

.resume-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    padding: 0;
}

.resume-nav a {
    color: var(--color-text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.resume-nav a:hover,
.resume-nav a.active {
    color: var(--color-primary);
    background-color: var(--color-primary-faint);
    text-decoration: none;
}

/* Footer */
.site-footer {
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 1rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.infrastructure-note {
    font-size: 0.85rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.infrastructure-note .iconify {
    font-size: 1.2rem;
}

.source-code {
    font-size: 0.85rem;
}

.source-code a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-text-light);
}

.source-code a:hover {
    color: var(--color-primary);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .theme-toggle {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .theme-toggle:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

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

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

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .resume-page {
        padding: 1rem;
        padding-top: 3.5rem; /* Space for theme toggle */
    }
    
    .resume-nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .resume-nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .infrastructure-note {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .resume-nav ul {
        gap: 0.25rem;
    }
    
    .resume-nav a {
        padding: 0.35rem 0.5rem;
        font-size: 0.85rem;
    }
}

@media print {
    .resume-nav,
    .site-footer {
        display: none;
    }
    
    .resume-page {
        max-width: none;
        padding: 0;
    }
}
