/* ====================================
   ALEX BRITTON - PORTFOLIO
   Modern Dark Theme
   ==================================== */

/* CSS Variables */
:root {
    /* Backgrounds - Warmer dark palette */
    --bg-primary: #0d0d0d;
    --bg-secondary: #161616;
    --bg-card: #1a1a1a;
    --bg-elevated: #222222;

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #999999;
    --text-muted: #666666;

    /* Accent - Deep Blue */
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --accent-glow: rgba(37, 99, 235, 0.15);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-visible: rgba(255, 255, 255, 0.12);

    /* Typography - Refined editorial fonts */
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'Satoshi', 'General Sans', system-ui, sans-serif;

    /* Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-secondary);
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ====================================
   SITE HEADER - Minimal Navigation
   ==================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 3rem;
    transition: all 0.4s var(--ease-out-expo);
}

.site-header.scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 3rem;
    border-bottom: 1px solid var(--border-subtle);
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-primary);
    transition: color 0.3s;
}

.nav-logo:hover {
    color: var(--accent);
}

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
}

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

/* ====================================
   HERO SECTION
   ==================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(37, 99, 235, 0.04), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 800px;
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.1s forwards;
}

.hero-intro {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 540px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.2s forwards;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.3s forwards;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 100px;
    transition: all 0.3s var(--ease-out-expo);
}

.hero-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.hero-links {
    display: flex;
    gap: 0.75rem;
}

.hero-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-visible);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-out-expo);
}

.hero-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 1s var(--ease-out-expo) 0.8s forwards;
}

.scroll-indicator svg {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(6px);
    }
    60% {
        transform: translateY(3px);
    }
}

/* ====================================
   RESEARCH SECTION
   ==================================== */
.research-section {
    padding: 5rem 4rem;
    background: var(--bg-secondary);
    position: relative;
}

.research-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.research-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.research-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.research-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.research-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    transition: all 0.4s var(--ease-out-expo);
}

.research-card:hover {
    border-color: var(--border-visible);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.research-card-content {
    flex: 1;
}

.research-journal {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2dd4bf;
    margin-bottom: 0.75rem;
}

.research-journal.under-review {
    color: #ffd93d;
}

.research-paper-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.research-authors {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.research-authors strong {
    color: var(--text-primary);
}

.research-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.research-doi {
    font-family: monospace;
    font-size: 0.75rem;
}

.research-abstract {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    border-left: 2px solid var(--border-visible);
    padding-left: 1rem;
    margin-top: 1rem;
}

.research-card-actions {
    flex-shrink: 0;
}

.research-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-visible);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-out-expo);
}

.research-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Responsive Research Section */
@media (max-width: 768px) {
    .research-section {
        padding: 3rem 1.5rem;
    }

    .research-card {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .research-paper-title {
        font-size: 1.15rem;
    }

    .research-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .research-card-actions {
        width: 100%;
    }

    .research-link {
        width: 100%;
        justify-content: center;
    }
}

/* ====================================
   UNIFIED WORK SECTION
   ==================================== */
.work-section {
    padding: 5rem 4rem 6rem;
    background: var(--bg-primary);
    position: relative;
}

.work-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-visible), transparent);
}

.work-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.work-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.work-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Work Grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Work Card */
.work-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
}

.work-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.work-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-secondary);
}

.work-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out-expo);
}

.work-card:hover .work-card-image img {
    transform: scale(1.05);
}

.work-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
}

.work-card:hover .work-card-overlay {
    opacity: 1;
}

.work-view-btn {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    padding: 0.7rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.4s var(--ease-out-expo);
    letter-spacing: 0.02em;
}

.work-card:hover .work-view-btn {
    transform: translateY(0);
    opacity: 1;
}

.work-view-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.work-card-body {
    padding: 1.5rem;
}

/* Category Labels with Vibrant Colors */
.work-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0;
    position: relative;
}

