/* ==================== UNIVERSAL STYLES - ALL PAGES ==================== */

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-indigo: #141d44;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    line-height: 1.4;
    color: var(--white);
    background: var(--deep-indigo);
}

/* ==================== TYPOGRAPHY ==================== */
h1 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 72px;
    font-weight: normal;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 0;
}

h2 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 48px;
    font-weight: normal;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 32px;
}

h3 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 32px;
    font-weight: normal;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 24px;
}

h4 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    font-weight: normal;
    line-height: 1.4;
    margin-bottom: 16px;
}

p {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 24px;
}

strong {
    font-weight: normal;
}

/* ==================== LINKS ==================== */
a {
    color: var(--white);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

/* ==================== NAVIGATION (INDEX PAGE) ==================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--deep-indigo);
    padding: 24px 40px;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.logo {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    font-weight: normal;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    justify-self: end;
    align-items: center;
}

.nav-links a {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    font-weight: normal;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Language Toggle */
.lang-toggle {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    font-weight: normal;
    color: var(--white);
    background: transparent;
    border: 1px solid var(--white);
    padding: 8px 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
}

.lang-toggle:hover {
    opacity: 0.7;
}

/* ==================== RTL SUPPORT (INDEX PAGE) ==================== */
[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] nav {
    grid-template-columns: 1fr 1fr;
}

[dir="rtl"] .logo {
    justify-self: end;
}

[dir="rtl"] .nav-links {
    justify-self: start;
    flex-direction: row-reverse;
}

[dir="rtl"] .main-grid {
    direction: rtl;
}

[dir="rtl"] .links-grid {
    direction: rtl;
}

[dir="rtl"] .link-item {
    text-align: right;
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ==================== HERO SECTION (INDEX PAGE) ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
}

.hero-content {
    text-align: center;
}

.hero-image {
    margin-top: 48px;
    width: 100%;
    max-width: 800px;
    height: auto;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==================== MAIN CONTENT GRID (INDEX PAGE) ==================== */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 96px 0;
}

.section-title {
    grid-column: 1 / -1;
}

/* ==================== LINKS SECTION (INDEX PAGE) ==================== */
.links-section {
    padding: 96px 0;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 64px;
}

.link-item {
    padding: 48px 32px;
    text-align: left;
}

.link-item h3 {
    margin-bottom: 16px;
}

.link-item a {
    font-size: 20px;
    font-weight: normal;
    display: inline-block;
    margin-top: 24px;
}

/* ==================== PORTFOLIO PAGE STYLES ==================== */

/* Header for portfolio */
header {
    margin-bottom: 64px;
    text-align: center;
}

.subtitle {
    margin-top: 16px;
    margin-bottom: 32px;
    font-size: 18px;
}

/* Week sections */
.week-section {
    margin-bottom: 96px;
}

.week-description {
    margin-bottom: 32px;
    opacity: 0.9;
}

/* Chart sections */
.chart-section {
    margin-bottom: 64px;
}

.chart-description {
    margin-bottom: 24px;
}

/* Figures / Charts */
figure {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    margin: 0 0 32px 0;
    transition: all 0.3s ease;
}

figure:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Chart grid for CC6 dashboard */
div[style*="grid-template-columns"] figure {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
}

/* ==================== FOOTER ==================== */
footer {
    padding: 48px 0;
    text-align: center;
}

footer p {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    h1 {
        font-size: 56px;
    }

    h2 {
        font-size: 40px;
    }

    .main-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .link-item {
        padding: 32px 24px;
    }
    
    .hero-image {
        max-width: 600px;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        padding: 20px;
    }

    nav {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }

    .nav-links {
        justify-self: start;
        gap: 24px;
    }

    h1 {
        font-size: 40px;
        letter-spacing: 0.02em;
    }

    h2 {
        font-size: 32px;
        margin-top: 48px;
    }

    h3 {
        font-size: 24px;
        margin-top: 32px;
    }
    
    h4 {
        font-size: 18px;
    }

    .container {
        padding: 0 20px;
    }

    .main-grid,
    .links-section {
        padding: 64px 0;
    }

    .link-item {
        padding: 32px 24px;
    }
    
    .week-section {
        margin-bottom: 64px;
    }
    
    /* Make CC6 dashboard single column on mobile */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
        margin-top: 32px;
    }
    
    h3 {
        font-size: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 16px;
    }

    .nav-links a {
        font-size: 14px;
    }
}

