:root {
    /* Palette - Deep Amber CRT (Dark Theme) */
    --amber-bright: #ff8c00;
    --amber-dim: #cc5500;
    --amber-glow: rgba(255, 140, 0, 0.45);

    --cyan: #00d4ff;
    --green: #00ff88;
    --green-glow: rgba(0, 255, 136, 0.45);

    --bg-deep: #050505;
    --bg-panel: #0a0a0a;
    --bg-card: #111111;

    /* Cyan Grid (matching iso grid blue) */
    --grid-line: rgba(0, 212, 255, 0.04);

    --border-dim: #2a2a2a;

    --text-main: #e0e0e0;
    --text-muted: #a0a0a0; /* Bumped from #808080 for WCAG AA compliance */
    --text-dark: #000000;
    --bg-terminal: #0a0a0a;
    --terminal-title-bg: #2a2a2a;

    /* CRT overlay opacity (differs per theme) */
    --crt-scanline-opacity: 0.25;
    --crt-vignette-opacity: 0.6;
    --noise-opacity: 0.03;

    /* Nav background */
    --nav-bg: rgba(5, 5, 5, 0.95);
}

/* Light Theme - Clean Industrial */
[data-theme="light"] {
    /* Primary - Deep Orange (consistent with dark theme) */
    --amber-bright: #d65a00;
    --amber-dim: #a04000;
    --amber-glow: rgba(214, 90, 0, 0.20);

    /* Accent - Teal (consistent with dark theme) */
    --cyan: #008899;

    /* Secondary - Muted Forest Green (subdued for light theme) */
    --green: #2d6a4f;
    --green-glow: rgba(45, 106, 79, 0.20);

    /* Backgrounds - Warm light grey */
    --bg-deep: #f4f3f0;
    --bg-panel: #eae9e4;
    --bg-card: #e0dfda;
    --bg-terminal: #2a2a2a;
    --terminal-title-bg: #4a4a4a;

    /* Grid - subtle orange tint */
    --grid-line: rgba(214, 90, 0, 0.05);

    /* Borders - warm grey */
    --border-dim: #c5c3bc;

    /* Text - dark charcoal */
    --text-main: #2a2a2a;
    --text-muted: #5a5a5a;
    --text-dark: #f4f3f0;

    /* Reduced CRT effects for light theme */
    --crt-scanline-opacity: 0.04;
    --crt-vignette-opacity: 0.15;
    --noise-opacity: 0.015;

    /* Nav background */
    --nav-bg: rgba(244, 243, 240, 0.95);
}

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

html { scroll-behavior: smooth; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'IBM Plex Mono', monospace;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

/* --- Skip Link for Accessibility --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--amber-bright);
    color: var(--bg-deep);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 10px;
}

/* --- CRT Overlay Effects --- */
.crt-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.crt-overlay::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,var(--crt-scanline-opacity)) 0px,
        rgba(0,0,0,var(--crt-scanline-opacity)) 1px,
        transparent 1px,
        transparent 3px
    );
}

.crt-overlay::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(
        circle at center,
        transparent 55%,
        rgba(0,0,0,var(--crt-vignette-opacity)) 100%
    );
}

/* Noise texture */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: var(--noise-opacity);
    pointer-events: none;
    z-index: 9998;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Bloom - removed for cleaner look */

/* --- Layout Utilities --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    border-bottom: 1px solid var(--border-dim);
    position: relative;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* H1 - Sharp Default */
h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: var(--amber-bright);
    line-height: 0.95;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 1px var(--amber-dim); /* Sharp */
    transition: all 0.3s ease;
    cursor: default;
}

.h1-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: default;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--text-main);
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 65ch;
}

.mono-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--amber-bright);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.5rem;
}

.mono-label::before { content: '// '; opacity: 0.5; }

a.mono-label {
    text-decoration: none;
}

