/*
Theme Name: Ichika Portfolio
Description: Noah Liteからの移行を前提にした、NOTES / WORKS / TRPG LOG中心の個人サイトテーマ。
Version: 0.1.1
License: GNU General Public License v2 or later
Text Domain: ichika-portfolio
*/
:root{--pink:#E75F71;--red:#E1344C;--deep-red:#AD1A2D;--wine:#6A101C;--ink:#28060A;--paper:#fffaf9;--white:#fff;--gap:clamp(16px,2vw,30px)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif;line-height:1.8}a{color:inherit;text-decoration:none}img{max-width:100%;height:auto;display:block}
.site-header{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;padding:14px clamp(18px,4vw,60px);background:rgba(255,250,249,.94);border-bottom:1px solid rgba(40,6,10,.12);backdrop-filter:blur(10px)}
.site-brand{font-weight:800}.site-nav{font-size:.88rem}.site-nav ul{display:flex;gap:18px;flex-wrap:wrap;list-style:none;margin:0;padding:0}.site-nav li{margin:0;padding:0}.site-nav a:hover,.site-nav a:focus-visible{color:var(--deep-red)}
.wrap{width:min(1180px,calc(100% - 36px));margin:0 auto;padding:50px 0 80px}.page-title{font-size:clamp(2.1rem,6vw,5rem);line-height:1;margin:.2em 0 .25em}
.home-shell{min-height:100vh;display:grid;grid-template-columns:minmax(330px,1fr) minmax(0,1fr)}
.home-left{position:sticky;top:0;height:100vh;padding:clamp(18px,3vw,44px);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:2fr repeat(3,1fr);gap:12px;background:var(--paper)}
.home-tile{border:1px solid rgba(40,6,10,.16);display:flex;align-items:flex-end;padding:clamp(18px,3vw,36px);font-size:clamp(1rem,2vw,1.35rem);font-weight:800;transition:.2s;background:var(--white)}
.home-tile:hover,.home-tile:focus-visible{background:var(--deep-red);color:#fff;transform:translateY(-2px)}
.home-identity{grid-column:1/-1;display:flex;flex-direction:column;justify-content:flex-end;background:var(--ink);color:#fff}
.home-identity .home-name{font-size:clamp(2.3rem,5vw,5rem);line-height:1.05}.home-tagline{font-weight:400;margin-top:14px;opacity:.82}
.home-right{padding:clamp(24px,4vw,64px);background:#fff}.home-section{margin-bottom:64px}.eyebrow{font-size:.75rem;letter-spacing:.16em;font-weight:800;color:var(--deep-red);margin-bottom:14px}
.video-role{font-size:.82rem;font-weight:800;letter-spacing:.08em;margin:-12px 0 14px;color:var(--deep-red)}
.video-frame{aspect-ratio:16/9;background:#eee}.video-frame iframe{width:100%;height:100%;border:0}
.card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--gap)}
.square-card{min-width:0}.square-media{aspect-ratio:1/1;background:#f1e7e7;overflow:hidden}.square-media img{width:100%;height:100%;object-fit:cover;transition:transform .25s}.square-card:hover img{transform:scale(1.025)}.square-title{font-weight:800;margin-top:10px}
.filter-bar{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:20px 0 34px;padding-bottom:14px;border-bottom:1px solid rgba(40,6,10,.18);font-size:.88rem}.filter-label{font-weight:800}.filter-bar .active{color:var(--deep-red);font-weight:800;text-decoration:underline;text-underline-offset:5px}
.pagination{display:flex;justify-content:space-between;margin-top:44px;font-size:2rem;font-weight:700}.pagination .disabled{visibility:hidden}
.entry{width:min(850px,100%);margin:0 auto}.entry-meta{font-size:.86rem;color:var(--wine);margin:10px 0 28px}.entry-hero{margin:0 0 34px}.entry-content{font-size:1.02rem}.entry-content a{text-decoration:underline}.post-nav{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:60px;padding-top:24px;border-top:1px solid rgba(40,6,10,.18)}.post-nav .next{text-align:right}
.log-list{display:grid;gap:14px}.log-card{display:grid;grid-template-columns:150px 1fr;gap:24px;padding:22px;border:1px solid rgba(40,6,10,.16);background:#fff}.log-date{font-weight:800;color:var(--deep-red)}.log-title{font-size:1.25rem;font-weight:800}.log-meta{font-size:.9rem;color:var(--wine)}
.site-footer{padding:32px clamp(18px,4vw,60px);border-top:1px solid rgba(40,6,10,.12);display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;font-size:.85rem}
.placeholder{width:100%;height:100%;display:grid;place-items:center;background:linear-gradient(135deg,var(--pink),var(--wine));color:#fff;font-weight:800}
@media(max-width:900px){.home-shell{display:block}.home-left{position:relative;height:auto;min-height:680px}.home-right{padding:36px 18px}.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.site-nav{display:none}}
@media(max-width:560px){.home-left{grid-template-rows:1.6fr repeat(3,1fr);min-height:600px}.home-tile{padding:16px;font-size:.9rem}.card-grid{grid-template-columns:1fr}.log-card{grid-template-columns:1fr}.wrap{width:min(100% - 28px,1180px)}}

/* v0.1.4: persistent left navigation on all pages */
.site-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(330px,1fr) minmax(0,1fr);
  align-items:start;
}
.global-left{
  position:sticky;
  top:0;
  height:100vh;
  padding:clamp(18px,3vw,44px);
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-rows:2fr repeat(3,1fr);
  gap:12px;
  background:var(--paper);
  overflow:hidden;
}
.global-left .home-identity{
  grid-column:1/-1;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:flex-start;
  background:var(--deep-red);
  color:#fff;
}
.global-left .home-identity:hover,
.global-left .home-identity:focus-visible{
  background:var(--wine);
}
.global-left .home-name{
  font-size:clamp(2.3rem,5vw,5rem);
  line-height:1.05;
}
.global-left .home-tagline{
  font-weight:400;
  margin-top:14px;
  opacity:.88;
}
.site-main{
  min-width:0;
  background:#fff;
}
.site-main > .wrap,
.site-main > .home-right{
  min-height:calc(100vh - 76px);
}
.site-main .site-footer{
  background:#fff;
}
@media(max-width:900px){
  .site-shell{display:block}
  .global-left{
    position:relative;
    height:auto;
    min-height:680px;
  }
  .site-main > .wrap,
  .site-main > .home-right{min-height:0}
}
@media(max-width:560px){
  .global-left{
    grid-template-rows:1.6fr repeat(3,1fr);
    min-height:600px;
  }
}

/* v0.1.5: ABOUT ME */
.about-profile{
  display:grid;
  grid-template-columns:minmax(180px,280px) minmax(0,1fr);
  gap:clamp(24px,4vw,52px);
  align-items:center;
  margin:30px 0 52px;
  padding-bottom:42px;
  border-bottom:1px solid rgba(40,6,10,.16);
}
.about-profile-image{min-width:0}
.about-avatar{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  background:#f1e7e7;
}
.about-avatar-placeholder{
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(135deg,var(--pink),var(--wine));
  font-weight:800;
  letter-spacing:.08em;
}
.about-name{
  font-size:clamp(2rem,4vw,3.8rem);
  line-height:1.1;
  font-weight:800;
}
.about-reading{
  margin-top:8px;
  color:var(--deep-red);
  font-size:.88rem;
  font-weight:800;
  letter-spacing:.12em;
}
.about-intro{
  margin:24px 0 0;
  font-size:1rem;
  line-height:1.9;
}
.about-content{
  margin-top:0;
}
@media(max-width:700px){
  .about-profile{grid-template-columns:1fr}
  .about-profile-image{max-width:280px}
}

/* v0.1.8: CONTACT */
.ichika-contact-form{margin-top:34px}
.ichika-contact-field{margin:0 0 24px}
.ichika-contact-field label{display:block;margin-bottom:7px;font-weight:800}
.ichika-contact-field input,.ichika-contact-field textarea{width:100%;padding:13px 14px;border:1px solid rgba(40,6,10,.28);background:#fff;color:var(--ink);font:inherit}
.ichika-contact-field input:focus,.ichika-contact-field textarea:focus{outline:3px solid rgba(225,52,76,.18);border-color:var(--deep-red)}
.ichika-contact-submit{border:0;background:var(--deep-red);color:#fff;padding:13px 28px;font:inherit;font-weight:800;cursor:pointer}
.ichika-contact-submit:hover,.ichika-contact-submit:focus-visible{background:var(--wine)}
.ichika-contact-notice{padding:14px 16px;margin:24px 0;border-left:4px solid var(--deep-red);background:#fff}
.ichika-contact-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

/* v0.2.1: HOME latest cards use the supplied 640x360 (16:9) ratio. */
.home-latest-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gap)}
.home-latest-media{aspect-ratio:16/9;overflow:hidden;background:#f1e7e7}
.home-latest-media img{width:100%;height:100%;object-fit:cover;transition:transform .25s}
.home-latest-card:hover .home-latest-media img{transform:scale(1.025)}
.home-latest-title{margin-top:10px;font-weight:800}
@media(max-width:560px){.home-latest-grid{grid-template-columns:1fr}}


/* v0.2.9: clean persistent left navigation */
.site-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(330px,1fr) minmax(0,1fr);
  align-items:start;
}

.global-left{
  position:sticky;
  top:0;
  box-sizing:border-box;
  height:100vh;
  padding:clamp(18px,3vw,44px);
  display:grid;
  grid-template-columns:1fr;
  grid-template-rows:minmax(0,2fr) minmax(0,3fr);
  gap:12px;
  overflow:hidden;
  background:var(--paper);
}

.global-left .home-identity{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  margin:0;
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:flex-start;
  background:var(--deep-red);
  color:#fff;
}

.global-left .home-name{
  font-size:clamp(2.3rem,5vw,5rem);
  line-height:1.05;
}

.global-left .home-tagline{
  margin-top:14px;
  font-weight:400;
  opacity:.88;
}

.global-nav-grid{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  margin:0;
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(3,minmax(0,1fr));
  gap:12px;
}

.global-nav-grid .home-tile{
  box-sizing:border-box;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  margin:0;
  position:relative;
  z-index:1;
  pointer-events:auto;
  transform:none;
  -webkit-transform:none;
}

.global-nav-grid .home-tile:hover,
.global-nav-grid .home-tile:focus-visible{
  transform:none;
  -webkit-transform:none;
}

@media(max-width:900px){
  .site-shell{display:block}
  .global-left{
    position:relative;
    height:auto;
    min-height:680px;
    grid-template-rows:minmax(240px,2fr) minmax(400px,3fr);
    overflow:visible;
  }
}

@media(max-width:560px){
  .global-left{
    min-height:600px;
    grid-template-rows:minmax(210px,2fr) minmax(360px,3fr);
  }
}


/* v0.3.2: fixed-page spacing aligned with WORKS / NOTES */
.about-entry,
.contact-entry{
  width:100%;
  max-width:none;
  margin:0;
}

.about-entry .page-title,
.contact-entry .page-title{
  margin-bottom:22px;
}

.about-profile{
  margin:18px 0 36px;
  padding-bottom:32px;
}

.contact-intro{
  margin-bottom:24px;
}

.ichika-contact-form{
  width:min(780px,100%);
  margin-top:24px;
  margin-left:0;
  margin-right:0;
}


/* v0.3.3: keep the site identity tile stationary on hover/focus */
.global-left .home-identity,
.global-left .home-identity:hover,
.global-left .home-identity:focus-visible{
  transform:none !important;
  -webkit-transform:none !important;
}

/* v0.3.4 mobile */
@media(max-width:900px){
.site-shell{display:block}.global-left{position:relative;top:auto;width:100%;height:auto;min-height:0;padding:18px;display:block!important;overflow:visible}
.global-left .home-identity{height:auto;min-height:180px;padding:24px;justify-content:flex-end}
.global-left .home-name{font-size:clamp(2rem,9vw,3.4rem);line-height:1}.global-left .home-tagline{margin-top:10px;font-size:.9rem}
.global-nav-grid{height:auto;min-height:0;margin-top:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;gap:10px}
.global-nav-grid .home-tile{height:auto;min-height:74px;padding:18px}.site-main{width:100%;min-width:0}.wrap{padding-left:18px;padding-right:18px}
}
@media(max-width:480px){
.global-left{padding:14px}.global-left .home-identity{min-height:150px;padding:20px}.global-left .home-name{font-size:clamp(1.9rem,8.8vw,2.8rem)}
.global-left .home-tagline{font-size:.82rem}.global-nav-grid{gap:8px;margin-top:8px}.global-nav-grid .home-tile{min-height:64px;padding:14px;font-size:.88rem}
.wrap{padding-left:14px;padding-right:14px}.home-latest-grid{grid-template-columns:1fr}
}


/* v0.3.5: mobile hamburger navigation */
.mobile-bar{display:none}

@media(max-width:900px){
  .global-left{
    position:sticky !important;
    top:0;
    z-index:100;
    width:100%;
    height:auto !important;
    min-height:0 !important;
    padding:0 !important;
    display:block !important;
    background:var(--paper);
    overflow:visible !important;
    border-bottom:1px solid rgba(40,6,10,.12);
  }

  .global-left .home-identity{
    display:none !important;
  }

  .mobile-bar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    min-height:64px;
    padding:12px 16px;
    background:var(--deep-red);
    color:#fff;
  }

  .mobile-brand{
    min-width:0;
    color:#fff;
  }

  .mobile-brand-name{
    display:block;
    max-width:70vw;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:1.08rem;
    font-weight:800;
    letter-spacing:.01em;
  }

  .mobile-menu-toggle{
    width:44px;
    height:44px;
    padding:9px;
    border:0;
    background:transparent;
    color:#fff;
    cursor:pointer;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:5px;
  }

  .mobile-menu-toggle span{
    display:block;
    width:100%;
    height:2px;
    background:currentColor;
    transition:transform .2s ease, opacity .2s ease;
    transform-origin:center;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2){
    opacity:0;
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
  }

  .global-nav-grid{
    display:none !important;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    z-index:120;
    height:auto !important;
    min-height:0 !important;
    margin:0 !important;
    padding:10px;
    grid-template-columns:1fr 1fr;
    gap:8px;
    background:var(--paper);
    border-bottom:1px solid rgba(40,6,10,.12);
    box-shadow:0 10px 24px rgba(40,6,10,.12);
  }

  .global-nav-grid.is-open{
    display:grid !important;
  }

  .global-nav-grid .home-tile{
    min-height:64px !important;
    height:auto !important;
    padding:16px !important;
    background:#fff;
  }

  .site-main{
    width:100%;
    min-width:0;
  }

  body.mobile-menu-open{
    overflow:hidden;
  }
}

@media(max-width:480px){
  .mobile-bar{
    min-height:58px;
    padding:10px 12px;
  }
  .mobile-brand-name{
    font-size:1rem;
    max-width:68vw;
  }
  .global-nav-grid{
    grid-template-columns:1fr;
  }
  .global-nav-grid .home-tile{
    min-height:56px !important;
  }
}

/* v0.3.6: hide the legacy front-page left panel on mobile.
   The global hamburger in header.php is the only mobile navigation. */
@media(max-width:900px){
  .site-main .home-shell{
    display:block !important;
  }
  .site-main .home-left{
    display:none !important;
  }
  .site-main .home-right{
    width:100%;
    min-width:0;
    padding:28px 18px;
  }
}
@media(max-width:480px){
  .site-main .home-right{
    padding:22px 14px;
  }
}
