/*
Theme Name: AI Div Theme
Theme URI: http://54.150.140.38
Author: AI Division
Description: GeneratePressベースのAI企業風ダークミニマルテーマ。
Version: 1.0.0
Template: generatepress
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-div-theme
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */

/* Light mode (default) */
:root,
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #e8e8ed;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #999;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-dim: rgba(99, 102, 241, 0.08);
  --accent-glow: rgba(99, 102, 241, 0.12);
  --border: #e5e5ea;
  --border-light: #d1d1d6;
  --code-bg: #f5f5f7;
  --code-text: #1d1d1f;
  --header-bg: rgba(255, 255, 255, 0.85);
  --heading-color: #1d1d1f;
  --content-width: 680px;
  --site-width: 1100px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-sans: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
[data-theme="dark"] {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #242424;
  --text-primary: #e8e8e8;
  --text-secondary: #888;
  --text-muted: #555;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-dim: rgba(129, 140, 248, 0.1);
  --accent-glow: rgba(129, 140, 248, 0.15);
  --border: #1f1f1f;
  --border-light: #2a2a2a;
  --code-bg: #1e1e2e;
  --code-text: #cdd6f4;
  --header-bg: rgba(15, 15, 15, 0.85);
  --heading-color: #fff;
}

/* ==========================================================================
   Base Overrides
   ========================================================================== */

body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  line-height: 1.8 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}

a {
  color: var(--accent) !important;
  transition: color var(--transition);
  text-decoration: none !important;
}

a:hover {
  color: var(--accent-hover) !important;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background-color: transparent !important;
  border-bottom: none !important;
  position: relative;
  z-index: 100;
}

/* Hide the empty inside-header container */
.site-header > .inside-header:empty,
.site-header > .inside-header {
  display: none !important;
}

.inside-header {
  max-width: var(--site-width) !important;
  margin: 0 auto !important;
  padding: 0.75rem 2rem !important;
  display: flex !important;
  align-items: center !important;
  position: relative !important;
  gap: 1rem !important;
}

/* Hero Banner Header */
.header-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #6366f1, #818cf8, #a78bfa);
}

[data-theme="dark"] .header-hero {
  background: linear-gradient(135deg, #1e1b4b, #312e81, #3730a3);
}

.header-hero__bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.header-hero__logo-bg {
  width: 550px;
  height: auto;
  opacity: 0.1;
  filter: brightness(0) invert(1);
}

[data-theme="dark"] .header-hero__logo-bg {
  opacity: 0.06;
}

.header-hero__content {
  position: relative;
  z-index: 1;
}

.header-hero__title {
  display: block;
  color: #fff !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  text-decoration: none !important;
  line-height: 1.2;
}

.header-hero__subtitle {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

.site-header .site-title a,
.main-title a {
  color: var(--heading-color) !important;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  text-decoration: none !important;
  letter-spacing: -0.02em !important;
}

.site-description {
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
}

/* Navigation */

.main-navigation {
  background: transparent !important;
}

.main-navigation a,
.menu-toggle {
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: var(--radius-md) !important;
  transition: all var(--transition) !important;
  border: none !important;
  line-height: 1.4 !important;
}

.main-navigation .main-nav > ul > li > a {
  padding: 0.35rem 0.75rem !important;
}

.main-navigation a:hover {
  color: var(--text-primary) !important;
  background-color: var(--bg-tertiary) !important;
}

/* Prevent header height jump on hover */
.main-navigation .main-nav ul li:hover > ul {
  top: 100% !important;
}

.main-navigation .current-menu-item > a {
  color: var(--accent) !important;
}

/* Sub-menu */
.main-navigation ul ul {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site-content {
  background-color: var(--bg-primary) !important;
  max-width: var(--site-width) !important;
  margin: 0 auto !important;
  padding: 2rem !important;
}

.site-main {
  max-width: var(--content-width) !important;
  margin: 0 auto !important;
}

.inside-article {
  background-color: transparent !important;
  padding: 0 !important;
}

.separate-containers .inside-article {
  box-shadow: none !important;
}

/* Sidebar */
.is-right-sidebar,
#right-sidebar {
  background-color: transparent !important;
}

.is-right-sidebar .inside-right-sidebar,
.sidebar .widget {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Sidebar Section Blocks */
#right-sidebar .widget {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

#right-sidebar > .inside-right-sidebar > .widget > .wp-block-group,
#right-sidebar > .inside-right-sidebar > .widget > .wp-block-search {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.25rem !important;
  margin-bottom: 1.25rem !important;
}

#right-sidebar .wp-block-group .wp-block-group {
  border: none !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
  background: transparent !important;
}

/* Sidebar Headings */
#right-sidebar h2,
#right-sidebar .wp-block-heading {
  color: var(--text-primary) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  margin-bottom: 1rem !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 2px solid var(--accent) !important;
}

