/* blog.css - mirrors the look of index.html. Variables, header and footer are copied from it. */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  color-scheme: light dark;
  --primary: #0a0a0a; --accent: #E10600; --text: #1a1a1a; --text-light: #55555a;
  --bg: #ffffff; --bg-alt: #f2f2f2; --border: #e0e0e0;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --section-highlight: #f2f2f2; --card-bg: #ffffff; --quote-bg: #f7f7f7;
}
[data-theme="dark"] {
  color-scheme: dark;
  --primary: #f5f5f5; --accent: #FF1A1A; --text: #f2f2f2; --text-light: #b0b0b0;
  --bg: #0a0a0a; --bg-alt: #141414; --border: #2a2a2a;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.5); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --section-highlight: #141414; --card-bg: #141414; --quote-bg: #141414;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --primary: #f5f5f5; --accent: #FF1A1A; --text: #f2f2f2; --text-light: #b0b0b0;
    --bg: #0a0a0a; --bg-alt: #141414; --border: #2a2a2a;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.5); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --section-highlight: #141414; --card-bg: #141414; --quote-bg: #141414;
  }
}

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; max-width: 100vw; background-color: var(--bg); }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; color: var(--text); background: var(--bg); overflow-x: hidden; max-width: 100vw; transition: background 0.3s, color 0.3s; padding-top: 135px; }
.container { max-width: 1350px; margin: 0 auto; width: 100%; padding: 0 5%; }

