/*
Theme Name: Takahashi Sanami Portfolio
Theme URI: https://example.com
Author: Takahashi Sanami
Author URI: https://example.com
Description: A minimal and elegant portfolio theme for web coders and creatives.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: takahashi-sanami
Tags: portfolio, minimal, one-column, custom-menu, featured-images
*/

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

:root {
  --bg: #faf8f4;
  --charcoal: #2a2520;
  --muted: #8a8078;
  --accent: #c4956a;
  --pale: #ede7dc;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--charcoal);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* Fixed Main Visual - Right Panel */
.main-visual {
  position: fixed;
  right: 0; top: 0;
  width: 50%; height: 100vh;
  background: var(--bg);
  z-index: 0;
  overflow: hidden;
}
.main-visual::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(196,149,106,0.1));
  pointer-events: none;
}

/* Scrollable Left Content */
.page-left {
  width: 50%;
  position: relative;
  z-index: 1;
}

/* Navigation */
nav {
  position: fixed; top: 0; left: 0;
  width: 50%;
  z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 4rem 3rem 3rem;
  background: rgba(250,248,244,0.85);
  backdrop-filter: blur(8px);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(42,37,32,0.45);
  text-decoration: none;
}
.nav-links {
  display: flex; gap: 2.5rem; list-style: none;
}
.nav-links a {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--charcoal);
  text-decoration: none;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--charcoal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.hamburger-btn { display: none; }

/* WordPress Menu */
#primary-menu {
  display: flex; gap: 2.5rem; list-style: none;
}
#primary-menu a {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(42,37,32,0.45);
  text-decoration: none;
  position: relative;
}
#primary-menu a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: rgba(42,37,32,0.45);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
#primary-menu a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Hero */
.hero {
  min-height: 100vh;
  padding: 8rem 0;
  display: flex;
  position: relative;
  overflow: hidden;
}
.hero-left {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 8rem 3rem 5rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.hero-name {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 3vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: #444444;
  text-align: center;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}
.hero-desc {
  font-size: 0.875rem;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 3rem;
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

/* CTA button */
.hero-cta,
.contact-btn {
  display: inline-flex; align-items: center; gap: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--charcoal);
  text-decoration: none;
}
.hero-cta {
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
  align-self: center;
}
.contact-btn {
  margin-top: 3rem;
}
.hero-cta span,
.contact-btn span {
  width: 48px; height: 1px;
  background: var(--charcoal);
  display: inline-block;
  transition: width 0.3s ease;
}
.hero-cta:hover span,
.contact-btn:hover span { width: 72px; }

/* Main Visual image */
.main-visual-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-scroll-indicator {
  position: absolute; bottom: 2.5rem; right: 3rem;
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.65rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, transparent, var(--muted));
  animation: scrollPulse 2s ease-in-out infinite;
}

/* Section Shared */
.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  line-height: 1.1;
}
.section-title em { font-style: italic; color: var(--muted); }

/* Works (top page) */
.works { background: var(--bg); padding: 8rem 0; }
.works-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 3rem;
  margin-bottom: 4rem;
}
.works-more {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--charcoal); text-decoration: none;
  display: flex; align-items: center; gap: 0.75rem;
}
.works-more span {
  width: 32px; height: 1px; background: var(--charcoal);
  display: inline-block; transition: width 0.3s;
}
.works-more:hover span { width: 56px; }

.works-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 0 3rem;
  margin-bottom: 2.5rem;
}
.work-preview-item {
  display: block;
  width: 70%;
  overflow: hidden;
  text-decoration: none;
}
.work-preview-item .work-thumb { aspect-ratio: 1; }
.work-preview-item:hover .work-thumb { transform: scale(1.03); }

.works-footer {
  display: flex;
  justify-content: center;
  padding: 0 3rem 2rem;
}

/* Shared work item styles */
.work-item { position: relative; overflow: hidden; }
.work-thumb {
  width: 100%;
  aspect-ratio: 1;
  background: var(--pale);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.work-thumb:hover { transform: scale(1.03); }
.work-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.work-thumb-inner {
  width: 60%; height: 60%;
  border: 1px solid rgba(196,149,106,0.3);
  display: flex; align-items: center; justify-content: center;
}
.work-thumb-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.work-info { padding: 1rem 0; }
.work-num {
  font-size: 0.6rem; letter-spacing: 0.25em;
  color: var(--accent); margin-bottom: 0.3rem;
}
.work-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 400;
}
.work-tag {
  font-size: 0.65rem; letter-spacing: 0.15em;
  color: var(--muted); margin-top: 0.2rem;
}

/* About */
.about { background: var(--bg); }
.about-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 0 3rem; gap: 3rem;
}
.about-image-wrap { position: relative; }
.about-image-box {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--pale);
  position: relative;
  overflow: hidden;
}
.about-image-box::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(196,149,106,0.15) 0%, transparent 70%);
}
.about-image-frame {
  position: absolute;
  top: -1.5rem; right: -1.5rem;
  width: 80%; height: 80%;
  border: 1px solid rgba(196,149,106,0.3);
}
.about-content { display: flex; flex-direction: column; justify-content: center; }
.about-text {
  font-size: 0.875rem; line-height: 2.0;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.about-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; margin-top: 2.5rem;
  border-top: 1px solid rgba(42,37,32,0.15);
  padding-top: 2rem;
}
.about-detail-label {
  font-size: 0.62rem; letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.4rem;
}
.about-detail-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem; color: var(--charcoal);
}

/* Contact — top page (button only) */
.contact { background: var(--bg); }
.contact-inner { padding: 0 3rem; }