/* Sidebar About text */
#right-sidebar .wp-block-group p {
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
  line-height: 1.7 !important;
  margin-bottom: 0 !important;
}

/* Sidebar Categories List */
#right-sidebar .wp-block-categories-list,
#right-sidebar .wp-block-archives-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#right-sidebar .wp-block-categories-list li,
#right-sidebar .wp-block-archives-list li {
  border-bottom: 1px solid var(--border) !important;
  padding: 0.6rem 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
}

#right-sidebar .wp-block-categories-list li:last-child,
#right-sidebar .wp-block-archives-list li:last-child {
  border-bottom: none !important;
}

#right-sidebar .wp-block-categories-list li a,
#right-sidebar .wp-block-archives-list li a {
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
  text-decoration: none !important;
  transition: all var(--transition) !important;
}

#right-sidebar .wp-block-categories-list li a:hover,
#right-sidebar .wp-block-archives-list li a:hover {
  color: var(--accent) !important;
}

/* Sidebar Latest Posts */
#right-sidebar .wp-block-latest-posts {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#right-sidebar .wp-block-latest-posts li {
  border-bottom: 1px solid var(--border) !important;
  padding: 0.6rem 0 !important;
}

#right-sidebar .wp-block-latest-posts li:last-child {
  border-bottom: none !important;
}

#right-sidebar .wp-block-latest-posts li a {
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
  transition: color var(--transition) !important;
}

#right-sidebar .wp-block-latest-posts li a:hover {
  color: var(--accent) !important;
}

#right-sidebar .wp-block-latest-posts__post-date {
  color: var(--text-muted) !important;
  font-size: 0.75rem !important;
  display: block !important;
  margin-top: 0.2rem !important;
}

/* Sidebar Search (additional styles) */

#right-sidebar .wp-block-search__inside-wrapper {
  display: flex !important;
  gap: 0.5rem !important;
}

#right-sidebar .wp-block-search__input {
  flex: 1 !important;
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: var(--radius-md) !important;
  font-size: 0.85rem !important;
}

#right-sidebar .wp-block-search__button {
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: background var(--transition) !important;
}

#right-sidebar .wp-block-search__button:hover {
  background: var(--accent-hover) !important;
}

/* ==========================================================================
   Posts / Articles
   ========================================================================== */

.post,
article {
  background-color: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding-bottom: 2.5rem !important;
  margin-bottom: 2.5rem !important;
}

/* Remove border from last article */
article:last-of-type {
  border-bottom: none !important;
}

/* Footer entry meta (categories at bottom) */
.entry-meta .cat-links {
  display: inline-flex !important;
  gap: 0.4rem !important;
  flex-wrap: wrap !important;
}

footer.entry-meta {
  margin-top: 1rem !important;
  padding-top: 1rem !important;
  border-top: none !important;
}

/* Headings */

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color) !important;
  letter-spacing: -0.02em;
}

.entry-title,
.entry-title a {
  color: var(--heading-color) !important;
  font-weight: 700 !important;
  font-size: 2rem !important;
  letter-spacing: -0.03em !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
}

.entry-title a:hover {
  color: var(--accent) !important;
}

/* Entry Meta */

