/* ==============================================================================
   MAIROKY PORTFOLIO — UNIFIED SUBPAGE DESIGN SYSTEM (css/editorial.css)
   Shared Editorial Aesthetic for:
     - projects.html (Dedicated Projects Hub)
     - project.php (Project Case Study Reader & SSR Engine)
     - blog.html (Dedicated Blog Hub)
     - blog-post.php (Technical Article Reader & SSR Engine)

   Tokens strictly inherited from the Mairoky Brand Design System:
     - Primary Background: #f5f4f0 (Warm cream minimal aesthetic)
     - Secondary Background: #ffffff (Pure white cards and containers)
     - Border Color: #e8e4de
     - Gold Accent: #b99e64 (Signature accent, active states, borders)
     - Terracotta Accent: #c06451 (Secondary geometric circle)
     - Teal Action Accent: #5ca595 (Action buttons, pills)
     - Text Primary: #000000 / #111111 (Headings and high contrast titles)
     - Text Secondary: #535355 / #666666 (Body copy and metadata)
     - Typography: 'Noto Sans', sans-serif
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* 1. BASE & RESETS */
html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #111111;
  background-color: #f5f4f0;
  margin: 0;
  padding: 0;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Sans', sans-serif;
  color: #111111;
  margin-top: 0;
}

h1 { font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; }
h2 { font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
h3 { font-weight: 700; line-height: 1.35; letter-spacing: -0.015em; }
h4 { font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
h5, h6 { font-weight: 600; line-height: 1.4; }

p {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #444444;
  margin-bottom: 1.25rem;
}

button, .btn, .btn-editorial-gold, .btn-editorial-outline, .editorial-cat-btn {
  font-family: 'Noto Sans', sans-serif;
}

i, .lni {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.font-custom {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.text-primary {
  color: #b99e64 !important;
}

.text-teal {
  color: #5ca595 !important;
}

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

a:hover {
  color: #3b7b6e;
  text-decoration: none;
}

/* 2. UNIFIED SUBPAGE HEADER NAVIGATION */
.editorial-header {
  background: #ffffff;
  border-bottom: 1px solid #e8e4de;
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 1.1rem 0;
  transition: box-shadow 0.3s ease;
}

.editorial-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.editorial-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editorial-brand {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  text-transform: uppercase;
  color: #000000;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.editorial-brand span {
  color: #b99e64;
}

.editorial-brand:hover {
  color: #000000;
  text-decoration: none;
}

.editorial-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.editorial-nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #444444;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
}

.editorial-nav-link:hover {
  color: #b99e64;
  text-decoration: none;
}

.editorial-nav-link.active {
  color: #000000;
  font-weight: 700;
}

.editorial-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #b99e64;
  border-radius: 2px;
}

.editorial-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* 3. UNIFIED EDITORIAL HERO */
.editorial-hero {
  background-color: #f5f4f0;
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid #e8e4de;
}

.hero-circle-gold {
  position: absolute;
  width: 9rem;
  height: 9rem;
  background-color: #b99e64;
  border-radius: 50%;
  left: -4.5rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-circle-brown {
  position: absolute;
  width: 42rem;
  height: 42rem;
  background-color: #c06451;
  border-radius: 50%;
  right: -12%;
  top: 50%;
  pointer-events: none;
  opacity: 0.12;
}

.editorial-hero-num {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #b99e64;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.editorial-hero-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #111111;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .editorial-hero-title {
    font-size: 3.1rem;
  }
}

.editorial-hero-sub {
  font-size: 1.25rem;
  color: #333333;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.editorial-hero-desc {
  font-size: 1.05rem;
  color: #555555;
  max-width: 680px;
  line-height: 1.65;
  margin: 0;
}

/* 4. UNIFIED CONTROLS & TOOLBAR */
.editorial-toolbar {
  background: #ffffff;
  border-bottom: 1px solid #e8e4de;
  padding: 1.25rem 0;
  position: sticky;
  top: 61px;
  z-index: 800;
}

.editorial-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.editorial-cat-btn {
  background: #ffffff;
  border: 1px solid #d9d5ce;
  color: #444444;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1.15rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.editorial-cat-btn:hover {
  border-color: #b99e64;
  color: #b99e64;
  background: rgba(185, 158, 100, 0.08);
}

.editorial-cat-btn.active {
  background: #b99e64 !important;
  border-color: #b99e64 !important;
  color: #121416 !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(185, 158, 100, 0.28);
}

.editorial-search-wrap {
  position: relative;
  width: 100%;
}

.editorial-search-input {
  width: 100%;
  border: 1px solid #d9d5ce;
  border-radius: 30px;
  padding: 0.5rem 1.25rem 0.5rem 2.5rem;
  font-size: 0.9rem;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editorial-search-input:focus {
  border-color: #b99e64;
  box-shadow: 0 0 0 3px rgba(185, 158, 100, 0.15);
}

.editorial-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #888888;
  font-size: 0.9rem;
  pointer-events: none;
}

/* 5. UNIFIED CARD GRID */
.editorial-card {
  background: #ffffff;
  border: 1px solid #e8e4de;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.editorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.07);
  border-color: rgba(185, 158, 100, 0.5);
}

.editorial-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #1a1d20;
}

.editorial-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.editorial-card:hover .editorial-card-thumb img {
  transform: scale(1.04);
}

.editorial-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.editorial-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b99e64;
  margin-bottom: 0.5rem;
}