/* ML - Electric Cyan */
.work-category[data-category="ml"] {
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* Data Pipelines - Hot Pink */
.work-category[data-category="pipeline"] {
    color: #ff4da6;
    text-shadow: 0 0 20px rgba(255, 77, 166, 0.4);
}

/* Computer Vision - Lime Green */
.work-category[data-category="cv"] {
    color: #7fff00;
    text-shadow: 0 0 20px rgba(127, 255, 0, 0.4);
}

/* Data Visualization - Golden */
.work-category[data-category="viz"] {
    color: #ffd93d;
    text-shadow: 0 0 20px rgba(255, 217, 61, 0.4);
}

/* AI - Violet */
.work-category[data-category="ai"] {
    color: #a78bfa;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.4);
}

/* 3D Modeling - Coral Orange */
.work-category[data-category="3d"] {
    color: #ff7b54;
    text-shadow: 0 0 20px rgba(255, 123, 84, 0.4);
}

/* Frontend - Aqua Mint */
.work-category[data-category="frontend"] {
    color: #2dd4bf;
    text-shadow: 0 0 20px rgba(45, 212, 191, 0.4);
}

/* FEA - Electric Blue */
.work-category[data-category="fea"] {
    color: #60a5fa;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
}

.work-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color 0.3s;
    line-height: 1.3;
}

.work-card:hover .work-card-title {
    color: white;
}

.work-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Responsive Work Section */
@media (max-width: 768px) {
    .work-section {
        padding: 3rem 1.5rem 4rem;
    }

    .work-header {
        margin-bottom: 2.5rem;
    }

    .work-title {
        font-size: 2rem;
    }

    .work-subtitle {
        font-size: 1rem;
    }

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

    .work-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

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

/* ====================================
   LANDING PAGE - TWO COLUMN
   ==================================== */
.landing-page {
    background: var(--bg-primary);
}

.landing-container {
    display: grid;
    grid-template-columns: 340px 1fr;
    min-height: 100vh;
}

/* Left Sidebar */
.landing-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    overflow-y: auto;
}

.sidebar-content {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.landing-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.landing-role {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.landing-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.landing-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.social-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease-out-expo);
}

.social-pill:hover {
    background: var(--bg-elevated);
    border-color: var(--border-visible);
    color: var(--text-primary);
}

.portfolio-cta {
    display: block;
    padding: 0.9rem 1.25rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s var(--ease-out-expo);
    margin-bottom: auto;
}

.portfolio-cta:hover {
    background: var(--text-secondary);
    transform: translateY(-1px);
}

.sidebar-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* Right Feed */
.landing-feed {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    align-content: start;
}

.landing-feed-simple {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.featured-card {
    padding: 1.5rem;
}

.featured-card video {
    border-radius: 10px;
}

.featured-card .feed-label {
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.featured-card p {
    font-size: 0.9rem;
    margin-top: 1rem;
}

.feed-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s var(--ease-out-expo);
}

.feed-card:hover {
    border-color: var(--border-visible);
    transform: translateY(-2px);
}

.feed-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.feed-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    line-height: 1.5;
}

/* Video Cards */
.video-feed-card video {
    width: 100%;
    border-radius: 8px;
    background: var(--bg-primary);
}

/* Image Cards */
.image-feed-card img {
    width: 100%;
    border-radius: 8px;
    background: var(--bg-primary);
}

/* Tweet Cards */
.tweet-feed-card {
    min-height: 300px;
}

.tweet-feed-card .tweet-container {
    min-height: 250px;
}

.tweet-feed-card .twitter-tweet {
    margin: 0 !important;
}

/* Site Name Link */
.site-name-link {
    text-decoration: none;
}

.site-name-link:hover .site-name {
    opacity: 0.8;
}

/* Responsive Landing */
@media (max-width: 1024px) {
    .landing-container {
        grid-template-columns: 280px 1fr;
    }
    
    .landing-feed {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .landing-container {
        grid-template-columns: 1fr;
    }
    
    .landing-sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }
    
    .sidebar-content {
        padding: 2rem 1.5rem;
    }
    
    .landing-name {
        font-size: 1.75rem;
    }
    
    .landing-feed {
        padding: 1.5rem;
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 100px;
    transition: all 0.3s var(--ease-out-expo);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

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

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ====================================
   PORTFOLIO SECTIONS
   ==================================== */
.portfolio-section {
    padding: 3rem 4rem;
    position: relative;
}

.portfolio-section:nth-child(odd) {
    background: var(--bg-primary);
}

.portfolio-section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-header {
    margin-bottom: 2rem;
    max-width: 600px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Portfolio Grid */
.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
    width: 100%;
}

/* Project Card */
.project-card {
    width: 320px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-visible);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.project-card:hover .card-image img {
    transform: scale(1.02);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 13, 13, 0.85) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
}

.project-card:hover .card-overlay {
    opacity: 1;
}

.view-project {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    border: none;
    border-radius: 100px;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.4s var(--ease-out-expo);
}

.project-card:hover .view-project {
    transform: translateY(0);
    opacity: 1;
}

.card-content {
    padding: 1.25rem;
}

.card-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.project-card:hover .card-title {
    color: var(--accent);
}

.card-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}