/* --- UI Elements --- */
.corner-frame {
    position: fixed;
    width: 40px; height: 40px;
    border: 2px solid var(--amber-bright);
    z-index: 100;
    pointer-events: none;
    opacity: 0.6;
}
.tl { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.tr { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.bl { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.br { bottom: 20px; right: 20px; border-left: none; border-top: none; }

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 140, 0, 0.08);
    border: 2px solid var(--amber-bright);
    color: var(--amber-bright);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    text-transform: lowercase;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before { content: '> '; margin-right: 0.5rem; }

/* Button cursor animation */
.btn-cursor {
    display: inline-block;
    width: 0.5em;
    height: 1em;
    background: var(--amber-bright);
    margin-left: 0.3em;
    vertical-align: middle;
    animation: cursorBlink 1s step-end infinite;
}

.btn:hover .btn-cursor {
    background: var(--bg-deep);
}

/* Green Hover State */
.btn:hover {
    background: var(--green);
    color: var(--bg-deep);
    border-color: var(--green);
}

/* --- GitHub Link --- */
.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    border: 1px solid var(--border-dim);
    border-radius: 4px;
    background: transparent;
    transition: all 0.2s ease;
}

.github-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.github-link-text {
    color: var(--text-main);
    transition: color 0.2s ease;
}

.github-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.github-link:hover {
    border-color: var(--amber-bright);
    background: rgba(255, 158, 31, 0.05);
}

.github-link:hover .github-icon {
    color: var(--amber-bright);
}

.github-link:hover .github-link-text {
    color: var(--amber-bright);
}

.github-link:hover .github-arrow {
    color: var(--amber-bright);
    transform: translate(2px, -2px);
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-dim);
}

/* Center nav-links absolutely for true centering on desktop */
@media (min-width: 901px) {
    nav {
        position: fixed;
    }
    .nav-links {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--amber-bright);
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    /* Sharp default */
    text-shadow: 0 0 1px var(--amber-dim);
    transition: all 0.3s ease;
    display: inline-block;
}

/* Abbreviated logo hidden by default, shown at medium widths */
.logo-text--abbr {
    display: none;
}

/* Thin desktop: show abbreviated logo to make room for nav links */
@media (min-width: 901px) and (max-width: 1200px) {
    .logo-text--full {
        display: none;
    }
    .logo-text--abbr {
        display: inline-block;
    }
}

.logo svg {
    width: 28px;
    height: 28px;
}

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.15s ease;
    display: inline-block;
}

.nav-links a:hover {
    color: var(--amber-bright);
    animation: glitch-skew-strong 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

/* --- Glitch Keyframes (Standard 3px offset) --- */
@keyframes glitch-skew {
    0% { transform: skew(0deg); text-shadow: none; }
    10% { transform: skew(0deg); text-shadow: none; }
    11% { transform: skew(-2deg); text-shadow: 3px 0 var(--amber-dim), -3px 0 var(--amber-bright); }
    12% { transform: skew(2deg); text-shadow: -3px 0 var(--amber-dim), 3px 0 var(--amber-bright); }
    13% { transform: skew(0deg); text-shadow: none; }
    100% { transform: skew(0deg); text-shadow: none; }
}

/* Enhanced glitch for nav hover */
@keyframes glitch-skew-strong {
    0% { transform: skew(0deg); text-shadow: none; }
    8% { transform: skew(0deg); text-shadow: none; }
    10% { transform: skew(-4deg); text-shadow: 4px 0 var(--cyan), -4px 0 var(--amber-bright); }
    12% { transform: skew(3deg); text-shadow: -3px 0 var(--green), 3px 0 var(--amber-dim); }
    14% { transform: skew(-2deg); text-shadow: 2px 0 var(--amber-bright), -2px 0 var(--cyan); }
    16% { transform: skew(0deg); text-shadow: none; }
    100% { transform: skew(0deg); text-shadow: none; }
}

/* --- Logo Hover --- */
.logo:hover .logo-text {
    animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

/* Title Hover (Glitch effect) */
.h1-link:hover h1 {
    animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

/* --- Mobile Menu --- */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--amber-bright);
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    opacity: 0.7;
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--amber-bright);
    transition: all 0.3s ease;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nav-bg);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

