/*
Theme Name:   OyezNow Custom
Theme URI:    https://oyeznow.com
Description:  A steampunk-inspired technical blog theme
Author:       OyezNow
Author URI:   https://oyeznow.com
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:  oyeznow-custom
*/

/* ==========================================================================
   1. Global Styles & Accessibility
   ========================================================================== */

/* 사이트 전체 그리드 배경 (모눈종이 패턴) */
body {
  background-color: #fafafa;
  background-image:
    linear-gradient(#e0e0e0 0.5px, transparent 0.5px),
    linear-gradient(90deg, #e0e0e0 0.5px, transparent 0.5px);
  background-size: 30px 30px;
  background-attachment: fixed;
  color: #333;
  line-height: 1.6;
}

/* 다크모드 지원 (시스템 설정) */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    background-image:
      linear-gradient(#333 0.5px, transparent 0.5px),
      linear-gradient(90deg, #333 0.5px, transparent 0.5px);
    color: #e0e0e0;
  }
}

/* 접근성 강화: 키보드 포커스 스타일 */
a:focus,
button:focus,
.wp-block-button__link:focus {
  outline: 2px solid #b8860b;
  outline-offset: 2px;
}

/* ==========================================================================
   2. Building Blocks (Header, Footer, Buttons)
   ========================================================================== */

/* Header Tweaks */
header {
  border-bottom: 3px double #e0e0e0;
  /* 이중선으로 설계도 느낌 강화 */
}

header .wp-block-site-title {
  font-weight: 500;
  letter-spacing: 0.08em;
}

header nav a {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* 섹션 테두리를 얇은 설계도 선으로 처리 */
.wp-block-group,
.wp-block-columns {
  transition: all 0.3s ease;
}

/* IT Solutions 섹션 카드 스타일 */
.wp-block-group.solutions-preview .wp-block-column {
  display: flex;
  flex-direction: column;
  border: 1px solid #d1d1d1;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  height: 100%;
}

.wp-block-group.solutions-preview .wp-block-column:hover {
  border-color: #b8860b;
  box-shadow: 5px 5px 0px rgba(184, 134, 11, 0.1);
}

/* 스팀펑크풍 황동색 버튼 */
.wp-block-button__link {
  background-color: transparent !important;
  color: #b8860b !important;
  border: 1px solid #b8860b !important;
  border-radius: 0px !important;
  /* 각진 디자인 */
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
}

.wp-block-button__link:hover {
  background-color: #b8860b !important;
  color: #fff !important;
}

/* 섹션 구분선 고도화 */
.wp-block-separator.is-style-wide,
.wp-block-separator {
  border: none;
  border-top: 3px double #d1d1d1;
  margin: 4rem auto;
  opacity: 0.6;
  width: 100%;
}

/* ==========================================================================
   3. Hero Section (3D Editorial Layout)
   ========================================================================== */

.home-hero-3d {
  position: relative;
  min-height: 85vh;
  background-image: linear-gradient(rgba(10, 10, 10, 0.9), rgba(10, 10, 10, 0.3)), url('assets/images/hero-main.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  /* 잘림 방지 */
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.hero-3d-container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Layer 1: 매거진 박스 */
.magazine-box-layer {
  position: absolute;
  right: 12%;
  width: 55%;
  height: 80%;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(184, 134, 11, 0.25);
  box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.4);
  z-index: 10;
  padding: 2.5rem 5rem 2.5rem 2.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.magazine-text-content {
  max-width: 240px;
  text-align: right;
  z-index: 5;
}

.magazine-quote {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.65;
  color: #b8860b;
  margin: 0;
}

/* Layer 2: 캐릭터 */
.character-3d-layer {
  position: absolute;
  left: 15%;
  bottom: 0px;
  width: 38%;
  z-index: 20;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.character-pop-out {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(20px 10px 35px rgba(0, 0, 0, 0.6));
  transition: transform 0.5s ease;
}

/* Layer 3: 슬로건 */
.slogan-overlay-layer {
  position: absolute;
  left: 20%;
  top: 25%;
  z-index: 30;
  pointer-events: none;
}

.slogan-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.slogan-text span {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 6.2rem);
  font-weight: 900;
  line-height: 0.82;
  color: rgba(245, 245, 245, 0.95);
  letter-spacing: -0.05em;
  text-shadow: 0 5px 25px rgba(0, 0, 0, 0.6);
}

.slogan-text span:nth-child(2) {
  color: rgba(110, 110, 110, 0.95);
  margin-left: 0.15em;
}

.slogan-text span:nth-child(3) {
  color: rgba(184, 134, 11, 0.9);
  margin-left: 0.3em;
}

/* 수직 버튼 */
.magazine-vertical-button {
  position: absolute;
  right: 12%;
  top: 15%;
  bottom: 15%;
  width: 42px;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  transition: all 0.3s ease;
}

.magazine-vertical-button a {
  transform: rotate(90deg);
  white-space: nowrap;
  color: #b8860b;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.magazine-vertical-button:hover {
  background: #b8860b;
  width: 75px;
}

.magazine-vertical-button:hover a {
  color: #fff;
}

/* ==========================================================================
   4. Content Sections (Insights, etc.)
   ========================================================================== */

/* Insights Section */
.insights-list article {
  display: grid;
  grid-template-columns: 90px 1fr 24px;
  column-gap: 1rem;
  padding: 0.75rem 0;
  align-items: center;
}

.insights-list time {
  color: #777;
  font-size: 0.85rem;
}

.insights-icon {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0.7;
}

.insights-list .wp-block-group:hover .insights-icon {
  opacity: 1;
  transform: scale(1.1) rotate(5deg);
  color: #daa520;
}

/* Learn More Link */
.learn-more-link {
  display: inline-block;
  color: #b8860b;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  margin-top: auto;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.learn-more-link::before {
  content: "[ ";
}

.learn-more-link::after {
  content: " ]";
}

.learn-more-link:hover {
  color: #daa520;
  text-decoration: underline;
}

/* 포스트 목록 — 제목 컬럼 */
.insights-list .post-content {
  min-width: 0; /* grid 1fr 자식이 넘치지 않도록 */
}

.insights-list .post-content .wp-block-post-title,
.insights-list .post-content .wp-block-post-title a {
  font-size: 1.1rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Breadcrumb */
.oyeznow-breadcrumb {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.oyeznow-breadcrumb a {
  color: #b8860b;
  text-decoration: none;
}

.oyeznow-breadcrumb a:hover {
  text-decoration: underline;
}

.oyeznow-breadcrumb .bc-sep {
  margin: 0 0.3rem;
  color: #bbb;
}

.oyeznow-breadcrumb .bc-current {
  color: #555;
}

/* Category Page Tweaks */
.category-icon-wrapper svg {
  color: #999;
}

.category-header {
  margin-bottom: 2rem;
}

.category-header p {
  color: #666;
  font-size: 0.9rem;
  max-width: 640px;
}

/* Author Bio */
.author-bio {
  border-top: 1px solid #e0e0e0;
  margin-top: 3rem;
  padding-top: 1.5rem;
}

.author-bio p {
  font-size: 0.9rem;
  color: #555;
}

/* ==========================================================================
   5. Responsive Design (Media Queries)
   ========================================================================== */

/* Mobile (max-width: 1024px) - 기존 로직 유지 */
@media (max-width: 1024px) {
  .hero-3d-container {
    height: auto;
    flex-direction: column;
    padding-top: 5rem;
  }

  .magazine-box-layer {
    position: relative;
    width: 95%;
    right: auto;
    height: auto;
    padding: 2rem;
    order: 2;
    margin-top: 15rem;
  }

  .character-3d-layer {
    width: 80%;
    left: 10%;
    bottom: auto;
    top: 0;
  }

  .slogan-overlay-layer {
    left: 5%;
    top: 5%;
  }

  .magazine-vertical-button {
    position: relative;
    width: 100%;
    height: 60px;
    right: auto;
    top: auto;
    order: 3;
  }

  .magazine-vertical-button a {
    transform: none;
  }
}

/* Tablet Optimizations (New) */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-3d-container {
    padding-top: 8rem;
    /* 태블릿에서 캐릭터 공간 확보 */
  }

  .character-3d-layer {
    width: 60%;
    left: 20%;
  }

  .slogan-text span {
    font-size: 4rem;
    /* 태블릿에서 폰트 사이즈 조정 */
  }
}


/* ==========================================================================
   Technical Addendum — [addendum] 숏코드 스타일
   6개월 마이그레이션 로드맵: "기록자 → 설계자" 전환 핵심 컴포넌트
   ========================================================================== */

.technical-addendum {
  border: 1px solid #B8860B;        /* 기존 brass 색상 */
  background: #faf6ef;
  padding: 1.5rem 1.5rem 1.5rem 1.8rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  font-family: "Courier New", "Lucida Console", monospace;
  font-size: 0.88rem;
  line-height: 1.8;
  position: relative;
  border-radius: 0;                 /* 테마 컨셉: 날카로운 모서리 */
}

.technical-addendum::before {
  content: "Technical Addendum";
  position: absolute;
  top: -11px;
  left: 20px;
  background: #faf6ef;
  padding: 0 10px;
  font-size: 0.68rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #8b6f47;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.technical-addendum p {
  margin: 0.4em 0;
}

.technical-addendum code {
  background: rgba(184, 134, 11, 0.08);
  border: 1px solid rgba(184, 134, 11, 0.25);
  padding: 1px 5px;
  border-radius: 2px;
  font-family: inherit;
}

/* 다크모드 */
@media (prefers-color-scheme: dark) {
  .technical-addendum {
    background: #1a1710;
    border-color: #8b6f47;
    color: #d4c4a0;
  }
  .technical-addendum::before {
    background: #1a1710;
    color: #a08050;
  }
  .technical-addendum code {
    background: rgba(184, 134, 11, 0.15);
  }
}


/* ==========================================================================
   The Codex 섹션 스타일 — 기술 창고 콘텐츠 영역 강조
   기존 grid 배경 위에 brass left-border로 "설계도" 느낌 부여
   ========================================================================== */

.codex-section {
  background: linear-gradient(rgba(245, 235, 210, 0.04), rgba(245, 235, 210, 0.04));
  border-left: 3px double #B8860B;
  padding-left: 1.5rem;
  margin-left: -0.5rem;
}

.codex-section h2,
.codex-section h3 {
  font-family: "Playfair Display", serif;
  color: #8b6f47;
  letter-spacing: 0.05em;
}

@media (prefers-color-scheme: dark) {
  .codex-section {
    background: linear-gradient(rgba(184, 134, 11, 0.04), rgba(184, 134, 11, 0.04));
    border-left-color: #8b6f47;
  }
}
}