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

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #eef1f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #1a1a2e;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

nav {
    background-color: #16213e;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav a:hover,
nav a.active {
    opacity: 0.85;
    text-decoration: underline;
    text-underline-offset: 4px;
}

main {
    padding: 3rem 0;
}

.home-main-layout {
    padding: 0;
}

.hero-band {
    width: 100%;
    background: linear-gradient(135deg, #dce4ed 0%, #e8eef5 50%, #eef1f5 100%);
    border-bottom: 1px solid #c5d0dc;
    padding: 3.5rem 0;
    margin-bottom: 3rem;
    max-height: 24rem;
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease, margin 0.35s ease, border-color 0.25s ease;
}

.hero-band.is-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom-color: transparent;
    pointer-events: none;
}

.hero-band .hero {
    text-align: left;
    margin-bottom: 0;
    max-width: 720px;
}

.hero h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
    line-height: 1.25;
}

.hero p {
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 0 1rem;
}

.hero .hero-sub {
    font-size: 1rem;
    color: #555;
    margin-bottom: 2rem;
}

.home-content {
    padding-bottom: 2rem;
}

.home-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: stretch;
}

.home-primary {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.home-sidebar-rail {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #0f7b6c;
    padding: 1.75rem;
    min-height: 100%;
}

.home-sidebar-rail .section-title {
    margin-bottom: 1.25rem;
}

.home-sidebar-rail .card-compact {
    box-shadow: none;
    background: #f8fafb;
    border: 1px solid #e8eef3;
}

.about-teaser-inset {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

.post-stack,
.sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-compact {
    padding: 1.25rem;
}

.card-compact h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.card-compact p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.card-compact .tag-list {
    margin-top: 0.5rem;
}

.cta-button {
    display: inline-block;
    background-color: #0f7b6c;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0a5c51;
}

.section-title {
    font-size: 1.75rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-title-left {
    text-align: left;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card h3 {
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.card h3 a {
    color: inherit;
    text-decoration: none;
}

.card h3 a:hover {
    text-decoration: underline;
}

.card p {
    margin-bottom: 1rem;
    color: #444;
}

.card-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.card-link {
    color: #0f7b6c;
    font-weight: 500;
    text-decoration: none;
}

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

.about-teaser {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    text-align: center;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.about-teaser p {
    margin-bottom: 1rem;
}

.about {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.about h2 {
    color: #1a1a2e;
    margin-bottom: 1.5rem;
}

.about p {
    margin-bottom: 1rem;
    max-width: 72ch;
}

.about .currently-exploring {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: #f0f4f8;
    border-left: 4px solid #0f7b6c;
    border-radius: 0 4px 4px 0;
    max-width: 72ch;
}

.about .currently-exploring strong {
    display: block;
    margin-bottom: 0.25rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.skill-tag,
.tag {
    background-color: #1a1a2e;
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag {
    background-color: #e8eef3;
    color: #1a1a2e;
}

.project-section {
    margin-bottom: 3rem;
}

.project-section h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0f7b6c;
}

.project-card {
    background: white;
    padding: 1.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.project-card p {
    margin-bottom: 1rem;
    max-width: 72ch;
}

.project-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.blog-post-list {
    list-style: none;
}

.blog-post-item {
    background: white;
    padding: 1.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.blog-post-item h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.blog-post-item h2 a {
    color: #1a1a2e;
    text-decoration: none;
}

.blog-post-item h2 a:hover {
    text-decoration: underline;
}

.blog-post-item .excerpt {
    margin: 0.75rem 0;
    color: #444;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.post-header h1 {
    font-size: 2.25rem;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

/* Blog reading layout — article fills the viewport */
.container--reading {
    max-width: min(960px, 94vw);
}

.blog-article-layout,
.blog-list-layout {
    padding: 2rem 0 3rem;
}

.blog-post-page header,
.blog-list-page header {
    padding: 1.25rem 0;
}

.blog-post-page header h1,
.blog-list-page header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.blog-post-page header p,
.blog-list-page header p {
    font-size: 0.95rem;
}

.blog-list-intro {
    margin-bottom: 2rem;
    color: #444;
}

.post-back-link {
    margin-top: 2rem;
}

.container--reading .post-content {
    max-width: none;
    width: 100%;
    padding: 2.5rem 3rem;
}

.container--reading .post-header {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.container--reading .blog-post-item {
    width: 100%;
}

.post-content {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    max-width: 72ch;
}

.post-content h2 {
    font-size: 1.4rem;
    color: #1a1a2e;
    margin: 2rem 0 1rem;
}

.post-content h2:first-child {
    margin-top: 0;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content ul {
    margin: 0 0 1rem 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    font-family: "Cascadia Code", "Consolas", "Monaco", monospace;
    font-size: 0.9em;
    background: #f0f4f8;
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.post-content pre {
    background: #1a1a2e;
    color: #e8eef3;
    padding: 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

footer {
    background-color: #1a1a2e;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer a {
    color: #8fd4c8;
}

footer a:hover {
    color: white;
}

.footer-contact {
    margin-top: 1rem;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: #8fd4c8;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 1.1rem;
}

.social-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-disclosure {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    opacity: 0.65;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.footer-disclosure a {
    color: inherit;
    text-decoration: underline;
}

.text-link {
    color: #0f7b6c;
    font-weight: 500;
    text-decoration: none;
}

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

@media (prefers-reduced-motion: reduce) {
    .hero-band {
        transition: none;
    }
}

@media (max-width: 899px) {
    .home-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .home-sidebar-rail {
        border-left: none;
        border-top: 4px solid #0f7b6c;
    }

    .hero-band .hero h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    nav ul {
        gap: 1rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 0.75rem;
    }

    .post-content {
        padding: 1.5rem;
    }

    .container--reading .post-content {
        padding: 1.5rem 1.25rem;
    }

    .post-header h1 {
        font-size: 1.75rem;
    }

    .blog-post-page header h1,
    .blog-list-page header h1 {
        font-size: 1.35rem;
    }

    .hero-band {
        padding: 2.5rem 0;
    }
}