/* --- Theme Toggle --- */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 1.5rem;
}

.theme-toggle:hover {
    color: var(--amber-bright);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Hide moon in dark mode, hide sun in light mode */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Light theme specific overrides for hardcoded colors */
[data-theme="light"] .product-visual {
    background: #e5dfcf;
}

[data-theme="light"] .terminal-box {
    background: #1a1a1a;
    border-color: var(--amber-dim);
}

[data-theme="light"] .term-title-bar {
    background: #2d2d2d;
    color: var(--amber-bright);
}

[data-theme="light"] .term-body {
    color: #e0e0e0;
}

[data-theme="light"] .data-label {
    color: #888888;
}

[data-theme="light"] .data-val {
    color: var(--amber-bright);
}

[data-theme="light"] .status-pill {
    background: rgba(234, 233, 228, 0.85);
}

[data-theme="light"] .schematic-grid {
    background-image:
        linear-gradient(rgba(0, 136, 153, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 136, 153, 0.08) 1px, transparent 1px);
}

/* Light theme: reduce blink-dot glow */
[data-theme="light"] .blink-dot {
    box-shadow: 0 0 4px var(--green);
}

/* Light theme: subtle hover effects */
[data-theme="light"] .service-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 2rem;
    transition: all 0.2s;
}

.mobile-nav a:hover {
    color: var(--amber-bright);
}

.mobile-nav a.active {
    color: var(--amber-bright);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* --- Hero Section --- */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;

    /* Static Tactical Grid (Alien Green) */
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center;

    mask-image: radial-gradient(circle at center, black 30%, transparent 100%);
}

/* Center the Hero Text Properly */
.hero p {
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* H1 Cursor Animation */
.h1-cursor {
    display: inline-block;
    width: 0.6em;
    height: 0.8em;
    background: var(--amber-bright);
    margin-left: 0.1em;
    vertical-align: baseline;
    animation: cursorBlink 1s step-end infinite;
    box-shadow: none;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Status Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid var(--border-dim);
    background: rgba(18, 18, 18, 0.6);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--green);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.05);
    border-radius: 50px;
    cursor: default;
    pointer-events: none;
}

.blink-dot {
    width: 8px; height: 8px;
    background-color: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 4px var(--green);
    animation: blink 2s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-wave-container {
    width: 100%;
    max-width: 800px;
    height: 80px;
    margin: 1.5rem auto 2.5rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.hero .btn {
    margin-top: 2.5rem;
}

.hero-wave path {
    stroke: var(--amber-bright);
    stroke-width: 2.5;
    fill: none;

    /* Width calculation matches the extended SVG width */
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;

    /* Plays once on load */
    animation: drawWave 2.5s ease-out forwards;
}

@keyframes drawWave {
    to { stroke-dashoffset: 0; }
}

/* --- Console Menu (Mobile-only nav hint) --- */
.console-menu {
    display: none; /* Hidden by default, shown only on mobile */
    margin-top: 3rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    opacity: 0.6;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.console-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.console-item a:hover {
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan);
}

.console-separator {
    color: var(--border-dim);
    opacity: 0.5;
}

/* Mobile: show console menu in one line */
@media (max-width: 900px) {
    .console-menu {
        display: flex; /* Show only on mobile */
        margin-top: 2rem;
        flex-direction: row;
        gap: 0.4rem;
        opacity: 0.5;
    }

    .console-separator {
        display: none;
    }

    .console-item::after {
        content: ' ▸';
        color: var(--amber-dim);
        opacity: 0.6;
    }

    .console-item:last-child::after {
        content: '';
    }
}

/* Tablet: ensure hero shows next content */
@media (min-width: 901px) and (max-width: 1024px) {
    .hero {
        min-height: 80vh;
    }
}

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

.service-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    padding: 2.5rem;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255,158,31,0.08), transparent);
    transform: translateY(-100%);
    transition: transform 0.6s;
}
.service-card:hover::after { transform: translateY(100%); }

