/*
Theme Name: Portfolio
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: Minimal portfolio theme with Works custom post type.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portfolio
*/

:root{
  --bg: #f6f6f4;
  --text: #1f1f1f;
  --muted: rgba(31,31,31,.68);
  --line: rgba(31,31,31,.82);
  --line-w: 3px;
  --radius: 14px;
  --container: 1040px;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  --footer-nav-space: 132px;
  font-family:
    "din-2014",
    "din-2014-narrow",
    "din",
    "DIN Alternate",
    "Helvetica Neue",
    Arial,
    "游ゴシック",
    "Yu Gothic",
    YuGothic,
    sans-serif;
  line-height: 1.6;
  letter-spacing: .01em;
  min-height: 100%;
}

@media (max-width: 520px){
  body{ --footer-nav-space: 168px; }
}

a{ color: inherit; text-decoration-thickness: from-font; }
a:hover{ text-decoration-thickness: from-font; }

.site{
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site__main{ flex: 1; }

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

.visually-hidden{
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Fixed footer navigation */
.footer-nav{
  position: fixed;
  left: 50%;
  transform: translateX(-50%) scale(var(--footer-nav-scale, 1));
  bottom: 16px;
  width: min(980px, calc(100% - 32px));
  background: rgba(255,255,255,.92);
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  backdrop-filter: blur(10px);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index: 1000;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}
.footer-nav:hover {
  opacity: 1;
}

.footer-nav__list{
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
}

.footer-nav__item{
  flex: 0 0 auto;
}

.footer-nav__link{
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px 8px;
  border-radius: 16px;
  text-decoration: none;
  color: #666;
  transition: transform .18s ease, color .18s ease, background-color .18s ease;
  min-height: 62px;
}

.footer-nav__en{
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: #666;
}

.footer-nav__jp{
  display: block;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #999;
  font-weight: 300;
}

.footer-nav__link:hover{
  transform: translateY(-1px);
  background-color: rgba(17,17,17,.04);
}

.footer-nav__link:hover .footer-nav__en{
  color: #111;
}

.footer-nav__link:hover .footer-nav__jp{
  color: #777;
}

.footer-nav__link.is-active .footer-nav__en{
  color: #111;
  font-weight: 500;
}

.footer-nav__link.is-active .footer-nav__jp{
  color: #666;
}

.footer-nav__link.is-active{
  background-color: rgba(17,17,17,.05);
}

.footer-nav__link:focus-visible{
  outline: 2px solid rgba(17,17,17,.55);
  outline-offset: 2px;
}

@media (max-width: 768px){
  .footer-nav{
    bottom: 12px;
    width: calc(100% - 24px);
    border-radius: 20px;
  }
  .footer-nav__list{
    padding: 10px 10px;
    gap: 8px;
    justify-content: space-between;
  }
  .footer-nav__link{
    padding: 9px 6px;
    min-height: 58px;
  }
  .footer-nav__en{ font-size: 12px; letter-spacing: .07em; }
  .footer-nav__jp{ font-size: 10px; }
}

/* If width is still tight, scale the whole bar slightly */
@media (max-width: 430px){
  .footer-nav{ --footer-nav-scale: .92; }
}

@media print{
  .footer-nav{ display:none; }
  body{ padding-bottom: 0; }
}

/* =========================
   TEMPORARY PAGE TRANSITION (FADE)
   (Easy to swap later)
========================= */
#page-fade-transition{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .38s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 9999;
}

#page-fade-transition.is-active{
  opacity: 1;
  pointer-events: auto;
}

body.is-page-fade-transition{
  overflow: hidden;
}

