/*
Theme Name: Cointobit Blog
Theme URI: https://cointobit.com/blog/
Author: Cointobit
Description: Cointobit styled WordPress blog theme.
Version: 1.0.0
Text Domain: cointobit-blog
*/

:root {
  color-scheme: dark;
  --ctb-bg: #101119;
  --ctb-bg-soft: #151827;
  --ctb-panel: #191c2b;
  --ctb-panel-soft: #202538;
  --ctb-border: #30364a;
  --ctb-border-soft: rgba(255, 255, 255, 0.08);
  --ctb-text: #f3f5f8;
  --ctb-muted: #9aa4b7;
  --ctb-soft: #c4cad6;
  --ctb-accent: #00bcd4;
  --ctb-accent-strong: #15d3e8;
  --ctb-positive: #37d68a;
  --ctb-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --ctb-header: rgba(22, 24, 43, 0.96);
  --ctb-header-border: rgba(255, 255, 255, 0.09);
}

:root.theme-light {
  color-scheme: light;
  --ctb-bg: #f4f6fa;
  --ctb-bg-soft: #eef2f8;
  --ctb-panel: #ffffff;
  --ctb-panel-soft: #f7f9fc;
  --ctb-border: #dce3ee;
  --ctb-border-soft: rgba(15, 23, 42, 0.08);
  --ctb-text: #171b26;
  --ctb-muted: #657287;
  --ctb-soft: #38445a;
  --ctb-header: rgba(255, 255, 255, 0.96);
  --ctb-header-border: rgba(15, 23, 42, 0.1);
  --ctb-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% -8%, rgba(0, 188, 212, 0.12), transparent 32%),
    linear-gradient(180deg, var(--ctb-bg-soft), var(--ctb-bg) 280px);
  color: var(--ctb-text);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0;
}

body.admin-bar .ctb-header {
  top: 32px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.ctb-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--ctb-header-border);
  background: var(--ctb-header);
  backdrop-filter: blur(14px);
}

.ctb-header-inner {
  display: flex;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  height: 56px;
  margin: 0 auto;
  gap: 18px;
}

.ctb-logo {
  display: inline-flex;
  align-items: baseline;
  flex: 0 0 auto;
  color: var(--ctb-text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.ctb-logo-accent {
  color: var(--ctb-accent);
}

.ctb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
}

.ctb-nav a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--ctb-muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ctb-nav a:hover,
.ctb-nav a.is-active {
  color: var(--ctb-accent);
  background: rgba(0, 188, 212, 0.1);
}

.ctb-header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.ctb-theme-toggle,
.ctb-mobile-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 34px;
  border: 1px solid var(--ctb-border);
  border-radius: 999px;
  background: var(--ctb-panel-soft);
  color: var(--ctb-text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.ctb-theme-toggle:hover,
.ctb-mobile-menu:hover {
  border-color: rgba(0, 188, 212, 0.42);
}

.ctb-mobile-menu {
  display: none;
  font-size: 19px;
}

.ctb-mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 8px 0 14px;
  border-top: 1px solid var(--ctb-header-border);
}

.ctb-mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ctb-text);
  font-size: 14px;
  font-weight: 700;
}

.ctb-mobile-nav a:hover,
.ctb-mobile-nav a.is-active {
  color: var(--ctb-accent);
  background: rgba(0, 188, 212, 0.1);
}

.ctb-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.ctb-blog-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 28px;
}

.ctb-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid rgba(0, 188, 212, 0.4);
  border-radius: 999px;
  color: var(--ctb-accent);
  background: rgba(0, 188, 212, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.ctb-blog-hero h1,
.ctb-page-title {
  margin: 0;
  color: var(--ctb-text);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
  line-height: 1.14;
}

.ctb-blog-hero p,
.ctb-page-desc {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--ctb-muted);
  font-size: 15px;
  line-height: 1.75;
}

.ctb-hero-stat {
  min-width: 190px;
  padding: 16px;
  border: 1px solid var(--ctb-border);
  border-radius: 8px;
  background: var(--ctb-panel);
  box-shadow: var(--ctb-shadow);
}

