/* ============================================
   Truth Will Out - Dark Theme CSS
   Professional dark-themed portfolio site
   ============================================ */

/* CSS Custom Properties (Design System) */
:root {
    /* Brand Colors */
    --brand-orange: #FF6B35;
    --brand-orange-hover: #FF8555;
    --brand-orange-dark: #E55A25;
    --brand-orange-light: #FFA875;

    /* Dark Backgrounds */
    --bg-charcoal: #1A1A1A;
    --bg-black: #0D0D0D;
    --bg-dark-grey: #2C2C2C;
    --bg-dark-grey-light: #3A3A3A;
    --bg-dark-grey-lighter: #4A4A4A;

    /* Text Colors */
    --text-primary: #F5F5F5;
    --text-secondary: #B8B8B8;
    --text-muted: #808080;
    --text-disabled: #5A5A5A;

    /* Border Colors */
    --border-dark: #3A3A3A;
    --border-medium: #4A4A4A;
    --border-light: #5A5A5A;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.6);
    --shadow-orange: 0 4px 12px rgba(255, 107, 53, 0.3);
    --shadow-orange-lg: 0 8px 20px rgba(255, 107, 53, 0.4);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 600ms ease;

    /* Spacing */
    --gap-sm: 1rem;
    --gap-md: 2rem;
    --gap-lg: 4rem;
    --gap-xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-mono: "SF Mono", Monaco, "Cascadia Mono", "Roboto Mono", Consolas, "Courier New", monospace;
}

/* ============================================
   Base Styles
   ============================================ */

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-charcoal);
    color: var(--text-primary);
    font-family: var(--font-family-base);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dark-theme {
    background-color: var(--bg-charcoal);
    color: var(--text-primary);
}

/* Text Selection */
::selection {
    background-color: var(--brand-orange);
    color: var(--bg-black);
}

::-moz-selection {
    background-color: var(--brand-orange);
    color: var(--bg-black);
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem; /* 40px */
}

h2 {
    font-size: 2rem; /* 32px */
}

h3 {
    font-size: 1.75rem; /* 28px */
}

h4 {
    font-size: 1.5rem; /* 24px */
}

h5 {
    font-size: 1.25rem; /* 20px */
}

h6 {
    font-size: 1rem; /* 16px */
}

p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-secondary);
}

small, .small {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

strong, b {
    font-weight: 600;
}

/* ============================================
   Links
   ============================================ */

a {
    color: var(--brand-orange);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--brand-orange-hover);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

a:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   Lists
   ============================================ */

ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

ul ul, ol ul, ul ol, ol ol {
    margin-bottom: 0;
}

li {
    margin-bottom: 0.5rem;
}

/* ============================================
   Code and Pre
   ============================================ */

code {
    background-color: var(--bg-dark-grey);
    color: var(--brand-orange-light);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-family-mono);
    font-size: 0.875em;
}

pre {
    background-color: var(--bg-black);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--border-dark);
}

pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: 0.875rem;
}

/* ============================================
   Horizontal Rules
   ============================================ */

hr {
    border: 0;
    border-top: 1px solid var(--border-dark);
    margin: var(--gap-md) 0;
}

/* ============================================
   Images
   ============================================ */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

figure {
    margin: 0 0 1rem;
}

figcaption {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

/* ============================================
   Tables
   ============================================ */

table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-dark);
}

th {
    color: var(--text-primary);
    font-weight: 600;
    background-color: var(--bg-dark-grey);
}

td {
    color: var(--text-secondary);
}

tr:hover td {
    background-color: var(--bg-dark-grey-light);
}

/* ============================================
   Blockquotes
   ============================================ */

blockquote {
    margin: 0 0 1rem;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--brand-orange);
    background-color: var(--bg-dark-grey);
    color: var(--text-secondary);
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote cite {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-style: normal;
    font-size: 0.875rem;
}

/* ============================================
   Scrollbar Styling (Webkit)
   ============================================ */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-dark-grey);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-dark-grey-light);
}

/* ============================================
   Focus Styles
   ============================================ */

:focus-visible {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

/* ============================================
   Accessibility - Skip to Main Content
   ============================================ */

.skip-to-main {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 1rem;
    background-color: var(--brand-orange);
    color: var(--bg-black);
    text-decoration: none;
    font-weight: 600;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
}

/* ============================================
   Utility Classes
   ============================================ */

.text-orange {
    color: var(--brand-orange) !important;
}

.bg-charcoal {
    background-color: var(--bg-charcoal) !important;
}

.bg-black {
    background-color: var(--bg-black) !important;
}

.bg-dark-grey {
    background-color: var(--bg-dark-grey) !important;
}

.border-orange {
    border-color: var(--brand-orange) !important;
}

.shadow-orange {
    box-shadow: var(--shadow-orange) !important;
}

/* ============================================
   Responsive Typography
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem; /* 32px */
    }

    h2 {
        font-size: 1.75rem; /* 28px */
    }

    h3 {
        font-size: 1.5rem; /* 24px */
    }

    .lead {
        font-size: 1.125rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.75rem; /* 28px */
    }

    h2 {
        font-size: 1.5rem; /* 24px */
    }

    h3 {
        font-size: 1.25rem; /* 20px */
    }
}