.about .contact-inner,
.contact .contact-inner {
  display: flex;
  flex-direction: column;
}
.about .contact-btn,
.contact .contact-btn {
  margin-left: auto;
}

/* Contact page form */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; margin-top: 4rem;
}
.contact-text {
  font-size: 0.875rem; line-height: 2.0;
  color: var(--muted); margin-bottom: 2.5rem;
}
.contact-email-link {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.2rem, 2.5vw, 2.2rem);
  color: var(--charcoal); text-decoration: none;
  display: block; margin-bottom: 2.5rem;
  transition: color 0.3s;
}
.contact-email-link:hover { color: var(--accent); }
.social-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.social-item { border-top: 1px solid rgba(42,37,32,0.15); }
.social-item:last-child { border-bottom: 1px solid rgba(42,37,32,0.15); }
.social-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 0;
  text-decoration: none; color: var(--charcoal);
  transition: padding-left 0.3s ease;
}
.social-link:hover { padding-left: 1rem; color: var(--accent); }
.social-link-name { font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase; }
.social-link-handle { font-family: 'Cormorant Garamond', serif; font-size: 1rem; color: var(--muted); }
.social-arrow { font-size: 0.8rem; color: var(--muted); }
.contact-form-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; margin-bottom: 2rem; }
.form-field { margin-bottom: 1.5rem; }
.form-field label {
  display: block;
  font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.5rem;
}
.form-field input, .form-field textarea {
  width: 100%; border: none; border-bottom: 1px solid rgba(42,37,32,0.25);
  background: transparent; padding: 0.75rem 0;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 0.875rem; color: var(--charcoal);
  outline: none; transition: border-color 0.3s;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--accent); }
.form-field textarea { resize: none; height: 100px; }
.form-submit {
  display: inline-flex; align-items: center; gap: 1rem;
  background: var(--charcoal); color: #faf8f4;
  border: none; padding: 1rem 2.5rem;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer; transition: background 0.3s, transform 0.2s;
}
.form-submit:hover { background: var(--accent); transform: translateY(-2px); }

/* Footer */
footer {
  background: var(--bg);
  color: rgba(42,37,32,0.45);
  padding: 2.5rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  border-top: 1px solid rgba(42,37,32,0.1);
}
.footer-name {
  font-size: 0.65rem; letter-spacing: 0.2em;
  color: var(--charcoal);
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes scrollPulse {
  0%,100% { opacity: 0.3; height: 48px; }
  50%     { opacity: 1;   height: 64px; }
}
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* Sub-pages */
body.subpage nav {
  width: 100%;
  background: rgba(250,248,244,0.92);
  backdrop-filter: blur(10px);
  mix-blend-mode: normal;
}
.subpage-main {
  padding-top: 6rem;
  min-height: 80vh;
}
.subpage-hero {
  padding: 5rem 3rem 4rem;
  border-bottom: 1px solid rgba(42,37,32,0.1);
}

/* Works page grid */
.works-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2rem;
  padding: 4rem 3rem;
}

/* About page */
.about-page { background: var(--bg); }
.about-page .section-title {
  color: #444444;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 3vw, 2rem);
}
.about-page .about-inner {
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  padding: 5rem 3rem;
}

/* Contact page */
.contact-page { background: var(--bg); }
.contact-page .contact-inner { padding: 5rem 3rem; }
.contact-page .contact-grid {
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}
.contact-page .contact-grid > div {
  width: 60%;
}

/* WordPress Content Styles */
.entry-content p { margin-bottom: 1rem; line-height: 1.8; }
.entry-content a { color: var(--accent); }
.wp-caption { max-width: 100%; }
.aligncenter { display: block; margin: 0 auto; }
.alignright { float: right; margin-left: 1rem; }
.alignleft { float: left; margin-right: 1rem; }

/* Responsive */
@media (max-width: 768px) {
  .main-visual {
    position: relative;
    width: 100%;
    height: 35vh;
    min-height: unset;
    margin-top: 5.5rem;
  }
  .hero-scroll-indicator { display: none; }
  .page-left { width: 100%; }
  nav { width: 100% !important; padding: 1.5rem; background: rgba(250,248,244,0.92); mix-blend-mode: normal; }
  .nav-links { display: none; }
  #primary-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  #primary-menu.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  #primary-menu a {
    font-size: 1rem;
    letter-spacing: 0.25em;
  }
  .hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
  }
  .hamburger-btn span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: rgba(42,37,32,0.45);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .hamburger-btn.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .hamburger-btn.is-open span:nth-child(2) { opacity: 0; }
  .hamburger-btn.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .hero { min-height: unset; height: calc(88vh - 5.5rem - 35vh); display: flex; align-items: center; }
  .hero-left { padding: 0 1.5rem; }
  .hero-name { white-space: normal; }
  .hero-desc { margin-bottom: 1.5rem; }
  .hero-cta { margin-top: 1.5rem; }
  .works-header { padding: 0 1.5rem; }
  .works-preview { grid-template-columns: 1fr; padding: 0 1.5rem; }
  .works-footer { padding: 0 1.5rem 2rem; }
  .about-inner { grid-template-columns: 1fr; padding: 0 1.5rem; gap: 3rem; }
  .contact-inner { padding: 0 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .subpage-hero { padding: 4rem 1.5rem 3rem; }
  .works-page-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem 1.5rem; }
  .about-page .about-inner { grid-template-columns: 1fr; gap: 3rem; padding: 3rem 1.5rem; }
  .contact-page .contact-inner { padding: 3rem 1.5rem; }
  .contact-page .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
}
