:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1e;
    --text-primary: #e8e6e3;
    --text-secondary: #9a9590;
    --text-muted: #5a5550;
    --accent-warm: #e8a33c;
    --accent-glow: #f0b955;
    --accent-subtle: #2a2018;
    --border: #222225;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

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

/* Navigation */
nav {
    position: fixed; top: 0; width: 100%; z-index: 100;
    padding: 1.25rem 2rem;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}

.nav-logo {
    font-weight: 600; font-size: 1rem; letter-spacing: 0.02em;
    color: var(--text-primary); text-decoration: none;
}
.nav-logo span { color: var(--accent-warm); }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.875rem; font-weight: 400; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

/* Sections */
section { max-width: 860px; margin: 0 auto; padding: 0 2rem; }

/* Hero with image */
.hero-wrapper {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-bg {
    position: absolute; top: 0; right: -10%; bottom: 0;
    width: 55%; opacity: 0.3;
    background: url('sun-magnetic-field.jpg') center center / contain no-repeat;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.8) 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.8) 20%, transparent 70%);
    pointer-events: none;
}

.hero {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding-top: 5rem;
}

.hero-eyebrow {
    font-family: var(--font-mono); font-size: 0.8rem;
    color: var(--accent-warm); letter-spacing: 0.08em;
    text-transform: uppercase; margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700;
    line-height: 1.15; margin-bottom: 1.75rem; letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--accent-warm); }

.hero-subtitle {
    font-size: 1.15rem; color: var(--text-secondary);
    max-width: 600px; line-height: 1.8; margin-bottom: 3rem;
}

.hero-cta {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--accent-warm); font-size: 0.9rem; font-weight: 500;
    text-decoration: none; transition: gap 0.2s;
}
.hero-cta:hover { gap: 0.75rem; }
.hero-cta svg { width: 30px; height: 30px; }

/* Divider */
.section-divider { max-width: 860px; margin: 0 auto; padding: 0 2rem; }
.section-divider hr { border: none; border-top: 1px solid var(--border); }

/* Section labels */
.section-label {
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--text-muted); letter-spacing: 0.1em;
    text-transform: uppercase; margin-bottom: 2rem;
}

/* Research */
.research { padding-top: 6rem; padding-bottom: 6rem; }
.research h2 { font-size: 1.75rem; font-weight: 600; margin-bottom: 1.5rem; }
.research > p { color: var(--text-secondary); margin-bottom: 1.25rem; max-width: 680px; }

.research-items {
    margin-top: 3rem; display: flex; flex-direction: column; gap: 1.5rem;
}

.research-item {
    display: flex; gap: 1.5rem; padding: 1.5rem;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 8px; transition: border-color 0.2s;
}
.research-item:hover { border-color: var(--accent-subtle); }

.research-item-marker {
    font-family: var(--font-mono); font-size: 0.8rem;
    color: var(--accent-warm); padding-top: 0.15rem;
    flex-shrink: 0; width: 24px;
}
.research-item h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; }
.research-item p {
    font-size: 0.875rem; color: var(--text-secondary);
    line-height: 1.65; margin-bottom: 0;
}

/* Writings section */
.writings { padding-top: 6rem; padding-bottom: 6rem; }
.writings h2 { font-size: 1.75rem; font-weight: 600; margin-bottom: 1.5rem; }
.writings > p { color: var(--text-secondary); margin-bottom: 1.25rem; max-width: 680px; }

.writing-cards {
    margin-top: 3rem; display: flex; flex-direction: column; gap: 1.5rem;
}

.writing-card {
    padding: 2rem;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 8px; transition: border-color 0.2s;
}
.writing-card:hover { border-color: var(--accent-subtle); }

.writing-card-meta {
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--text-muted); letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.writing-card h3 {
    font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem;
    line-height: 1.35;
}

.writing-card .lede {
    font-size: 0.925rem; color: var(--text-secondary);
    line-height: 1.7; margin-bottom: 1.5rem; max-width: 680px;
}

.read-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--accent-warm); font-size: 0.875rem; font-weight: 500;
    text-decoration: none; transition: gap 0.2s;
}
.read-link:hover { gap: 0.75rem; }
.read-link svg { width: 30px; height: 30px; }

/* Product section */
.product { padding-top: 6rem; padding-bottom: 6rem; }
.product h2 { font-size: 1.75rem; font-weight: 600; margin-bottom: 1.5rem; letter-spacing: -0.01em; }
.product > p { color: var(--text-secondary); margin-bottom: 1.25rem; max-width: 680px; }
.product > p strong { color: var(--text-primary); font-weight: 500; }

.capabilities {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem; margin-top: 3rem;
}
.capability {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 8px; padding: 1.5rem; transition: border-color 0.2s;
}
.capability:hover { border-color: var(--accent-subtle); }
.capability h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.75rem; }
.capability p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 0; }