.service-icon {
    color: var(--amber-bright);
    width: 32px; height: 32px;
    margin-bottom: 1.5rem;
}

/* --- Products Section --- */
.product-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    margin-top: 3rem;
    align-items: center;
}

.product-visual {
    background: #08090a;
    height: 400px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid var(--border-dim);
}

.schematic-grid {
    position: absolute;
    width: 200%; height: 200%;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-100px);
}

.product-content { padding: 3rem; }

.tech-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 2rem; }
.tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-dim);
    color: var(--cyan);
    background: rgba(0, 212, 255, 0.05);
}

/* --- Philosophy Section --- */
.philosophy-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.manifesto p {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.manifesto p.highlight {
    color: var(--amber-bright);
    font-weight: 500;
}

.values-list {
    list-style: none;
    border-left: 2px solid var(--amber-dim);
    padding-left: 2rem;
}

.values-list li {
    margin-bottom: 1.5rem;
    position: relative;
}

.values-list li h4 {
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.25rem;
}

.values-list li p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* --- Contact Terminal --- */
.terminal-box {
    background: var(--bg-terminal);
    border: 1px solid var(--text-muted);
    padding: 0;
    font-family: 'IBM Plex Mono', monospace;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
}

.term-title-bar {
    background: var(--terminal-title-bg);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    gap: 0.5rem;
}

.term-title-bar > span {
    white-space: nowrap;
}

.term-body {
    padding: 2.5rem;
    color: var(--text-main);
    font-size: 0.9rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--border-dim);
    padding: 0.75rem 0;
}

.data-label { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;}
.data-val { color: var(--amber-bright); text-align: right; }

.email-block {
    margin-top: 2rem;
    border: 2px solid var(--amber-bright);
    background: rgba(255, 140, 0, 0.05);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

/* Green state: hovering the block (copy to clipboard action) */
.email-block:hover {
    background: var(--green);
    border-color: var(--green);
}

.email-block:hover .email-address {
    color: var(--bg-deep);
    text-shadow: none;
}

.email-block:hover .click-hint {
    color: var(--bg-deep);
}

/* Orange state: hovering the email link (mailto action) */
.email-block:has(.email-address:hover) {
    background: var(--amber-bright);
    border-color: var(--amber-bright);
}

.email-block:has(.email-address:hover) .email-address {
    color: var(--bg-deep);
}

.email-block:has(.email-address:hover) .click-hint {
    color: var(--bg-deep);
}

.email-address {
    font-size: clamp(0.8rem, 4.5vw, 1.25rem);
    color: var(--amber-bright);
    display: block;
    margin-bottom: 0.5rem;
    text-decoration: none;
    overflow-wrap: break-word;
    word-break: break-word;
}

.email-address:hover {
    text-decoration: underline;
}

.click-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.email-heading {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--amber-bright);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0 0 0.75rem 0;
}

.email-heading::before {
    content: '// ';
    opacity: 0.5;
}

.email-block:hover .email-heading {
    color: var(--bg-deep);
}

.email-block:has(.email-address:hover) .email-heading {
    color: var(--bg-deep);
}

.cursor-block {
    display: inline-block;
    width: 10px;
    height: 1.1em;
    background: var(--green);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--green), 0 0 10px var(--green-glow);
    vertical-align: middle;
}

/* === Newsletter Signup Form === */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.signup-block {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px dashed var(--amber-dim);
    background: rgba(255, 140, 0, 0.03);
}

.signup-block--success {
    border-style: solid;
    border-color: var(--green);
    background: rgba(0, 255, 136, 0.05);
    text-align: center;
}

.signup-heading {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--amber-bright);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.25rem 0;
}

.signup-heading::before {
    content: '// ';
    opacity: 0.5;
}

.signup-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-row {
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-dim);
    color: var(--text-main);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-input:focus {
    outline: none;
    border-color: var(--amber-bright);
    background: rgba(255, 140, 0, 0.05);
}

.form-input:focus-visible {
    box-shadow: 0 0 0 2px var(--amber-glow);
}

.form-input--error {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.signup-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
}