.entry-meta {
  margin-top: 0.75rem !important;
  margin-bottom: 1.5rem !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

.entry-meta,
.entry-meta a,
.posted-on,
.posted-on a,
.byline,
.byline a {
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
  text-decoration: none !important;
}

.cat-links a,
.tags-links a {
  color: var(--accent) !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  background-color: var(--accent-dim) !important;
  padding: 0.2rem 0.6rem !important;
  border-radius: 9999px !important;
  text-decoration: none !important;
  transition: all var(--transition) !important;
}

.cat-links a:hover,
.tags-links a:hover {
  background-color: var(--accent-glow) !important;
  color: var(--accent-hover) !important;
}

/* Featured Image / Thumbnail */

.post-image {
  margin-bottom: 1.25rem !important;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.post-image img {
  width: 100% !important;
  height: auto !important;
  border-radius: var(--radius-lg) !important;
  transition: transform 0.3s ease !important;
}

.post-image a:hover img {
  transform: scale(1.02) !important;
}

/* ==========================================================================
   Tabelog-style Article Card (Archive/Index)
   ========================================================================== */

.tabelog-card {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.tabelog-card__thumb {
  flex-shrink: 0;
  width: 200px;
}

.tabelog-card__thumb img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: opacity 0.3s ease;
}

.tabelog-card__thumb a:hover img {
  opacity: 0.85;
}

.tabelog-card__body {
  flex: 1;
  min-width: 0;
}

.tabelog-card__excerpt {
  color: var(--text-secondary) !important;
  font-size: 0.875rem !important;
  line-height: 1.7 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tabelog-card__excerpt p {
  margin: 0 !important;
  color: var(--text-secondary) !important;
}

.tabelog-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tabelog-tag {
  display: inline-block;
  font-size: 0.75rem !important;
  font-weight: 500;
  color: var(--accent) !important;
  background: var(--accent-dim);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  text-decoration: none !important;
  transition: all var(--transition);
}

.tabelog-tag:hover {
  background: var(--accent-glow);
  color: var(--accent-hover) !important;
}

/* Hide default entry-summary/content on archive (replaced by tabelog-card) */
.blog .entry-summary,
.archive .entry-summary,
.search-results .entry-summary {
  display: none !important;
}

/* Hide "続きを読む" inside tabelog card excerpt */
.tabelog-card__excerpt .read-more,
.tabelog-card__excerpt a.read-more {
  display: none !important;
}

/* Hide byline (by admin) */
.byline,
.entry-meta .byline {
  display: none !important;
}

/* Archive: entry-title smaller */
.blog .entry-title,
.blog .entry-title a,
.archive .entry-title,
.archive .entry-title a {
  font-size: 1.35rem !important;
  line-height: 1.35 !important;
}

/* Archive: entry-meta (date) above title - reorder via flex */
.blog .entry-header,
.archive .entry-header {
  display: flex;
  flex-direction: column;
}

.blog .entry-meta,
.archive .entry-meta {
  order: -1;
  margin-top: 0 !important;
  margin-bottom: 0.25rem !important;
}

/* Hide footer meta on archive (we show tags in tabelog-card) */
.blog footer.entry-meta,
.archive footer.entry-meta {
  display: none !important;
}

/* Hide cat-links in header meta (shown in tabelog-card__tags) */
.blog .entry-meta .cat-links,
.archive .entry-meta .cat-links {
  display: none !important;
}

@media (max-width: 768px) {
  .tabelog-card {
    flex-direction: column;
    gap: 0.75rem;
  }

  .tabelog-card__thumb {
    width: 100%;
  }

  .tabelog-card__thumb img {
    height: 180px;
  }
}

/* Entry Content */

.entry-content,
.entry-summary {
  color: var(--text-primary) !important;
  font-size: 0.95rem !important;
  line-height: 1.9 !important;
}

.entry-content p,
.entry-summary p {
  color: var(--text-primary) !important;
  margin-bottom: 1.5rem !important;
}

.entry-content a {
  color: var(--accent) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-color: rgba(129, 140, 248, 0.3) !important;
}

.entry-content a:hover {
  color: var(--accent-hover) !important;
  text-decoration-color: var(--accent-hover) !important;
}

/* "続きを読む" リンク */
.read-more,
a.read-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: var(--accent) !important;
  text-decoration: none !important;
  padding: 0.5rem 0 !important;
  transition: all var(--transition) !important;
}

.read-more:hover,
a.read-more:hover {
  gap: 0.5rem !important;
}

/* Content Headings */

.entry-content h2 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-top: 3rem !important;
  margin-bottom: 1rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid var(--border) !important;
}

.entry-content h3 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin-top: 2rem !important;
}

.entry-content h4 {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  margin-top: 1.5rem !important;
}

/* Lists */

.entry-content ul,
.entry-content ol {
  color: var(--text-primary) !important;
  padding-left: 1.5rem !important;
}

.entry-content li {
  margin-bottom: 0.4rem !important;
}

/* Code Blocks (Catppuccin風) */

.entry-content pre,
.entry-content code {
  background-color: var(--code-bg) !important;
  color: var(--code-text) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.85rem !important;
}

.entry-content pre {
  padding: 1.25rem !important;
  overflow-x: auto !important;
  border: 1px solid var(--border-light) !important;
  margin: 1.5rem 0 !important;
}

