/* /css/style.css */

/* --------------------------------------------------
   1. Global Styles & Variables
   -------------------------------------------------- */
:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --primary-color: #f7931a;
    /* Bitcoin Orange */
    --card-bg-color: #1e1e1e;
    --border-color: #333;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}


/* --------------------------------------------------
   2. Layout & Common Elements
   -------------------------------------------------- */
.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    flex-grow: 1;
}

/* --- Language Switcher --- */
.lang-switcher {
    text-align: right;
    margin-bottom: 2rem;
}

.lang-switcher button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    border-radius: 5px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.lang-switcher button.active {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
    opacity: 1;
    font-weight: bold;
}

/* --- Footer --- */
.main-footer {
    width: 100%;
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    opacity: 0.6;
    margin-top: auto;
}

.main-footer a {
    margin: 0 0.75rem;
}


/* --------------------------------------------------
   3. Page-Specific Styles
   -------------------------------------------------- */

/* --- Homepage (/index.html) --- */
.hero-header {
    text-align: center;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-header h1 {
    font-family: 'Fira Code', monospace;
    font-size: 3rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(247, 147, 26, 0.3);
}

.hero-header h2 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.transaction-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.detail-card {
    background-color: var(--card-bg-color);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 200px;
    text-align: left;
}

.detail-card span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 0.25rem;
}

.detail-card strong {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
}

.cta-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cta-link:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    opacity: 1;
}

.projects-hub {
    padding: 4rem 0;
    text-align: center;
}

.projects-hub h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.project-card {
    background-color: var(--card-bg-color);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.project-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.project-card h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    opacity: 0.7;
}

/* --- Article Pages (About, Legacy, etc.) --- */
.about-page .container {
    max-width: 800px;
}

.about-page h1,
.about-page h2,
.about-page h3 {
    line-height: 1.3;
    margin: 2rem 0 1rem 0;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
}

.about-page h1 {
    font-size: 2.5rem;
}

.about-page h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.about-page p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-page strong {
    color: var(--text-color);
    font-weight: 700;
}

.about-page blockquote {
    border-left: 3px solid var(--primary-color);
    margin: 1.5rem 0;
    padding: 0.5rem 1.5rem;
    background-color: var(--card-bg-color);
    font-style: italic;
    opacity: 0.9;
}

.about-page .mono {
    font-family: 'Fira Code', monospace;
    background: var(--card-bg-color);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.about-page .back-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: bold;
}

.about-page ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.about-page li {
    margin-bottom: 0.5rem;
}

.diagram {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin: 2rem 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    white-space: pre;
    overflow-x: auto;
    border-radius: 8px;
}

/* --- Timeline Page (/timeline/) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-color);
    border: 3px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid var(--border-color);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--border-color);
}

.timeline-item.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid var(--border-color);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--border-color) transparent transparent;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--card-bg-color);
    position: relative;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.timeline-content h2 {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}

.timeline-content p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* --- BTC Dashboard Page (/btc/) --- */
.btc-dashboard-body {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.dashboard {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem 3rem;
    min-width: 320px;
}

.dashboard .price-label {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.dashboard .price-display {
    font-family: 'Fira Code', monospace;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: font-size 0.3s ease;
}

.dashboard .metrics {
    display: flex;
    justify-content: space-around;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.dashboard .metric span {
    display: block;
    opacity: 0.6;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.dashboard .change.positive {
    color: #2ecc71;
}

.dashboard .change.negative {
    color: #e74c3c;
}


/* --------------------------------------------------
   4. Responsive Design (Mobile First)
   -------------------------------------------------- */
@media screen and (max-width: 768px) {

    /* --- General --- */
    .container {
        padding: 1.5rem 1rem;
    }

    /* --- Homepage --- */
    .hero-header h1 {
        font-size: 2rem;
    }

    .hero-header h2 {
        font-size: 1rem;
    }

    .transaction-details {
        flex-direction: column;
        align-items: center;
    }

    /* --- Article Pages --- */
    .about-page h1 {
        font-size: 2rem;
    }

    .about-page h2 {
        font-size: 1.5rem;
    }

    /* --- Timeline Page --- */
    .timeline::after {
        left: 21px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 15px;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0%;
    }

    .timeline-item.left::before,
    .timeline-item.right::before {
        left: 50px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--border-color) transparent transparent;
    }

    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 11px;
    }

    /* --- BTC Dashboard --- */
    .dashboard {
        padding: 2rem 1.5rem;
        border: none;
        background: none;
    }

    .dashboard .price-display {
        font-size: 2.8rem;
    }
}