/* ==========================================================================
   Charlie Helman Portfolio - Cassette Futurism Theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --bg: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #0f0f0f;
    --text: #e8e8e8;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --text-faint: #3a3a3a;
    --accent: #00ff88;
    --accent-dim: rgba(0, 255, 136, 0.08);
    --accent-glow: rgba(0, 255, 136, 0.15);
    --accent-alt: #ff6b35;
    --border: #1e1e1e;
    --border-subtle: #161616;

    /* Typography */
    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing (4px grid) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-24: 6rem;     /* 96px */

    /* Legacy aliases — keep so carousel CSS doesn't break */
    --space-xs: var(--space-1);
    --space-sm: var(--space-2);
    --space-md: var(--space-4);
    --space-lg: var(--space-8);
    --space-xl: var(--space-16);
    --space-2xl: var(--space-24);

    /* Layout */
    --max-width: 900px;
    --header-height: 56px;

    /* Transitions */
    --transition-fast: 120ms ease;
    --transition-base: 200ms ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* --------------------------------------------------------------------------
   Scanline Overlay — disabled (render cost not worth 0.03 opacity)
   -------------------------------------------------------------------------- */
.scanlines { display: none; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

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

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
}

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

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.nav {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color var(--transition-fast);
    padding-bottom: var(--space-1);
    border-bottom: 1px solid transparent;
}

.nav-link:hover { color: var(--text-secondary); }
.nav-link.active { color: var(--text); border-bottom-color: var(--accent); }

/* --------------------------------------------------------------------------
   Section Titles
   -------------------------------------------------------------------------- */
.section-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.section-divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    margin-bottom: var(--space-16);
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 48px; height: 1px;
    background: var(--accent);
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about-content { max-width: 640px; }

.about-content p {
    margin-bottom: var(--space-6);
    color: var(--text-secondary);
    font-size: 0.975rem;
    line-height: 1.75;
}

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

.lead {
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--text) !important;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-8) !important;
}

.about-rule {
    width: 32px; height: 2px;
    background: var(--accent);
    margin: var(--space-8) 0;
}

