/*
Theme Name: Nick Nakatani
Theme URI: https://nicknakatani.com/
Author: Nick Nakatani / Maruninben Inc.
Author URI: https://nicknakatani.com/
Description: 中谷英峰の個人サイト用カスタムテーマ。「学んだものを、次に渡す。」哲学に基づくダーク&ゴールドのミニマルデザイン。Cormorant Garamond + Noto Serif JP + Inter のタイポグラフィ。固定ページ(Home, Story, Ventures, Letters, Writings, Contact)とブログ投稿(Letters)のテンプレートを内蔵。
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: Proprietary
License URI: https://nicknakatani.com/
Text Domain: nicknakatani
Tags: custom, dark, japanese, personal, minimal
*/

/* ====================================================================
 * NICK NAKATANI THEME — SHARED STYLES
 * Page-specific styles are inlined within their respective page templates.
 * ==================================================================== */

:root {
  /* Backgrounds */
  --bg: #0a0908;
  --bg-soft: #161412;
  --bg-mid: #1f1d1a;
  --bg-cream: #faf9f5;
  --bg-cream-soft: #f3f1e9;
  --bg-cream-warm: #ede8db;
  --bg-tan: #c9b88e;
  --bg-tan-soft: #d4c5a0;
  --bg-tan-bg: rgba(201, 184, 142, 0.18);

  /* Cards */
  --card: #131110;
  --card-hover: #1a1815;

  /* Inks/Text */
  --ink: #1a1815;
  --ink-soft: #4a4540;
  --ink-mute: #8a847b;
  --ink-faint: #8a8580;

  /* Lines */
  --line: #d8d4c8;
  --line-soft: rgba(250, 249, 245, 0.08);

  /* Gold/Accent */
  --gold: #b89968;
  --gold-bright: #d4ad75;
  --gold-soft: #c4a47a;
  --accent: #8b6f47;

  /* Fonts */
  --font-display: 'Cormorant Garamond', 'Noto Serif JP', serif;
  --font-sans: 'Inter', 'Noto Sans JP', sans-serif;
  --font-jp: 'Noto Serif JP', serif;
  --font-jp-sans: 'Noto Sans JP', 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--bg-cream);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* WordPress required core classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--ink-mute); margin-top: 0.5rem; }
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.sticky, .gallery-caption, .bypostauthor { display: block; }

