/*
Theme Name: Uchide Minimal
Theme URI: https://psymage.com/blog/
Author: psymage
Description: シンプルな個人ブログ専用テーマ
Version: 1.0.0
Text Domain: uchide-minimal
*/

:root {
  --color-bg: #f5f1e8;
  --color-paper: #fffdf8;
  --color-text: #27231f;
  --color-muted: #77706a;
  --color-border: #ded6ca;
  --color-accent: #8a2f2f;
  --color-accent-dark: #5f1f1f;
  --color-link: #7b2525;
  --font-base: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --max-width: 1120px;
  --content-width: 760px;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  line-height: 1.85;
  letter-spacing: 0.02em;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 9999;
  padding: 10px 14px;
  background: #fff;
  color: #000;
  border: 2px solid #000;
}

.site-header {
  background: #171514;
  color: #fff;
  border-bottom: 4px solid var(--color-accent);
}

.site-container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
}

.site-branding {
  min-width: 0;
}

.site-title {
  display: inline-block;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.site-title:hover {
  color: #fff;
  text-decoration: none;
}

.site-description {
  margin: 8px 0 0;
  color: #d4cdc5;
  font-size: 14px;
}

.primary-nav {
  flex-shrink: 0;
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  color: #f4efe8;
  font-size: 14px;
}

.primary-nav a:hover {
  color: #fff;
}

.site-main {
  padding: 36px 0 56px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: 36px;
  align-items: start;
}

.main-column {
  min-width: 0;
}

.page-header {
  margin-bottom: 24px;
  padding: 24px;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.page-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.45;
}

.archive-description {
  margin-top: 12px;
  color: var(--color-muted);
}

.post-card {
  margin-bottom: 24px;
  padding: 28px;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.post-card.sticky {
  border-color: var(--color-accent);
}

.post-thumbnail {
  margin: -6px -6px 22px;
  overflow: hidden;
  border-radius: 10px;
}

.post-thumbnail img {
  width: 100%;
  display: block;
}

.entry-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

.entry-title a {
  color: var(--color-text);
}

.entry-title a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 18px;
  color: var(--color-muted);
  font-size: 13px;
}

.entry-meta a {
  color: var(--color-muted);
}

.entry-summary {
  color: #3b3632;
}

.entry-summary p {
  margin: 0 0 18px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 16px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
}

.read-more:hover {
  background: var(--color-accent-dark);
  color: #fff;
  text-decoration: none;
}

.single-article {
  padding: 34px;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.single-article .entry-title {
  font-size: 34px;
}

.entry-content {
  font-size: 17px;
}

.entry-content p {
  margin: 0 0 1.45em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 2.2em 0 0.9em;
  line-height: 1.5;
  font-family: var(--font-serif);
}

.entry-content h2 {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
  font-size: 27px;
}

.entry-content h3 {
  font-size: 23px;
}

.entry-content h4 {
  font-size: 20px;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.5em 1.4em;
  padding: 0;
}

.entry-content li {
  margin-bottom: 0.4em;
}

.entry-content blockquote {
  margin: 1.8em 0;
  padding: 18px 22px;
  background: #f4eee4;
  border-left: 5px solid var(--color-accent);
  color: #3d3731;
}

.entry-content pre {
  overflow-x: auto;
  padding: 18px;
  background: #1e1e1e;
  color: #f4f4f4;
  border-radius: 8px;
  line-height: 1.6;
}

.entry-content code {
  padding: 0.15em 0.35em;
  background: #eee5da;
  border-radius: 4px;
  font-family: Consolas, Menlo, Monaco, monospace;
  font-size: 0.92em;
}

.entry-content pre code {
  padding: 0;
  background: transparent;
}

.entry-content table {
  width: 100%;
  margin: 1.8em 0;
  border-collapse: collapse;
  background: #fff;
}

.entry-content th,
.entry-content td {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.entry-content th {
  background: #f0e8dd;
}

.entry-content figure {
  margin: 1.8em 0;
}

.entry-content figcaption {
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 13px;
  text-align: center;
}

.entry-footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 14px;
}

.entry-footer a {
  color: var(--color-muted);
}

.post-navigation {
  margin-top: 24px;
  padding: 18px;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  min-width: 0;
}

.post-navigation .nav-next {
  text-align: right;
}

.posts-pagination {
  margin-top: 30px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
}

.pagination .page-numbers.current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.sidebar {
  min-width: 0;
}

.widget {
  margin-bottom: 22px;
  padding: 20px;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.widget-title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.5;
}

.widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.65;
}

.widget select,
.search-form input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text);
  font-size: 15px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form label {
  flex: 1;
}

