/*
Theme Name: SAKI MAKI NET Minimal
Theme URI: https://sakimaki.net/
Author: SAKI MAKI
Description: Minimal archive theme for SAKI MAKI NET.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: All rights reserved.
Text Domain: sakimaki-minimal
*/

:root {
  --sm-bg: #f6f2e9;
  --sm-text: #111111;
  --sm-muted: #5f5a52;
  --sm-line: rgba(17,17,17,.62);
  --sm-softline: rgba(17,17,17,.16);
  --sm-accent: #d5302f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sm-bg);
  color: var(--sm-text);
  font-family: Helvetica, Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
}

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

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

a:hover {
  color: var(--sm-accent);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.sm-site {
  min-height: 100vh;
  background: var(--sm-bg);
  padding: 58px 28px 88px;
}

.sm-masthead {
  text-align: center;
  margin: 0 auto 74px;
}

.sm-title {
  display: inline-block;
  font-family: "Avenir Next Condensed", "Avenir Next", "Futura", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(36px, 4.4vw, 62px);
  line-height: 1;
  font-weight: 750;
  letter-spacing: .12em;
  transform: scaleX(.92);
  transform-origin: center;
  white-space: nowrap;
}

.sm-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
}

.sm-landing {
  display: grid;
  grid-template-columns: 220px 420px;
  gap: 58px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 76px;
}

.sm-menu {
  width: 220px;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 27px;
  line-height: 1.35;
  text-align: left;
}

.sm-menu > a,
.sm-works-toggle summary {
  display: block;
  width: fit-content;
  margin: 0 0 24px 0;
  padding: 0;
  color: var(--sm-text);
  font-size: 27px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -.04em;
  cursor: pointer;
}

.sm-works-toggle {
  margin: 0;
  padding: 0;
}

.sm-works-toggle summary {
  list-style: none;
}

.sm-works-toggle summary::-webkit-details-marker {
  display: none;
}

.sm-works-toggle summary::after {
  content: "";
}

.sm-submenu {
  margin: -10px 0 20px 0;
  padding-left: 22px;
}

.sm-submenu a {
  display: block;
  width: fit-content;
  margin: 0 0 9px 0;
  color: var(--sm-muted);
  font-size: 19px;
  line-height: 1.45;
}

.sm-portrait {
  width: 420px;
  margin: 0;
}

.sm-portrait img {
  display: block;
  width: 420px;
  height: auto;
}

.sm-news-block {
  width: 100%;
  margin: 76px auto 0;
}

.sm-news-block h2,
.sm-page h1,
.sm-archive h1 {
  margin: 0 0 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--sm-line);
  font-size: 14px;
  letter-spacing: .2em;
  font-weight: 700;
  text-transform: uppercase;
}

.sm-news-block ul,
.sm-archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sm-news-block li,
.sm-archive-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sm-softline);
  font-size: 15px;
  line-height: 1.8;
}

.sm-news-block time,
.sm-archive-list time {
  color: var(--sm-muted);
  font-size: 13px;
}

.sm-copyright {
  width: min(760px, 100%);
  margin: 96px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--sm-line);
  color: var(--sm-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
}

/* Pages */
.sm-page,
.sm-archive,
.sm-single {
  width: min(760px, calc(100vw - 56px));
  margin: 0 auto;
  padding-top: 8px;
}