/* ====================================
   MODAL
   ==================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out-expo);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    width: 95%;
    max-width: 700px;
    height: 90vh;
    max-height: 900px;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transform: scale(0.9) translateY(30px);
    transition: transform 0.5s var(--ease-out-expo);
    display: flex;
    flex-direction: column;
}

.modal.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 22, 24, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-visible);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s var(--ease-out-expo);
}

.modal-close:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: rotate(90deg);
}

.modal-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-elevated);
}

.modal-left {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    order: 2;
    max-height: 300px;
}

.modal-media img {
    max-height: 250px;
    width: auto;
    margin: 0 auto;
}

.modal-left::-webkit-scrollbar {
    width: 6px;
}

.modal-left::-webkit-scrollbar-track {
    background: var(--bg-elevated);
}

.modal-left::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.modal-left .modal-tweet-section {
    padding: 2rem;
    margin: 0;
}

.modal-left .modal-tweet-section h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.modal-media-fallback {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-media {
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-media img,
.modal-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.modal-media img {
    cursor: zoom-in;
}

/* Gallery Section */
.modal-gallery-section {
    margin-bottom: 2rem;
}

.modal-gallery-section h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-gallery img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-primary);
    cursor: pointer;
    transition: transform 0.3s var(--ease-out-expo);
}

.modal-gallery img:hover {
    transform: scale(1.02);
}

/* ====================================
   IMAGE LIGHTBOX
   ==================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-expo);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-visible);
    border-radius: 50%;
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s var(--ease-out-expo);
}

.lightbox-close:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    overflow: auto;
    cursor: grab;
}

.lightbox-content:active {
    cursor: grabbing;
}

.lightbox-content img {
    display: block;
    max-width: none;
    transition: transform 0.2s ease;
    transform-origin: center center;
}

.lightbox-controls {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.lightbox-controls button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
}

.lightbox-controls button:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Video Section */
.modal-video-section {
    margin-bottom: 2rem;
}

.modal-video-section h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.demo-video {
    width: 100%;
    max-height: 300px;
    border-radius: 12px;
    background: var(--bg-primary);
    object-fit: contain;
}

/* Tweet Embeds Section */
.modal-tweet-section {
    margin-bottom: 2rem;
}

.modal-tweet-section h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.tweet-embeds {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tweet-embeds .twitter-tweet {
    margin: 0 !important;
}

.tweet-embeds iframe {
    border-radius: 12px !important;
}

.modal-details {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    order: 1;
}

.modal-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 2rem;
}

.modal-tech {
    margin-bottom: 2rem;
}

.modal-tech h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

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

.tech-tags span {
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* ====================================
   FOOTER
   ==================================== */
.footer {
    padding: 3rem 4rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-primary);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 1024px) {
    .portfolio-section {
        padding: 2.5rem 3rem;
    }
}

@media (max-width: 768px) {
    /* Header */
    .site-header {
        padding: 1rem 1.5rem;
    }

    .site-header.scrolled {
        padding: 0.75rem 1.5rem;
    }

    .nav-logo {
        font-size: 1.25rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    /* Hero */
    .hero {
        padding: 5rem 1.5rem 3rem;
        min-height: 90vh;
    }

    .hero-label {
        font-size: 0.7rem;
    }

    .hero-name {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero-intro {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-btn {
        padding: 0.7rem 1.25rem;
        font-size: 0.85rem;
    }

    .hero-link {
        width: 42px;
        height: 42px;
    }

    .scroll-indicator {
        bottom: 2rem;
        font-size: 0.65rem;
    }

    /* Section Nav */
    .section-nav {
        padding: 1.5rem 1.5rem;
        gap: 0.5rem;
    }

    .nav-pill {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    /* Portfolio */
    .portfolio-section {
        padding: 2rem 1.5rem;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-description {
        font-size: 0.9rem;
    }

    .portfolio-grid {
        justify-content: center;
    }

    .project-card {
        width: 100%;
        max-width: 320px;
    }

    /* Footer */
    .footer {
        padding: 2rem 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Modal */
    .modal-details {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.75rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2.5rem;
    }

    .hero-intro {
        font-size: 1rem;
    }

    .section-nav {
        justify-content: center;
    }

    .nav-pill {
        flex: 1 1 calc(50% - 0.5rem);
        text-align: center;
    }

    .portfolio-section {
        padding: 1.5rem 1rem;
    }
}

