/*
Theme Name: sunagadesign
Theme URI: http://sunagadesign.local
Author: sunagadesign
Author URI: http://sunagadesign.local
Description: An original minimal design theme inspired by Naoto Fukasawa Design. Clean, typographic, and refined aesthetic with fixed left sidebar navigation.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sunagadesign
Tags: minimal, portfolio, one-column, two-columns, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Sans JP', 'Noto Sans Japanese', 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.8;
    color: #444444;
    background-color: #ffffff;
    overflow-x: hidden;
}

a {
    color: #444444;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #222222;
}

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

ul, ol {
    list-style: none;
}

/* ==========================================================================
   Layout — Two-column: fixed sidebar + fluid main
   ========================================================================== */

.site {
    display: flex;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.site-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 64px 56px;
    background-color: #ffffff;
    z-index: 200;
}

/* --------------------------------------------------------------------------
   Main content
   -------------------------------------------------------------------------- */

.site-main {
    margin-left: 300px;
    flex: 1;
    min-height: 100vh;
}

/* ==========================================================================
   Site Branding / Title
   ========================================================================== */

.site-branding {
    margin-bottom: auto;
}

.site-title {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.4;
    color: #111111;
    text-transform: none;
    white-space: nowrap;
}

.site-title a {
    color: #111111;
    text-decoration: none;
    display: inline-block;
}

.site-title a:hover {
    color: #555555;
}

.site-description {
    display: none;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
    margin-top: 64px;
}

.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-navigation ul li {
    margin-bottom: 2px;
}

.main-navigation ul li a {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #444444;
    text-decoration: none;
    letter-spacing: 0.04em;
    display: inline-block;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current_page_item > a,
.main-navigation ul li.current-page-ancestor > a {
    color: #111111;
}

/* ==========================================================================
   Sidebar Footer / News
   ========================================================================== */

.sidebar-footer {
    margin-top: auto;
    padding-top: 40px;
}

.sidebar-news {
    font-size: 11px;
    color: #555555;
    line-height: 1.7;
    letter-spacing: 0.02em;
}

.sidebar-news-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    color: #555555;
    letter-spacing: 0.06em;
}

.sidebar-news ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-news ul li {
    margin-bottom: 5px;
}

.sidebar-news ul li a {
    font-size: 11px;
    color: #555555;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.5;
}

.sidebar-news ul li a:hover {
    color: #444444;
}

/* ==========================================================================
   Hero Slideshow
   ========================================================================== */

.hero-slideshow {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
}