/* Sun image feature */
.sun-feature {
    margin-top: 4rem; padding: 2rem;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 8px; display: flex; gap: 2rem; align-items: center;
}
.sun-feature img {
    width: 180px; height: 180px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    box-shadow: 0 0 40px rgba(212, 135, 28, 0.15);
}
.sun-feature-text { flex: 1; }
.sun-feature-text h3 {
    font-size: 0.95rem; font-weight: 600; margin-bottom: 0.75rem;
    color: var(--accent-warm);
}
.sun-feature-text p {
    font-size: 0.85rem; color: var(--text-secondary); line-height: 1.65;
}
.sun-feature-text .credit {
    font-size: 0.75rem; color: var(--text-muted); margin-top: 0.75rem;
}

/* About */
.company { padding-top: 6rem; padding-bottom: 6rem; }
.company h2 { font-size: 1.75rem; font-weight: 600; margin-bottom: 1.5rem; }
.company > p { color: var(--text-secondary); margin-bottom: 1.25rem; max-width: 680px; }

/* Contact */
.contact { padding-top: 6rem; padding-bottom: 8rem; }
.contact h2 { font-size: 1.75rem; font-weight: 600; margin-bottom: 1.5rem; }
.contact > p { color: var(--text-secondary); margin-bottom: 2rem; max-width: 680px; }

.contact-email {
    display: inline-flex; align-items: center; gap: 0.75rem;
    color: var(--accent-warm); font-size: 1.1rem; font-weight: 500;
    text-decoration: none; padding: 0.75rem 1.5rem;
    background: var(--accent-subtle);
    border: 1px solid rgba(212, 135, 28, 0.2); border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}
.contact-email:hover {
    background: rgba(212, 135, 28, 0.12);
    border-color: rgba(212, 135, 28, 0.35);
}

/* Listing pages (Research, Writings, Works) */
section.listing-page { padding-top: 10rem; padding-bottom: 6rem; }

.listing-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.listing-header h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700;
    line-height: 1.25; margin-bottom: 0.75rem; letter-spacing: -0.01em;
}
.listing-header p {
    font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8;
    max-width: 680px;
}

.listing-items {
    display: flex; flex-direction: column; gap: 1.5rem;
}

.listing-card {
    padding: 2rem;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 8px; transition: border-color 0.2s;
}
.listing-card:hover { border-color: var(--accent-subtle); }

.listing-card-meta {
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--text-muted); letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.listing-card h3 {
    font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem;
    line-height: 1.35;
}
.listing-card p {
    font-size: 0.925rem; color: var(--text-secondary);
    line-height: 1.7; margin-bottom: 1.5rem; max-width: 680px;
}
.listing-card p:last-of-type { margin-bottom: 1.5rem; }

.listing-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Preview cards on main page */
.preview-cards {
    margin-top: 2rem; display: flex; flex-direction: column; gap: 1.5rem;
}

.section-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--accent-warm); font-size: 0.875rem; font-weight: 500;
    text-decoration: none; transition: gap 0.2s;
    margin-top: 1rem;
}
.section-link:hover { gap: 0.75rem; }
.section-link svg { width: 30px; height: 30px; }

/* Essay pages */
section.essay-page { padding-top: 10rem; padding-bottom: 6rem; }

.essay-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.essay-header h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700;
    line-height: 1.25; margin-bottom: 0.75rem; letter-spacing: -0.01em;
}
.essay-header .essay-byline {
    font-size: 0.875rem; color: var(--text-muted);
}
.essay-header .essay-byline em { font-style: italic; }

.essay-body h2 {
    font-size: 1.15rem; font-weight: 600; margin-top: 3rem; margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.essay-body p {
    font-size: 0.95rem; color: var(--text-secondary);
    line-height: 1.85; margin-bottom: 1.25rem; max-width: 720px;
}

.essay-body p strong { color: var(--text-primary); font-weight: 500; }
.essay-body p em { font-style: italic; color: var(--text-primary); }

.essay-body .essay-divider {
    border: none; border-top: 1px solid var(--border);
    margin: 2.5rem 0; max-width: 720px;
}

.essay-body .essay-author-note {
    font-size: 0.85rem; color: var(--text-muted);
    font-style: italic; margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    max-width: 720px;
}
.essay-body .essay-author-note a { color: var(--accent-warm); }

.essay-back {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--text-muted); font-size: 0.8rem; font-weight: 400;
    text-decoration: none; transition: color 0.2s;
    margin-top: 3rem;
}
.essay-back:hover { color: var(--text-secondary); }
.essay-back svg { width: 10px; height: 10px; transform: rotate(180deg); }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 2rem; text-align: center; }
footer p { font-size: 0.8rem; color: var(--text-muted); }

/* Mobile */
@media (max-width: 640px) {
    nav { padding: 1rem 1.25rem; }
    .nav-links { gap: 1rem; }
    .nav-links a { font-size: 0.8rem; }
    section { padding: 0 1.25rem; }
    .section-divider { padding: 0 1.25rem; }
    .hero { min-height: 90vh; }
    .hero-bg { right: 0; width: 100%; opacity: 0.25; mask-image: none; -webkit-mask-image: none; }
    .capabilities { grid-template-columns: 1fr; }
    .research-item { flex-direction: column; gap: 0.75rem; }
    .sun-feature { flex-direction: column; text-align: center; }
    .sun-feature img { width: 140px; height: 140px; }
    section.essay-page { padding-top: 6rem; }
    section.listing-page { padding-top: 6rem; }
}