.signup-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(255, 140, 0, 0.05);
}

.signup-btn:disabled:hover {
    background: rgba(255, 140, 0, 0.05);
    color: var(--amber-bright);
    border-color: var(--amber-bright);
}

.signup-btn:disabled .btn-cursor {
    animation: none;
    opacity: 0.5;
}

.signup-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    align-items: flex-start;
    gap: 0.5rem;
}

.signup-message[hidden] {
    display: none;
}

.signup-message:not([hidden]) {
    display: flex;
}

.signup-message--error {
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.success-message {
    font-size: 0.9rem;
    color: var(--green);
    margin: 0;
}

.success-message .cursor-block {
    width: 0.5em;
    height: 1em;
    margin-left: 0.2em;
    vertical-align: text-bottom;
}

/* Light Theme - Signup Form */
[data-theme="light"] .signup-block {
    background: rgba(26, 26, 26, 0.95);
    border-color: var(--amber-dim);
}

[data-theme="light"] .signup-block--success {
    background: rgba(26, 26, 26, 0.95);
    border-color: var(--green);
}

[data-theme="light"] .form-input {
    background: rgba(0, 0, 0, 0.4);
    color: #e0e0e0;
}

[data-theme="light"] .form-input::placeholder {
    color: #888;
}

/* --- Footer --- */
footer {
    padding: 2.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-dim);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.footer-left {
    justify-self: start;
}

.footer-center {
    justify-self: center;
}

.footer-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-status {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-main);
    letter-spacing: 0.08em;
    margin-right: 0.75rem;
    font-weight: 600;
}

.footer-social a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border: 1px solid transparent;
}

.footer-social a:hover {
    color: var(--text-main);
    border-color: var(--border-dim);
    background: rgba(255, 255, 255, 0.05);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-copy {
    opacity: 0.5;
}

/* --- Scroll Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Fallback: show content if JS disabled or fails */
@media (scripting: none) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 900px) {
    h1 { font-size: 3rem; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    .corner-frame { display: none; }
    .product-feature, .philosophy-layout, .services-grid { grid-template-columns: 1fr; }
    .product-visual { height: 250px; border-right: none; border-bottom: 1px solid var(--border-dim); }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    .footer-left,
    .footer-center,
    .footer-right { justify-self: center; }
    .footer-right { flex-direction: column; gap: 0.75rem; }
    .footer-status { order: -1; }
    .footer-label { display: none; }
    .email-address {
        padding: 0 0.5rem;
    }
    .email-block {
        padding: 1rem;
    }
    .click-hint {
        font-size: 0.65rem;
    }
    nav { padding: 1rem 1.5rem; }
    .logo-text { font-size: 0.9rem; }
    .theme-toggle,
    .mobile-menu-btn {
        margin-left: 0;
        width: 36px;
        height: 36px;
    }

    /* Squish hero to ensure button is visible without scrolling */
    .hero {
        min-height: auto;
        padding: 6rem 0 4rem;
        /* Remove the mask fade effect on mobile - it was making the button appear faded */
        mask-image: none;
    }

    .hero-wave-container {
        height: 50px;
        margin: 0.5rem auto 1rem;
    }

    .status-pill {
        margin-bottom: 1rem;
    }

    /* Make button more prominent on mobile */
    .btn {
        background: rgba(255, 140, 0, 0.25);
        border-width: 2px;
    }
}

/* Extra small screens (iPhone SE, small phones) */
@media (max-width: 400px) {
    .term-body {
        padding: 1.5rem;
    }
    .term-title-bar {
        font-size: 0.65rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Sneaky glitch word effect */
.glitch-word {
    display: inline-block;
    position: relative;
}

.glitch-word.glitching {
    animation: glitch-shake 0.1s linear infinite;
    color: var(--cyan);
    text-shadow: 
        -1px 0 var(--amber-bright),
        1px 0 var(--green);
}

@keyframes glitch-shake {
    0%, 100% { transform: translate(0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, -1px); }
}

/* ========================================
   BLOG & PAGE STYLES
   ======================================== */

/* Page Header */
.page-header {
    padding: 7rem 0 3rem;
    border-bottom: 1px solid var(--border-dim);
}

.page-header h1 {
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
}

/* Blog Listing */
.blog-listing {
    padding: 3rem 0 6rem;
}

.posts-grid {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 4px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.post-card:hover {
    border-color: var(--amber-dim);
    transform: translateY(-2px);
}

.post-card-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.post-date {
    font-size: 0.75rem;
    color: var(--amber-bright);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.post-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0.5rem 0;
    line-height: 1.3;
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.post-card-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-small {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
}

/* Blog Post */
.blog-post {
    padding-bottom: 4rem;
}

.post-header {
    padding: 4rem 0 2rem;
    border-bottom: 1px solid var(--border-dim);
}

.back-link {
    display: inline-block;
    color: var(--amber-bright);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--amber-dim);
}

.post-header h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text-main);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.meta-separator {
    margin: 0 0.5rem;
    color: var(--border-dim);
}

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

/* Post Content */
.post-content {
    padding: 3rem 0;
}

.container-narrow {
    max-width: 750px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content h2 {
    font-size: 1.5rem;
}

.post-content h3 {
    font-size: 1.25rem;
}

.post-content h4 {
    font-size: 1.1rem;
}

.post-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.post-content a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--amber-bright);
}

.post-content blockquote {
    border-left: 3px solid var(--amber-bright);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border-dim);
    margin: 2rem 0;
}

/* Code Blocks */
.post-content code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    background: var(--bg-panel);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    color: var(--cyan);
}

