/* Meta Block */
.meta-block {
    margin-bottom: calc(var(--spacing-unit) * 12);
}

.meta-block p {
    font-size: var(--size-meta);
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Primary Navigation */
.primary-nav {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1.5);
    margin-bottom: auto;
}

.nav-item {
    font-size: var(--size-nav);
    color: var(--color-text-muted);
    position: relative;
    padding-left: 16px;
    font-family: var(--font-primary);
    letter-spacing: 0.02em;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-accent);
    opacity: 0;
}

.nav-item.active {
    color: var(--color-text);
}

.nav-item.active::before {
    opacity: 1;
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-unit);
    margin-top: auto;
}

.social-links a {
    font-size: var(--size-meta);
    color: var(--color-text-muted);
}

/* Page Header */
.page-header {
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.page-title {
    font-size: var(--size-title);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.page-subtitle {
    font-size: var(--size-body);
    color: var(--color-text-muted);
    font-weight: 400;
}

/* Accent text */
.accent {
    color: var(--color-accent);
}

.underline {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Content Sections */
.content-section {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.section-number {
    font-size: var(--size-meta);
    color: var(--color-accent);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    letter-spacing: 0.05em;
}

.section-title {
    font-size: var(--size-nav);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}

.content-section p {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    max-width: 540px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

/* Emphasis Line */
.emphasis-line {
    font-weight: 600;
    margin-top: calc(var(--spacing-unit) * 4);
}

.comparison-column {
    min-height: 280px;
}

.comparison-column p {
    margin-bottom: calc(var(--spacing-unit) * 1.25);
    max-width: none;
}

.comparison-heading {
    font-size: var(--size-nav);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.compact-two-col p {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.principle {
    padding-bottom: calc(var(--spacing-unit) * 3);
}

.principle-number {
    font-size: var(--size-meta);
    color: var(--color-accent);
    display: block;
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.principle h3 {
    font-size: var(--size-body);
    font-weight: 500;
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.principle p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* Services Compact */
.services-compact {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
}

.service-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: calc(var(--spacing-unit) * 4);
    padding: calc(var(--spacing-unit) * 2) 0;
    border-bottom: 1px solid var(--color-border);
}

.service-row:first-child {
    border-top: 1px solid var(--color-border);
}

.service-name {
    font-weight: 500;
    color: var(--color-accent);
}

.service-desc {
    color: var(--color-text-muted);
    font-size: 14px;
}

/* Work Compact */
.work-compact {
    display: flex;
    flex-direction: column;
}

.work-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: calc(var(--spacing-unit) * 4);
    padding: calc(var(--spacing-unit) * 3) 0;
    border-bottom: 1px solid var(--color-border);
}

.work-row:first-child {
    border-top: 1px solid var(--color-border);
}

.work-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.work-role {
    font-weight: 500;
}

.work-company,
.work-date {
    font-size: var(--size-meta);
    color: var(--color-text-muted);
}

.work-highlight {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* CTA Row */
.cta-row {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 2);
}

.meta-label {
    font-size: var(--size-meta);
    color: var(--color-text-muted);
    margin-bottom: calc(var(--spacing-unit) * 1);
}

/* Closing Section */
.closing-section {
    margin-top: calc(var(--spacing-unit) * 8);
    padding-top: calc(var(--spacing-unit) * 4);
    border-top: 1px solid var(--color-border);
}

.closing-line {
    font-size: var(--size-section);
    font-weight: 400;
    color: var(--color-text-muted);
}

/* CTA Button */
.cta-button {
    display: inline-block;
    font-size: var(--size-nav);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    border: 1px solid var(--color-accent);
    background: transparent;
    color: var(--color-accent);
    cursor: pointer;
    margin-top: calc(var(--spacing-unit) * 3);
}

/* Large Quote */
.large-quote {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.3;
    max-width: 500px;
}

/* Stats */
.stats-row {
    display: flex;
    gap: calc(var(--spacing-unit) * 6);
    margin: calc(var(--spacing-unit) * 3) 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 28px;
    font-weight: 500;
    color: var(--color-accent);
    white-space: nowrap;
}

.stat-label {
    font-size: var(--size-meta);
    color: var(--color-text-muted);
}

/* Work Items */
.work-item {
    padding: calc(var(--spacing-unit) * 3) 0;
    border-bottom: 1px solid var(--color-border);
}

.work-item:first-child {
    border-top: 1px solid var(--color-border);
}

.work-header {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.work-header h3 {
    font-size: var(--size-body);
    font-weight: 500;
    margin-bottom: calc(var(--spacing-unit) * 0.25);
}

.work-role {
    display: block;
    font-size: var(--size-meta);
    color: var(--color-text-muted);
}

.work-period {
    display: block;
    font-size: var(--size-meta);
    color: var(--color-text-muted);
}

.work-highlight {
    margin-bottom: calc(var(--spacing-unit) * 2);
    max-width: 540px;
}

.work-phase {
    margin-top: calc(var(--spacing-unit) * 2);
}

.work-phase-label {
    font-size: var(--size-meta);
    color: var(--color-accent);
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.work-details {
    margin-top: calc(var(--spacing-unit) * 1);
}

.work-details p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: calc(var(--spacing-unit) * 1);
    max-width: 540px;
}

.work-details p:last-child {
    margin-bottom: 0;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 24px;
    left: 24px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.mobile-nav-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    background-color: var(--color-text);
}

/* ===========================================
   ARTICLES LIST PAGE (/articles)
   =========================================== */

/* Post list container */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Article card */
.post-list-item {
    display: block;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: transparent;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

.post-list-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.post-list-item:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Card header */
.post-list-item-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

/* Card title */
.post-list-item-title {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-text);
    margin: 0;
}

/* Card date */
.post-list-item-date {
    font-size: 14px;
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* Card description */
.post-list-item-description {
    font-size: 18px;
    line-height: 1.45;
    color: var(--color-text);
    opacity: 0.9;
    margin: 0;
    max-width: none;
}

/* ===========================================
   SINGLE ARTICLE PAGE (/articles/[slug])
   =========================================== */

/* Article container */
.post {
    max-width: 700px;
}

/* Article header */
.post-header {
    margin-bottom: 28px;
}

.post-title {
    font-size: var(--size-title);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.post-date {
    font-size: 15px;
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* Back link */
.back-link {
    display: inline-block;
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: calc(var(--spacing-unit) * 6);
    padding-top: calc(var(--spacing-unit) * 4);
    border-top: 1px solid var(--color-border);
    transition: color 0.2s ease;
}

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

.back-link-top {
    display: block;
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 3);
    padding-top: 0;
    border-top: none;
}

/* Post description (under date) */
.post-description {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-top: 12px;
    line-height: 1.5;
}

/* ===========================================
   ARTICLE BODY TYPOGRAPHY (Markdown)
   =========================================== */

.post-content {
    font-size: 18px;
    line-height: 1.6;
}

/* Paragraphs */
.post-content p {
    margin-bottom: 16px;
    max-width: none;
}

.post-content p:last-child {
    margin-bottom: 0;
}

/* Headings */
.post-content h2 {
    font-size: 28px;
    font-weight: 500;
    margin-top: 40px;
    margin-bottom: 14px;
    line-height: 1.2;
}

.post-content h3 {
    font-size: 21px;
    font-weight: 500;
    margin-top: 32px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-content h4 {
    font-size: 18px;
    font-weight: 500;
    margin-top: 24px;
    margin-bottom: 8px;
}

/* Lists */
.post-content ul,
.post-content ol {
    margin-bottom: 16px;
    padding-left: 0;
    list-style: none;
}

.post-content li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.post-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-text-muted);
}

.post-content ol {
    counter-reset: list-counter;
}

.post-content ol li {
    counter-increment: list-counter;
}

.post-content ol li::before {
    content: counter(list-counter) '.';
    font-size: 14px;
}

/* Links */
.post-content a {
    color: var(--color-text);
    opacity: 0.85;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.post-content a:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Blockquotes */
.post-content blockquote {
    margin: 24px 0;
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-text-muted);
    font-style: normal;
}

.post-content blockquote p {
    margin-bottom: 0;
}

/* Code - inline */
.post-content code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Code blocks */
.post-content pre {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    margin: 20px 0;
    overflow-x: auto;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Horizontal rule */
.post-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 32px 0;
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* Strong and emphasis */
.post-content strong {
    font-weight: 600;
}

.post-content em {
    font-style: italic;
}

/* ===========================================
   APPROACH GRID (Home Page)
   =========================================== */

.approach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 3);
}

.approach-grid > div {
    padding: calc(var(--spacing-unit) * 2) 0;
}

.approach-connection {
    grid-column: 1 / -1;
    padding-top: calc(var(--spacing-unit) * 3) !important;
    margin-top: calc(var(--spacing-unit) * 1);
    border-top: 1px solid var(--color-border);
}

/* ===========================================
   FOUNDATION ITEMS (Foundations Page)
   =========================================== */

.foundation-item {
    padding-bottom: calc(var(--spacing-unit) * 1);
}

.foundation-item h3 {
    font-size: var(--size-body);
    font-weight: 500;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.foundation-item p {
    margin-bottom: calc(var(--spacing-unit) * 1.25);
}

.foundation-item p:last-child {
    margin-bottom: 0;
}

/* ===========================================
   SERVICE BLOCKS (Services Page)
   =========================================== */

.service-block {
    padding-bottom: calc(var(--spacing-unit) * 1);
}

.service-number {
    font-size: var(--size-meta);
    color: var(--color-accent);
    display: block;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.service-block h3 {
    font-size: var(--size-body);
    font-weight: 500;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.service-detail {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.service-detail:last-child {
    margin-bottom: 0;
}

.service-detail p {
    margin-bottom: calc(var(--spacing-unit) * 0.75);
}

.service-detail p:last-child {
    margin-bottom: 0;
}

/* ===========================================
   RULES DRAWER (Foundations Page)
   =========================================== */

/* Handle - fixed to right edge */
.rules-handle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 1.5);
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: var(--font-primary);
    font-size: var(--size-meta);
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.rules-handle:hover,
.rules-handle:focus {
    color: var(--color-text);
    border-color: var(--color-text-muted);
    outline: none;
}

.rules-handle:focus-visible {
    outline: 1px solid var(--color-text-muted);
    outline-offset: 2px;
}

.rules-handle[aria-expanded="true"] {
    opacity: 0;
    pointer-events: none;
}

/* Drawer */
.rules-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 33vw;
    max-width: 420px;
    min-width: 300px;
    height: 100vh;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    z-index: 1002;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    overflow-y: auto;
}

.rules-drawer.open {
    transform: translateX(0);
    opacity: 1;
}

.rules-drawer-inner {
    padding: calc(var(--spacing-unit) * 6);
}

.rules-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: calc(var(--spacing-unit) * 5);
}

.rules-drawer-title {
    font-size: var(--size-body);
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    padding-right: calc(var(--spacing-unit) * 2);
}

.rules-drawer-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
}

.rules-drawer-close:hover,
.rules-drawer-close:focus {
    color: var(--color-text);
    outline: none;
}

.rules-drawer-close:focus-visible {
    outline: 1px solid var(--color-text-muted);
    outline-offset: 2px;
}

.rules-drawer-content {
    padding-top: calc(var(--spacing-unit) * 2);
}

/* Overlay */
.rules-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
}

.rules-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Rule items */
.rule-item {
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-size: var(--size-body);
    line-height: 1.6;
}

.rule-item:last-child {
    margin-bottom: 0;
}

.rule-item strong {
    font-weight: 500;
    color: var(--color-text);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rules-drawer {
        transition: none;
    }
    .rules-drawer-overlay {
        transition: none;
    }
    .rules-handle {
        transition: none;
    }
}