.sm-page-title,
.sm-single-title {
  margin: 0 0 38px;
  font-family: "Avenir Next Condensed", "Avenir Next", "Futura", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sm-page-content,
.sm-single-content {
  font-size: 18px;
  line-height: 2;
}

.sm-page-content p,
.sm-single-content p {
  margin: 0 0 1.5em;
}

.sm-page-content a,
.sm-single-content a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sm-back {
  display: inline-block;
  margin-top: 64px;
  color: var(--sm-muted);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .sm-site {
    padding: 38px 22px 64px;
  }

  .sm-masthead {
    margin-bottom: 34px;
  }

  .sm-title {
    font-size: clamp(29px, 8vw, 40px);
    letter-spacing: .08em;
    transform: scaleX(.94);
    white-space: nowrap;
  }

  .sm-wrap {
    width: 100%;
  }

  .sm-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    width: 100%;
    margin: 0 auto 54px;
  }

  .sm-portrait {
    order: 1;
    width: 210px;
    max-width: 210px;
    margin: 0 auto;
  }

  .sm-portrait img {
    width: 210px;
    max-width: 210px;
    margin: 0 auto;
  }

  .sm-menu {
    order: 2;
    width: 270px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "profile news"
      "essay works";
    column-gap: 44px;
    row-gap: 18px;
    margin: 0 auto;
    padding: 0;
    align-items: start;
    justify-items: center;
    text-align: center;
  }

  .sm-menu > a,
  .sm-works-toggle summary {
    width: auto;
    margin: 0;
    padding: 0;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: .02em;
    text-align: center;
  }

  .sm-menu > a[href$="/profile/"] { grid-area: profile; }
  .sm-menu > a[href$="/news/"] { grid-area: news; }
  .sm-menu > a[href$="/essay/"] { grid-area: essay; }

  .sm-works-toggle {
    grid-area: works;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .sm-submenu {
    margin: 12px 0 0 0;
    padding: 0;
    text-align: center;
  }

  .sm-submenu a {
    width: auto;
    margin: 0 0 8px 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
  }

  .sm-news-block {
    width: 100%;
    margin: 54px auto 0;
  }

  .sm-news-block li,
  .sm-archive-list li {
    display: block;
    padding: 13px 0;
  }

  .sm-news-block time,
  .sm-archive-list time {
    display: block;
    margin-bottom: 3px;
  }

  .sm-copyright {
    width: 100%;
    margin: 64px auto 0;
    padding-top: 18px;
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: .08em;
  }

  .sm-page,
  .sm-archive,
  .sm-single {
    width: 100%;
  }

  .sm-page-title,
  .sm-single-title {
    font-size: 42px;
  }
}
/* Essay list */
.saki-essay-list {
  width: min(860px, calc(100vw - 48px));
  margin: 80px auto;
}

.saki-essay-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.22);
}

.saki-essay-thumb {
  display: block;
  width: 220px;
  aspect-ratio: 4 / 3;
  background: #ddd8cd;
  overflow: hidden;
  text-decoration: none;
}

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

.saki-no-thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #5f5a52;
}

.saki-essay-text time {
  display: block;
  margin-bottom: 10px;
  color: #5f5a52;
  font-size: 13px;
}

.saki-essay-text h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 500;
}

.saki-essay-text h2 a {
  color: #111;
  text-decoration: none;
}

.saki-essay-text p {
  margin: 0;
  color: #5f5a52;
  font-size: 15px;
  line-height: 1.9;
}

.saki-read-more {
  display: inline-block;
  margin-top: 16px;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #111;
  padding-bottom: 3px;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.saki-read-more:hover {
  color: #d5302f;
  border-bottom-color: #d5302f;
}

@media (max-width: 760px) {
  .saki-essay-list {
    width: calc(100vw - 44px);
    margin: 48px auto;
  }

  .saki-essay-item {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 30px 0;
  }

  .saki-essay-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .saki-essay-text h2 {
    font-size: 24px;
  }
}
/* Essay JP / EN switch */
.essay-lang-switch {
  width: min(860px, calc(100vw - 48px));
  margin: 28px auto 32px;
  text-align: right;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.14em;
}

.essay-lang-switch a,
.essay-lang-switch span {
  display: inline-block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  vertical-align: baseline !important;
}

.essay-lang-switch a {
  color: #111;
  text-decoration: none;
}

.essay-lang-switch a:hover {
  color: #d5302f;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.essay-lang-switch .current {
  font-weight: 700;
  border-bottom: 1px solid #111;
  padding-bottom: 3px !important;
}

.essay-lang-switch span {
  color: #5f5a52;
  margin: 0 8px !important;
}

@media (max-width: 760px) {
  .essay-lang-switch {
    width: calc(100vw - 44px);
    margin: 22px auto 28px;
    text-align: left;
  }
}
/* TOP link */
.saki-top-link {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 9999;
  color: #111;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.saki-top-link:hover {
  color: #d5302f;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 760px) {
  .saki-top-link {
    position: static;
    display: inline-block;
    margin: 24px 0 0 24px;
    font-size: 12px;
  }
}
/* TOP link：少し大きく、画面端から離す */
.saki-top-link {
  position: fixed !important;
  top: 46px !important;
  left: max(36px, calc((100vw - 860px) / 2)) !important;
  z-index: 9999 !important;

  color: #111 !important;
  text-decoration: none !important;

  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;

  padding: 0 !important;
}

.saki-top-link:hover {
  color: #d5302f !important;
  text-decoration: underline !important;
  text-underline-offset: 5px !important;
}

/* スマホでは固定せず、本文上に自然に置く */
@media (max-width: 760px) {
  .saki-top-link {
    position: static !important;
    display: inline-block !important;
    margin: 28px 0 0 24px !important;
    font-size: 15px !important;
    letter-spacing: 0.08em !important;
  }
}