.post-content pre {
    background: var(--bg-terminal);
    border: 1px solid var(--border-dim);
    border-radius: 4px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-main);
    font-size: inherit;
}

/* Syntax Highlighting (Prism-compatible) */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: var(--text-muted);
}

.token.punctuation {
    color: var(--text-main);
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: var(--amber-bright);
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: var(--green);
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: var(--text-main);
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: var(--cyan);
}

.token.function,
.token.class-name {
    color: var(--amber-bright);
}

.token.regex,
.token.important,
.token.variable {
    color: var(--amber-dim);
}

/* Post Footer */
.post-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-dim);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Tools Page */
.tools-listing {
    padding: 3rem 0 6rem;
}

.tool-card {
    text-align: left;
}

/* Products Page */
#products-list {
    padding: 3rem 0 4rem;
}

#products-list .product-feature {
    margin-bottom: 2rem;
}

#products-list h2 {
    font-size: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.feature-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--green);
    font-family: 'IBM Plex Mono', monospace;
}

/* Error Page */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Active nav link */
.nav-links a.active {
    color: var(--amber-bright);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Responsive adjustments for blog */
@media (max-width: 900px) {
    .page-header {
        padding: 5rem 0 2rem;
    }

    .post-header {
        padding: 3rem 0 1.5rem;
    }

    .post-content {
        padding: 2rem 0;
    }

    .post-header h1 {
        font-size: 1.5rem;
    }
}

/* ===== Navigation Dropdown ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-dropdown-toggle::after {
    content: '';
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    display: inline-block;
    padding: 2px;
    transform: rotate(45deg);
    margin-left: 0.4rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
    transform: rotate(-135deg);
    margin-bottom: -2px;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-dim);
    border-radius: 4px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
    margin-top: 0.5rem;
    list-style: none;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-menu li {
    padding: 0;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    color: var(--amber-bright);
    background: rgba(255, 140, 0, 0.1);
    animation: none;
}

/* Mobile Navigation Group */
.mobile-nav-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mobile-nav-parent {
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 2rem;
    transition: all 0.2s;
}

.mobile-nav-parent:hover {
    color: var(--amber-bright);
}

.mobile-nav-children {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding-bottom: 0.5rem;
}

.mobile-nav-children a {
    color: var(--text-muted);
    font-size: 1rem;
    padding: 0.5rem 2rem;
}

.mobile-nav-children a:hover {
    color: var(--amber-bright);
}

/* ===== Products Grid (Home Page) ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
}

.product-card:hover {
    border-color: var(--amber-dim);
    transform: translateY(-2px);
}

.product-card-visual {
    background: var(--bg-deep);
    border-radius: 6px;
    padding: 1rem;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-visual svg {
    width: 100%;
    height: 100%;
    max-height: 180px;
}

.product-card h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0;
}

.product-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.product-card .tech-tags {
    margin-top: 0.5rem;
}

.product-link {
    color: var(--amber-bright);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: auto;
    transition: all 0.15s ease;
}

.product-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.product-card:hover .product-link {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Status pill variants */
.status-pill--amber {
    color: var(--amber-bright);
    border-color: var(--amber-dim);
}

.status-pill--green {
    color: var(--green);
    border-color: var(--green);
}

/* ===== Product Detail Pages ===== */
.product-detail {
    padding: 2rem 0 4rem;
}

.product-detail .product-feature {
    margin-bottom: 3rem;
}

.product-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-dim);
}