body.is-page-fade-transition .is-transition-target{
  transition:
    opacity .38s cubic-bezier(0.22, 1, 0.36, 1),
    transform .38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

body.is-page-fade-transition.is-page-fade-leaving .is-transition-target{
  opacity: 0;
  transform: translateY(-8px);
}

@media (prefers-reduced-motion: reduce){
  #page-fade-transition{ transition: none; }
  body.is-page-fade-transition .is-transition-target{ transition: none; }
}

/* About page */
.about{
  background: #2f2f2f;
  color: #fff;
}

.about a{ color: inherit; }

.about__container{
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

@media (max-width: 768px){
  .about__container{ width: calc(100% - 32px); }
}

.about__page-title{
  padding-top: 56px;
  padding-bottom: 10px;
}

.about__title{
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 2.4vw, 36px);
  letter-spacing: 0.18em;
  font-weight: 400;
  color: rgba(255,255,255,.86);
}

.about-hero{
  padding-top: 46px;
  padding-bottom: 84px;
}

.about-hero__grid{
  display: grid;
  grid-template-columns: auto 0.85fr;
  gap: clamp(56px, 7vw, 96px);
  align-items: start;
}

@media (max-width: 960px){
  .about-hero__grid{
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

.about-hero__copy{
  margin: 0;
  font-size: clamp(36px, 4.2vw, 48px);
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: .1em;
}

.about-hero__sub{
  margin: 20px 0 10em;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  letter-spacing: .06em;
}

.about-hero__sub em{
  font-style: italic;
  font-weight: 300;
  font-size: 1.5em;
}

/* Contact page */
.contact{
  background:#2f2f2f;
  color:#fff;
}
.contact a{ color: inherit; }

.contact__container{
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  text-align: center;
}
@media (max-width: 768px){
  .contact__container{ width: calc(100% - 32px); }
}

.contact__page-title{
  padding-top: 56px;
  padding-bottom: 18px;
}

.contact__title{
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 2.4vw, 36px);
  letter-spacing: 0.18em;
  font-weight: 400;
  color: rgba(255,255,255,.86);
}

.contact__desc{
  display: inline-block;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid #555;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  letter-spacing: 0.05em;
  line-height: 1.8;
  text-align: center;
}

.contact__body{
  padding-top: 34px;
  padding-bottom: 84px;
}

.contact__form{
  width: min(840px, 100%);
  margin-inline: auto;
  border: 1px solid #555;
  border-radius: 22px;
  padding: 28px 28px 22px;
  background: rgba(0,0,0,.10);
  text-align: left;
}

@media (max-width: 768px){
  .contact__body{ padding-top: 26px; padding-bottom: 64px; }
  .contact__form{
    border-radius: 18px;
    padding: 22px 18px 18px;
  }
}

.contact__notice{
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 14px;
  letter-spacing: .02em;
}

/* Contact Form 7 (scoped) */
.contact .wpcf7{
  margin: 0;
}
.contact .wpcf7 form{
  margin: 0;
}
.contact .wpcf7-form p{
  margin: 0 0 18px;
}
.contact .wpcf7-form p:last-of-type{
  margin-bottom: 0;
}

.contact .wpcf7-form label{
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  letter-spacing: .06em;
}

.contact .wpcf7-form .wpcf7-form-control-wrap{
  display: block;
}

.contact .wpcf7-form input[type="text"],
.contact .wpcf7-form input[type="email"],
.contact .wpcf7-form input[type="url"],
.contact .wpcf7-form input[type="tel"],
.contact .wpcf7-form textarea,
.contact .wpcf7-form select{
  width: 100%;
  background: #222;
  border: 1px solid #555;
  border-radius: 16px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  letter-spacing: .02em;
  line-height: 1.65;
}

.contact .wpcf7-form textarea{
  min-height: 160px;
  resize: vertical;
}

.contact .wpcf7-form input::placeholder,
.contact .wpcf7-form textarea::placeholder{
  color: rgba(255,255,255,.40);
}

.contact .wpcf7-form input:focus-visible,
.contact .wpcf7-form textarea:focus-visible,
.contact .wpcf7-form select:focus-visible{
  outline: none;
  border-color: #777;
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}

.contact .wpcf7-form input[type="submit"]{
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255,255,255,.65);
  background: transparent;
  color: rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 12px 18px;
  letter-spacing: .12em;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease, border-color .18s ease;
}

.contact .wpcf7-form input[type="submit"]:hover{
  background: #fff;
  color: #111;
  border-color: #fff;
  transform: translateY(-1px);
}

.contact .wpcf7-form input[type="submit"]:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.14);
}

.contact .wpcf7-not-valid-tip{
  margin-top: 8px;
  color: rgba(255,179,179,.95);
  font-size: 12px;
  letter-spacing: .02em;
}

.contact .wpcf7-response-output{
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #555;
  border-radius: 16px;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  letter-spacing: .02em;
  line-height: 1.8;
}