.search-form .search-field {
  width: 100%;
}

.search-form .search-submit,
button,
input[type="submit"] {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: var(--color-accent);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

.search-form .search-submit:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--color-accent-dark);
}

.comments-area {
  margin-top: 28px;
  padding: 28px;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.comments-title,
.comment-reply-title {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 24px;
}

.comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-list .comment {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}

.comment-meta {
  color: var(--color-muted);
  font-size: 13px;
}

.comment-content {
  margin-top: 10px;
}

.comment-form p {
  margin-bottom: 14px;
}

.comment-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 15px;
}

.comment-form textarea {
  min-height: 160px;
}

.no-results,
.error-404 {
  padding: 30px;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.site-footer {
  padding: 28px 0;
  background: #171514;
  color: #d4cdc5;
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.site-footer a {
  color: #fff;
}

@media screen and (max-width: 900px) {
  .header-inner {
    display: block;
  }

  .primary-nav {
    margin-top: 18px;
  }

  .layout {
    display: block;
  }

  .sidebar {
    margin-top: 34px;
  }

  .single-article,
  .post-card {
    padding: 24px;
  }

  .single-article .entry-title {
    font-size: 30px;
  }
}

@media screen and (max-width: 640px) {
  .site-container {
    width: min(100% - 28px, var(--max-width));
  }

  .site-main {
    padding: 24px 0 40px;
  }

  .site-title {
    font-size: 27px;
  }

  .post-card,
  .single-article,
  .comments-area,
  .page-header,
  .widget {
    border-radius: 10px;
  }

  .entry-title {
    font-size: 24px;
  }

  .single-article .entry-title {
    font-size: 27px;
  }

  .entry-content {
    font-size: 16px;
  }

  .post-navigation .nav-links {
    display: block;
  }

  .post-navigation .nav-next {
    margin-top: 14px;
    text-align: left;
  }

  .footer-inner {
    display: block;
  }
}

/* =========================================================
   Header background image
========================================================= */

.site-header {
  position: relative;
  min-height: 260px;
  background:
    linear-gradient(
      90deg,
      rgba(10, 8, 7, 0.82) 0%,
      rgba(10, 8, 7, 0.62) 42%,
      rgba(10, 8, 7, 0.28) 100%
    ),
    url("https://psymage.com/blog/wp-content/uploads/d59ecaf5-16f3-42a3-9e43-0c97b7f1445a.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #fff;
  border-bottom: 4px solid var(--color-accent);
}

.header-inner {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.site-branding {
  max-width: 680px;
  min-width: 0;
}

.site-title {
  color: #fff;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

.site-title a {
  color: #fff;
}

.site-title a:hover {
  color: #fff;
  text-decoration: none;
}

.site-description {
  margin: 12px 0 0;
  color: #f1eae0;
  font-size: 15px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.primary-nav {
  align-self: flex-start;
  margin-top: 4px;
  padding: 8px 12px;
  background: rgba(10, 8, 7, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.primary-nav a {
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.primary-nav a:hover {
  color: #fff;
}

@media screen and (max-width: 900px) {
  .site-header {
    min-height: 230px;
  }

  .header-inner {
    min-height: 230px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 30px 0;
  }

  .primary-nav {
    align-self: flex-start;
    margin-top: 18px;
    border-radius: 14px;
  }
}

@media screen and (max-width: 640px) {
  .site-header {
    min-height: 190px;
    background:
      linear-gradient(
        180deg,
        rgba(10, 8, 7, 0.72) 0%,
        rgba(10, 8, 7, 0.56) 100%
      ),
      url("https://psymage.com/blog/wp-content/uploads/d59ecaf5-16f3-42a3-9e43-0c97b7f1445a.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }

  .header-inner {
    min-height: 190px;
    padding: 24px 0;
  }

  .site-title {
    font-size: 28px;
  }

  .site-description {
    font-size: 13px;
  }

  .primary-nav {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .primary-nav ul {
    gap: 6px 14px;
  }
}