/* ===================================
   DARK PORTFOLIO CSS
   SpaceX/Tanner Thelin inspired
   Bold, geometric, high-contrast
   =================================== */

/* === CSS CUSTOM PROPERTIES === */
:root {
    /* Colors - Dark theme with high contrast */
    --primary-text: #FFFFFF;
    --secondary-text: #B0B0B0;
    --tertiary-text: #808080;
    --background: #000000;
    --background-alt: #0A0A0A;
    --background-card: #111111;
    --accent: #00A6FF;
    --accent-hover: #33B8FF;
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);

    /* Spacing - 8px base grid */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 32px;
    --space-lg: 64px;
    --space-xl: 96px;
    --space-2xl: 128px;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;

    /* Shadows - subtle for dark theme */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);

    /* Border radius - ALL ZERO for sharp edges */
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
    --radius-pill: 0px;

    /* Transitions */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === GLOBAL RESETS & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 18px;
    line-height: 1.6;
    color: var(--primary-text);
    background-color: var(--background);
    font-weight: 400;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
    color: var(--primary-text);
}

h1 {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
}

h2 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.05;
}

h3 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

h4 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

h5 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
}

p {
    margin-bottom: var(--space-md);
    color: var(--secondary-text);
}

.lead {
    font-size: 24px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--secondary-text);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

/* === NAVIGATION === */
.navbar {
    height: 64px;
    background: var(--background);
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: border-color var(--transition-base);
}

.navbar.scrolled {
    border-bottom-color: var(--border-medium);
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-text) !important;
    transition: opacity var(--transition-fast);
    letter-spacing: -0.01em;
}

.navbar-brand:hover {
    opacity: 0.7;
}

.navbar-dark {
    background: var(--background);
}

.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
    color: var(--primary-text) !important;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-text) !important;
    padding: 0 var(--space-sm) !important;
    transition: opacity var(--transition-fast);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    opacity: 0.7;
}

.nav-link.active {
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: var(--space-sm);
    right: var(--space-sm);
    height: 2px;
    background: var(--accent);
}

/* === LAYOUT === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

section {
    padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
    section {
        padding: var(--space-2xl) 0;
    }
}

/* === HERO SECTION === */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-2xl) 0;
    margin-top: 64px;
    background: var(--background);
    border-bottom: none;
}

.hero::after {
    display: none;
}

.hero h1 {
    font-size: 96px;
    font-weight: 900;
    margin-bottom: var(--space-md);
    letter-spacing: -0.04em;
    text-shadow: none;
    color: var(--primary-text);
}

.hero p {
    font-size: 28px;
    max-width: 700px;
    margin: 0 auto var(--space-lg);
    color: var(--secondary-text);
}

.scroll-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: bounce 2s ease-in-out infinite;
    opacity: 0.6;
    color: var(--primary-text);
    cursor: pointer;
}

.scroll-indicator svg {
    width: 32px;
    height: 32px;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(12px);
    }
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 16px 40px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 0;
    border: 2px solid var(--primary-text);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--primary-text);
    color: var(--background);
    border-color: var(--primary-text);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-text);
    box-shadow: none;
    transform: none;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-text);
    border: 2px solid var(--primary-text);
}

.btn-outline-primary:hover {
    background: var(--primary-text);
    color: var(--background);
    box-shadow: none;
    transform: none;
}

.btn-accent {
    background: var(--accent);
    color: var(--background);
    border-color: var(--accent);
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: var(--background);
}

.btn-light {
    background: transparent;
    color: var(--secondary-text);
    border: 2px solid var(--border-light);
}

.btn-light:hover {
    background: var(--background-alt);
    color: var(--primary-text);
    border-color: var(--border-medium);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--secondary-text);
    border: 2px solid var(--secondary-text);
}

.btn-outline-secondary:hover {
    background: var(--secondary-text);
    color: var(--background);
}

.btn-outline-dark {
    background: transparent;
    color: var(--primary-text);
    border: 2px solid var(--primary-text);
}

.btn-outline-dark:hover {
    background: var(--primary-text);
    color: var(--background);
}

/* === CARDS === */
.card {
    background: var(--background-card);
    border: 1px solid var(--border-light);
    border-radius: 0;
    box-shadow: none;
    transition: transform var(--transition-base),
                border-color var(--transition-base);
    overflow: hidden;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-medium);
}

.card-body {
    padding: var(--space-md);
    background: var(--background-card);
    border-top: none;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--secondary-text);
    margin-bottom: var(--space-md);
}

.card-large .card-body,
.card-fun .card-body {
    background: var(--background-card);
}

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--secondary-text);
}

.bg-primary {
    background: transparent !important;
    color: var(--secondary-text) !important;
    border-color: var(--border-light) !important;
}

/* === SECTIONS === */
section:nth-child(odd),
section:nth-child(even) {
    background-color: var(--background);
}

.home-cards {
    background-color: var(--background);
}

/* === FOOTER === */
footer {
    background: var(--background);
    color: var(--secondary-text);
    text-align: center;
    padding: var(--space-lg) 0;
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border-light);
}