.hero-slide {
    position: absolute;
    inset: 32px;
    opacity: 0;
    transition: opacity 1.4s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-placeholder {
    width: 100%;
    height: 100%;
    background-color: #eeeeee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-placeholder span {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: #cccccc;
    text-transform: none;
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.site-content {
    padding: 88px 72px;
    max-width: 100%;
}

/* Page / Section title */
.page-header {
    margin-bottom: 56px;
}

.entry-title,
.page-title {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: #111111;
    text-transform: none;
    margin-bottom: 0;
}

/* Post content */
.entry-content {
    max-width: none;
    font-size: 16px;
    line-height: 1.95;
    color: #444444;
    font-weight: 300;
}

.entry-content p {
    margin-bottom: 28px;
}

.entry-content p:last-child {
    margin-bottom: 0;
}

.entry-content h2 {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: #111111;
    text-transform: none;
    margin-top: 56px;
    margin-bottom: 24px;
}

.entry-content h3 {
    font-size: 17px;
    font-weight: 400;
    color: #555555;
    margin-top: 40px;
    margin-bottom: 16px;
}

.entry-content a {
    color: #555555;
    border-bottom: 1px solid #dddddd;
    padding-bottom: 1px;
}

.entry-content a:hover {
    color: #111111;
    border-color: #111111;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.entry-content table {
    width: 100%;
    max-width: none;
    border-collapse: collapse;
    margin-bottom: 40px;
    font-size: 15px;
}

.entry-content table th {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: none;
    color: #555555;
    text-align: left;
    padding: 0 16px 12px 0;
}

.entry-content table td {
    padding: 14px 16px 14px 0;
    color: #444444;
    font-weight: 300;
    line-height: 1.7;
    vertical-align: top;
}

.entry-content table td:first-child {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #555555;
    white-space: nowrap;
    width: 1%;
    letter-spacing: 0.04em;
    padding-right: 24px;
}

/* Award highlight rows */
.entry-content .award-row td strong {
    color: #555555;
}

/* Philosophy / Quote blocks */
.entry-content blockquote {
    margin: 40px 0;
    padding: 0 0 0 20px;
    border-left: 1px solid #dddddd;
    font-size: 15px;
    color: #444444;
    font-weight: 300;
    line-height: 1.9;
    font-style: normal;
}

.entry-content blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: #555555;
    letter-spacing: 0.06em;
    font-style: normal;
}

/* Brand / Project cards */
.project-block {
    margin-bottom: 56px;
}

.project-block h3 {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #111111;
    text-transform: none;
    margin-bottom: 16px;
}

.project-block p {
    margin-bottom: 12px;
}

.project-block .project-url {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: #555555;
    letter-spacing: 0.06em;
}

/* Media list */
.media-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.media-list li {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 20px 0;
    font-weight: 300;
    line-height: 1.7;
}

.media-list .media-date {
    flex-shrink: 0;
    width: 84px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #555555;
    letter-spacing: 0.04em;
}

.media-list .media-right {
    flex: 1;
    min-width: 0;
}

.media-list .media-outlet {
    display: block;
    font-size: 13px;
    color: #555555;
    line-height: 1;
    margin-bottom: 0;
}

.media-list .media-content {
    display: block;
    font-size: 15px;
    color: #444444;
}

/* ==========================================================================
   News / Archive List
   ========================================================================== */

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list-item {
    display: flex;
    align-items: baseline;
    gap: 48px;
    padding: 20px 0;
    border-bottom: 1px solid #ebebeb;
}

.news-list-item:first-child {
    border-top: 1px solid #ebebeb;
}

.news-date {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #555555;
    white-space: nowrap;
    min-width: 80px;
    letter-spacing: 0.06em;
    font-weight: 300;
}

.news-title {
    flex: 1;
}

.news-title a {
    font-size: 14px;
    color: #444444;
    text-decoration: none;
    font-weight: 300;
    transition: color 0.2s ease;
    letter-spacing: 0.02em;
}

.news-title a:hover {
    color: #111111;
}

/* ==========================================================================
   Single Post / Page
   ========================================================================== */

.post-header {
    margin-bottom: 56px;
}

.post-meta {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #555555;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    font-weight: 300;
}

.post-thumbnail {
    margin-bottom: 56px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
}

/* Navigation between posts */
.post-navigation {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #ebebeb;
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: none;
    color: #555555;
    transition: color 0.2s ease;
}

.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover {
    color: #111111;
}

/* ==========================================================================
   Profile page — two-column layout
   ========================================================================== */

.profile-page.site-content {
    padding: 0;
}

.profile-layout {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

.profile-photo {
    width: 42%;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.profile-photo-img,
.profile-photo-placeholder {
    display: block;
    width: 100%;
    max-height: calc(100vh - 64px);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background-color: #e0e0e0;
}

.profile-text {
    flex: 1;
    min-width: 0;
    padding: 88px 72px;
    order: -1;
}

/* ==========================================================================
   Footer (hidden — branding is in sidebar)
   ========================================================================== */

.site-footer {
    display: none;
}

/* ==========================================================================
   Works / Portfolio Grid
   ========================================================================== */

/* Works page wrapper — full-width, no inner padding cap */
.works-page {
    padding: 0 !important;
}

.works-header {
    padding: 88px 72px 0;
}

/* Category filter */
.works-filter {
    padding: 32px 72px 32px;
}

.works-filter ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.works-filter ul li a {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: #555555;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 3px 0;
    display: inline-block;
}

.works-filter ul li a:hover,
.works-filter ul li a.is-active {
    color: #111111;
}

/* Grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.work-item {
    position: relative;
    background-color: #ffffff;
    padding: 8px;
}

/* Image container — square */
.work-item > a {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f0f0f0;
}

.work-item > a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.work-item:hover > a img {
    transform: scale(1.04);
}

/* Placeholder when no image */
.work-placeholder {
    width: 100%;
    height: 100%;
    background-color: #eeeeee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-placeholder span {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 200;
    color: #cccccc;
    letter-spacing: 0.1em;
}

/* Caption below image */
.work-item-caption {
    padding: 14px 16px 20px;
    background-color: #ffffff;
}

.work-item-title {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #555555;
    letter-spacing: 0.04em;
    line-height: 1.5;
    margin: 0 0 2px;
}

.work-item-cat {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 300;
    color: #555555;
    letter-spacing: 0.06em;
    text-transform: none;
    margin: 0;
}

.works-empty {
    grid-column: 1 / -1;
    padding: 80px 56px;
    font-size: 14px;
    color: #555555;
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .works-grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 768px) {
    .works-filter { padding: 32px 24px 20px; }
    .works-grid { grid-template-columns: repeat(2, 1fr); }
    .works-page { padding: 0 !important; }
}

@media screen and (max-width: 480px) {
    .works-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Scrollbar
   ========================================================================== */

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #ffffff; }
::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #cccccc; }

/* ==========================================================================
   WordPress Core Styles
   ========================================================================== */

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    padding: 10px 20px;
    background: #111111;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    clip: auto;
    height: auto;
    overflow: auto;
    width: auto;
    outline: 2px solid #ffffff;
    outline-offset: -4px;
}

/* Screen reader utility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.screen-reader-text:focus {
    clip: auto;
    height: auto;
    overflow: auto;
    width: auto;
}

/* Focus indicators for keyboard navigation */
:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}

.main-navigation a:focus-visible,
.sidebar-news a:focus-visible,
.news-title a:focus-visible,
.post-navigation a:focus-visible,
.works-filter a:focus-visible,
.work-item a:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}

.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: 24px; margin-bottom: 16px; }
.alignright { float: right; margin-left: 24px; margin-bottom: 16px; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: #555555; text-align: center; margin-top: 8px; letter-spacing: 0.04em; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 1200px) {
    .site-sidebar {
        width: 260px;
        padding: 56px 44px;
    }
    .site-main { margin-left: 260px; }
    .site-content { padding: 72px 56px; }
}

