/* SwapHunt – Restrained but alive */

:root {
    --bg: #0d1117;
    --bg-card: #161b22;
    --border: #30363d;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    --radius: 12px;
    --transition: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: #8b9ff5;
}

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

/* Header */
.site-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: var(--accent-gradient);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 16px;
    height: 16px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

/* Navigation */
.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

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

/* Main content */
main {
    padding: 5rem 0;
}

/* Intro section */
.intro {
    margin-bottom: 4rem;
}

.intro h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.intro h1 .gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Home page */
.home-highlight {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.home-highlight blockquote {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text);
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent);
}

.home-highlight p {
    color: var(--text-muted);
    margin: 0;
}

.home-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.home-boxes-full {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .home-boxes-full {
        grid-template-columns: 1fr;
    }
}

.home-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all var(--transition);
}

.home-box:hover {
    border-color: #444c56;
}

.home-box h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.home-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.home-box-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.home-section {
    margin-bottom: 3rem;
    max-width: 700px;
}

.home-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.home-section p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.home-list {
    list-style: none;
    margin: 1rem 0 1.5rem 0;
    padding-left: 0;
}

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

.home-list li::before {
    content: "·";
    position: absolute;
    left: 0.25rem;
    color: var(--accent);
    font-weight: bold;
}

.home-closing {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.home-closing p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* Link row */
.link-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.link-row a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all var(--transition);
}

.link-row a:hover {
    border-color: var(--accent);
    background: rgba(102, 126, 234, 0.1);
}

/* Feature cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: #444c56;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-card .icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

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

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

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

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition);
}

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

.footer-divider {
    width: 1px;
    height: 12px;
    background: var(--border);
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Page header */
.page-header {
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Legal pages */
.legal-page {
    max-width: 700px;
}

.legal-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 3rem;
}

.legal-page section {
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.legal-page p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.legal-page ul {
    list-style: none;
    margin: 1rem 0 1.5rem 0;
    padding-left: 0;
}

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

.legal-page li::before {
    content: "·";
    position: absolute;
    left: 0.25rem;
    color: var(--accent);
    font-weight: bold;
}

.legal-page a {
    color: var(--accent);
}

.legal-page .tldr {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2.5rem;
}

.legal-page .tldr p {
    margin-bottom: 0;
    color: var(--text);
}

.legal-entity {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Tools page */
.tools-page {
    max-width: 900px;
}

.tools-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.tools-intro {
    margin-bottom: 3rem;
}

.tools-intro p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.tools-category {
    margin-bottom: 3rem;
}

.tools-category h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.tools-category-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    margin-top: -0.5rem;
}

.tools-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.tool-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}

.tool-box:hover {
    border-color: #444c56;
}

.tool-box h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

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

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}

.tool-card:hover {
    border-color: #444c56;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tool-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.tool-badge {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(102, 126, 234, 0.15);
    color: var(--accent);
}

.tool-badge:contains("Beta") {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.tool-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.tool-link:hover {
    text-decoration: underline;
}

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

.tools-note a {
    color: var(--accent);
}

/* Articles page */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.article-card:last-child {
    border-bottom: none;
}

.article-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-card);
}

.article-image.placeholder {
    background: linear-gradient(135deg, var(--bg-card) 0%, #1e2430 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-image.placeholder::after {
    content: '';
    width: 40px;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23444c56' stroke-width='1.5'%3E%3Cpolyline points='22,7 13.5,15.5 8.5,10.5 2,17'/%3E%3Cpolyline points='16,7 22,7 22,13'/%3E%3C/svg%3E") no-repeat center;
    opacity: 0.5;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity var(--transition);
}

.article-card:hover .article-image img {
    opacity: 1;
}

.article-content time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.article-content h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.article-content h2 a {
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}

.article-content h2 a:hover {
    color: var(--accent);
}

.article-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Article single page */
.article-page {
    max-width: 700px;
}

.article-header {
    margin-bottom: 3rem;
}

.article-header time {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.article-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.75rem 0 1rem;
    line-height: 1.3;
}

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

.article-body {
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-card);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* Article tags */
.article-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.8rem;
    color: var(--accent);
    background: rgba(102, 126, 234, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Share section */
.share-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.share-section h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Share section */
.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.share-section h4 {
    display: none;
}

.share-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
}

.share-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.share-btn.twitter:hover {
    color: #1da1f2;
    border-color: #1da1f2;
}

.share-btn.linkedin:hover {
    color: #0077b5;
    border-color: #0077b5;
}

.share-btn.copy:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Article body styling */
.article-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text);
}

.article-body p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Uses page */
.uses-section {
    margin-bottom: 3rem;
}

.uses-section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.uses-list {
    list-style: none;
}

.uses-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.uses-list li:last-child {
    border-bottom: none;
}

.uses-list a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.uses-list a:hover {
    color: var(--accent);
}

.uses-list span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.uses-note {
    margin-top: 3rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.uses-page {
    max-width: 700px;
}

.uses-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.uses-intro {
    margin-bottom: 3rem;
}

.uses-intro p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.uses-section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* About page */
.about-page {
    max-width: 700px;
}

.about-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.about-intro {
    margin-bottom: 3rem;
}

.about-intro p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.about-section p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.about-section a {
    color: var(--accent);
}

.about-list {
    list-style: none;
    margin: 1rem 0 1.5rem 0;
    padding-left: 0;
}

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

.about-list li::before {
    content: "·";
    position: absolute;
    left: 0.25rem;
    color: var(--accent);
    font-weight: bold;
}

.about-note {
    margin-top: 3rem;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1.5rem;
    }

    main {
        padding: 3rem 0;
    }

    .intro h1 {
        font-size: 2rem;
    }

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

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

    .article-card {
        grid-template-columns: 1fr;
    }

    .article-image {
        max-width: 280px;
    }

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