/* 
 * Jeremy Robards Portfolio - Main Stylesheet
 * GitHub Pages Compatible CSS
 * ES2025+ Frontend with Modern Design Patterns
 */

:root {
    /* Design System Variables */
    --primary-color: #10b981;
    --primary-hover: #059669;
    --background-dark: #000000;
    --background-gradient: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
    --text-light: #ffffff;
    --text-muted: #6b7280;
    --border-subtle: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-system: system-ui, -apple-system, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    
    /* Animations */
    --transition-fast: 200ms ease;
    --transition-medium: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-system);
    background: var(--background-gradient);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
}

/* GitHub Pages asset path compatibility */
img, video, audio {
    max-width: 100%;
    height: auto;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Accessibility Styles */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Interactive elements */
a, button, [role="button"], [tabindex="0"] {
    cursor: pointer;
    transition: var(--transition-fast);
}

a:hover, button:hover, [role="button"]:hover {
    opacity: 0.8;
}

/* Component Styles Placeholder */
/* Add your component styles here */

/* Article Prose Styles */
.prose {
    color: #e5e7eb;
    max-width: 65ch;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    color: #ffffff;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
}

.prose h1 { font-size: 2.25em; }
.prose h2 { font-size: 1.875em; }
.prose h3 { font-size: 1.5em; }
.prose h4 { font-size: 1.25em; }

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    line-height: 1.75;
}

.prose a {
    color: #10b981;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #059669;
}

.prose strong {
    color: #ffffff;
    font-weight: 600;
}

.prose em {
    font-style: italic;
}

.prose code {
    color: #10b981;
    font-size: 0.875em;
    font-weight: 600;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

.prose pre {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0.5rem;
    padding: 1.5em;
    overflow-x: auto;
    margin: 1.5em 0;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.prose pre code {
    background-color: transparent;
    padding: 0;
    color: #e5e7eb;
    font-size: 0.875em;
    line-height: 1.7;
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose blockquote {
    font-style: italic;
    border-left: 4px solid #10b981;
    padding-left: 1em;
    margin: 1.5em 0;
    color: #9ca3af;
}

.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.prose figure {
    margin: 2.5em 0;
}

.prose figcaption {
    margin-top: 0.75em;
    font-size: 0.875em;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
}

.prose hr {
    border: none;
    border-top: 1px solid rgba(156, 163, 175, 0.2);
    margin: 3em 0;
}

.prose table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
}

.prose th {
    background-color: rgba(16, 185, 129, 0.1);
    padding: 0.75em;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #10b981;
}

.prose td {
    padding: 0.75em;
    border-bottom: 1px solid rgba(156, 163, 175, 0.2);
}

/* Form Input Styling */
input[type="text"],
input[type="email"],
textarea {
    color: #ffffff !important;
    background-color: #111827 !important;
    -webkit-text-fill-color: #ffffff !important;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

/* Fix autocomplete background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #111827 inset !important;
    box-shadow: 0 0 0px 1000px #111827 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ===================================
   MAGAZINE-STYLE ARTICLE LAYOUT
   =================================== */

.article-page {
    min-height: 100vh;
    background: var(--background-gradient);
    color: var(--text-light);
    padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
}

.article-magazine {
    max-width: 960px;
    margin: 0 auto;
}

/* Article Header Styling */
.article-header-magazine {
    margin-bottom: 3rem;
}

.article-category {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #10b981;
    margin-bottom: 1rem;
}

.article-title-magazine {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1rem;
    font-family: 'Exo 2', sans-serif;
}

.article-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.4;
    color: #9ca3af;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(156, 163, 175, 0.2);
    border-bottom: 1px solid rgba(156, 163, 175, 0.2);
    font-size: 0.875rem;
    color: #9ca3af;
}

.article-author {
    font-weight: 600;
    color: #ffffff;
}

.article-date {
    color: #9ca3af;
}

.article-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
}

.article-excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #d1d5db;
    max-width: 48rem;
    margin-top: 1.5rem;
}

/* Hero Image Styling */
.article-hero-image {
    margin: 2rem 0 3rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

.article-hero-caption {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
}

/* Professional Article Body Styling */
.article-body-magazine {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #e5e7eb;
}

.article-body-magazine::after {
    content: "";
    display: table;
    clear: both;
}

.article-body-magazine p:first-of-type::first-letter {
    font-size: 3.5em;
    line-height: 0.9;
    float: left;
    padding-right: 0.1em;
    margin-top: 0.1em;
    font-weight: 700;
    color: #10b981;
}

/* Pull Quotes */
.article-body-magazine blockquote.pullquote {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    border-left: 4px solid #10b981;
    padding: 1.5rem 0 1.5rem 2rem;
    margin: 2.5rem 0;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    font-style: italic;
}

/* Image Captions */
.article-body-magazine img + em {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: -1rem;
    margin-bottom: 2rem;
}

.article-image {
    margin: 2.5rem 0;
}

.article-image img {
    width: 100%;
    border-radius: 0.75rem;
    display: block;
    box-shadow: 0 24px 60px -40px rgba(15, 23, 42, 0.85);
}

.article-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
}

.article-image--left {
    float: left;
    max-width: min(360px, 50%);
    margin: 0 var(--space-lg) var(--space-lg) 0;
}

.article-image--right {
    float: right;
    max-width: min(360px, 50%);
    margin: 0 0 var(--space-lg) var(--space-lg);
}

.article-image--full {
    width: 100%;
}


.article-image--gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
}

.article-image--gallery img {
    width: 100%;
}

.article-image--gallery figcaption {
    text-align: center;
}

@media (max-width: 900px) {
    .article-image--left,
    .article-image--right {
        float: none;
        max-width: 100%;
        margin: 2rem 0;
    }
}

/* Callout Boxes */
.callout {
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
    border-left: 4px solid;
}

.callout.info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.callout.warning {
    background-color: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
}

.callout.success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

/* Tag Display */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
}

.article-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.3);
    transition: all 200ms ease;
}

.article-tag:hover {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.article-links {
    margin: 3rem 0 0;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(156, 163, 175, 0.2);
}

.article-links h2 {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

.article-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.article-links li {
    font-size: 0.95rem;
    color: #e5e7eb;
}

.article-links a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 0.1rem;
    transition: border-color var(--transition-fast);
}

.article-links a:hover {
    border-color: currentColor;
}

/* Wide Images (Breakout) */
.wide-image {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    margin-top: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .wide-image {
        width: 120%;
        max-width: 120%;
        margin-left: -10%;
        transform: none;
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    .article-title-magazine {
        font-size: 2rem;
    }
    
    .article-subtitle {
        font-size: 1.125rem;
    }
    
    .article-body-magazine {
        font-size: 1rem;
    }
    
    .article-body-magazine blockquote.pullquote {
        font-size: 1.25rem;
    }
}

/* Utility: Line Clamp */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}