/*
Theme Name: OnRoom
Author: Atsuko
Version: 1.0
*/

:root{
  --blue:#20B6F3;
  --yellow:#FFE100;
  --black:#111;
  --white:#fff;
  --gray:#f4f4f4;
  --card:#ffffff;

  --container: 1080px;
  --radius: 18px;
  --shadow: 0 10px 25px rgba(0,0,0,.12);
}

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

body{
  margin:0;
  color:var(--black);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height:1.8;
  background: var(--white);
}

img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }

.container{
  width:min(var(--container), calc(100% - 32px));
  margin-inline:auto;
}

.section{ padding: 70px 0; }
.bg-blue{ background: var(--blue); }
.bg-gray{ background: var(--gray); }
.bg-white{ background: var(--white); }
.center{ text-align:center; }

/* ===== Header ===== */
.site-header{
  background: var(--yellow);
  position: sticky;
  top:0;
  z-index: 50;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 0;
  gap: 16px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing:.06em;
}
.brand .logo{
  font-size: 22px;
  line-height:1;
}
.nav-toggle{
  appearance:none;
  border:0;
  background: transparent;
  padding: 8px;
  cursor:pointer;
}
.hamburger{
  width: 28px;
  height: 2px;
  background: var(--black);
  position:relative;
  display:block;
}
.hamburger::before,
.hamburger::after{
  content:"";
  position:absolute;
  left:0;
  width: 28px;
  height: 2px;
  background: var(--black);
}
.hamburger::before{ top:-8px; }
.hamburger::after{ top:8px; }

.primary-nav{ display:none; }
.primary-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:18px;
  font-weight:700;
}
.primary-nav a{
  padding: 8px 10px;
  border-radius: 999px;
}
.primary-nav a:hover{ background: rgba(255,255,255,.5); }

@media (min-width: 860px){
  .nav-toggle{ display:none; }
  .primary-nav{ display:block; }
}

/* ===== Mobile menu ===== */
.mobile-nav{ display:block; padding-bottom: 12px; }
.mobile-nav ul{
  list-style:none;
  margin:0;
  padding: 0;
  display:grid;
  gap: 6px;
}
.mobile-nav a{
  display:block;
  background: rgba(255,255,255,.6);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
}

/* ===== Hero ===== */
.hero{
  background: var(--blue);
  padding: 70px 0;
}
.hero-center{
  min-height: 420px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  gap: 16px;
}

/* ロゴ */
.hero-logo{
  width: min(560px, 78vw);
  color: #333;
  transition:
    color 650ms ease-out,
    filter 850ms ease-out;
}
.hero-logo svg{
  width: 100%;
  height: auto;
  display:block;
  margin: 0 auto;
}

/* スイッチ */
.hero-switch{
  appearance:none;
  border:0;
  padding:0;
  background: transparent;
  cursor:pointer;
  display:flex;
  justify-content:center;
  align-items:center;
}
.hero-switch img{
  width: 90px;
  height: auto;
  display:block;
}
.hero-switch:active{ transform: translateY(2px); }

/* 点灯中 */
.hero-logo.is-lit{
  color: #fcee21;
  filter:
    drop-shadow(0 0 6px rgba(252,238,33,.95))
    drop-shadow(0 0 18px rgba(252,238,33,.65))
    drop-shadow(0 0 24px rgba(32,182,243,.30));
}

@media (max-width: 520px){
  .hero-center{ min-height: 360px; }
  .hero-logo{ width: min(480px, 86vw); }
  .hero-switch img{ width: 78px; }
}

/* ===== Section Title ===== */
.section-title{
  display:inline-block;
  background: #333;
  color: #fff;
  padding: 10px 20px;
  font-weight: 1000;
  letter-spacing: .35em;
  border-radius: 8px;
  margin: 0 auto 34px;
}

/* ===== Profile ===== */
.profile{
  padding: 60px 0;
  text-align:center;
}

.profile-top{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items:center;
  justify-content:center;
  width: min(720px, 92vw);
  margin: 0 auto 18px;
}

/* ★名前を消したとき：1カラムにして中央寄せ */
.profile-top.is-solo{
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.profile-avatar{
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: var(--blue);
  overflow: hidden;
  margin: 0 auto;
}
.profile-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 10px;
}
.profile-dots{
  width: 220px;
  height: 1px;
  border-top: 2px dashed rgba(0,0,0,.35);
}
.profile-name h3{
  margin:0;
  letter-spacing: .22em;
  font-weight: 900;
  font-size: 22px;
  line-height: 1.35;
}

.profile-text{
  width: min(720px, 92vw);
  margin: 0 auto;
  line-height: 1.95;
  color:#333;
  text-align: center; /* ←希望どおり真ん中 */
}

@media (max-width: 520px){
  .profile-top{
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .profile-dots{ width: 180px; }
}

/* ===== Skills ===== */
.skills-area{ background: var(--blue); }
.skills-grid{ display:grid; gap: 18px; }
.card{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card h3{
  margin: 0 0 10px;
  font-weight: 1000;
  letter-spacing:.1em;
  text-align:center;
}
.list{ margin: 0; padding-left: 1.2em; }
.list li{ margin: 6px 0; }

@media (min-width: 860px){
  .skills-grid{ grid-template-columns: 1fr 1fr; gap: 22px; }
}

/* ===== Works ===== */
.works-grid{
  display:grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
.work-card{
  border-radius: 14px;
  overflow:hidden;
  background: #ddd;
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
}
.work-card img{
  width:100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
@media (min-width: 860px){
  .works-grid{ grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
.more-wrap{ text-align:center; margin-top: 18px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 900;
  border: 0;
}
.btn-yellow{
  background: var(--yellow);
  color:#222;
}
.btn-yellow:active{ transform: translateY(4px); }

/* Work open button */
.work-open{
  width:100%;
  padding:0;
  border:0;
  background: transparent;
  cursor:pointer;
}
.work-placeholder{
  aspect-ratio: 1 / 1;
  background:#ddd;
}

/* ===== Contact ===== */
.contact-area{ background: var(--blue); color: var(--black); }
.contact-box{
  width:min(640px, 100%);
  margin: 0 auto;
  text-align:center;
}
.contact-box p{ margin: 0 0 14px; font-weight: 700; }

/* ===== Footer ===== */
.site-footer{
  background: #222;
  color: #fff;
  text-align:center;
  padding: 24px 0;
  font-weight: 700;
}

/* ===== Lightbox ===== */
.lightbox{
  position: fixed;
  inset: 0;
  display:none;
  z-index: 200;
}
.lightbox.is-open{ display:block; }
.lightbox__bg{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
}
.lightbox__dialog{
  position: relative;
  width: min(920px, calc(100% - 32px));
  margin: 6vh auto 0;
  background: transparent;
  border-radius: 14px;
}
.lightbox__img{
  width: 100%;
  height: auto;
  max-height: 84vh;     /* ★はみ出し防止 */
  object-fit: contain;  /* ★収まり重視 */
  border-radius: 14px;
  display:block;
  background:#fff;
}
.lightbox__caption{
  margin-top: 10px;
  color:#fff;
  font-weight: 900;
  text-align:center;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.lightbox__close{
  position:absolute;
  right: -10px;
  top: -16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  font-size: 26px;
  font-weight: 1000;
  cursor:pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}