.product-section h2 {
    font-size: 1.5rem;
    color: var(--amber-bright);
    margin-bottom: 1rem;
}

.product-section p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.feature-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--amber-bright);
    font-family: 'IBM Plex Mono', monospace;
}

.feature-list li strong {
    color: var(--text-main);
}

/* Workflow Steps */
.workflow-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .workflow-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .workflow-steps {
        grid-template-columns: 1fr;
    }
}

.workflow-step {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    padding: 1.25rem;
}

.step-number {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--amber-dim);
    margin-bottom: 0.5rem;
}

.workflow-step h4 {
    font-size: 1rem;
    color: var(--amber-bright);
    margin-bottom: 0.5rem;
}

.workflow-step p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    padding: 1.25rem;
}

.feature-item h4 {
    font-size: 0.95rem;
    color: var(--amber-bright);
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ===== Featured Tool Card (opcilloscope) ===== */
.tool-card-featured {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    margin-top: 2rem;
}

.tool-card-featured:hover {
    border-color: var(--amber-dim);
    transform: translateY(-2px);
}

.tool-card-featured-visual {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bg-deep);
}

.tool-card-featured-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 0.75rem;
}

.tool-card-featured-content h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin: 0;
}

.tool-card-featured-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.tool-card-featured-content .tech-tags {
    margin-top: 0.5rem;
}

.tool-card-link-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-dim);
    border-radius: 4px;
    background: transparent;
    transition: all 0.2s ease;
    width: fit-content;
    align-self: flex-start;
}

.tool-card-link-hint .github-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tool-card-featured:hover .tool-card-link-hint {
    color: var(--amber-bright);
    border-color: var(--amber-bright);
    background: rgba(255, 140, 0, 0.08);
}

/* Terminal Frame */
.terminal-frame {
    border-radius: 8px;
    overflow: hidden;
}

.terminal-frame-titlebar {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    border-bottom: 1px solid var(--border-dim);
    gap: 0.75rem;
}

.terminal-frame-dots {
    display: flex;
    gap: 6px;
}

.terminal-frame-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-frame-dots .dot-red {
    background: #ff5f56;
}

.terminal-frame-dots .dot-yellow {
    background: #ffbd2e;
}

.terminal-frame-dots .dot-green {
    background: #27c93f;
}

.terminal-frame-title {
    flex: 1;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.terminal-frame-spacer {
    width: 52px; /* Balance the dots on the left */
}

.terminal-frame-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.terminal-frame-content img {
    display: block;
    width: 280px;
    height: auto;
    image-rendering: auto;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .tool-card-featured {
        flex-direction: column;
    }

    .tool-card-featured-visual {
        padding: 1.25rem;
    }

    .terminal-frame-content img {
        width: 100%;
        max-width: 300px;
    }

    .tool-card-featured-content {
        padding: 1.5rem;
    }
}

/* Light theme adjustments for terminal frame */
[data-theme="light"] .terminal-frame {
    border-color: #333;
}

[data-theme="light"] .terminal-frame-titlebar {
    background: #2a2a2a;
}
