/*
Theme Name: Ma
Theme URI: https://akino.blog
Author: Perris Aquino
Description: Custom theme for akino.blog
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ma
*/

:root {
  --ink: #0F0F0F;
  --paper: #FAFAF8;
  --stone: #1A1A1A;
  --smoke: #2A2A2A;
  --ash: #6B6B6B;
  --mist: #9A9A9A;
  --cloud: #E8E6E2;
  --warmwhite: #F5F3EF;
  --sage: #5A7A6A;
  --sage-soft: #7A9A8A;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
  --jp: 'Noto Sans JP', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--stone);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--sage);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

img { max-width: 100%; height: auto; }

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.page {
  flex: 1;
  display: flex;
  flex-direction: row;
  padding: 56px 64px;
  gap: 0;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 64px;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
}

.site-name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--stone);
  line-height: 1.5;
  margin-bottom: 4px;
}

.site-name-sub {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 32px;
}

.bio {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ash);
  font-weight: 400;
  max-width: 260px;
}

/* ─── NAV (WordPress menu) ─── */
.sidebar-nav {
  margin-top: 32px;
}

.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-nav ul li a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ash);
  transition: color 0.3s ease;
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li.current-menu-item > a,
.sidebar-nav ul li.current_page_item > a,
.sidebar-nav ul li.current-post-ancestor > a {
  color: var(--stone);
  font-weight: 500;
}

.socials {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.socials a { color: var(--mist); transition: color 0.3s ease; }
.socials a:hover { color: var(--stone); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }

/* ─── MAIN ─── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─── SECTION TITLE ─── */
.section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 32px;
}

/* ═══════════════════════════════════════════
   POST LIST
═══════════════════════════════════════════ */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.post-list-date {
  font-size: 12px;
  color: var(--mist);
  width: 72px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.post-list-title {
  font-size: 14px;
  color: var(--ash);
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.post-list a:hover .post-list-title {
  color: var(--stone);
}

/* ═══════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════ */
.breadcrumb {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--mist);
  transition: color 0.3s ease;
}

.breadcrumb a:hover { color: var(--stone); }

.breadcrumb .sep {
  margin: 0 10px;
  color: var(--cloud);
}

.breadcrumb .current {
  color: var(--ash);
}

.post-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.post-meta-item {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mist);
  font-weight: 400;
}

.post-body {
  max-width: 560px;
}

.post-body p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ash);
  margin-bottom: 20px;
}

.post-body p:first-child {
  color: var(--stone);
}

.post-body h2 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 40px;
  margin-bottom: 16px;
}

.post-body blockquote {
  border-left: 1px solid var(--cloud);
  padding-left: 20px;
  margin: 28px 0;
  font-style: italic;
  color: var(--mist);
  font-size: 14px;
  line-height: 1.8;
}

.post-body a {
  color: var(--ash);
  border-bottom: 1px solid var(--cloud);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.post-body a:hover {
  color: var(--stone);
  border-color: var(--stone);
}

.post-body ul, .post-body ol {
  margin: 0 0 20px 0;
  padding: 0;
  list-style: none;
}

.post-body ul li, .post-body ol li {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ash);
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}

.post-body ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--cloud);
}

.post-body hr {
  border: none;
  height: 1px;
  background: var(--cloud);
  margin: 40px 0;
  max-width: 48px;
}

.post-end {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--cloud);
  max-width: 560px;
}

.post-end a {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mist);
  transition: color 0.3s ease;
}

.post-end a:hover { color: var(--stone); }

/* ═══════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════ */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project-entry {
  max-width: 520px;
}

.project-entry-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.project-entry-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--stone);
  letter-spacing: 0.5px;
}

.project-entry-status {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  padding: 2px 8px;
  background: rgba(90, 122, 106, 0.08);
  border-radius: 2px;
}

.project-entry-desc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ash);
}

/* ═══════════════════════════════════════════
   READING
═══════════════════════════════════════════ */
.reading-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 36px;
}

.reading-tabs a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mist);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.reading-tabs a:hover { color: var(--ash); }

.reading-tabs a.active {
  color: var(--stone);
  font-weight: 600;
  border-bottom-color: var(--stone);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 20px;
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.3s ease;
}

