/* =============================================================================
   MATT GAVIN - PROFESSIONAL WEBSITE
   Sophisticated Dark Theme - Premium, Not Neon
============================================================================= */

:root {
    --black: #0a0a0a;
    --black-pure: #000000;
    --white: #ffffff;
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --accent-teal: #5d9b93;
    --accent-teal-muted: #4a8078;
    --accent-teal-subtle: rgba(93, 155, 147, 0.4);
    --card-bg: rgba(15, 15, 15, 0.8);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-border-top: rgba(255, 255, 255, 0.1);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =============================================================================
   RESET & BASE
============================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dot grid pattern - Linear aesthetic */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 1;
}

/* =============================================================================
   CONSTELLATION CANVAS
============================================================================= */
#constellation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background: transparent;
}

/* =============================================================================
   NAVIGATION
============================================================================= */
body > header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    animation: navSlideDown 0.6s ease-out;
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-teal);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    width: 100%;
}

/* Mobile hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 101;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        opacity: 0;
        transform: translateX(30px);
        transition: all 0.3s ease;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
    
    .nav-links a {
        font-size: 1.1rem;
    }
}

/* =============================================================================
   HERO SECTION
============================================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 2rem;
    overflow: hidden;
}

/* Subtle ambient glow - barely visible purple/warm tone */
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(120, 80, 160, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    width: 100%;
    animation: heroFadeIn 1s ease-out;
    padding: 3rem 2rem;
    border-radius: 24px;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.hero-tagline {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
    min-height: 1.6em;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.7s forwards;
}

.scroll-indicator {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.9s forwards, float 3s ease-in-out infinite 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* =============================================================================
   BUTTONS
============================================================================= */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    overflow: hidden;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:focus {
    outline: 2px solid var(--accent-teal);
    outline-offset: 3px;
}

.btn-primary {
    background: var(--accent-teal-muted);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(74, 128, 120, 0.15);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(93, 155, 147, 0.25);
    background: var(--accent-teal);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(60, 60, 60, 0.3);
    border-color: var(--text-secondary);
    transform: translateY(-3px);
}

/* =============================================================================
   SECTIONS
============================================================================= */
section,
article {
    position: relative;
    z-index: 10;
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(180deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Very thin section dividers - Linear aesthetic */
section + section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =============================================================================
   SCOUT'S TAKE - AI Summary Callout
============================================================================= */
.scouts-take {
    position: relative;
    background: rgba(93, 155, 147, 0.08);
    border-left: 3px solid var(--accent-teal);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.scouts-take h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-teal);
    margin: 0 0 0.75rem 0;
    letter-spacing: 0.3px;
}

.scouts-take p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.scouts-take p:last-child {
    margin-bottom: 0;
}

/* Light mode variant */
[data-theme="light"] .scouts-take {
    background: rgba(74, 128, 120, 0.06);
    border-left-color: #4a8078;
}

[data-theme="light"] .scouts-take h4 {
    color: #4a8078;
}

[data-theme="light"] .scouts-take p {
    color: #555555;
}

/* =============================================================================
   CARDS
============================================================================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: 1px solid var(--card-border-top);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(60, 60, 60, 0.1) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.card:hover::before {
    left: 150%;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--accent-teal);
    margin-bottom: 1rem;
    font-weight: 500;
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(60, 60, 60, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-active {
    background: rgba(93, 155, 147, 0.2);
    color: #7ec4b8;
    border: 1px solid rgba(93, 155, 147, 0.4);
}

.status-shipping {
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-building {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-research {
    background: rgba(167, 139, 250, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

/* =============================================================================
   SCROLL REVEAL ANIMATION
============================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.card-grid .card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-grid .card:nth-child(1) { transition-delay: 0.1s; }
.card-grid .card:nth-child(2) { transition-delay: 0.2s; }
.card-grid .card:nth-child(3) { transition-delay: 0.3s; }
.card-grid .card:nth-child(4) { transition-delay: 0.4s; }
.card-grid .card:nth-child(5) { transition-delay: 0.5s; }
.card-grid .card:nth-child(6) { transition-delay: 0.6s; }

.card-grid.reveal.active .card {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================================================
   ABOUT PAGE - Timeline
============================================================================= */
.bio-section {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
}

.bio-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.skill-category h3 {
    font-size: 1.2rem;
    background: linear-gradient(180deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.skill-category li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
    font-size: 1.2rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.15) 10%, 
        rgba(255, 255, 255, 0.15) 90%, 
        transparent 100%
    );
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent-teal);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(93, 155, 147, 0.3);
}

.timeline-item h3 {
    font-size: 1.2rem;
    background: linear-gradient(180deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
}

.timeline-item .timeline-date {
    color: var(--accent-teal);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =============================================================================
   CONTACT FORM
============================================================================= */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 20px rgba(93, 155, 147, 0.15);
    background: rgba(15, 15, 15, 0.8);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-submit {
    text-align: center;
    margin-top: 2rem;
}

.form-submit .btn {
    min-width: 200px;
}

/* =============================================================================
   FOOTER
============================================================================= */
footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Subtle footer glow */
footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%
    );
    pointer-events: none;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-teal);
}

