/* Fonts */
@font-face {
    font-family: 'Neue Haas Grotesk';
    src: url('../fonts/neuehaasgrotdisp-55roman-trial.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Neue Haas Grotesk';
    src: url('../fonts/neuehaasgrotdisp-56italic-trial.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Neue Haas Grotesk';
    src: url('../fonts/neuehaasgrotdisp-65medium-trial.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Neue Haas Grotesk';
    src: url('../fonts/neuehaasgrotdisp-75bold-trial.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

/* Base styles scoped to .container to avoid affecting navbar/footer */
.container {
    font-family: 'Neue Haas Grotesk', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Container - centered single column like Medium/Substack */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 24px;
    position: relative;
}

/* Engineering grid overlay - subtle */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(to right, rgba(23, 74, 194, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(23, 74, 194, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: -1;
}

/* Typography */
.container h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.container h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 2rem;
}

/* Engineering-style reference marks */
.container h2::before {
    content: '//';
    position: absolute;
    left: 0;
    top: 9px;
    color: #174AC2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.3em;
    line-height: 1;
}

.container p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: #444;
}

/* Section spacing */
.container section {
    margin-bottom: 3rem;
}

/* Links */
.container a {
    color: #174AC2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.container a:hover {
    color: #0d3589;
    text-decoration: underline;
}

.pseudo-link {
    color: #174AC2;
    cursor: pointer;
}

/* Highlights */
.container mark {
    background: rgba(255, 235, 120, 0.4);
    padding: 2px 4px;
    border-radius: 2px;
    color: inherit;
    font-weight: 500;
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #f0f0f0;
    border: 1px solid #174AC2;
    border-radius: 2px;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: #e0e0e0;
}

.theme-toggle .sun {
    display: block;
}

.theme-toggle .moon {
    display: none;
}

/* Image placeholders */
.image-placeholder {
    width: 100%;
    height: 300px;
    background: #f5f5f5;
    margin: 3rem 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    position: relative;
}

/* Technical corner marks */
.image-placeholder::before,
.image-placeholder::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1px solid #174AC2;
}

.image-placeholder::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.image-placeholder::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

/* Dark mode styles */
html[data-theme="dark"] .container {
    color: #e0e0e0;
}

html[data-theme="dark"] .container h1,
html[data-theme="dark"] .container h2 {
    color: #f0f0f0;
}

html[data-theme="dark"] .container p {
    color: #c0c0c0;
}

html[data-theme="dark"] .container a {
    color: #66b3ff;
}

html[data-theme="dark"] .container a:hover {
    color: #99ccff;
}

html[data-theme="dark"] .theme-toggle {
    background: #2a2a2a;
    border-color: #444;
}

html[data-theme="dark"] .theme-toggle:hover {
    background: #333;
}

html[data-theme="dark"] .theme-toggle:hover {
    background: #333;
}

html[data-theme="dark"] .theme-toggle .sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle .moon {
    display: block;
}

html[data-theme="dark"] .image-placeholder {
    background: #2a2a2a;
    color: #666;
}

html[data-theme="dark"] .container::before {
    background-image:
        linear-gradient(to right, rgba(102, 179, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(102, 179, 255, 0.05) 1px, transparent 1px);
}

html[data-theme="dark"] .container h2::before {
    color: #66b3ff;
}

html[data-theme="dark"] .image-placeholder::before,
html[data-theme="dark"] .image-placeholder::after {
    border-color: #66b3ff;
}

html[data-theme="dark"] .theme-toggle {
    background: #2a2a2a;
    border-color: #66b3ff;
}

html[data-theme="dark"] .theme-toggle {
    background: #2a2a2a;
    border-color: #66b3ff;
}

html[data-theme="dark"] .container mark {
    background: rgba(255, 235, 120, 0.2);
    color: #f0f0f0;
}