.contact .wpcf7 form.invalid .wpcf7-response-output,
.contact .wpcf7 form.failed .wpcf7-response-output{
  border-color: rgba(255,179,179,.55);
}

.contact .wpcf7 form.sent .wpcf7-response-output{
  border-color: rgba(160,255,200,.40);
}

.about-hero__line{
  width: 22px;
  height: 1px;
  background: rgba(255,255,255,.55);
  flex: 0 0 auto;
}

.about-hero__body{
  margin-top: 22px;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: .02em;
}

.about-hero__body p{
  margin: 0 0 14px;
}
.about-hero__body p:last-child{ margin-bottom: 0; }

.about-hero__sign{
  margin: 34px 0 0;
  text-align: right;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  letter-spacing: .08em;
}

.about-hero__visual{
  display: grid;
  justify-items: end;
  padding-top: 5em;
}

@media (max-width: 960px){
  .about-hero__visual{ justify-items: start; }
}

.about-hero__figure,
.about-hero__placeholder{
  width: clamp(320px, 34vw, 420px);
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.06);
}

.about-hero__figure{ margin: 0; overflow: hidden; }

.about-hero__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 960px){
  .about-hero__figure,
  .about-hero__placeholder{
    width: min(420px, 100%);
  }
}

.about-can{
  padding-top: 72px;
  padding-bottom: 110px;
}

.about-can__box{
  margin-inline: auto;
  width: min(980px, 100%);
  border: 1px solid rgba(255,255,255,.28);
  padding: 30px 28px 28px;
  text-align: center;
}

@media (max-width: 768px){
  .about-can__box{ padding: 26px 18px 22px; }
}

.about-can__title{
  margin: 0 0 16px;
  font-size: 14px;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: rgba(255,255,255,.9);
}

.about-can__list{
  list-style: none;
  margin: 0;
  padding: 0;
  color: rgba(255,255,255,.80);
  font-size: 14px;
  line-height: 2.0;
  letter-spacing: .02em;
}

.about-can__list li{
  padding-block: 2px;
}

/* TOP tiles */
body.home{
  height: 100%;
  overflow: hidden;
  background: #333;
  color: #fff;
  padding-bottom: 0;
}

body.home .site,
body.home .site__main{
  height: 100vh;
  height: 100dvh;
}

body.home .top-grid{
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  margin: 0;
  padding: 0;
  background-color: #333;
}

body.home .top-grid > a.tile{
  width: 33vw;
  height: 49.5vh;
  height: 49.2dvh;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  transition: 0.3s;
  cursor: pointer;
}

/* hover text color + smooth transition (TOP only) */
body.home .top-grid > a.tile,
body.home .top-grid > a.tile .tile__en,
body.home .top-grid > a.tile .tile__jp{
  transition: background 0.3s ease, color 0.3s ease;
}

body.home .top-grid > a.tile:hover,
body.home .top-grid > a.tile:focus-visible{
  background: #333;
  outline: none;
}

body.home .top-grid > a.tile:hover .tile__en,
body.home .top-grid > a.tile:hover .tile__jp,
body.home .top-grid > a.tile:focus-visible .tile__en,
body.home .top-grid > a.tile:focus-visible .tile__jp{
  color: #fff;
}

body.home .top-grid .tile__en{
  font-family: "din-2014", "din", sans-serif;
  font-size: 28px;
  letter-spacing: 0.15em;
  font-weight: 300;
  line-height: 1.15;
}

body.home .top-grid .tile__jp{
  font-family: "游ゴシック", "Yu Gothic", YuGothic, sans-serif;
  font-size: 12px;
  opacity: 0.7;
  margin-top: 10px;
  letter-spacing: 0.08em;
}

/* border-radius (inner corners only) */
body.home .tile-graphic{ border-radius: 0 0 20px 0; }
body.home .tile-web{ border-radius: 0 0 20px 20px; }
body.home .tile-movie{ border-radius: 0 0 0 20px; }
body.home .tile-about{ border-radius: 20px 20px 0 0; }
/* Flow page temporarily removed */
body.home .tile-product{ border-radius: 0px 20px 0 0; }
body.home .tile-contact{ border-radius: 20px 0 0 0; }

