/* RESET & ROOT */
*,
::before,
::after {
  box-sizing: border-box;
}

:root {
  --bg:#0f172a;
  --text:#e5e7eb;
  --card:#111827;
  --cardlink:#1f2937;
  --border:#1f2937;
  --link:#22c55e;
  --muted:#9ca3af;
  --accent:#22c55e;
}

html.light-mode {
  --bg:#ffffff;
  --text:#111827;
  --card:#f9fafb;
  --cardlink:#f3f4f6;
  --border:#e5e7eb;
  --link:#16a34a;
  --muted:#6b7280;
  --accent:#16a34a;
}

body {
  margin:0;
  font-family:system-ui;
  background:var(--bg);
  color:var(--text);
}

/* HEADER */
header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px;
  background:var(--card);
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:999;
}

.logo img {
  height:40px;
}

nav a {
  margin-left:15px;
  text-decoration:none;
  color:var(--muted);
}

nav a:hover {
  color:var(--link);
}

.menu-btn {
  font-size:22px;
  cursor:pointer;
  display:none;
}

.close-btn {
  display:none;
}

/* TOGGLE */
.toggle {
  cursor:pointer;
  font-size:18px;
}

/* CONTAINER */
.container {
  max-width:1100px;
  margin:auto;
  padding:20px;
}

/* BLOG BASIC */
.blog-list {
  list-style:none;
  padding:0;
  margin:0;
}

.blog-list li {
  margin-bottom:20px;
}

.blog-list a {
  text-decoration:none;
  color:inherit;
  display:flex;
  gap:15px;
}

.thumb img {
  width:120px;
  border-radius:10px;
}

.title {
  margin:0;
}

.date {
  font-size:12px;
  color:var(--muted);
}

.desc {
  font-size:14px;
  color:var(--muted);
}

/* FOOTER */
.footer-container {
  max-width:1100px;
  margin:auto;
  padding:30px 20px;
}

.footer-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:20px;
}

.footer-title {
  font-weight:600;
  margin-bottom:10px;
}

.footer-grid a {
  display:block;
  margin-bottom:10px;
  text-decoration:none;
  color:var(--text);
  font-size:14px;
  border-bottom:1px solid var(--border);
}

.footer-grid a:hover {
  color:var(--accent);
}

.footer-more {
  margin-top:8px;
  font-size:13px;
  color:var(--accent);
}

.footer-bottom {
  text-align:center;
  margin-top:20px;
  font-size:13px;
  color:var(--muted);
}

/* =========================
   MOBILE
========================= */
@media(max-width:768px){
  .footer-container{
    padding:30px 15px;
  }

  .footer-grid{
    gap:20px;
  }
}

/* light mode fix */
html.light-mode .footer a:not(:last-child){
  border-bottom:1px dashed rgba(0,0,0,0.05);
}

/* =========================
   BOTTOM
========================= */
.footer-bottom {
  margin-top:25px;
  padding-top:15px;
  border-top:1px solid var(--border);
  font-size:13px;
  color:var(--muted);
  text-align:center;
}

/* MOBILE */
@media(max-width:768px){
  .menu-btn,
  .close-btn {
    display:block;
  }

  nav {
    position:fixed;
    top:0;
    left:-100%;
    width:75%;
    height:100%;
    background:var(--card);
    display:flex;
    flex-direction:column;
    padding:30px;
    transition:.3s;
    z-index:999;
  }

  nav.active {
    left:0;
  }

  nav a {
    margin:15px 0;
    font-size:18px;
  }

  .close-btn {
    margin-bottom:20px;
    cursor:pointer;
    padding:8px 12px;
    background:var(--border);
    border-radius:8px;
  }

  .blog-list a {
    flex-direction:column;
  }

  .thumb img {
    width:100%;
  }
}
