:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --border-color: #334155;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    padding-bottom: 40px;
}

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

/* Hero Header */
.hero {
    position: relative;
    padding: 100px 0; /* Adjust height as needed */
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    
    /* Background Image Setup */
    background-image: url('../assets/images/train.jpg'); /* Ensure correct path */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dark Overlay Layer for Text Readability */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 27, 45, 0.85); /* Dark shade with 85% opacity */
    z-index: 1;
}

/* Ensure container text stays on top of the overlay */
.hero .container {
    position: relative;
    z-index: 2;
}

.hero .name {
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.35;
    max-width: 720px;
    margin: 0 auto 10px;
    color: var(--text-main);
}

.hero .tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}



/* Project Page Hero */
.project-hero {
    position: relative;
    padding: 80px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* We will inject the unique image via inline style on each page */
}

/* Dark Overlay for Readability */
.project-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85); 
    z-index: 1;
}

.project-hero .container {
    position: relative;
    z-index: 2;
}

.project-hero .project-hero-centered,
.hero .project-hero-centered {
    text-align: center;
}

.project-hero .project-hero-centered .meta-strip,
.project-hero .project-hero-centered .tech-pill-box,
.hero .project-hero-centered .meta-strip,
.hero .project-hero-centered .tech-pill-box {
    justify-content: center;
}

/* Project Detail Pages */
.article-body {
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
    color: var(--text-main);
}

.project-hero h1,
.hero h1:not(.name) {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.article-body h2 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.article-body h3 {
    font-size: 1.15rem;
    color: var(--text-main);
    margin-top: 25px;
    margin-bottom: 10px;
}

.article-body p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.article-body ul,
.article-body ol {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.article-body li {
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.6;
}

.article-body code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #f43f5e;
}

.back-btn {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
}

.back-btn:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.meta-item strong {
    color: var(--text-main);
}

.tech-pill-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 25px;
}

.tech-pill {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.highlight-box {
    background: var(--card-bg);
    border-left: 4px solid var(--accent);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 25px 0;
}

.highlight-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.lesson-summary p {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.75;
}

.lesson-list {
    list-style: none;
    margin-left: 0;
    counter-reset: lesson-counter;
}

.lesson-list > li {
    counter-increment: lesson-counter;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 22px 18px 64px;
    margin-bottom: 18px;
    position: relative;
}

.lesson-list > li::before {
    content: counter(lesson-counter);
    position: absolute;
    left: 20px;
    top: 20px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.lesson-list h3,
.concept-card h3 {
    color: var(--text-main);
    font-size: 1.08rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.lesson-list p,
.concept-card p,
.concept-card li {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

.lesson-list p,
.concept-card p {
    margin-bottom: 0;
}

.section-intro {
    margin-bottom: 20px;
}

.concept-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.concept-card {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 22px;
}

.concept-card ul,
.concept-card ol {
    margin: 12px 0 12px 22px;
}

.concept-card li {
    margin-bottom: 8px;
    padding-left: 2px;
}

.concept-card strong {
    color: var(--text-main);
}

.concept-card .analogy {
    margin-top: 14px;
    padding-left: 14px;
    border-left: 3px solid var(--accent);
    color: var(--text-main);
}

.example-tag {
    background: #334155;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-right: 5px;
    vertical-align: middle;
}

.regulatory-box {
    background: rgba(244, 63, 94, 0.05);
    border-left: 4px solid #f43f5e;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 25px 0;
}

.regulatory-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: #fecdd3;
}


/* Project Cards Layout */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.project-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.project-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem 0;
}

.tech-stack {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 20px;
    background-color: rgba(56, 189, 248, 0.06);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
}

.explore-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
    margin-top: auto;
}

.explore-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Dividers */
.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 20px 0 50px 0;
}

/* Certifications Layout */
.certifications-section {
    padding-bottom: 60px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    justify-items: center;
}

.cert-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 130px;
    height: 130px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.cert-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(20%) brightness(90%);
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

/* Model Card tables (project pages) */
.model-card-section {
    margin: 2rem 0;
}

.model-card-section h3 {
    font-size: 1.15rem;
    margin: 1.75rem 0 0.75rem;
    color: var(--text-main);
}

.model-card-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.table-wrap {
    overflow-x: auto;
    margin: 0.75rem 0 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.model-card-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.model-card-table th,
.model-card-table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.model-card-table th {
    background: rgba(56, 189, 248, 0.08);
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
}

.model-card-table tbody tr:last-child td {
    border-bottom: none;
}

.model-card-table td:nth-child(n+3) {
    font-variant-numeric: tabular-nums;
}

.model-card-table code {
    font-size: 0.82em;
}

.champion-callout {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 22px 24px;
    margin: 24px 0;
}

.champion-callout h3 {
    margin-top: 0;
    color: var(--accent);
    font-size: 1.15rem;
}

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

.champion-callout strong {
    color: var(--text-main);
}

.lesson-accent {
    border-left-color: #e07b39;
}

.lesson-accent h3 {
    color: #e07b39;
    margin-top: 0;
}

.lesson-accent ol {
    margin: 0.8rem 0 0 1.2rem;
    padding: 0;
    line-height: 1.9;
}

.connect-section {
    margin-top: 60px;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent);
    color: var(--bg-color);
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;
}

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

.article-footer {
    margin-top: 60px;
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.pipeline-list {
    margin-left: 20px;
    color: var(--text-muted);
}

.pipeline-list li {
    margin-bottom: 10px;
    line-height: 1.65;
}

/* Visually hidden — kept in DOM for crawlers / LLM indexing */
.seo-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* SEO / article index */
.article-index {
    padding: 40px 0 10px;
}

.article-index .section-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 28px;
}

.article-index .section-intro a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.article-index .section-intro a:hover {
    text-decoration: underline;
}

.article-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
}

.article-list li {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0;
}

.article-list h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.article-list h3 a {
    color: var(--text-main);
    text-decoration: none;
}

.article-list h3 a:hover {
    color: var(--accent);
}

.article-list .article-teaser {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 10px;
    line-height: 1.6;
}

.article-byline,
.card-byline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.article-byline a,
.card-byline a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.article-byline a:hover,
.card-byline a:hover {
    text-decoration: underline;
}

.author-links {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.author-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin: 0 10px;
}

.author-links a:hover {
    text-decoration: underline;
}