.book-card:hover { opacity: 0.8; }

.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--cloud);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.book-card:hover .book-cover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--stone);
  letter-spacing: 0.3px;
  line-height: 1.4;
}

.book-author {
  font-size: 10px;
  color: var(--mist);
  letter-spacing: 0.3px;
  margin-top: -6px;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
  padding: 32px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid var(--cloud);
}

.footer-contact {
  font-size: 12px;
  color: var(--mist);
  font-weight: 300;
}

.footer-contact a {
  color: var(--ash);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.footer-contact a:hover { border-color: var(--ash); }

.footer-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-copy {
  font-size: 11px;
  color: var(--mist);
  letter-spacing: 0.5px;
}

.footer-jp {
  font-family: var(--jp);
  font-size: 11px;
  font-weight: 300;
  color: var(--cloud);
  letter-spacing: 3px;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar-top { opacity: 0; animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards; }
.socials { opacity: 0; animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards; }
.section-title { opacity: 0; animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards; }
.breadcrumb { opacity: 0; animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards; }
.post-body { opacity: 0; animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards; }
.post-end { opacity: 0; animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards; }
.site-footer { opacity: 0; animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards; }

.post-list li {
  opacity: 0;
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.post-list li:nth-child(1) { animation-delay: 0.25s; }
.post-list li:nth-child(2) { animation-delay: 0.30s; }
.post-list li:nth-child(3) { animation-delay: 0.35s; }
.post-list li:nth-child(4) { animation-delay: 0.40s; }
.post-list li:nth-child(5) { animation-delay: 0.45s; }
.post-list li:nth-child(6) { animation-delay: 0.50s; }
.post-list li:nth-child(7) { animation-delay: 0.55s; }
.post-list li:nth-child(8) { animation-delay: 0.60s; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .page {
    flex-direction: column;
    padding: 40px 24px;
    gap: 48px;
  }
  .sidebar { width: 100%; padding-right: 0; }
  .bio { max-width: 100%; }
  .post-body, .post-end { max-width: 100%; }
  .project-entry { max-width: 100%; }
  .book-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer {
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 540px) {
  .page { padding: 32px 20px; gap: 36px; }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
  .book-title { font-size: 11px; }
  .reading-tabs { gap: 16px; flex-wrap: wrap; }
  .site-footer { padding: 20px; }
}

/* ═══════════════════════════════════════════
   BOOK DETAIL
═══════════════════════════════════════════ */
.book-detail {
  display: flex;
  gap: 32px;
  margin-bottom: 48px;
  align-items: flex-start;
}
.book-detail-cover {
  flex-shrink: 0;
  width: 140px;
}
.book-detail-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.book-detail-meta { flex: 1; }
.book-detail-title {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.2;
}
.book-detail-author {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ash);
  margin-bottom: 12px;
}
.book-detail-status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--warmwhite);
  color: var(--ash);
  margin-bottom: 16px;
}
.book-detail-status.status-currently-reading { background: #EEF4F0; color: var(--sage); }
.book-detail-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--sage);
  text-decoration: none;
  margin-top: 4px;
}
.book-detail-link:hover { text-decoration: underline; }

.book-section { margin-bottom: 40px; }
.book-section-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cloud);
}

.book-cover-placeholder {
  background: var(--warmwhite);
  aspect-ratio: 2/3;
  border-radius: 4px;
}

.reading-empty {
  font-family: var(--sans);
  color: var(--ash);
  font-size: 14px;
  grid-column: 1 / -1;
}

/* ═══════════════════════════════════════════
   PROJECT DETAIL
═══════════════════════════════════════════ */
.project-detail-header { margin-bottom: 32px; }
.project-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.project-status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--warmwhite);
  color: var(--ash);
}
.project-status.status-released { background: #EEF4F0; color: var(--sage); }
.project-status.status-in-progress { background: #F0EFEA; color: var(--smoke); }
.project-detail-link {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--sage);
  text-decoration: none;
}
.project-detail-link:hover { text-decoration: underline; }

@media (max-width: 540px) {
  .book-detail { flex-direction: column; gap: 20px; }
  .book-detail-cover { width: 100px; }
  .book-detail-title { font-size: 22px; }
}
