/*
Theme Name: Darkfolio
Description: Minimal dark theme. 3-column post grid, random pages on single posts, 2-column pages. No sidebar, no comments.
Version: 1.0
Text Domain: darkfolio
*/

:root{
  --bg:#14161a;
  --surface:#1c1f25;
  --line:#2c3038;
  --text:#d9dce1;
  --muted:#8b919b;
  --accent:#e0b66a;
  --wrap:1180px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font:18px/1.7 Georgia,"Times New Roman",serif;}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 24px}
.narrow{max-width:740px}

/* Header / footer */
.site-header{border-bottom:1px solid var(--line)}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;gap:24px;padding-top:22px;padding-bottom:22px;flex-wrap:wrap}
.site-title{font:700 24px/1 system-ui,sans-serif;color:var(--text);letter-spacing:-.01em}
.site-title:hover{text-decoration:none;color:var(--accent)}
.main-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:22px;flex-wrap:wrap}
.main-nav a{font:15px system-ui,sans-serif;color:var(--muted)}
.main-nav a:hover,.main-nav .current-menu-item a{color:var(--text);text-decoration:none}
.site-footer{border-top:1px solid var(--line);margin-top:80px;padding:32px 0;color:var(--muted);font:14px system-ui,sans-serif}

main{padding-top:56px}
.entry-title{font:700 clamp(30px,4.5vw,48px)/1.15 system-ui,sans-serif;letter-spacing:-.02em;margin:0 0 32px;color:#fff}
.entry-content{font-size:19px}
.entry-content > *{margin-top:0;margin-bottom:1.3em}
.entry-content h2,.entry-content h3{font-family:system-ui,sans-serif;color:#fff;line-height:1.25}
.entry-content blockquote{border-left:3px solid var(--accent);margin-left:0;padding-left:20px;color:var(--muted)}
.entry-content pre{background:var(--surface);padding:16px;overflow:auto;border-radius:6px}

/* Home: 3 columns */
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:28px}
.post-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:28px;display:flex;flex-direction:column}
.post-card h2{font:700 22px/1.3 system-ui,sans-serif;margin:0 0 12px}
.post-card h2 a{color:#fff}
.post-card h2 a:hover{color:var(--accent);text-decoration:none}
.post-card p{margin:0;color:var(--muted);font-size:16px;line-height:1.65}
.pagination{margin-top:48px;font:15px system-ui,sans-serif;display:flex;gap:10px;flex-wrap:wrap}
.pagination .page-numbers{padding:6px 12px;border:1px solid var(--line);border-radius:4px;color:var(--text)}
.pagination .current{background:var(--accent);color:#14161a;border-color:var(--accent)}

/* Single post: random pages, 2 columns */
.random-pages{}
.page-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:32px 28px}
.page-card a{display:block;color:var(--text)}
.page-card a:hover{text-decoration:none}
.page-card .thumb{aspect-ratio:9/16;background:var(--surface);border:1px solid var(--line);border-radius:8px;overflow:hidden}
.page-card .thumb img{width:100%;height:100%;object-fit:cover}
.page-card h3{font:600 19px/1.3 system-ui,sans-serif;margin:12px 0 0}
.page-card a:hover h3{color:var(--accent)}

/* Page: 2 columns */
.page-layout{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:start}
.page-layout .featured{border-radius:8px;overflow:hidden;border:1px solid var(--line);position:sticky;top:24px}
.page-layout .featured img{width:100%}
.page-layout.no-image{grid-template-columns:1fr}

@media (max-width:900px){
  .post-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:640px){
  .post-grid,.page-grid,.page-layout{grid-template-columns:1fr}
  .page-layout .featured{position:static}
  body{font-size:17px}
}

/* ---------- Buttons ---------- */
.btn,
.wp-block-button__link,
.wp-block-button.is-style-fill .wp-block-button__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  font: 600 16px/1 system-ui, sans-serif;
  color: #14161a;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 6px 0 #a47e34, 0 12px 24px rgba(224, 182, 106, .18);
  transition: transform .15s ease, box-shadow .15s ease;
  margin-top:10px;
}
/* light sweep across the button on hover */
.btn::before,
.wp-block-button__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}
.btn:hover,
.wp-block-button__link:hover {
  color: #14161a;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #a47e34, 0 16px 28px rgba(224, 182, 106, .28);
}
.btn:hover::before,
.wp-block-button__link:hover::before { transform: translateX(120%); }

/* pressed-down feel */
.btn:active,
.wp-block-button__link:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 #a47e34, 0 4px 10px rgba(224, 182, 106, .2);
}

/* Outline button: fill sweeps up from the bottom */
.btn-outline,
.wp-block-button.is-style-outline .wp-block-button__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  font: 600 16px/1 system-ui, sans-serif;
  color: var(--accent);
  background: transparent;
  border: 2px solid var(--accent);
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: none;
  transition: color .3s ease;
}
.btn-outline::before,
.wp-block-button.is-style-outline .wp-block-button__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.btn-outline:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  color: #14161a;
  text-decoration: none;
  transform: none;
  box-shadow: none;
}
.btn-outline:hover::before,
.wp-block-button.is-style-outline .wp-block-button__link:hover::before {
  transform: translateY(0);
}

/* Ghost button: underline grows from the left, arrow nudges */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font: 600 16px/1 system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0% 2px no-repeat;
  transition: background-size .35s ease, color .2s ease;
}
.btn-ghost::after {
  content: "\2192";
  transition: transform .25s ease;
}
.btn-ghost:hover {
  color: var(--accent);
  text-decoration: none;
  background-size: 100% 2px;
}
.btn-ghost:hover::after { transform: translateX(6px); }

/* Pagination uses the outline look */
.pagination .page-numbers {
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.pagination a.page-numbers:hover {
  background: var(--accent);
  color: #14161a;
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
}

/* Keyboard focus */
.btn:focus-visible,
.btn-outline:focus-visible,
.btn-ghost:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .btn, .btn::before, .btn-outline, .btn-outline::before,
  .btn-ghost, .btn-ghost::after, .wp-block-button__link,
  .wp-block-button__link::before {
    transition: none;
  }
}