/* Responsive (SP): grid -> vertical stack, scroll enabled (TOP only) */
@media (max-width: 768px){
  body.home{
    height: auto;
    overflow: auto;
  }

  body.home .site,
  body.home .site__main{
    height: auto;
    min-height: 100%;
  }

  body.home .top-grid{
    display:flex;
    flex-direction:column;
    width:100%;
    height:auto;
    padding:20px 16px;
    gap:16px;
  }

  body.home .top-grid > a.tile{
    width:100%;
    height:20vh;
    min-height:200px;
    border-radius:12px !important;
  }

  body.home .top-grid .tile__en{
    font-size:20px;
  }

  body.home .top-grid .tile__jp{
    font-size:11px;
  }
}

/* SP: disable hover effect on touch devices (TOP only) */
@media (hover: none) and (max-width: 768px){
  body.home .top-grid > a.tile:hover,
  body.home .top-grid > a.tile:focus-visible{
    background-color:#f4f4f4;
    color:#333;
  }

  body.home .top-grid > a.tile:hover .tile__en,
  body.home .top-grid > a.tile:hover .tile__jp,
  body.home .top-grid > a.tile:focus-visible .tile__en,
  body.home .top-grid > a.tile:focus-visible .tile__jp{
    color:#333;
  }
}

/* Works category unified (Graphic / Web / Movie) */
body.tax-works_category{
  background:#2f2f2f;
  color:#fff;
}

body.tax-works_category a{ color: inherit; }

body.tax-works_category .container{
  width: min(1120px, calc(100% - 48px));
  padding-block: 72px;
}

@media (max-width: 768px){
  body.tax-works_category .container{
    width: calc(100% - 32px);
    padding-block: 44px;
  }
}

.works-card__placeholder{
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
}

.works-archive__header{
  text-align:center;
  margin-bottom: 44px;
}

.works-archive__title{
  margin: 0;
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 300;
  letter-spacing: 0.12em;
}

.works-archive__desc{
  display: inline-block;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid #555;
  color: #aaa;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.works-grid.works-grid--unified{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 28px;
}

