/* Paper & Ink styles for Hexos Lab Landing Page */

/* Import shared design system (single source of truth) */
@import '_design-system.css';

/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--base-font-size);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--ink-black);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink-black);
}

h1 {
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h2 {
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--ink-black);
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    font-style: italic;
}

p {
    margin-bottom: var(--space-md);
    text-align: justify;
    hyphens: auto;
}

em {
    font-style: italic;
}

strong {
    font-weight: 600;
}

a {
    color: var(--ink-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

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

/* Header / Hero - Paper title page style */
.hero {
    background: var(--paper);
    color: var(--ink-black);
    padding: var(--space-3xl) 0;
    text-align: center;
    margin-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--ink-faint);
}

.hero::before {
    content: "§";
    display: block;
    font-size: 1.5rem;
    color: var(--ink-light);
    margin-bottom: var(--space-lg);
}

.hero h1 {
    color: var(--ink-black);
    margin-bottom: var(--space-md);
}

.hero .subtitle {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--ink-medium);
    margin-bottom: 0;
    text-align: center;
}

/* Sections */
section {
    margin-bottom: var(--space-3xl);
}

.section-intro {
    font-size: 1rem;
    color: var(--ink-medium);
    margin-bottom: var(--space-xl);
    font-style: italic;
}

/* Abstract section - indented block quote style */
.abstract {
    background: transparent;
    padding: var(--space-lg) var(--space-xl);
    margin-left: var(--space-lg);
    margin-right: var(--space-lg);
    border-left: 2px solid var(--ink-light);
    border-radius: 0;
}

.abstract h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: var(--space-md);
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.abstract p {
    font-size: 0.95rem;
}

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

/* Project cards - clean paper sections */
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
}

.project-card {
    background: transparent;
    border: none;
    border-top: 1px solid var(--ink-faint);
    border-radius: 0;
    padding: var(--space-xl) 0;
}

.project-card:first-child {
    border-top: none;
    padding-top: 0;
}

.project-icon {
    width: 32px;
    height: 32px;
    margin-bottom: var(--space-md);
    color: var(--ink-medium);
}

.project-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1;
}

.project-domain {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-medium);
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: var(--space-sm);
}

.project-description {
    color: var(--ink-dark);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.project-features {
    list-style: none;
    margin-bottom: var(--space-lg);
    padding-left: var(--space-md);
}

.project-features li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-xs);
    font-size: 0.9rem;
    color: var(--ink-medium);
}

.project-features li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--ink-light);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink-dark);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--ink-dark);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.2s ease;
}

.project-link:hover {
    background: var(--ink-black);
    color: var(--paper);
    border-color: var(--ink-black);
}

.project-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.project-link:hover svg {
    transform: translateX(3px);
}

/* Methodology section - numbered list style */
.method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg) var(--space-xl);
    counter-reset: method-counter;
}

.method-item {
    padding: 0;
    background: transparent;
    border: none;
    counter-increment: method-counter;
}

.method-item h4 {
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    color: var(--ink-black);
}

.method-item h4::before {
    content: counter(method-counter) ". ";
    font-style: normal;
}

.method-item p {
    font-size: 0.875rem;
    color: var(--ink-medium);
    margin-bottom: 0;
    line-height: 1.6;
    text-align: left;
}

/* References section - bibliography style */
.reference-list {
    padding-left: 0;
    list-style: none;
    counter-reset: ref-counter;
}

.reference-list li {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
    position: relative;
    counter-increment: ref-counter;
}

.reference-list li::before {
    content: "[" counter(ref-counter) "]";
    position: absolute;
    left: 0;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--ink-medium);
}

.reference-list cite {
    font-family: var(--font-serif);
    font-style: italic;
}

/* Footer - colophon style */
footer {
    border-top: 1px solid var(--ink-faint);
    padding: var(--space-xl) 0;
    margin-top: var(--space-3xl);
    text-align: center;
    color: var(--ink-light);
    font-size: 0.85rem;
}

footer::before {
    content: "❧";
    display: block;
    font-size: 1.2rem;
    color: var(--ink-faint);
    margin-bottom: var(--space-md);
}

footer p {
    text-align: center;
}

footer .separator {
    margin: 0 var(--space-sm);
    opacity: 0.5;
}

footer a {
    color: var(--ink-medium);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    h1 {
        font-size: 1.75rem;
        letter-spacing: 0.05em;
    }

    h2 {
        font-size: 1.15rem;
    }

    .hero {
        padding: var(--space-2xl) 0;
    }

    .container {
        padding: 0 var(--space-lg);
    }

    .abstract {
        margin-left: 0;
        margin-right: 0;
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }

    .method-grid {
        grid-template-columns: 1fr;
    }
}

/* Print styles - already paper-like, just optimize */
@media print {
    body {
        background: white;
    }

    .hero::before,
    footer::before {
        display: none;
    }

    .project-link {
        border: none;
        padding: 0;
    }

    .project-link svg {
        display: none;
    }

    .project-link::after {
        content: " →";
    }
}