.ctb-hero-stat span {
  display: block;
  color: var(--ctb-muted);
  font-size: 12px;
  font-weight: 800;
}

.ctb-hero-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--ctb-text);
  font-size: 22px;
  line-height: 1;
}

.ctb-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.ctb-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.ctb-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ctb-border);
  border-radius: 8px;
  background: var(--ctb-panel);
  color: var(--ctb-text);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.ctb-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 188, 212, 0.42);
  background: var(--ctb-panel-soft);
}

.ctb-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 78% 24%, rgba(0, 188, 212, 0.26), transparent 30%),
    linear-gradient(135deg, #07080b, #171d2d);
}

.theme-light .ctb-card-media {
  background:
    radial-gradient(circle at 78% 24%, rgba(0, 188, 212, 0.22), transparent 30%),
    linear-gradient(135deg, #f8fbff, #e8eef8);
}

.ctb-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ctb-card-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 18px;
  color: var(--ctb-accent);
  font-size: 17px;
  font-weight: 900;
  text-align: center;
}

.ctb-card-body {
  padding: 15px 16px 16px;
}

.ctb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--ctb-muted);
  font-size: 12px;
  font-weight: 700;
}

.ctb-meta a {
  color: var(--ctb-accent);
}

.ctb-card h2 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin: 10px 0 9px;
  color: var(--ctb-text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ctb-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ctb-muted);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ctb-sidebar {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.ctb-side-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--ctb-border);
  border-radius: 8px;
  background: var(--ctb-panel);
}

.ctb-side-panel h2,
.ctb-side-panel h3 {
  margin: 0 0 12px;
  color: var(--ctb-text);
  font-size: 15px;
  font-weight: 900;
}

.ctb-side-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 10px;
}

.ctb-side-list a {
  display: block;
  color: var(--ctb-soft);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.ctb-side-list a:hover {
  color: var(--ctb-accent);
}

.ctb-search-form {
  display: flex;
  min-width: 0;
  gap: 8px;
}

.ctb-search-form input[type="search"] {
  min-width: 0;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ctb-border);
  border-radius: 8px;
  background: var(--ctb-bg);
  color: var(--ctb-text);
  outline: none;
}

.ctb-search-form button,
.ctb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(0, 188, 212, 0.45);
  border-radius: 8px;
  background: rgba(0, 188, 212, 0.12);
  color: var(--ctb-accent);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.ctb-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.ctb-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--ctb-border);
  border-radius: 8px;
  background: var(--ctb-panel);
  color: var(--ctb-muted);
  font-weight: 800;
}

.ctb-pagination .page-numbers.current,
.ctb-pagination .page-numbers:hover {
  color: var(--ctb-accent);
  border-color: rgba(0, 188, 212, 0.45);
}

.ctb-article-shell {
  display: grid;
  grid-template-columns: minmax(0, 820px) 280px;
  gap: 28px;
  align-items: start;
}

.ctb-article {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--ctb-border);
  border-radius: 8px;
  background: var(--ctb-panel);
}

.ctb-article-header {
  margin-bottom: 22px;
}

.ctb-article-title {
  margin: 10px 0 12px;
  color: var(--ctb-text);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.22;
}

.ctb-featured-image {
  overflow: hidden;
  margin: 20px 0 26px;
  border-radius: 8px;
}

.ctb-featured-image img {
  width: 100%;
}

.ctb-entry {
  color: var(--ctb-text);
  font-size: 16px;
  line-height: 1.9;
}

.ctb-entry > *:first-child {
  margin-top: 0;
}

.ctb-entry h2,
.ctb-entry h3,
.ctb-entry h4 {
  margin: 32px 0 12px;
  color: var(--ctb-text);
  font-weight: 900;
  line-height: 1.35;
}

.ctb-entry h2 {
  font-size: 25px;
}

.ctb-entry h3 {
  font-size: 21px;
}

.ctb-entry p,
.ctb-entry ul,
.ctb-entry ol {
  margin: 0 0 18px;
}

.ctb-entry ul,
.ctb-entry ol {
  padding-left: 22px;
}