/* ============ NAV (Day 5 unified) ============ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: transparent;
  transition: all 0.4s ease;
}
nav.scrolled {
  background: rgba(10, 9, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px 56px;
  border-bottom: 1px solid rgba(184, 153, 104, 0.08);
}
.nav-left { justify-self: start; }
.nav-center { justify-self: center; text-align: center; }
.nav-right { justify-self: end; }

.brand-logo {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: inline-block;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.brand-logo:hover { color: var(--gold-bright); }
.brand-logo-jp {
  display: block;
  font-family: var(--font-jp);
  font-size: 9px;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  margin-top: 4px;
  text-transform: none;
}

.hamburger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hamburger-btn:hover { color: var(--gold-bright); }
.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}
.hamburger-icon span {
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: all 0.3s ease;
}
.hamburger-btn.active .hamburger-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.active .hamburger-icon span:nth-child(2) { opacity: 0; }
.hamburger-btn.active .hamburger-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============ MENU (Day 5 unified) ============ */
.menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.menu-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }
.menu-overlay::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: rgba(10, 9, 8, 0.4);
}
.menu-content {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: rgba(10, 9, 8, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 120px 60px 60px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.menu-overlay.active .menu-content { transform: translateX(0); }

.menu-eyebrow {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 6px;
  color: var(--gold-bright);
  text-transform: uppercase;
  font-style: italic;
  margin-bottom: 48px;
}
.menu-eyebrow::before { content: '— '; color: var(--gold); }

.menu-list { list-style: none; margin-bottom: 48px; }
.menu-list li { margin-bottom: 4px; border-bottom: 1px solid rgba(184, 153, 104, 0.08); }
.menu-list a {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  color: rgba(250, 249, 245, 0.9);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 0;
  transition: all 0.3s ease;
}
.menu-list a:hover { color: var(--gold-bright); padding-left: 8px; }
.menu-list a.active { color: var(--gold-bright); }
.menu-list a .menu-jp {
  font-family: var(--font-jp);
  font-size: 10px;
  letter-spacing: 4px;
  color: rgba(184, 153, 104, 0.5);
  font-weight: 300;
  text-transform: none;
}

.menu-footer {
  padding-top: 32px;
  border-top: 1px solid rgba(184, 153, 104, 0.15);
  margin-top: auto;
}
.menu-footer-text {
  font-family: var(--font-display);
  font-size: 11px;
  font-style: italic;
  color: rgba(250, 249, 245, 0.5);
  letter-spacing: 3px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.menu-archives { display: flex; flex-direction: column; gap: 8px; }
.menu-archives a {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(250, 249, 245, 0.7);
  text-decoration: none;
  text-transform: uppercase;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.menu-archives a::before { content: '↗'; color: var(--gold); font-size: 10px; }
.menu-archives a:hover { color: var(--gold-bright); }

/* ============ FOOTER (Day 5 unified) ============ */
footer {
  padding: 80px 56px 40px;
  background: var(--bg-soft);
  color: var(--bg-cream);
  border-top: none;
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-top {
  text-align: center;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(184, 153, 104, 0.15);
  margin-bottom: 56px;
}
.footer-mark {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.footer-mark-jp {
  font-family: var(--font-jp);
  font-size: 11px;
  letter-spacing: 8px;
  color: var(--gold-bright);
  font-weight: 300;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}
.footer-brand p {
  font-family: var(--font-jp);
  font-size: 14px;
  color: rgba(250, 249, 245, 0.55);
  line-height: 2;
  font-weight: 300;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--gold-bright);
  margin-bottom: 24px;
  text-transform: uppercase;
  font-style: italic;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  font-family: var(--font-jp);
  font-size: 14px;
  color: rgba(250, 249, 245, 0.7);
  text-decoration: none;
  font-weight: 300;
  transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(184, 153, 104, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(250, 249, 245, 0.35);
  text-transform: uppercase;
  font-style: italic;
}

/* ============ SHARED: CLOSING QUOTE (used in Letters/Writings/Contact) ============ */
.quote-section {
  background: var(--bg-tan);
  color: var(--ink);
  padding: 8rem 2rem;
  text-align: center;
}
.quote-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: 0.01em;
  max-width: 1000px;
  margin: 0 auto 2rem;
}
.quote-jp {
  font-family: var(--font-jp);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}
.quote-attr {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

/* ============ RESPONSIVE (shared) ============ */
@media (max-width: 968px) {
  nav { padding: 16px 24px; grid-template-columns: auto 1fr auto; }
  .brand-logo { font-size: 16px; letter-spacing: 0.5px; }
  .brand-logo-jp { font-size: 8px; letter-spacing: 4px; }
  .hamburger-btn { font-size: 12px; gap: 10px; }
  .menu-content { width: 100%; max-width: 100%; padding: 100px 32px 40px; }
  .menu-list a { font-size: 18px; padding: 14px 0; }
  .menu-list a .menu-jp { font-size: 9px; letter-spacing: 3px; }
  footer { padding: 60px 24px 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .quote-section { padding: 5rem 1.5rem; }
}

/* ============================================================
 * READABILITY OVERRIDES (added v1.0.1)
 * Bump Japanese serif body text from font-weight 300 to 400
 * and darken color where needed. Uses !important to override
 * inline <style> blocks in page templates.
 * ============================================================ */

/* Article body (Letters single posts) */
.article-body-inner,
.article-body-inner p,
.article-body-inner ul li,
.article-body-inner ol li {
  font-weight: 400 !important;
  color: var(--ink) !important;
}

/* Home — pursuit card descriptions (the most visible issue) */
.pursuit-card-desc {
  font-weight: 400 !important;
  color: var(--ink) !important;
}

/* Home — discovery / life / section deck */
.life-content,
.life-content p,
.discovery-intro,
.section-deck,
.section-deck p {
  font-weight: 400 !important;
}

/* Story — chapter body */
.chapter-body,
.chapter-body p {
  font-weight: 400 !important;
  color: var(--ink-soft) !important;
}

/* Multiple pages — hero descriptions */
.hero-desc {
  font-weight: 400 !important;
}

/* Ventures — tile descriptions */
.tile-desc,
.tile-desc-jp,
.tile-points,
.tile-points li {
  font-weight: 400 !important;
}

/* Writings — detail body */
.detail-text p,
.detail-text ul,
.detail-text ul li {
  font-weight: 400 !important;
}

/* Letters & Archive — excerpts */
.article-excerpt,
.at-excerpt,
.popular-card .pc-meta {
  font-weight: 400 !important;
}

/* Contact — tile descriptions */
.cat-tile-desc {
  font-weight: 400 !important;
}

/* Story CTA & quote attribution stays light (intentional) */
/* Hero attribution/sub stays as-is */

/* ============================================================
 * READABILITY OVERRIDES (v1.0.1 — stronger fix)
 * - Switch body text from Noto Serif JP (thin) to Noto Sans JP (bolder)
 * - Bump font-weight from 300 to 500
 * - Darken color to var(--ink) for max contrast
 * - Use !important to win against inline <style> blocks
 * ============================================================ */

/* === Article body (Letters single posts) === */
.article-body-inner,
.article-body-inner p,
.article-body-inner ul,
.article-body-inner ol,
.article-body-inner li,
.article-body-inner strong {
  font-family: var(--font-jp-sans) !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
}

.article-body-inner h2,
.article-body-inner h3 {
  font-weight: 700 !important;
  color: var(--ink) !important;
}

.article-body-inner blockquote {
  font-weight: 500 !important;
}

/* === Home — Pursuit card descriptions === */
.pursuit-card-desc {
  font-family: var(--font-jp-sans) !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
}

/* === Home — Discovery / Life / Section deck === */
.life-content,
.life-content p,
.discovery-intro,
.section-deck,
.section-deck p {
  font-family: var(--font-jp-sans) !important;
  font-weight: 500 !important;
  color: var(--ink-soft) !important;
}

/* === Story — chapter body === */
.chapter-body,
.chapter-body p {
  font-family: var(--font-jp-sans) !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
}

/* === Hero descriptions (multiple pages) === */
.hero-desc {
  font-weight: 500 !important;
}

/* === Ventures — tile descriptions === */
.tile-desc,
.tile-desc-jp,
.tile-points,
.tile-points li {
  font-family: var(--font-jp-sans) !important;
  font-weight: 500 !important;
}

/* === Writings — detail body === */
.detail-text p,
.detail-text ul,
.detail-text ul li {
  font-family: var(--font-jp-sans) !important;
  font-weight: 500 !important;
}

/* === Letters & Archive — excerpts === */
.article-excerpt,
.at-excerpt {
  font-family: var(--font-jp-sans) !important;
  font-weight: 500 !important;
}

/* === Contact — tile descriptions === */
.cat-tile-desc {
  font-family: var(--font-jp-sans) !important;
  font-weight: 500 !important;
}

/* === v1.0.2: Home pursuit-card readability ===
 * The JP subtitle (e.g. 物 語) and CTA link (e.g. READ THE STORY)
 * were too pale on cream background. Darken and bold them.
 */
.pursuit-card-jp {
  color: var(--ink-soft) !important;
  font-weight: 500 !important;
}
.pursuit-card-link {
  color: var(--ink) !important;
  font-weight: 600 !important;
  border-bottom-color: var(--ink) !important;
}

/* Stats labels under pursuit cards */
.pursuit-card-stat span {
  color: var(--ink-soft) !important;
  font-weight: 500 !important;
}

/* Section eyebrow on home (Where to begin) */
.section-eyebrow {
  color: var(--ink) !important;
  font-weight: 600 !important;
}

/* Discovery section CTA */
.discovery-cta {
  font-weight: 600 !important;
}

/* Hero attribution and meta labels */
.hero-meta-label {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500 !important;
}

/* === v1.0.3: Home credentials-strip readability ===
 * The 4-column credentials strip (SV/MBA/AMP/CEO) had:
 *   - JP subtitles in pale --accent color, thin weight
 *   - English detail text using thin serif
 *   - Decorative labels too pale
 */

/* Big gold numbers (SV/MBA/AMP/CEO) — keep as-is, they're decorative */

/* Italic labels: "— US YEARS —", "— 2014 —" etc */
.credential-pillar-label {
  color: var(--ink) !important;
  font-weight: 600 !important;
}

/* English detail: "Silicon Valley", "McGill University", etc. */
.credential-pillar-detail {
  font-family: var(--font-jp-sans) !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
}
.credential-pillar-detail strong {
  font-weight: 700 !important;
  color: var(--ink) !important;
}

/* Japanese subtitles: シリコンバレーへ、マギル大学MBA修了、etc. */
.credential-pillar-jp {
  font-family: var(--font-jp-sans) !important;
  color: var(--ink-soft) !important;
  font-weight: 500 !important;
}

/* Small detail text in pursuit cards (under stats) */
.pursuit-card-stat strong {
  font-weight: 700 !important;
}

/* === v1.0.4: Comprehensive home page readability sweep ===
 * Based on user feedback (red circle annotations).
 * Fix: Nav brand-jp, hero quote/labels, discovery quote,
 * credentials labels, section eyebrows, pursuit card stats,
 * letters closing eyebrow.
 *
 * Also fixes a v1.0.2 bug: hero-meta-label was downgraded
 * from weight 600 to 500. Restored to 600.
 */

/* === NAV ===
 * "中谷 英峰" subtitle under "NICK NAKATANI" */
.brand-logo-jp {
  color: rgba(255, 255, 255, 1) !important;
  font-weight: 500 !important;
}

/* === HERO ===
 * "Everything I learned, I'm now paying it forward." (italic EN) */
.hero-quote-en {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 400 !important;
}

/* "— Nick Nakatani" attribution under quote */
.hero-attribution-text {
  color: var(--gold-bright) !important;
  font-weight: 500 !important;
}

/* "2 / 10+ / 10+" big gold numbers */
.hero-meta-num {
  font-weight: 700 !important;
}

/* "Degrees · MBA + AMP / Years As Exec / Investments" labels */
.hero-meta-label {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600 !important;
}

/* === DISCOVERY (cream section) ===
 * Top intro text "私自身、遠回りしながら、ここまで来た" */
.discovery-intro,
.discovery-intro .turn {
  color: var(--ink) !important;
  font-weight: 500 !important;
}

/* "I pay it forward by showing the shortest path." (italic EN) */
.discovery-quote-en {
  color: var(--ink) !important;
  font-weight: 500 !important;
}

/* === CREDENTIALS STRIP === */
.credential-pillar-label {
  color: var(--ink) !important;
  font-weight: 700 !important;
}
.credential-pillar-jp {
  color: var(--ink-soft) !important;
  font-weight: 600 !important;
  font-family: var(--font-jp-sans) !important;
}

/* === PURSUITS SECTION === */
/* "WHERE TO BEGIN" section eyebrow */
.section-eyebrow {
  color: var(--ink) !important;
  font-weight: 700 !important;
}

/* "— I —", "— II —" small numbers above each card */
.pursuit-card-num {
  color: var(--ink) !important;
  font-weight: 600 !important;
}

/* Pursuit card stats: number + label */
.pursuit-card-stat strong {
  color: var(--gold) !important;
  font-weight: 700 !important;
}
.pursuit-card-stat span {
  color: var(--ink) !important;
  font-weight: 600 !important;
}

/* === LETTERS CLOSING (dark section at bottom) === */
.letters-eyebrow {
  color: var(--gold-bright) !important;
  font-weight: 600 !important;
}
.letters-text {
  color: rgba(250, 249, 245, 0.9) !important;
  font-weight: 400 !important;
}
.letters-link {
  font-weight: 600 !important;
}
.letters-headline {
  font-weight: 500 !important;
}
