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

:root {
    --content-max: 1120px;
    --text-max: 720px;
    --pad: clamp(16px, 4vw, 48px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--pad);
}

.post-page {
    max-width: var(--text-max);
    padding-top: 32px;
    padding-bottom: 48px;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #111;
    color: #fff;
    padding: 16px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--content-max);
    gap: 16px;
}

.logo {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: flex-end;
}

nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
}

nav a:hover,
nav a.is-active {
    color: #fff;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: #0066cc;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Page header */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 4px;
}

.page-meta {
    color: #888;
    font-size: 0.85rem;
}

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

.post-list li {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.post-list li:last-child {
    border-bottom: none;
}

.post-list a {
    text-decoration: none;
    color: #111;
    font-size: 1.2rem;
    font-weight: 600;
}

.post-list a:hover {
    color: #0066cc;
}

.post-list .post-date {
    color: #888;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Post content */
.post-content {
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.post-content h1, .post-content h2, .post-content h3 {
    margin: 24px 0 12px;
}

.post-content p {
    margin-bottom: 12px;
}

.post-content ul, .post-content ol {
    margin: 12px 0 12px 24px;
}

.post-content a {
    color: #0066cc;
}

.post-content img {
    max-width: 100%;
    height: auto;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    display: block;
    overflow-x: auto;
}

.post-content td, .post-content th {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

/* Home page */
.home-hero {
    text-align: center;
    padding: clamp(48px, 10vw, 96px) var(--pad) clamp(28px, 5vw, 48px);
    max-width: var(--content-max);
    margin: 0 auto;
}

.home-hero h1 {
    font-size: clamp(1.75rem, 5vw, 3.25rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.home-hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #555;
    max-width: 640px;
    margin: 0 auto 28px;
}

.home-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 9999px;
    font-weight: 500;
    transition: background 0.2s;
}

.home-btn:hover {
    background: #333;
}

.home-hero-img {
    display: block;
    width: calc(100% - 2 * var(--pad));
    max-width: var(--content-max);
    margin: 0 auto;
    border-radius: clamp(8px, 2vw, 16px);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.home-methodology,
.home-project,
.home-posts {
    padding: clamp(48px, 8vw, 80px) var(--pad);
    max-width: var(--content-max);
    margin: 0 auto;
}

.home-methodology {
    text-align: center;
}

.home-methodology h2,
.home-project h2,
.home-posts h2,
.home-contact h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    margin-bottom: 8px;
}

.home-subtitle {
    color: #666;
    max-width: 560px;
    margin: 0 auto 40px;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

.home-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 4vw, 40px);
    text-align: left;
}

.home-feature h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.home-feature p {
    font-size: 0.95rem;
    color: #666;
}

.home-project {
    text-align: center;
}

.home-project-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(24px, 5vw, 56px);
    margin-top: clamp(32px, 5vw, 56px);
    text-align: left;
}

.home-project-block.reverse {
    direction: rtl;
}

.home-project-block.reverse > * {
    direction: ltr;
}

.home-project-text h3 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    margin-bottom: 12px;
}

.home-project-text ul {
    list-style: none;
    padding: 0;
}

.home-project-text li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px;
    line-height: 1.75;
}

.home-project-text li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #111;
}

.home-project-block img {
    width: 100%;
    max-width: none;
    border-radius: clamp(8px, 2vw, 16px);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.home-quote {
    background: #111;
    color: #fff;
    padding: clamp(56px, 10vw, 96px) var(--pad);
    text-align: center;
}

.home-quote-text {
    font-size: clamp(1.15rem, 3vw, 1.85rem);
    max-width: 800px;
    margin: 0 auto 24px;
    line-height: 1.4;
}

.home-quote-label {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.home-quote-subtitle {
    font-size: 0.85rem;
    color: #999;
}

.home-contact {
    padding: clamp(48px, 8vw, 72px) var(--pad);
    text-align: center;
    background: #f5f5f5;
    border-radius: clamp(8px, 2vw, 16px);
    margin: 0 var(--pad);
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 2 * var(--pad));
}

.home-contact p {
    color: #666;
    margin-bottom: 24px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.home-posts-list {
    display: flex;
    flex-direction: column;
}

.home-post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.home-post-item a {
    color: #111;
    text-decoration: none;
    font-weight: 600;
}

.home-post-item a:hover {
    color: #0066cc;
}

.home-post-item span {
    color: #888;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.home-footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 4vw, 48px);
    background: #000;
    color: #fff;
    padding: clamp(48px, 8vw, 72px) var(--pad);
}

.home-footer-col {
    text-align: center;
}

.home-footer-col > p {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 12px;
}

.home-footer-col nav,
.home-footer-col a {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-footer-col a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

.home-footer-col a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 0.85rem;
    text-align: center;
}

/* Tablet */
@media (max-width: 900px) {
    .home-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .home-features {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .home-project-block,
    .home-project-block.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .home-footer {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .home-post-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .home-post-item span {
        white-space: normal;
    }
}

@media (max-width: 600px) {
    header .container {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    nav {
        justify-content: flex-start;
    }

    .home-btn {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }
}