@media screen and (max-width: 900px) {
    .site-sidebar {
        width: 220px;
        padding: 48px 36px;
    }
    .site-main { margin-left: 220px; }
    .site-content { padding: 56px 40px; }
}

@media screen and (max-width: 768px) {
    .site { flex-direction: column; }

    .site-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        padding: 36px 32px;
        border-bottom: 1px solid #ebebeb;
    }

    .sidebar-top { display: flex; gap: 40px; align-items: flex-start; }
    .main-navigation { margin-top: 0; }
    .main-navigation ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
    .main-navigation ul li { margin-bottom: 0; }
    .sidebar-footer { display: none; }

    .site-main { margin-left: 0; }

    .hero-slideshow { height: 65vw; min-height: 260px; }

    .site-content { padding: 48px 32px; }
    .works-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 480px) {
    .site-sidebar { padding: 28px 24px; }
    .sidebar-top { flex-direction: column; gap: 20px; }
    .site-content { padding: 36px 24px; }
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

/* External link icon */
.entry-content a[target="_blank"]::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='%23555555' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 1H1v8h8V6'/%3E%3Cpath d='M6 1h3v3'/%3E%3Cline x1='9' y1='1' x2='4' y2='6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    opacity: 0.7;
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }

    .work-item > a img {
        transition: none;
    }

    a,
    .main-navigation ul li a,
    .sidebar-news ul li a,
    .news-title a,
    .post-navigation a,
    .works-filter ul li a {
        transition: none;
    }
}


/* =================================================================
   追加CSS（カスタマイザーより移行）
   ================================================================= */

.hero-slideshow {
    overflow: hidden;
}

body.admin-bar .hero-slideshow {
    height: calc(100vh - 32px);
}

body.admin-bar .site-main {
    min-height: calc(100vh - 32px);
}

body.admin-bar .site {
    min-height: calc(100vh - 32px);
}

/* 投稿日付を非表示 */
.post-meta {
    display: none;
}