/* ==========================================
   Font Imports - Must be first!
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================
   CSS Variables - Dark Terminal Aesthetic
   ========================================== */
:root {
    /* Core Colors - Inspired by Monokai Pro */
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2e2e2e;
    --bg-code: #1e1e1e;

    /* Accent Colors */
    --accent-primary: #ffd866;
    --accent-secondary: #ff6188;
    --accent-tertiary: #78dce8;
    --accent-muted: #a9dc76;

    /* Text Colors */
    --text-primary: #fcfcfa;
    --text-secondary: #c1c0b8;
    --text-tertiary: #8b8a81;
    --text-code: #ff6188;

    /* Borders & Lines */
    --border-color: #3a3a3a;
    --line-color: rgba(255, 216, 102, 0.1);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Typography */
    --font-sans: 'JetBrains Mono', 'Courier New', monospace;
    --font-display: 'Outfit', system-ui, sans-serif;

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.6;
    --line-height-loose: 1.8;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

/* ==========================================
   Grid Overlay Effect
   ========================================== */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(90deg, var(--line-color) 1px, transparent 1px),
        linear-gradient(0deg, var(--line-color) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.grid-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at top,
        rgba(255, 216, 102, 0.03) 0%,
        transparent 50%
    );
}

/* ==========================================
   Header & Navigation
   ========================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color var(--transition-fast);
}

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

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

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

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.5rem;
    align-self: center;
    transition: transform var(--transition-fast);
}

.hamburger-menu:hover {
    transform: scale(1.1);
}

.hamburger-icon {
    display: inline-block;
    transition: opacity var(--transition-fast);
}

.hamburger-menu.open .hamburger-icon {
    opacity: 0;
    position: absolute;
}

.hamburger-menu.open::after {
    content: '❌';
}

/* ==========================================
   Container & Layout
   ========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    z-index: 1;
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg) var(--spacing-md);
    border-top: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    z-index: 1;
}

.site-footer p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

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

/* ==========================================
   Responsive Design - Common
   ========================================== */
@media (max-width: 768px) {
    .nav-container {
        padding: var(--spacing-md) var(--spacing-sm);
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

    .hamburger-menu {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
        display: none;
        animation: slideDown 0.3s ease-out;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        padding: var(--spacing-sm) 0;
        font-size: 0.95rem;
    }

    .container {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .grid-overlay,
    .site-header,
    .site-footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