/* ===== HEADER (same as index.html) ===== */
header.site-header { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 100; background: var(--bg); border-bottom: 3px solid var(--primary); min-height: 135px; display: flex; align-items: center; padding: 0.8rem 0; transition: background 0.3s; }
.site-header nav { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; width: 100%; padding: 0 1.5rem; }
.logo-wrap { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; min-width: 0; }
.header-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); flex-shrink: 0; }
.logo-text-group { display: flex; align-items: center; gap: 6px; font-size: 1.35rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.pipe { color: #888; margin: 0 6px; }
.job-title { color: var(--accent); }
.theme-wrap { position: static; transform: none; }
.theme-toggle { background: rgba(128,128,128,0.15); border: none; color: var(--text); cursor: pointer; font-size: 1.25rem; border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.theme-toggle:hover { background: var(--bg-alt); color: var(--primary); }
.nav-right { display: flex; align-items: center; flex-shrink: 0; }
.nav-links { display: flex; gap: 1.2rem; list-style: none; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 1.05rem; transition: 0.3s; border-bottom: 3px solid transparent; padding-bottom: 5px; }
.nav-links a:hover { border-bottom: 3px solid var(--accent); color: var(--accent); }
.nav-fix-btn { background-color: var(--bg); color: var(--primary) !important; padding: 8px 14px !important; border-radius: 50px; border: 2px solid var(--primary) !important; box-shadow: 0 4px 0 var(--accent); display: inline-block; transition: 0.3s all ease; }
.nav-links .nav-fix-btn:hover { background-color: var(--accent) !important; color: #ffffff !important; border-color: var(--accent) !important; }
.nav-for-you { background-color: var(--primary); color: var(--bg) !important; height: 40px; padding: 0 18px; border-radius: 50px; display: inline-flex !important; align-items: center; justify-content: center; gap: 10px; border: none !important; font-weight: 800 !important; position: relative; box-shadow: var(--shadow); white-space: nowrap; }
.nav-links .nav-for-you:hover { border-bottom: none !important; background-color: var(--accent) !important; color: #ffffff !important; }
.nav-for-you::after { content: ""; position: absolute; bottom: 3px; left: 18px; right: 18px; height: 3px; background-color: var(--accent); border-radius: 2px; }
.nav-for-you:hover::after { background-color: #ffffff !important; }
.menu-toggle { display: none; }

@media (max-width: 1400px) {
  body { padding-top: 76px; }
  header.site-header { min-height: 76px; padding: 0; }
  .site-header nav { padding: 8px 14px; gap: 10px; }
  .logo-wrap { flex: 1; min-width: 0; gap: 10px; }
  .header-photo { width: 48px; height: 48px; }
  .logo-text-group { flex-direction: column; align-items: flex-start; gap: 0; white-space: normal; font-size: 1rem; line-height: 1.2; min-width: 0; }
  .pipe { display: none; }
  .job-title { font-size: 0.78rem; font-weight: 600; }
  .theme-wrap { position: static; transform: none; flex-shrink: 0; }
  .theme-toggle { width: 40px; height: 40px; font-size: 1.1rem; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin: 0 0 0 4px; padding: 0; background: none; border: 2px solid var(--border); border-radius: 10px; color: var(--primary); font-size: 1.4rem; cursor: pointer; }
  .nav-links { display: none; position: fixed; top: 76px; left: 0; right: 0; max-height: calc(100vh - 76px); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.25rem 1.25rem; background: var(--bg); border-bottom: 4px solid var(--accent); box-shadow: var(--shadow-lg); white-space: normal; z-index: 99; }
  .nav-links.active { display: flex; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: block; padding: 14px 6px; font-size: 1.1rem; border-bottom: none; text-align: left; }
  .nav-links a.nav-fix-btn { box-shadow: none; border: none !important; border-radius: 0; padding: 14px 6px !important; }
  .nav-links a.nav-for-you { display: flex !important; justify-content: center; width: 100%; height: 46px; margin-top: 12px; }
  .nav-for-you::after { display: none; }
}

/* ===== BUTTONS ===== */
.cta-button { display: inline-block; padding: 1.2rem 2.5rem; background: var(--accent); color: #ffffff; text-decoration: none; border-radius: 10px; font-weight: 800; cursor: pointer; border: none; font-size: clamp(1.1rem, 2vw, 1.35rem); transition: 0.3s; text-align: center; max-width: 100%; }
.cta-button:hover { background: #b30000; transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.2); }

/* ===== FOOTER (same as index.html) ===== */
footer { padding: 4rem 0; text-align: center; background: var(--bg-alt); border-top: 3px solid var(--primary); }
.social-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; width: 100%; }
.social-icon { font-size: 1.5rem; color: #ffffff; background: var(--accent); width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50% !important; text-decoration: none !important; transition: 0.4s; flex-shrink: 0; }
.social-icon:hover { transform: scale(1.1) rotate(360deg); background: var(--primary); color: white; }
.footer-credit { margin-bottom: 10px; font-weight: 700; color: var(--primary); }
@media (max-width: 767px) {
  .container { padding: 0 15px; }
  .social-links { gap: 10px; }
  .social-icon { width: 45px; height: 45px; font-size: 1.2rem; }
  .footer-credit { font-size: 0.85rem; padding: 0 10px; }
}

/* ===== BLOG-SPECIFIC ===== */
.blog-hero { background: linear-gradient(135deg, #050505 0%, #1a1a1a 100%); color: #fff; padding: clamp(3rem, 8vh, 5rem) 0; text-align: center; }
.blog-hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900; margin-bottom: 1rem; }
.blog-hero p { font-size: clamp(1rem, 2vw, 1.3rem); max-width: 800px; margin: 0 auto; padding: 0 20px; opacity: 0.95; }
.blog-hero .tagline-accent { color: var(--accent); font-weight: 800; }

.blog-section { padding: clamp(3rem, 6vh, 5rem) 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.post-card { background: var(--card-bg); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: 10px; padding: 1.8rem; box-shadow: var(--shadow); transition: 0.3s; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary); border-top-color: var(--primary); }
.post-card h2 { font-size: 1.3rem; margin: 10px 0; }
.post-card h2 a { color: var(--primary); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card p { color: var(--text-light); font-size: 1rem; margin-bottom: 1rem; }
.post-card .read-more { margin-top: auto; font-weight: 800; color: var(--accent); text-decoration: none; }
.empty-note { text-align: center; color: var(--text-light); font-size: 1.15rem; max-width: 700px; margin: 0 auto; }

.blog-date { font-size: 0.8rem; color: #ffffff; font-weight: 800; background: var(--accent); padding: 4px 10px; border-radius: 4px; display: inline-block; margin-bottom: 10px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0.5rem 0 0; }
.tag { font-size: 0.8rem; font-weight: 700; color: var(--primary); border: 1px solid var(--border); background: var(--bg-alt); padding: 3px 10px; border-radius: 50px; }

.post-wrap { max-width: 820px; margin: 0 auto; padding: clamp(2rem, 5vh, 4rem) 20px; }
.post-wrap .back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--accent); font-weight: 800; text-decoration: none; }
.post-wrap h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.25; color: var(--primary); font-weight: 900; margin-bottom: 0.8rem; }
.post-meta { color: var(--text-light); margin-bottom: 2rem; }
.post-content h2 { color: var(--primary); font-size: 1.5rem; font-weight: 800; margin: 2.2rem 0 0.8rem; border-left: 5px solid var(--accent); padding-left: 15px; }
.post-content p, .post-content li { font-size: 1.1rem; line-height: 1.8; color: var(--text); margin-bottom: 1rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-content a { color: var(--accent); }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); margin: 1rem 0; }
.post-content code { background: var(--bg-alt); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; font-size: 0.95em; font-family: Consolas, Monaco, 'Courier New', monospace; }
.post-content pre { background: var(--bg-alt); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: 8px; padding: 1.2rem; overflow-x: auto; margin: 1rem 0 1.5rem; }
.post-content pre code { background: none; border: none; padding: 0; font-size: 0.95rem; line-height: 1.6; }
.status-box { background: var(--card-bg); border: 1px solid var(--border); border-left: 8px solid var(--accent); border-radius: 10px; padding: 1.2rem 1.5rem; margin: 1.5rem 0; box-shadow: var(--shadow); }
.status-box p { margin-bottom: 0.4rem; font-size: 1.05rem; }
.post-cta { background: var(--bg-alt); border-radius: 12px; border-bottom: 6px solid var(--accent); padding: 2rem; text-align: center; margin-top: 3rem; }
.post-cta p { color: var(--text-light); margin-bottom: 1.2rem; font-size: 1.1rem; }
@media (max-width: 767px) { .cta-button { padding: 1rem 1.5rem; font-size: 1rem; width: auto; max-width: 90%; } }