footer p {
    margin: 0;
    font-size: 12px;
    opacity: 0.6;
    color: var(--secondary-text) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bg-dark {
    background-color: var(--background) !important;
}

.text-white {
    color: var(--primary-text) !important;
}

/* === UTILITY CLASSES === */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--secondary-text) !important;
    opacity: 1;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: var(--space-xs) !important;
}

.mb-2 {
    margin-bottom: var(--space-sm) !important;
}

.mb-3 {
    margin-bottom: var(--space-md) !important;
}

.mb-4 {
    margin-bottom: var(--space-lg) !important;
}

.mb-5 {
    margin-bottom: var(--space-xl) !important;
}

.mt-5 {
    margin-top: var(--space-xl) !important;
}

.py-5 {
    padding-top: var(--space-xl) !important;
    padding-bottom: var(--space-xl) !important;
}

.me-1 {
    margin-right: var(--space-xs) !important;
}

.me-2 {
    margin-right: var(--space-sm) !important;
}

.bg-light {
    background-color: var(--background-card) !important;
    color: var(--primary-text) !important;
}

/* === RESPONSIVE TYPOGRAPHY === */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 48px;
    }

    h2 {
        font-size: 36px;
    }

    h3 {
        font-size: 28px;
    }

    .hero h1 {
        font-size: 56px;
    }

    .hero p {
        font-size: 20px;
    }

    .lead {
        font-size: 20px;
    }

    .container {
        padding: 0 20px;
    }

    section {
        padding: var(--space-lg) 0;
    }

    .display-4 {
        font-size: 48px;
    }
}

/* === PROGRAMMING PORTFOLIO SPECIFIC STYLES === */
.portfolio-content h2 {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.portfolio-content h3 {
    margin-top: var(--space-lg);
    color: var(--accent);
}

.portfolio-content pre {
    background: var(--background-card);
    border: 1px solid var(--border-light);
    border-radius: 0;
    padding: var(--space-md);
    overflow-x: auto;
    margin-bottom: var(--space-md);
    font-size: 14px;
    line-height: 1.6;
}

.portfolio-content code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    color: var(--accent);
}

.portfolio-content .note {
    background: var(--background-card);
    border-left: 3px solid var(--accent);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    border-radius: 0;
}

.portfolio-content .note p:last-child {
    margin-bottom: 0;
}

.portfolio-content ul,
.portfolio-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
    color: var(--secondary-text);
}

.portfolio-content li {
    margin-bottom: var(--space-sm);
}

.list-unstyled li {
    font-size: 16px;
    margin-bottom: var(--space-sm);
    color: var(--secondary-text);
}

/* === RESUME PAGE SPECIFIC STYLES === */
.resume-section {
    margin-bottom: var(--space-xl);
}

.resume-section h2 {
    font-size: 36px;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.resume-item {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.resume-item:last-child {
    border-bottom: none;
}

.resume-item h3 {
    font-size: 24px;
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
}

.resume-item h4 {
    font-size: 18px;
    color: var(--secondary-text);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.resume-item .date {
    color: var(--tertiary-text);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
}

.resume-item ul {
    color: var(--secondary-text);
}

.card-subtitle {
    font-size: 16px;
    color: var(--secondary-text);
}

/* === ABOUT PAGE SPECIFIC STYLES === */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-content p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    color: var(--secondary-text);
}

/* === FORM STYLES === */
.form-control {
    border: 1px solid var(--border-medium);
    font-family: var(--font-family);
    font-size: 16px;
    background-color: var(--background-card);
    color: var(--primary-text);
    transition: border-color var(--transition-fast);
    border-radius: 0;
    padding: 12px 16px;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: none;
    background-color: var(--background-card);
    outline: none;
}

.form-label {
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === NAVBAR TOGGLER === */
.navbar-toggler {
    border: 1px solid var(--border-medium);
    padding: 8px 12px;
    border-radius: 0;
}

.navbar-toggler:focus {
    outline: 2px solid var(--accent);
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='square' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation delays for multiple elements */
.col-md-6:nth-child(1) .card,
.col-lg-4:nth-child(1) .card {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.col-md-6:nth-child(2) .card,
.col-lg-4:nth-child(2) .card {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.col-md-6:nth-child(3) .card,
.col-lg-4:nth-child(3) .card {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.col-md-6:nth-child(4) .card,
.col-lg-4:nth-child(4) .card {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.col-md-6:nth-child(5) .card,
.col-lg-4:nth-child(5) .card {
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.col-md-6:nth-child(6) .card,
.col-lg-4:nth-child(6) .card {
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

/* === DIVIDERS === */
.retro-divider {
    display: none;
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-text);
}

/* === FOCUS STATES FOR ACCESSIBILITY === */
button:focus,
a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* === DISPLAY HEADINGS === */
.display-4 {
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}

/* === PRINT STYLES === */
@media print {
    .navbar,
    footer {
        display: none;
    }

    .card {
        break-inside: avoid;
    }
}
