/*
Theme Name: Ozuno Portfolio
Theme URI: https://ozunodesign.com
Author: Fumino Ozuno
Author URI: https://ozunodesign.com
Description: Fumino Ozuno のデザインポートフォリオテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ozuno-portfolio
*/

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #faf9f6;
  color: #543219;
  font-family: Helvetica, Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100%;
  margin: 0;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-wrap {
  display: grid;
  grid-template-columns: 20% 75%;
  gap: 5%;
  width: 92%;
  max-width: 1800px;
  margin: 0 auto;
}

.sidebar {
  min-width: 0;
}

.site-header {
  position: relative;
  padding-top: 50px;
  padding-bottom: 40px;
}

.logo-link {
  display: block;
  width: 100%;
  text-align: center;
}

.logo-link img {
  width: min(100%, 235px);
  margin: 0 auto;
}

.side-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.side-nav a {
  color: #543219;
  font-size: 16px;
  line-height: 18px;
  transition: color 150ms ease;
}

.side-nav a:hover {
  color: #222;
}

.side-nav a.active,
.mobile-nav a.active {
  color: #222;
}

.side-nav .contact-link {
  margin-top: 18px;
  font-size: 17px;
  line-height: 20px;
}

.content {
  min-width: 0;
}

.masthead {
  display: flex;
  min-height: 314px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 110px 12% 90px;
  text-align: center;
}

.masthead h1 {
  width: 100%;
  margin: 0 0 10px;
  color: #543219;
  font-size: 50px;
  font-weight: 400;
  line-height: 36px;
}

.masthead p {
  width: 100%;
  margin: 20px 0 0;
  color: #543219;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.5%;
}

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin-top: 1%;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: #fff;
  opacity: 0;
  transition: opacity 150ms ease;
}

.card-details {
  position: absolute;
  inset: 5% 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 5%;
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 150ms ease;
}

.project-card:hover::after,
.project-card:focus-visible::after {
  opacity: 0.85;
}

.project-card:hover .card-details,
.project-card:focus-visible .card-details {
  opacity: 1;
}

.date {
  width: 90%;
  padding-bottom: 5px;
  color: #999;
  font-size: 16px;
  font-style: italic;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

.title {
  width: 100%;
  color: #222;
  font-size: 26px;
  font-weight: 600;
  line-height: 33px;
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 40px;
  bottom: 40px;
  z-index: 3;
  display: flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.05);
  color: #999;
  font-size: 28px;
  line-height: 1;
}

.site-footer {
  width: 100%;
  padding: 60px 0;
  color: #543219;
  font-size: 16px;
  line-height: 18px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.page-detail {
  color: #333;
}

.page-title-block {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 0 64px;
  text-align: center;
}

.page-title-block h1 {
  margin: 0;
  color: #543219;
  font-size: 50px;
  font-weight: 400;
  line-height: 1.1;
}

.detail-modules {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.detail-image,
.detail-gallery,
.detail-text {
  width: 100%;
  margin: 0 auto 34px;
}

.detail-image img,
.detail-gallery img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-text {
  max-width: 840px;
  padding: 20px 0;
  font-size: 14px;
  line-height: 1.75;
}

.detail-text p {
  margin: 0 0 8px;
}

.detail-text p:first-child {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}

.about-intro {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.45fr);
  gap: 34px;
  align-items: start;
}

.about-intro .detail-image,
.about-intro .detail-text {
  margin-bottom: 0;
}

.other-projects {
  max-width: 1100px;
  margin: 72px auto 0;
}

.other-projects h2 {
  margin: 0 0 24px;
  color: #543219;
  font-size: 22px;
  font-weight: 400;
  text-align: center;
}

.contact-form-wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 80px;
  color: #333;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(84, 50, 25, 0.28);
  border-radius: 0;
  background: #fff;
  color: #333;
  font-size: 16px;
  line-height: 1.4;
  padding: 12px 14px;
}

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

.contact-form button,
.contact-button {
  align-self: flex-start;
  border: 0;
  background: #543219;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  padding: 14px 34px;
  cursor: pointer;
}

.contact-form-sent {
  margin: 28px 0 0;
  color: #333;
  font-size: 15px;
  line-height: 1.8;
}

.hamburger {
  position: absolute;
  top: 50%;
  right: 0;
  display: none;
  width: 34px;
  height: 34px;
  padding: 5px;
  border: 0;
  background: transparent;
  transform: translateY(-50%);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  margin-bottom: 4px;
  background: #543219;
}

.hamburger span:last-child {
  margin-bottom: 0;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  padding: 50px 5% 0;
  overflow: auto;
  background: #faf9f6;
  opacity: 0;
  visibility: hidden;
  transition: visibility 0s ease 200ms, opacity 200ms ease;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transition: visibility 0s ease, opacity 200ms ease;
}

.mobile-nav nav {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  padding-bottom: 80px;
}

.mobile-nav a {
  padding-bottom: 30px;
  color: #543219;
  font-size: 22px;
  line-height: 32px;
  text-align: center;
}

.mobile-close {
  position: fixed;
  top: 40px;
  right: 5%;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-close::before,
.mobile-close::after {
  position: absolute;
  top: 2px;
  left: 11px;
  width: 2px;
  height: 20px;
  content: "";
  background: #543219;
}

.mobile-close::before {
  transform: rotate(45deg);
}

.mobile-close::after {
  transform: rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 932px) {
  .site-wrap {
    display: block;
    width: 100%;
  }

  .site-header {
    padding: 40px 5%;
  }

  .logo-link {
    padding-right: 39px;
    padding-left: 39px;
  }

  .logo-link img {
    width: auto;
    max-height: 60px;
  }

  .hamburger {
    display: block;
    right: 5%;
  }

  .side-nav {
    display: none;
  }

  .masthead {
    min-height: 0;
    padding-top: 44px;
    padding-bottom: 38px;
  }

  .page-title-block {
    padding: 44px 5% 38px;
  }

  .page-title-block h1 {
    font-size: 24px;
  }

  .detail-modules,
  .other-projects,
  .contact-form-wrap {
    padding-right: 5%;
    padding-left: 5%;
  }

  .detail-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-text p:first-child {
    font-size: 20px;
  }

  .about-intro {
    grid-template-columns: 1fr;
  }

  .masthead h1 {
    font-size: 24px;
    line-height: 17px;
  }

  .masthead p {
    margin-top: 14px;
    font-size: 14px;
    line-height: 20px;
  }

  .project-card {
    margin-top: 2%;
  }

  .title {
    font-size: 19px;
    line-height: 24px;
  }

  .date {
    font-size: 14px;
    line-height: 20px;
  }

  .back-to-top {
    display: none;
  }

  .site-footer {
    padding: 28px 5%;
    font-size: 14px;
    line-height: 20px;
  }
}

@media (max-width: 540px) {
  .site-header {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .mobile-close {
    top: 30px;
  }

  .masthead {
    padding-top: 38px;
    padding-bottom: 33px;
  }

  .masthead h1 {
    font-size: 21px;
    line-height: 24px;
  }

  .masthead p {
    margin-top: 13px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .detail-gallery {
    grid-template-columns: 1fr;
  }

  .project-card {
    margin-top: 2%;
  }

  .title {
    font-size: 16px;
    line-height: 20px;
  }
}