.editorial-card-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #111111;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.editorial-card-title a {
  color: #111111;
  text-decoration: none;
}

.editorial-card-title a:hover {
  color: #b99e64;
}

.editorial-card-excerpt {
  font-size: 0.95rem;
  color: #555555;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.editorial-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.editorial-tag {
  background: #f5f4f0;
  color: #333333;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #e8e4de;
}

.editorial-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #f0eee8;
  margin-top: auto;
}

/* 6. UNIFIED BUTTONS */
.btn-editorial-gold {
  background: #b99e64;
  border: 1px solid #b99e64;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.25rem;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-editorial-gold:hover {
  background: #9d8450;
  border-color: #9d8450;
  color: #ffffff;
}

.btn-editorial-outline {
  background: transparent;
  border: 1px solid #111111;
  color: #111111;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.25rem;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-editorial-outline:hover {
  background: #111111;
  color: #ffffff;
}

.btn-editorial-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #d9d5ce;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #444444;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.btn-editorial-circle:hover {
  border-color: #b99e64;
  color: #b99e64;
  background: rgba(185, 158, 100, 0.08);
}

/* 7. UNIFIED READER / CASE STUDY / ARTICLE VIEW */
.editorial-reader-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1rem 5rem;
}

.editorial-specs-bar {
  background: #ffffff;
  border: 1px solid #e8e4de;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
}

.spec-column-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #888888;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.spec-column-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111111;
}

.editorial-cover-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8e4de;
  margin-bottom: 2.5rem;
  background: #1a1d20;
}

.editorial-cover-wrap img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
}

.editorial-body-card {
  background: #ffffff;
  border: 1px solid #e8e4de;
  border-radius: 12px;
  padding: 2.5rem;
  line-height: 1.8;
  font-size: 1.05rem;
  color: #222222;
}

@media (max-width: 767px) {
  .editorial-body-card {
    padding: 1.5rem;
  }
}

.editorial-body-card h2 {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #111111;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(185, 158, 100, 0.3);
  padding-bottom: 0.4rem;
}

.editorial-body-card h2:first-child {
  margin-top: 0;
}

.editorial-body-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111111;
  margin-top: 1.8rem;
  margin-bottom: 0.75rem;
}

.editorial-body-card p {
  margin-bottom: 1.4rem;
}

.editorial-body-card ul,
.editorial-body-card ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.editorial-body-card li {
  margin-bottom: 0.5rem;
}

/* 8. SHARED FOOTER */
.editorial-footer {
  background: #ffffff;
  border-top: 1px solid #e8e4de;
  padding: 2.5rem 0;
  text-align: center;
  color: #777777;
  font-size: 0.85rem;
}

.editorial-footer a {
  color: #777777;
}

.editorial-footer a:hover {
  color: #b99e64;
}