.highlight {
    color: var(--accent);
    font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Timeline (Experience Section)
   -------------------------------------------------------------------------- */
.timeline {
    position: relative;
    padding-left: var(--space-lg);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: calc(-1 * var(--space-lg) - 4px);
    top: 4px;
    width: 9px;
    height: 9px;
    background: var(--bg);
    border: 2px solid var(--accent);
    border-radius: 50%;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.timeline-item:hover .timeline-marker {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-header {
    margin-bottom: var(--space-md);
}

.timeline-title {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

.timeline-company {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: var(--space-xs);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.timeline-details {
    list-style: none;
    padding-left: 0;
}

.timeline-details li {
    position: relative;
    padding-left: var(--space-md);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
    color: var(--text-muted);
}

.timeline-details li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Projects Section
   -------------------------------------------------------------------------- */
.projects-grid { display: grid; gap: var(--space-2); }

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    transition: border-color var(--transition-base), background var(--transition-base);
}

.project-card:hover {
    border-color: #2e2e2e;
    background: var(--bg-elevated);
}

/* --------------------------------------------------------------------------
   Project Media & Carousel
   -------------------------------------------------------------------------- */
.project-media {
    position: relative;
}

.carousel {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg);
    overflow: hidden;
}

/* Taller carousel for portrait content (35% taller) */
.project-card.has-portrait-active .carousel {
    aspect-ratio: 16 / 12.15;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Portrait slide layout (centered media) */
.carousel-slide--portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.carousel-slide--portrait img,
.carousel-slide--portrait video {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.carousel-slide video {
    background: var(--bg);
}

/* Carousel Navigation (Arrows + Dots) */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    background: var(--bg);
}

.carousel-dots {
    display: flex;
    gap: var(--space-sm);
}

.carousel-arrow {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    flex-shrink: 0;
}

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

.carousel-arrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-style: solid;
    border-width: 2px 2px 0 0;
    border-color: var(--accent);
}

.carousel-arrow--prev::before {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.carousel-arrow--next::before {
    transform: rotate(45deg);
    margin-right: 3px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
    padding: 0;
    position: relative;
}

.carousel-dot:hover {
    background: rgba(0, 255, 136, 0.3);
}

.carousel-dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Progress ring around active dot */
.carousel-dot.active.has-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: conic-gradient(
        from -90deg,
        var(--accent) calc(var(--progress, 0) * 1%),
        transparent calc(var(--progress, 0) * 1%)
    );
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #fff calc(100% - 2px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #fff calc(100% - 2px));
}

/* Progress border on next arrow */
.carousel-arrow--next.has-progress {
    position: relative;
    overflow: visible;
}

.carousel-arrow--next.has-progress::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 6px;
    background: conic-gradient(
        from -90deg,
        var(--accent) calc(var(--progress, 0) * 1%),
        transparent calc(var(--progress, 0) * 1%)
    );
    mask:
        linear-gradient(#fff, #fff) content-box,
        linear-gradient(#fff, #fff);
    mask-composite: exclude;
    -webkit-mask:
        linear-gradient(#fff, #fff) content-box,
        linear-gradient(#fff, #fff);
    -webkit-mask-composite: xor;
    padding: 2px;
    z-index: -1;
}

/* Video Controls Overlay */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 44px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0 var(--space-md);
    z-index: 10;
}

/* Gradient background - fades in on hover */
.video-controls::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.carousel-slide:hover .video-controls::before,
.carousel-slide.controls-active .video-controls::before {
    opacity: 1;
}

/* Scrubber - hidden by default, shown on hover */
.video-controls .video-scrubber {
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.carousel-slide:hover .video-controls .video-scrubber,
.carousel-slide.controls-active .video-controls .video-scrubber {
    opacity: 1;
    visibility: visible;
}

/* Disabled state for videos without audio */
.video-audio-toggle--no-audio {
    opacity: 0.25 !important;
    cursor: default;
    pointer-events: none;
}

.video-audio-toggle--no-audio .audio-icon {
    filter: grayscale(1);
}

/* Video Scrubber */
.video-scrubber {
    flex: 1;
    height: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.video-scrubber-track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: height var(--transition-fast);
}

.video-scrubber:hover .video-scrubber-track,
.video-scrubber.dragging .video-scrubber-track {
    height: 6px;
}

.video-scrubber-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    width: 0%;
}

.video-scrubber-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%) scale(0);
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow);
    transition: transform var(--transition-fast);
}

.video-scrubber:hover .video-scrubber-handle,
.video-scrubber.dragging .video-scrubber-handle {
    transform: translate(-50%, -50%) scale(1);
}

/* Audio Toggle Button - always visible as hint */
.video-audio-toggle {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity var(--transition-base), background var(--transition-fast), border-color var(--transition-fast);
    flex-shrink: 0;
}

.carousel-slide:hover .video-audio-toggle,
.carousel-slide.controls-active .video-audio-toggle {
    opacity: 1;
    background: transparent;
    border-color: var(--border);
}

.video-audio-toggle:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

.audio-icon {
    width: 18px;
    height: 18px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.audio-icon--muted {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ff88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5L6 9H2v6h4l5 4V5z'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E");
}

.audio-icon--unmuted {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ff88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5L6 9H2v6h4l5 4V5z'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3C/svg%3E");
}

/* Mobile: larger touch targets */
@media (max-width: 640px) {
    .video-controls {
        height: 52px;
        padding: 0 var(--space-sm);
    }

    .video-scrubber {
        height: 32px;
    }

    .video-scrubber-track {
        height: 6px;
    }

    .video-scrubber-handle {
        width: 18px;
        height: 18px;
    }

    .video-audio-toggle {
        width: 44px;
        height: 44px;
    }

    .audio-icon {
        width: 22px;
        height: 22px;
    }

    /* Portrait layout on mobile: use tall aspect ratio to fill most of screen */
    .project-card.has-portrait-active .carousel {
        aspect-ratio: 9 / 14;
    }

    /* Portrait media: fill the tall container */
    .carousel-slide--portrait img,
    .carousel-slide--portrait video {
        width: auto;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
}

/* Media Caption */
.media-caption {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: var(--space-sm) var(--space-lg) var(--space-md);
    background: var(--bg);
    min-height: 2rem;
    line-height: 1.5;
    display: none;
}

.media-caption.visible {
    display: block;
}

/* YouTube Placeholder */
.youtube-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.youtube-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.youtube-play-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent var(--bg);
}

.youtube-placeholder:hover .youtube-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
}

/* YouTube Embed */
.youtube-embed {
    width: 100%;
    height: 100%;
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Legacy project-image support */
.project-image {
    aspect-ratio: 16 / 9;
    background: var(--border);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter var(--transition-base), transform var(--transition-base);
}

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

.project-content { padding: var(--space-6) var(--space-8); }

.project-title {
    font-family: var(--font-sans);
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-2);
    letter-spacing: -0.01em;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.65;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* Tech tags — neutral, not accent-highlighted */
.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: transparent;
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--border);
    border-radius: 2px;
    letter-spacing: 0.05em;
}

/* Consolidated project links — one canonical block */
.project-links { margin-top: var(--space-4); display: flex; gap: var(--space-4); }

.project-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* --------------------------------------------------------------------------
   Consulting Section
   -------------------------------------------------------------------------- */
.consulting-content { max-width: 640px; }

.consulting-content p {
    margin-bottom: var(--space-6);
    color: var(--text-secondary);
    font-size: 0.975rem;
    line-height: 1.75;
}

.consulting-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    margin: var(--space-8) 0;
}

.consulting-service {
    padding: var(--space-6);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2px;
}

.consulting-service h4 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.consulting-service p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0;
}

.consulting-note {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: var(--space-8) !important;
}

.consulting-cta { margin-top: var(--space-4); }

