:root {
    --ink: #0a0a0c;
    --paper: #f7f5f0;
    --accent: #c9483b;
    --muted: #6b6b6b;
    --grid: rgba(10, 10, 12, 0.06);
    --serif: 'Instrument Serif', Georgia, serif;
    --body: 'Newsreader', Georgia, serif;
    --mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden;
}

/* Grid background pattern */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* Geometric accent shapes */
.geo-accent {
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

.geo-accent.circle {
    width: 400px;
    height: 400px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    right: -150px;
    top: 200px;
    opacity: 0.15;
}

.geo-accent.arc {
    width: 600px;
    height: 600px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    left: -400px;
    bottom: 100px;
    opacity: 0.08;
}

/* Header */
header {
    padding: 40px 60px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--grid);
    animation: fadeDown 0.8s ease-out;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.2em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.logo::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.header-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.nav {
    display: flex;
    align-items: baseline;
    gap: 30px;
}

.nav a {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: var(--ink);
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Hero */
.hero {
    padding: 120px 0 20px;
    position: relative;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 50px;
    animation: fadeUp 1s ease-out 0.2s both;
}

.hero h1 em {
    font-style: italic;
    color: var(--accent);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-tagline {
    font-size: 1.4rem;
    max-width: 700px;
    color: var(--muted);
    font-weight: 300;
    animation: fadeUp 1s ease-out 0.4s both;
    padding-left: 30px;
    border-left: 3px solid var(--accent);
}

.hero-tagline strong {
    color: var(--ink);
    font-weight: 400;
}

/* Section styling */
section {
    padding: 10px 0;
    border-top: 1px solid var(--grid);
}

.section-label {
    font-family: var(--mono);
    font-size: 22px;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin-top: 30px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--grid);
    max-width: 100px;
}

.section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.section-content.single {
    grid-template-columns: 1fr;
    max-width: 800px;
    gap: 0;
}

.section-content h2 {
    font-family: var(--serif);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 10px;
}

.section-content p {
    color: var(--muted);
    margin-bottom: 10px;
}

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

/* Focus areas */
.focus-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 0;
}

.focus-tag {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    border: 1px solid var(--ink);
    transition: all 0.3s ease;
    cursor: default;
}

.focus-tag:hover {
    background: var(--ink);
    color: var(--paper);
}

/* Operating model */
.model-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.model-step {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 30px;
    padding: 30px 0;
    border-bottom: 1px solid var(--grid);
    align-items: start;
}

.model-step:last-child {
    border-bottom: none;
}

.step-num {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
}

.step-content h3 {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--muted);
}

/* RIFT Stack */
.rift-intro {
    margin-bottom: 50px;
}

.rift-intro h2 {
    font-family: var(--serif);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 15px;
}

.rift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.rift-item {
    padding: 35px;
    background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 100%);
    border: 1px solid rgba(10, 10, 12, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.rift-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--accent);
    transition: height 0.4s ease;
}

.rift-item:hover::before {
    height: 100%;
}

.rift-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(10, 10, 12, 0.08);
}

.rift-abbr {
    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 12px;
}

.rift-name {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Footer */
footer {
    margin-top: 100px;
    padding: 60px;
    background: var(--ink);
    color: var(--paper);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-legal {
    font-family: var(--mono);
    font-size: 11px;
    line-height: 2;
    opacity: 0.6;
}

.footer-legal strong {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 1;
    letter-spacing: 0.1em;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(247, 245, 240, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-mark {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    opacity: 0.5;
}

.footer-mark a {
    color: inherit;
}

/* Responsive */
@media (max-width: 900px) {
    header {
        padding: 30px 30px;
        flex-direction: column;
        gap: 15px;
    }

    main {
        padding: 0 30px;
    }

    .hero {
        padding: 80px 0 60px;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 8vw, 5rem);
    }

    .section-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    footer {
        padding: 40px 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Blog & Papers pages */
.page-hero {
    padding: 80px 0 40px;
}

.page-hero h1 {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 15px;
}

.page-hero .tagline {
    color: var(--muted);
    font-size: 1.2rem;
}

/* Post/Paper list */
.post-list, .paper-list {
    list-style: none;
}

.post-item, .paper-item {
    border-bottom: 1px solid var(--grid);
}

.post-item a, .paper-item > a {
    display: block;
    padding: 30px 0;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.post-item a:hover, .paper-item > a:hover {
    padding-left: 15px;
    background: rgba(10, 10, 12, 0.02);
}

.post-item time, .paper-item time {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.post-item h2, .paper-item h2 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.post-item p, .paper-item p {
    color: var(--muted);
    font-size: 0.95rem;
}

.empty-state {
    padding: 60px 0;
    color: var(--muted);
    font-style: italic;
}

/* Article pages */
.article {
    padding: 60px 0;
}

.article-header {
    margin-bottom: 60px;
}

.article-header time {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.article-header h1 {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 15px;
}

.article-header .author,
.article-header .authors {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
}

.article-content h2 {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 400;
    margin: 50px 0 20px;
}

.article-content h3 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 400;
    margin: 40px 0 15px;
}

.article-content p {
    margin-bottom: 24px;
    color: var(--muted);
}

.article-content a {
    color: var(--accent);
}

.article-content ul,
.article-content ol {
    margin: 24px 0;
    padding-left: 24px;
    color: var(--muted);
}

.article-content li {
    margin-bottom: 8px;
}

.article-content code {
    font-family: var(--mono);
    background: rgba(10, 10, 12, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-content pre {
    background: var(--ink);
    color: var(--paper);
    padding: 24px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 24px;
    margin: 24px 0;
    font-style: italic;
    color: var(--muted);
}

.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--grid);
}

.article-footer a {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.article-footer a:hover {
    color: var(--ink);
}

/* Buttons */
.btn {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-primary {
    background: var(--accent);
    color: var(--paper);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}

.btn-secondary:hover {
    background: var(--ink);
    color: var(--paper);
}

/* Publications */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.publication-item {
    display: block;
    padding: 25px 0;
    border-bottom: 1px solid var(--grid);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

.publication-item:hover {
    padding-left: 15px;
    background: rgba(10, 10, 12, 0.02);
}

.pub-title {
    display: block;
    font-family: var(--body);
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--ink);
}

.pub-meta {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.pub-links {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.pub-links .btn {
    margin-top: 0;
}

.pub-abstract {
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(10, 10, 12, 0.02);
    border-left: 3px solid var(--accent);
}

.pub-abstract .section-label {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 11px;
}

.pub-abstract .section-label::after {
    display: none;
}

.pub-abstract p {
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 0;
}

.venue {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.05em;
    font-style: italic;
}

/* Publications intro */
.pub-intro {
    padding: 40px 0;
    border-top: none;
}

.pub-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
}
