:root {
    --bg: #ffffff;
    --text: #111111;
    --accent: #0056b3; /* Professional Blue */
    --gray: #666;
    --border: #eaeaea;
    /* --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
    --font-main: 'Montserrat', sans-serif;
    --font-code: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Container */
header, main, footer {
    max-width: 720px; /* Hank Green style width */
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar */
nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4rem; }
nav ul { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0; }
nav a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.95rem; }
nav .logo { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.5px; }

/* Language Switcher */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switch {
    border-left: 1px solid var(--border);
    padding-left: 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
}

.lang-switch a {
    color: var(--gray);
    text-decoration: none;
}

.lang-switch .active-lang {
    color: var(--text);
    cursor: default;
}

.lang-switch a:hover {
    color: var(--accent);
}
/* Typography */
h1, h2, h3, h4 { margin: 0 0 1rem 0; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 2.2rem; line-height: 1.1; }
h2 { font-size: 1.2rem; color: var(--gray); font-weight: 400; margin-top: 0; }
h3 { margin-top: 3rem; font-size: 1.1rem; border-bottom: 2px solid var(--text); padding-bottom: 0.5rem; margin-bottom: 1.5rem; }


/* Typography Updates */
body {
    font-family: var(--font-main);
    font-weight: 400; /* Regular readable weight */
    font-size: 1rem;  /* Standard base size */
}

/* Updated Headers: Cleaner, less massive */
h1, h2, h3, h4 { 
    font-weight: 700; /* Reduced from 900 to 700 (Standard Bold) */
    letter-spacing: -0.02em; 
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: var(--text);
}

/* Specific Sizes */
h1 { 
    font-size: 2.2rem; /* Reduced from 3rem */
    text-transform: none; /* Removed uppercase for a friendlier look */
}


/* Hero */
.hero-content { margin-bottom: 2rem; }
.cta-links a { margin-right: 1rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.cta-links a:hover { text-decoration: underline; }

/* Grid (Vibert Thio Style) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    border: 1px solid var(--border);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: block;
}
.card:hover { border-color: var(--text); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.card-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.card h4 { margin: 0; font-size: 1.1rem; }
.card .tag { font-size: 0.75rem; background: #f0f0f0; padding: 2px 6px; border-radius: 4px; color: var(--gray); }
.card p { margin: 0; font-size: 0.95rem; color: var(--gray); }

/* Accordion (Bin Wang + Interaction) */
details { margin-top: 2rem; border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 1rem; background: #fafafa; }
summary { cursor: pointer; font-weight: 600; padding: 0.5rem 0; outline: none; }
.transcript-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 0.5rem;}
.transcript-grid ul { list-style: none; padding: 0; margin: 0; }
.transcript-grid li { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px dashed var(--border); font-size: 0.9rem; }
.transcript-grid li strong { color: var(--text); }
.transcript-grid li span { color: var(--gray); }

/* Footer */
footer { margin-top: 4rem; border-top: 1px solid var(--border); color: var(--gray); font-size: 0.85rem; }

/* Mobile */
@media (max-width: 600px) {
    .transcript-grid { grid-template-columns: 1fr; }
    h1 { font-size: 1.8rem; }
}


/* Code Blocks (Large snippets) */
pre {
    font-family: var(--font-code);
    font-size: 0.95rem;
    border-radius: 6px;
    line-height: 1.45;
    overflow-x: auto;
    padding: 1rem;
    
    /* GITHUB STYLE OVERRIDES */
    background-color: #f6f8fa; /* Light grey background */
    border: 1px solid #d0d7de; /* Subtle border */
    color: #1f2328;            /* Dark text (Essential!) */
}

/* Ensure inner code tag inherits font */
pre code {
    font-family: inherit;
    font-size: inherit;
    background: transparent;
    padding: 0;
    color: inherit; /* This fixes the invisible text */
}


/* Inline Code (Single backticks like `this`) */
p code, li code {
    font-family: var(--font-code);
    background-color: #f3f4f6; /* Light gray background */
    color: #e01e5a;            /* Vivid Red/Pink text */
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* --- Single Project Page Meta (Tags & Date) --- */

.project-detail header {
    margin-bottom: 2.5rem; /* Add breathing room before the text starts */
}

/* The container holding both tags and date */
.meta {
    display: flex;
    align-items: center; /* Vertically align them */
    gap: 1.5rem;         /* Space between the group of tags and the date */
    margin-top: 1rem;
}

/* The container holding just the tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* Space between individual tags */
}

/* Individual Tag Styling */
.tag {
    background-color: #f1f3f5; /* Very subtle grey */
    color: #495057;            /* Dark grey text for readability */
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

/* Subtle Date Styling */
.post-date {
    font-size: 0.85rem;
    color: #868e96; /* Very light grey, low contrast */
    font-weight: 500;
}

/* --- Responsive Images --- */
.content img {
    max-width: 100%;       /* Prevents the image from overflowing the container */
    height: auto;          /* Maintains the original aspect ratio */
    display: block;        /* Behaves like a block element... */
    margin: 2rem auto;     /* ...so we can center it and add vertical breathing room */
    border-radius: 6px;    /* Matches the slightly rounded corners of your code blocks */
    border: 1px solid var(--border); /* Optional: adds a subtle border to separate white images from the white background */
}

/* --- Image Captions --- */
figure {
    margin: 2rem auto;
    text-align: center;
}

figure img {
    margin: 0 auto 0.5rem auto; /* Overrides the previous image margin */
}

figcaption {
    font-size: 0.85rem;
    color: var(--gray);
    font-style: italic;
    padding: 0 1rem;
}
