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

html {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2c2d33;
}

a { color: #4183d7; text-decoration: none; }
a:hover { color: #81a7d7; }

h1 { font-family: 'Montserrat', sans-serif; font-size: 1.6rem; font-weight: 700; color: #555a5c; margin: 0 0 0.5rem; line-height: 1.2; }
h2 { font-family: 'Montserrat', sans-serif; font-size: 1.15rem; font-weight: 400; color: #777c7e; margin: 0.5rem 0; }
h3 { font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 400; color: #222; text-transform: uppercase; margin: 1rem 0 0.25rem; }
p + p { margin-top: 1rem; }
ol, ul { padding-left: 1.5rem; }
li { margin: 0.25rem 0; }
hr { border: none; border-top: 1px solid #ddd; margin: 1.5rem 0; }

/* Title bar (mobile) */
#titleBar {
    display: none;
    background: #333;
    padding: 0 1rem;
    height: 44px;
    line-height: 44px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
}
#titleBar #page-title { color: #fff; font-family: 'Montserrat', sans-serif; font-size: 1rem; }
#titleBar nav { display: none; }

.hamburger {
    position: absolute;
    top: 0; right: 0;
    width: 44px; height: 44px;
    background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav {
    display: none;
    position: fixed;
    top: 44px; right: 0;
    width: 240px;
    background: #33383a;
    padding: 1.5rem;
    z-index: 99;
    flex-direction: column;
    gap: 0.5rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav-header { text-align: center; margin-bottom: 1rem; padding: 0.5rem; }
.mobile-nav-header img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid #eee; }
.mobile-nav-header h2 { font-size: 1.1rem; color: #fff; margin-top: 0.75rem; }
.mobile-nav a { color: #ccc; text-decoration: none; padding: 0.5rem 0; border-bottom: 1px solid #444; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.mobile-nav a:hover { color: #4183d7; }

/* Layout */
.page-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
#sidebar {
    width: 260px;
    min-width: 260px;
    background: #33383a;
    color: #ccc;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

#logo { text-align: center; }
#logo img {
    width: 120px; height: 120px;
    border-radius: 50%;
    border: 2px solid #eee;
    object-fit: cover;
    display: block;
    margin: 0 auto 0.75rem;
}
#logo h1 { font-size: 1rem; color: #fff; }
#logo h1 a { color: #fff; }
#logo h2 { font-size: 0.8rem; color: #aaa; line-height: 1.4; margin-top: 0.25rem; }

#sidenav ul { list-style: none; padding: 0; text-align: center; }
#sidenav li { padding: 0.25rem 0; }
#sidenav a { color: #ccc; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
#sidenav a:hover { color: #4183d7; }

.social-icons { text-align: center; font-size: 0.8rem; }
.social-icons a { color: #4183d7; margin: 0 0.4rem; }
.social-icons a:hover { color: #81a7d7; }

.related-list { font-size: 0.85rem; }
.related-list .section-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.related-list .section-title::before, .related-list .section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #555;
}
.related-list .section-title h3 {
    white-space: nowrap;
    color: #999;
    margin: 0;
}
.related-list a {
    display: block;
    color: #aaa;
    padding: 0.3rem 0;
    border-bottom: 1px solid #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.82rem;
}
.related-list a:hover { color: #4183d7; }

/* Main content */
#main {
    flex: 1;
    padding: 2rem 2.5rem;
    max-width: 860px;
}

/* Entry grid */
.entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.entry-card {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.entry-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.entry-card > div, .entry-card > h2, .entry-card > h3, .entry-card > p, .entry-card > a.read-more {
    padding: 0 1rem;
}
.entry-card h2 { font-size: 1rem; margin: 0.75rem 0 0.25rem; }
.entry-card h3 { font-size: 0.8rem; color: #999; margin: 0 0 0.5rem; text-transform: none; }
.entry-card p { font-size: 0.9rem; color: #555; margin-bottom: 0.75rem; }
.entry-meta { padding: 0.5rem 1rem 0; font-size: 0.75rem; color: #999; }
.entry-type { font-weight: 700; text-transform: uppercase; margin-right: 0.5rem; }
.read-more { display: inline-block; padding: 0 1rem 1rem; font-size: 0.85rem; color: #4183d7; }

/* Single post/recipe */
.single { max-width: 700px; }
.single h1 { font-size: 1.8rem; margin-bottom: 0.25rem; }
.single h2.subtitle { font-size: 1rem; color: #999; font-style: italic; margin-bottom: 1.5rem; }
.single .hero-img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 4px; margin-bottom: 1.5rem; }
.single .content { font-size: 1rem; line-height: 1.75; }
.single .content h2 { font-size: 1.1rem; font-weight: 700; color: #555; margin: 1.5rem 0 0.5rem; }
.single .content p { margin-bottom: 1rem; }

/* Recipe-specific */
.recipe-meta { color: #888; font-size: 0.9rem; margin-bottom: 1.5rem; font-style: italic; }
.recipe-link { display: inline-block; margin-top: 1rem; background: #4183d7; color: #fff; padding: 0.4rem 1rem; border-radius: 3px; font-size: 0.9rem; }
.recipe-link:hover { background: #81a7d7; color: #fff; }

.ingredients-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.9rem; border-left: 3px solid #4183d7; }
.ingredients-table td { padding: 0.3rem 0.6rem; border: none; border-bottom: 1px solid #eee; }
.ingredients-table td:first-child { font-weight: 700; text-align: right; white-space: nowrap; width: 1%; color: #333; }
.ingredients-table td:nth-child(2) { text-align: right; white-space: nowrap; width: 1%; color: #777; }
.ingredients-table td:last-child { width: 100%; }
.ingredients-table tr:last-child td { border-bottom: none; }

/* Option C: minimal lines */
.ingredients-minimal { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.9rem; border-left: none; }
.ingredients-minimal td { padding: 0.3rem 0.5rem; border: none; border-bottom: 1px solid #eee; }
.ingredients-minimal td:first-child { text-align: right; white-space: nowrap; width: 1%; color: #999; }
.ingredients-minimal td:nth-child(2) { text-align: right; white-space: nowrap; width: 1%; color: #999; font-size: 0.85em; }
.ingredients-minimal td:last-child { width: 100%; color: #333; }
.ingredients-minimal tr:last-child td { border-bottom: none; }

/* Footer */
#footer {
    background: #ddd;
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
    color: #888;
}
#footer a { color: #666; }

/* Responsive */
@media (max-width: 768px) {
    #titleBar { display: block; }
    .page-layout { flex-direction: column; padding-top: 44px; }
    #sidebar { display: none; }
    #main { padding: 1.5rem 1rem; max-width: 100%; }
    .entry-grid { grid-template-columns: 1fr; }
}

/* Recipe index */
.recipe-alpha-section { margin-bottom: 1.5rem; }
.alpha-header { font-size: 1.2rem; font-weight: 700; color: #333; border-bottom: 1px solid #ddd; padding-bottom: 0.25rem; margin-bottom: 0.75rem; }
.recipe-alpha-list { display: flex; flex-wrap: wrap; gap: 1rem; }
.recipe-alpha-item { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: #2c2d33; font-size: 0.95rem; }
.recipe-alpha-item img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.recipe-alpha-item:hover span { color: #4183d7; }

/* Post list */
.post-list { max-width: 680px; }
.post-summary { padding: 1.5rem 0; border-bottom: 1px solid #eee; }
.post-summary:last-child { border-bottom: none; }
.post-banner { width: 100%; max-height: 280px; object-fit: cover; border-radius: 4px; margin-bottom: 0.75rem; display: block; }
.post-summary h2 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.post-subtitle { color: #999; font-style: italic; font-size: 0.9rem; margin-bottom: 0.5rem; }
.post-excerpt { font-size: 0.95rem; color: #444; line-height: 1.6; }

.post-date { font-size: 0.8rem; color: #999; display: block; margin-bottom: 0.3rem; }

/* Scale buttons */
.scale-buttons { margin: 0.5rem 0; display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.scale-buttons span { color: #777; }
.scale-btn { background: #eee; border: 1px solid #ddd; border-radius: 3px; padding: 0.15rem 0.5rem; cursor: pointer; font-size: 0.85rem; }
.scale-btn.active { background: #4183d7; color: #fff; border-color: #4183d7; }
.scale-btn:hover { background: #81a7d7; color: #fff; border-color: #81a7d7; }

/* Home hero (in-column) */
.home-hero {
    background-size: cover;
    background-position: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 4px;
    margin-bottom: 2rem;
}
.home-hero::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.4); border-radius: 4px; }
.home-hero-content { position: relative; z-index: 1; text-align: center; color: #fff; padding: 2rem; }
.home-hero-content h1 { font-family: 'Montserrat', sans-serif; font-size: 2rem; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5); margin-bottom: 0.5rem; }
.home-hero-content p { font-size: 1.1rem; color: #eee; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.home-below #main { max-width: 720px; padding: 2rem 2.5rem; }
@media (max-width: 768px) {
    .home-hero { min-height: 200px; }
    .home-hero-content h1 { font-size: 1.4rem; }
    .home-hero-content p { font-size: 0.9rem; }
}

/* Carousel */
.carousel { position: relative; margin-bottom: 1.5rem; }
.carousel-track { position: relative; overflow: hidden; border-radius: 4px; }
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; transform: translateX(30px); transition: opacity 0.4s ease, transform 0.4s ease; pointer-events: none; }
.carousel-slide.active { position: relative; opacity: 1; transform: translateX(0); pointer-events: auto; }
.carousel-slide.out { opacity: 0; transform: translateX(-30px); }
.carousel-slide img { width: 100%; max-height: 400px; object-fit: cover; display: block; }
.carousel-caption { text-align: center; font-style: italic; color: #747474; font-size: 0.85rem; padding: 0.5rem 0; margin: 0; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.4rem 0; }
.carousel-dots { display: flex; gap: 6px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: #ccc; cursor: pointer; padding: 0; }
.carousel-dot.active { background: #4183d7; }
.carousel-pause { background: none; border: none; cursor: pointer; color: #999; padding: 0; line-height: 0; display: flex; align-items: center; }
.carousel-pause:hover { color: #4183d7; }

.hero-img.centered { display: block; margin: 0 auto 1.5rem; max-width: 100%; border-radius: 4px; }