/* =============================================================================
   RESPONSIVE BREAKPOINTS
============================================================================= */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .hero {
        padding: 5rem 1rem 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    section {
        padding: 3rem 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
    }

    .nav-links a {
        font-size: 0.75rem;
    }
}

/* =============================================================================
   ACCESSIBILITY
============================================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    #constellation {
        display: none;
    }

    body {
        background: linear-gradient(180deg, #000 0%, #0a0a0a 50%, #000 100%);
    }

    .hero-content,
    .hero-subtitle,
    .hero-tagline,
    .hero-buttons,
    .scroll-indicator {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .card {
        background: #000;
        border: 2px solid #fff;
    }

    .btn-primary {
        background: #fff;
        color: #000;
    }

    .btn-secondary {
        border: 2px solid #fff;
        color: #fff;
    }
}

/* =============================================================================
   THEME TOGGLE BUTTON
============================================================================= */
.theme-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: rgba(60, 60, 60, 0.3);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.theme-toggle:focus {
    outline: 2px solid var(--accent-teal);
    outline-offset: 2px;
}

.theme-icon::before {
    content: '☀️';
}

@media (max-width: 768px) {
    .theme-toggle {
        margin-left: 0;
        margin-right: 1rem;
    }
}

/* =============================================================================
   LIGHT MODE THEME
============================================================================= */
:root[data-theme="light"] {
    --black: #f5f5f5;
    --black-pure: #ffffff;
    --white: #1a1a1a;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-teal: #4a8078;
    --accent-teal-muted: #4a8078;
    --accent-teal-subtle: rgba(74, 128, 120, 0.4);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-border-top: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .theme-icon::before {
    content: '🌙';
}

[data-theme="light"] body {
    background: #f5f5f5;
    color: #1a1a1a;
}

[data-theme="light"] body::before {
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

[data-theme="light"] #constellation {
    background: linear-gradient(180deg, #f5f5f5 0%, #ebebeb 50%, #f5f5f5 100%);
}

[data-theme="light"] header {
    background: rgba(245, 245, 245, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .logo {
    color: #1a1a1a;
}

[data-theme="light"] .nav-links a {
    color: #666666;
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
    color: #1a1a1a;
}

[data-theme="light"] .hamburger span {
    background: #1a1a1a;
}

[data-theme="light"] .hero::before {
    background: radial-gradient(ellipse, rgba(255, 180, 120, 0.15), transparent 70%);
}

[data-theme="light"] .hero h1,
[data-theme="light"] .section-title,
[data-theme="light"] .card h3,
[data-theme="light"] .skill-category h3,
[data-theme="light"] .timeline-item h3 {
    background: linear-gradient(180deg, #1a1a1a 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .hero-subtitle,
[data-theme="light"] .hero-tagline,
[data-theme="light"] .card p,
[data-theme="light"] .card-meta,
[data-theme="light"] .tag,
[data-theme="light"] .skill-category li,
[data-theme="light"] .timeline-item p,
[data-theme="light"] .bio-section p,
[data-theme="light"] footer {
    color: #666666;
}

[data-theme="light"] .status-active {
    background: rgba(74, 128, 120, 0.15);
    color: #3a6a62;
    border: 1px solid rgba(74, 128, 120, 0.3);
}

[data-theme="light"] .status-shipping {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

[data-theme="light"] .status-building {
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

[data-theme="light"] .status-research {
    background: rgba(139, 92, 246, 0.15);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .btn-primary {
    background: #4a8078;
    color: #ffffff;
}

[data-theme="light"] .btn-secondary {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #666666;
}

[data-theme="light"] .card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .card::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 0, 0, 0.03) 50%,
        transparent 100%
    );
}

[data-theme="light"] .card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .tag {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus {
    border-color: #4a8078;
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] footer::before {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.1) 50%, 
        transparent 100%
    );
}

[data-theme="light"] .footer-links a {
    color: #666666;
}

[data-theme="light"] .footer-links a:hover {
    color: #4a8078;
}

[data-theme="light"] section + section {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .timeline::before {
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.12) 10%, 
        rgba(0, 0, 0, 0.12) 90%, 
        transparent 100%
    );
}

[data-theme="light"] .timeline-item::before {
    background: #4a8078;
    box-shadow: 0 0 20px rgba(74, 128, 120, 0.3);
}

[data-theme="light"] .timeline-item .timeline-date {
    color: #4a8078;
}

[data-theme="light"] .theme-toggle {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #666666;
}

[data-theme="light"] .nav-links {
    background: rgba(245, 245, 245, 0.98);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    [data-theme="light"] .nav-links {
        background: rgba(245, 245, 245, 0.98);
    }
}

/* =============================================================================
   ARTICLE/BLOG POST STYLES
============================================================================= */

/* Article Container */
.article-wrapper {
    position: relative;
    z-index: 20;
    max-width: 800px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    background: transparent;
}

:root[data-theme="light"] .article-wrapper {
    background: transparent;
}

/* Article Header */
.article-header {
    margin-bottom: 3rem;
    text-align: center;
}

.article-meta-top {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-teal);
}

.article-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.article-meta time {
    color: var(--text-secondary);
}

.article-meta .author {
    color: var(--accent-teal);
    font-weight: 500;
}

.meta-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Article Content */
.article-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 500;
}

.article-content > * + * {
    margin-top: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* Headings within article */
.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    scroll-margin-top: 6rem;
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    scroll-margin-top: 6rem;
}

.article-content h2:first-child,
.article-content h3:first-child {
    margin-top: 0;
}

/* Heading Anchors */
.article-content h2[id],
.article-content h3[id] {
    position: relative;
}

.article-content h2[id]:hover::before,
.article-content h3[id]:hover::before {
    content: '#';
    position: absolute;
    left: -1.5rem;
    color: var(--accent-teal);
    opacity: 0.6;
    font-weight: 400;
}

/* Links */
.article-content a {
    color: var(--accent-teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(93, 155, 147, 0.3);
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: var(--accent-teal-muted);
    border-bottom-color: var(--accent-teal);
}

/* Lists */
.article-content ul,
.article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.article-content li strong {
    color: var(--text-primary);
}

/* Code Blocks */
.article-content pre {
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--accent-teal);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
    font-size: 0.9em;
    background: rgba(60, 60, 60, 0.3);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: #e0e0e0;
}

.article-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.9rem;
    color: #e0e0e0;
}

/* Blockquotes / Article Insights */
.article-content blockquote,
.article-insight {
    position: relative;
    background: rgba(60, 60, 60, 0.2);
    border-left: 3px solid var(--text-secondary);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content blockquote p,
.article-insight p {
    margin: 0;
    color: var(--text-secondary);
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin: 2rem 0;
    display: block;
}

.article-image {
    margin: 2.5rem 0;
    text-align: center;
}

.article-image img {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.article-image figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Article Footer */
.article-footer {
    max-width: 720px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.article-tags .tag {
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tags .tag:hover {
    background: rgba(93, 155, 147, 0.2);
    border-color: var(--accent-teal);
}

/* Related Posts Section */
.related-posts {
    position: relative;
    z-index: 10;
    padding: 4rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.related-posts .card h3 a {
    color: inherit;
    text-decoration: none;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.related-posts .card:hover h3 a {
    background: linear-gradient(180deg, var(--accent-teal) 0%, #4a8078 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Light Mode - Article Overrides */
[data-theme="light"] .article-content pre {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .article-content code {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
}

[data-theme="light"] .article-content pre code {
    background: none;
    color: #1a1a1a;
}

[data-theme="light"] .article-content blockquote,
[data-theme="light"] .article-insight {
    background: rgba(0, 0, 0, 0.03);
    border-left-color: #666666;
}

[data-theme="light"] .article-content img {
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .article-footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .related-posts {
    border-top-color: rgba(0, 0, 0, 0.06);
}

/* Inline SVG Diagrams */
.comparison-visual svg {
    border-radius: 12px;
}

[data-theme="light"] .comparison-visual svg .cv-bg,
[data-theme="light"] .comparison-visual svg .cost-bg,
[data-theme="light"] .comparison-visual svg .rt-bg {
    fill: #e8e8e8;
}

[data-theme="light"] .comparison-visual svg .cv-label,
[data-theme="light"] .comparison-visual svg .cost-label,
[data-theme="light"] .comparison-visual svg .rt-desc {
    fill: #555;
}

[data-theme="light"] .comparison-visual svg .cv-head,
[data-theme="light"] .comparison-visual svg .cost-val,
[data-theme="light"] .comparison-visual svg .rt-title {
    fill: #1a1a1a;
}

[data-theme="light"] .comparison-visual svg .cv-bar-bg {
    fill: #d0d0d0;
}

[data-theme="light"] .comparison-visual svg rect[fill="#1a2e2b"] { fill: #d5e8e5; }
[data-theme="light"] .comparison-visual svg rect[fill="#1a1a2e"] { fill: #d8daf5; }
[data-theme="light"] .comparison-visual svg rect[fill="#1a1a1a"] { fill: #e0e0e0; }

/* Responsive - Article Styles */
@media (max-width: 768px) {
    .article-wrapper {
        padding: 6rem 1.5rem 3rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-lead {
        font-size: 1.15rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
        margin-top: 2.5rem;
    }

    .article-content h3 {
        font-size: 1.25rem;
        margin-top: 2rem;
    }

    .article-content h2[id]:hover::before,
    .article-content h3[id]:hover::before {
        display: none;
    }

    .article-content pre {
        padding: 1rem;
        font-size: 0.85rem;
        margin: 1.5rem -0.5rem;
        border-radius: 6px;
    }

    .article-tags {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .article-content ul,
    .article-content ol {
        margin-left: 1.25rem;
    }
}