@media (max-width: 640px) {
    .consulting-services {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact-intro {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: var(--space-lg);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-link:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.contact-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   Featured Project Card
   -------------------------------------------------------------------------- */
.project-card--featured {
    border: 1px solid rgba(0, 255, 136, 0.25);
    background: linear-gradient(135deg, #0d1410 0%, #0a0a0a 60%);
    position: relative;
}

.project-card--featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent 60%);
}

.project-card--featured:hover {
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 40px rgba(0,255,136,0.06), inset 0 0 40px rgba(0,255,136,0.02);
}

.project-card--featured .project-title { font-size: 1.1rem; }
.project-card--featured .project-content { padding: var(--space-8); }
.project-card--featured .project-description { font-size: 0.95rem; }

.project-card--featured .project-link {
    color: var(--accent);
    border: 1px solid rgba(0,255,136,0.3);
    padding: var(--space-2) var(--space-4);
    border-radius: 2px;
}

.project-card--featured .project-link:hover {
    background: var(--accent);
    color: var(--bg);
}

.project-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bg);
    background: var(--accent);
    padding: 2px 8px;
    border-radius: 2px;
    margin-left: var(--space-sm);
    vertical-align: middle;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: var(--space-sm) var(--space-lg);
    border-radius: 4px;
    text-decoration: none;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
}

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

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

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

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

/* --------------------------------------------------------------------------
   Vibery Section
   -------------------------------------------------------------------------- */
.section--vibery {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 50%, var(--bg) 100%);
}

.vibery-content {
    max-width: 700px;
}

.vibery-hero {
    margin-bottom: var(--space-xl);
}

.vibery-hero h3 {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.vibery-hero .lead {
    font-size: 1.1rem;
}

.vibery-features { display: grid; gap: var(--space-2); margin-bottom: var(--space-8); }

.vibery-feature {
    padding: var(--space-6) var(--space-8);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: 2px;
}

.vibery-feature h4 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--space-3);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.vibery-feature p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; }

.vibery-business {
    padding: var(--space-lg);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: var(--space-xl);
}

.vibery-business h4 {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.vibery-business ul {
    list-style: none;
    padding: 0;
}

.vibery-business li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.vibery-business li strong {
    color: var(--text);
}

.vibery-business a {
    color: var(--accent);
    text-decoration: none;
}

.vibery-business a:hover {
    text-decoration: underline;
}

.vibery-cta {
    text-align: center;
}

/* Vibery PoC Section */
.vibery-poc {
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: 2px;
    margin: var(--space-4) 0 var(--space-8);
}

.vibery-poc h4 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--space-3);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.vibery-poc p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: var(--space-sm);
}

.vibery-poc-note {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --------------------------------------------------------------------------
   GitHub Section
   -------------------------------------------------------------------------- */
.github-intro {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: var(--space-lg);
}

.github-intro a {
    color: var(--accent);
    text-decoration: none;
}

.github-intro a:hover {
    text-decoration: underline;
}

.github-contributions {
    display: block;
    width: 100%;
    max-width: 640px;
    border-radius: 2px;
    margin-bottom: var(--space-8);
    opacity: 0.9;
}

.github-stats {
    margin-bottom: var(--space-xl);
}

.github-stat {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.github-stat:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.github-stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.github-stat-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.github-repos {
    display: grid;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.github-repo {
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color var(--transition-fast);
}

.github-repo:hover {
    border-color: var(--accent);
}

.github-repo h4 {
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.github-repo h4 a {
    color: var(--accent);
    text-decoration: none;
}

.github-repo h4 a:hover {
    text-decoration: underline;
}

.github-repo-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.github-repo-stats {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.github-cta {
    text-align: center;
}

/* Mobile Vibery features */
@media (min-width: 640px) {
    .vibery-features {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border);
    margin-top: var(--space-xl);
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* --------------------------------------------------------------------------
   First Section Offset (for fixed header)
   -------------------------------------------------------------------------- */
#about {
    padding-top: calc(var(--header-height) + var(--space-2xl));
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */

/* Tablet and up */
@media (min-width: 640px) {
    .contact-links {
        flex-direction: row;
    }

    .contact-link {
        flex: 1;
    }
}

/* Desktop */
@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-image {
        aspect-ratio: 16 / 9;
    }
}

/* Mobile adjustments */
@media (max-width: 640px) {
    :root {
        --space-2xl: 4rem;
    }

    .header .container {
        flex-direction: column;
        justify-content: center;
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
    }

    .header {
        height: auto;
        padding: var(--space-sm) 0;
    }

    #about {
        padding-top: calc(100px + var(--space-xl));
    }

    .nav {
        gap: var(--space-md);
    }

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

    .logo {
        font-size: 0.9rem;
    }

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

    .lead {
        font-size: 1.15rem;
    }

    .timeline {
        padding-left: var(--space-md);
    }

    .timeline-marker {
        left: calc(-1 * var(--space-md) - 4px);
    }

    .container {
        padding: 0 var(--space-md);
    }
}

/* --------------------------------------------------------------------------
   Selection Styling
   -------------------------------------------------------------------------- */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* --------------------------------------------------------------------------
   Focus States (Accessibility)
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Fade In Animation (JS-triggered)
   -------------------------------------------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