.entry-content code {
  padding: 0.15rem 0.45rem !important;
  border-radius: var(--radius-sm) !important;
  font-size: 0.85em !important;
}

.entry-content pre code {
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 0.85rem !important;
}

/* Blockquote */

.entry-content blockquote {
  border-left: 3px solid var(--accent) !important;
  padding: 1rem 1.5rem !important;
  margin: 1.5rem 0 !important;
  color: var(--text-secondary) !important;
  background: var(--accent-dim) !important;
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

/* Tables */

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.entry-content th,
.entry-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.entry-content th {
  background-color: var(--bg-secondary);
  font-weight: 600;
  color: var(--heading-color);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.entry-content tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Images */

.entry-content img {
  border-radius: var(--radius-md);
}

.wp-caption-text {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  background-color: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 0.65rem 1.5rem !important;
  cursor: pointer !important;
  transition: all var(--transition) !important;
}

.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background-color: var(--accent-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25) !important;
}

/* ==========================================================================
   Comments (hidden by default)
   ========================================================================== */

.comments-area,
.comment-respond,
#comments {
  display: none !important;
}

/* ==========================================================================
   Navigation Links & Pagination
   ========================================================================== */

.navigation,
.paging-navigation,
.post-navigation,
.posts-navigation {
  background-color: transparent !important;
}

.navigation .nav-links a {
  color: var(--accent) !important;
  font-size: 0.9rem !important;
}

/* Pagination */

.paging-navigation .nav-links {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.paging-navigation .nav-links a,
.paging-navigation .nav-links span,
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.6rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
  font-size: 0.85rem;
  transition: all var(--transition);
  text-decoration: none !important;
}

.paging-navigation .nav-links a:hover,
.paging-navigation .nav-links span.current,
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer,
.site-info {
  background-color: var(--bg-primary) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  padding: 2rem 0 !important;
}

.inside-site-info {
  max-width: var(--site-width) !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.copyright-bar {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  letter-spacing: 0.02em;
}

.site-footer a {
  color: var(--text-muted) !important;
}

.site-footer a:hover {
  color: var(--accent) !important;
}

/* ==========================================================================
   WordPress Admin Bar override
   ========================================================================== */

.admin-bar .header-hero {
  margin-top: 0;
}

.admin-bar .theme-toggle {
  top: calc(32px + 0.75rem);
}

@media (max-width: 782px) {
  .admin-bar .theme-toggle {
    top: calc(46px + 0.75rem);
  }
}

/* ==========================================================================
   Search Widget & Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.6rem 0.9rem !important;
  font-family: var(--font-sans) !important;
  transition: border-color var(--transition) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-dim) !important;
}

/* ==========================================================================
   Widgets
   ========================================================================== */

.widget-title {
  color: var(--text-secondary) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  margin-bottom: 1rem !important;
}

.widget ul li {
  border-bottom: 1px solid var(--border) !important;
  padding: 0.5rem 0 !important;
}

.widget ul li a {
  color: var(--text-secondary) !important;
  font-size: 0.875rem !important;
}

.widget ul li a:hover {
  color: var(--accent) !important;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
  text-align: center;
  padding: 4rem 1rem;
}

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

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   Selection
   ========================================================================== */

::selection {
  background-color: var(--accent-dim);
  color: var(--text-primary);
}

/* ==========================================================================
   Smooth Transitions
   ========================================================================== */

img {
  transition: opacity var(--transition);
}

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

@media (max-width: 768px) {
  .inside-header {
    padding: 0.5rem 1rem !important;
    flex-wrap: wrap !important;
  }

  .header-branding {
    flex: 1;
  }

  .header-logo {
    height: 22px;
  }

  .header-site-title {
    font-size: 0.85rem !important;
  }

  .header-subtitle {
    font-size: 0.6rem !important;
  }

  .header-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .site-content {
    padding: 1.5rem 1rem !important;
  }

  .entry-title,
  .entry-title a {
    font-size: 1.5rem !important;
  }

  .post,
  article {
    padding-bottom: 2rem !important;
    margin-bottom: 2rem !important;
  }

}

/* ==========================================================================
   Theme Toggle Button (in header)
   ========================================================================== */

.theme-toggle {
  position: fixed;
  top: 0.75rem;
  right: 1rem;
  z-index: 200;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  padding: 0;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

[data-theme="light"] .post-image img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Smooth transition for theme switching */
body,
.site-header,
.site-footer,
.site-info,
#right-sidebar .wp-block-group,
#right-sidebar .wp-block-search,
input,
textarea {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