.ctb-entry a {
  color: var(--ctb-accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ctb-entry blockquote {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 3px solid var(--ctb-accent);
  border-radius: 0 8px 8px 0;
  background: rgba(0, 188, 212, 0.08);
  color: var(--ctb-soft);
}

.ctb-entry table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.ctb-entry th,
.ctb-entry td {
  padding: 10px 12px;
  border: 1px solid var(--ctb-border);
}

.ctb-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.ctb-post-nav a {
  padding: 14px;
  border: 1px solid var(--ctb-border);
  border-radius: 8px;
  background: var(--ctb-panel-soft);
  color: var(--ctb-text);
  font-size: 13px;
  font-weight: 800;
}

.ctb-post-nav a:hover {
  border-color: rgba(0, 188, 212, 0.42);
  color: var(--ctb-accent);
}

.ctb-empty {
  padding: 56px 22px;
  border: 1px dashed var(--ctb-border);
  border-radius: 8px;
  background: var(--ctb-panel);
  color: var(--ctb-muted);
  text-align: center;
}

.ctb-footer {
  border-top: 1px solid var(--ctb-border-soft);
  color: var(--ctb-muted);
  background: rgba(0, 0, 0, 0.08);
}

.ctb-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  gap: 18px;
  font-size: 13px;
}

.ctb-footer-links {
  display: flex;
  gap: 14px;
}

.ctb-footer a:hover {
  color: var(--ctb-accent);
}

.ctb-comments {
  margin-top: 24px;
}

.ctb-comments-panel {
  margin-top: 24px;
}

.ctb-comment-list {
  margin: 0 0 22px;
  padding-left: 20px;
}

.ctb-comment-list li {
  margin-bottom: 14px;
  color: var(--ctb-soft);
}

.ctb-comments-panel input,
.ctb-comments-panel textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ctb-border);
  border-radius: 8px;
  background: var(--ctb-bg);
  color: var(--ctb-text);
}

.ctb-comments-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--ctb-muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1060px) {
  .ctb-nav a {
    padding: 0 7px;
    font-size: 12px;
  }

  .ctb-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.admin-bar .ctb-header {
    top: 46px;
  }

  .ctb-nav {
    display: none;
  }

  .ctb-mobile-menu {
    display: inline-flex;
  }

  .ctb-mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .ctb-content-layout,
  .ctb-article-shell {
    grid-template-columns: 1fr;
  }

  .ctb-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .ctb-header-inner {
    width: min(100% - 24px, 1180px);
    height: 50px;
    gap: 10px;
  }

  .ctb-logo {
    font-size: 18px;
  }

  .ctb-theme-toggle,
  .ctb-mobile-menu {
    width: 38px;
    height: 32px;
  }

  .ctb-main {
    width: min(100% - 24px, 1180px);
    padding: 18px 0 44px;
  }

  .ctb-blog-hero {
    display: block;
    padding: 12px 0 20px;
  }

  .ctb-blog-hero h1,
  .ctb-page-title {
    font-size: 30px;
  }

  .ctb-hero-stat {
    margin-top: 16px;
    box-shadow: none;
  }

  .ctb-post-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ctb-card {
    display: grid;
    width: 100%;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .ctb-card-media {
    aspect-ratio: auto;
    min-height: 126px;
  }

  .ctb-card-body {
    min-width: 0;
    padding: 12px;
  }

  .ctb-card h2 {
    min-height: 0;
    margin: 7px 0 7px;
    font-size: 15px;
  }

  .ctb-card p {
    -webkit-line-clamp: 1;
  }

  .ctb-sidebar {
    grid-template-columns: 1fr;
  }

  .ctb-article {
    padding: 18px 16px;
  }

  .ctb-article-title {
    font-size: 28px;
  }

  .ctb-entry {
    font-size: 15px;
  }

  .ctb-post-nav {
    grid-template-columns: 1fr;
  }

  .ctb-footer-inner {
    display: block;
    padding: 18px 0;
  }

  .ctb-footer-links {
    margin-top: 10px;
  }

  .ctb-blog-hero p,
  .ctb-page-desc,
  .ctb-card h2,
  .ctb-card p {
    overflow-wrap: anywhere;
  }
}