@media (max-width: 768px){
  .works-grid.works-grid--unified{
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.works-card{
  opacity: 1;
  transform: none;
}

.js .works-card.js-fade{
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .works-card.js-fade.is-inview{
  opacity: 1;
  transform: translateY(0);
}

.works-card__link{
  display: block;
  text-decoration: none;
}

.works-card__media{
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #222;
  border: 1px solid #555;
}

.works-card__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.35s ease;
  display: block;
}

.works-card__video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.works-card__media::after{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.tax-works_category .works-card:hover .works-card__img{
  transform: scale(1.04);
}

body.tax-works_category .works-card:hover .works-card__media::after{
  opacity: 1;
}

body.tax-works_category .works-card[data-has-video="1"]:hover .works-card__video{
  opacity: 1;
}

.works-card__body{
  padding-top: 14px;
}

.works-card__title-row{
  position: relative;
  padding-right: 70px;
}

.works-card__title{
  margin: 0;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.works-card__cat{
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 11px;
  color: #aaa;
  letter-spacing: 0.10em;
}

.works-card__divider{
  margin-top: 12px;
  height: 1px;
  background: #555;
}

.works-archive__empty{
  text-align: center;
  color: #aaa;
}

/* Works list */
.works-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px){
  .works-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .works-grid{ grid-template-columns: 1fr; }
}

.work-card{
  border: 1px solid rgba(31,31,31,.18);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.35);
}
.work-card a{
  display: block;
  text-decoration: none;
}
.work-card__thumb{
  aspect-ratio: 4/3;
  background: rgba(31,31,31,.06);
}
.work-card__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.work-card__body{
  padding: 14px 14px 16px;
}
.work-card__title{
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}
.work-card__meta{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
}

/* Single works */
.single-works{
  background:#2f2f2f;
  color:#fff;
}
.single-works a{ color: inherit; }
.single-works .container{
  width: min(1120px, calc(100% - 48px));
  padding-block: 72px;
}
@media (max-width: 768px){
  .single-works .container{
    width: calc(100% - 32px);
    padding-block: 44px;
  }
}

.works-single__meta-block{
  border-top: 1px solid #555;
  border-bottom: 1px solid #555;
  padding: 22px 0;
  margin-bottom: 34px;
}

.works-single--simple .works-single__title{
  margin: 0;
}
.works-single__title--center{
  text-align: center;
  letter-spacing: .12em;
}

.works-single__meta-simple{
  margin-top: 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 56px;
}
.works-single__meta-chip{
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255,255,255,.80);
  letter-spacing: .06em;
}

/* Works single gallery grid (2 columns) */
.works-single__gallery-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
}
@media (max-width: 768px){
  .works-single__gallery-grid{
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.works-single__title{
  margin: 0 0 14px;
  font-size: clamp(24px, 2.8vw, 40px);
  font-weight: 300;
  letter-spacing: .08em;
  line-height: 1.25;
}

.works-single__meta{
  display: grid;
  gap: 10px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  letter-spacing: .02em;
}

.works-single__meta-item{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: start;
}
@media (max-width: 560px){
  .works-single__meta-item{ grid-template-columns: 1fr; gap: 6px; }
}

.works-single__meta-label{
  color: rgba(255,255,255,.55);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 11px;
}
.works-single__ext{
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.35);
}
.works-single__ext:hover{
  border-bottom-color: rgba(255,255,255,.70);
}

.works-single__roles{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.works-single__role{
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255,255,255,.80);
}

.works-single__hero{
  margin: 0 0 52px;
}
.works-single__hero-media{
  border: 1px solid #555;
  background: #222;
  border-radius: 18px;
  overflow: hidden;
}
.works-single__hero-img{
  display: block;
  width: 100%;
  height: min(52vh, 520px);
  object-fit: cover;
}
@media (max-width: 768px){
  .works-single__hero{ margin-bottom: 38px; }
  .works-single__hero-img{ height: min(44vh, 420px); }
}

.works-single__gallery{
  display: grid;
  gap: 26px;
  margin: 0 0 64px;
}
.works-single__gallery-item{
  margin: 0;
}
.works-single__gallery-img{
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid #555;
  background: #222;
  border-radius: 18px;
}
.works-single__gallery-cap{
  margin-top: 10px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  letter-spacing: .02em;
  line-height: 1.8;
}

.works-single__content{
  color: rgba(255,255,255,.82);
  margin: 56px auto 0;
  line-height: 1.95;
  letter-spacing: .02em;
}
.works-single__content > *:first-child{ margin-top: 0; }
.works-single__content > *:last-child{ margin-bottom: 0; }
.works-single__content p{
  margin: 0 0 16px;
}
.works-single__content p:last-child{ margin-bottom: 0; }
.works-single__content h2,
.works-single__content h3{
  margin: 42px 0 14px;
  font-weight: 500;
  letter-spacing: .06em;
  color: rgba(255,255,255,.90);
}
.works-single__content ul,
.works-single__content ol{
  margin: 0 0 18px;
  padding-left: 1.2em;
}
.works-single__content a{
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.35);
}
.works-single__content a:hover{
  border-bottom-color: rgba(255,255,255,.70);
}
.works-single__content img{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 28px auto;
  border-radius: 14px;
}

.works-single__nav{
  margin-top: 72px;
  border-top: 1px solid #555;
  padding-top: 22px;
}
.works-single__nav-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 768px){
  .works-single__nav{ margin-top: 56px; }
  .works-single__nav-row{ grid-template-columns: 1fr; }
}

.works-single__nav-link{
  display: grid;
  gap: 6px;
  text-decoration: none;
  border: 1px solid #555;
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(0,0,0,.08);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}
.works-single__nav-link:hover{
  transform: translateY(-1px);
  background: rgba(0,0,0,.14);
  border-color: #777;
}
.works-single__nav-link--next{
  text-align: right;
}
.works-single__nav-kicker{
  color: rgba(255,255,255,.55);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.works-single__nav-title{
  color: rgba(255,255,255,.86);
  font-size: 13px;
  letter-spacing: .02em;
  line-height: 1.6;
}

.works-single__back{
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.works-single__back-link{
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(255,255,255,.82);
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.works-single__back-link:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.60);
  background: rgba(255,255,255,.06);
}

.works-single__header{
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}
.works-single__thumb{
  border-radius: 12px;
  overflow: hidden;
  background: rgba(31,31,31,.06);
}
.works-single__thumb img{
  width: 100%;
  height: auto;
  display: block;
}
/* legacy styles kept (superseded by new fixed layout) */

