/* ---- Preloader ---- */
.t3a-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000d24;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.t3a-preloader.hide {
  opacity: 0;
  visibility: hidden;
}
.t3a-preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.t3a-preloader__logo {
  width: 64px;
  height: auto;
  opacity: 0.9;
}
.t3a-preloader__bar {
  width: 120px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.t3a-preloader__bar-fill {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, #4bc4f2, #1e4b8f);
  border-radius: 3px;
  animation: t3a-preloader-slide 1.2s ease-in-out infinite;
}
@keyframes t3a-preloader-slide {
  0% { transform: translateX(-100%); width: 40%; }
  50% { transform: translateX(100%); width: 60%; }
  100% { transform: translateX(300%); width: 40%; }
}

@font-face {
  font-family: 'Garet';
  src: url('public/fonts/Garet-Book.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Garet';
  src: url('public/fonts/Garet-Heavy.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --cyan: #29c5e8;
  --cyan-light: rgba(41, 197, 232, 0.08);
  --black: #0a0a0a;
  --gray-900: #1a1a1a;
  --gray-700: #3a3a3a;
  --gray-600: #555;
  --gray-500: #777;
  --gray-400: #a0a0a0;
  --gray-200: #e8e8e8;
  --gray-100: #f5f5f5;
  --white: #ffffff;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: 'Garet', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ---- Mobile hamburger menu ---- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 10;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

::selection {
  background: var(--cyan);
  color: var(--white);
}

/* ---- Nav ---- */
.nav {
  padding: 0 24px;
  background: #000d24;
  border-bottom: 1px solid rgba(75, 196, 242, 0.1);
}

.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  display: block;
  border-radius: 5px;
}

.nav-logo span {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--cyan);
}
.nav-links .t3a-nav-cta {
  color: #4bc4f2 !important;
  font-weight: 600;
}

/* ---- Author byline ---- */
.blog-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.blog-author__photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(41, 197, 232, 0.2);
}
.blog-author__info {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.4;
}
.blog-author__name {
  font-weight: 600;
  color: var(--gray-700);
}

/* ---- Article CTA footer ---- */
.article-cta {
  margin-top: 48px;
  padding: 40px 32px;
  background: #000d24;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(75, 196, 242, 0.1);
}
.article-cta h3 {
  font-family: 'Garet', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.article-cta p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}
.article-cta__btn {
  display: inline-block;
  padding: 14px 32px;
  background: #4bc4f2;
  color: #000d24;
  font-family: 'Garet', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.article-cta__btn:hover {
  background: #7dd3f5;
  transform: translateY(-2px);
}

/* ---- Article meta top ---- */
.article-meta-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px;
  color: var(--gray-500);
}
.article-meta-top svg {
  vertical-align: -2px;
  margin-right: 4px;
}

/* ---- Main ---- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Blog header ---- */
.blog-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--gray-200);
}

.blog-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 8px;
}

.blog-header p {
  font-size: 16px;
  color: var(--gray-500);
}

/* ---- Category filters ---- */
.filters {
  display: flex;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
}

.filter {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  padding: 6px 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter:hover {
  color: var(--gray-900);
  border-color: var(--gray-400);
}

.filter.active {
  color: var(--white);
  background: var(--cyan);
  border-color: var(--cyan);
}

/* ---- Featured card ---- */
.featured {
  border-bottom: 1px solid var(--gray-200);
}

.featured-card {
  display: block;
  padding: 40px 20px;
  margin: 0 -20px;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s;
}

.featured-card:hover {
  background: var(--gray-100);
}

.featured-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.featured-card h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--black);
  margin-bottom: 12px;
  transition: color 0.15s;
}

.featured-card:hover h2 {
  color: var(--cyan);
}

.featured-card p {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ---- Article cards ---- */
.articles {
  display: flex;
  flex-direction: column;
}

.article-card {
  display: block;
  padding: 32px 20px;
  border-bottom: 1px solid var(--gray-200);
  text-decoration: none;
  transition: background 0.15s;
  margin: 0 -20px;
  border-radius: 10px;
}

.article-card:hover {
  background: var(--gray-100);
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.article-card-meta time {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
}

.meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gray-400);
  flex-shrink: 0;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.article-card h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--black);
  margin-bottom: 8px;
  transition: color 0.15s;
}

.article-card:hover h2 {
  color: var(--cyan);
}

.article-card p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: 14px;
}

.article-card-footer {
  display: flex;
  align-items: center;
}

.read-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
}

.read-time svg {
  opacity: 0.6;
}

/* ---- Article page ---- */
.article-nav {
  padding-top: 24px;
}

.article-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.15s;
}

.article-nav a:hover {
  color: var(--cyan);
}

.article-header {
  padding: 56px 0 40px;
}

.article-header time {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: clamp(26px, 4.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 16px;
}

.article-header .subtitle {
  font-size: 18px;
  color: var(--gray-600);
  line-height: 1.65;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 40px;
}

.article-meta span {
  font-size: 13px;
  color: var(--gray-500);
}

.article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gray-400);
}

/* ---- Article body ---- */
.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  margin: 48px 0 16px;
  line-height: 1.3;
}

.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 36px 0 12px;
  line-height: 1.4;
}

.article-body p {
  color: var(--gray-700);
  line-height: 1.85;
  margin-bottom: 24px;
}

.article-body strong {
  font-weight: 600;
  color: var(--gray-900);
}

.article-body em {
  font-style: italic;
}

.article-body blockquote {
  margin: 32px 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--cyan);
}

.article-body blockquote p {
  font-size: 18px;
  font-weight: 500;
  color: var(--gray-900);
  line-height: 1.7;
}

.article-body ul,
.article-body ol {
  margin: 0 0 24px 20px;
  color: var(--gray-700);
}

.article-body li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.article-body a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.article-body a:hover {
  border-bottom-color: var(--cyan);
}

.article-body hr {
  border: none;
  height: 1px;
  background: var(--gray-200);
  margin: 48px 0;
}

/* Highlight box */
.highlight {
  background: var(--cyan-light);
  border-radius: 6px;
  padding: 20px 24px;
  margin: 32px 0;
}

.highlight p {
  color: var(--gray-900);
  margin-bottom: 0;
}

/* ---- Related articles ---- */
.related {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--gray-200);
}

.related h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.related-link {
  display: block;
  padding: 14px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--gray-200);
  transition: padding-left 0.15s;
}

.related-link:first-of-type {
  border-top: 1px solid var(--gray-200);
}

.related-link:hover {
  padding-left: 8px;
}

.related-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.15s;
}

.related-link:hover .related-title {
  color: var(--cyan);
}

.related-meta {
  font-size: 12px;
  color: var(--gray-400);
}

/* ---- Blog CTA (homepage) ---- */
.blog-cta {
  padding: 56px 0;
  text-align: center;
  border-top: 1px solid var(--gray-200);
}

.blog-cta .cta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.blog-cta h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 8px;
  line-height: 1.3;
}

.blog-cta p {
  font-size: 15px;
  color: var(--gray-600);
  margin-bottom: 20px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ---- Author section ---- */
.author-section {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-200);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}

.author-role {
  font-size: 13px;
  color: var(--gray-400);
}

.author-name a {
  color: var(--gray-900);
  text-decoration: none;
  transition: color 0.15s;
}

.author-name a:hover {
  color: var(--cyan);
}

/* ---- CTA block (article) ---- */
.cta-block {
  background: var(--gray-100);
  border-radius: 10px;
  padding: 32px;
  margin-top: 48px;
  text-align: center;
}

.cta-block .cta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.cta-block .cta-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.3;
}

.cta-block .cta-desc {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--cyan);
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  text-decoration: none;
  transition: opacity 0.15s;
  cursor: pointer;
}

.cta-button:hover {
  opacity: 0.85;
}
.cta-button--secondary {
  background: transparent !important;
  border: 1.5px solid var(--cyan) !important;
  color: var(--cyan) !important;
}
.cta-button--secondary:hover {
  background: rgba(41, 197, 232, 0.1) !important;
  opacity: 1 !important;
}

/* ---- Article footer ---- */
.article-footer {
  padding: 40px 0;
  border-top: 1px solid var(--gray-200);
  margin-top: 0;
}

.article-footer-cta {
  font-size: 15px;
  color: var(--gray-600);
  margin-bottom: 12px;
}

.article-footer a {
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.article-footer a:hover {
  border-bottom-color: var(--cyan);
}

/* ---- Footer ---- */
footer {
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid var(--gray-200);
}

footer p {
  font-size: 12px;
  color: var(--gray-400);
  letter-spacing: 0.02em;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #000d24;
    flex-direction: column;
    padding: 20px 24px;
    gap: 0;
    border-bottom: 1px solid rgba(75,196,242,0.1);
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 0;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: center;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-inner { position: relative; }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  main {
    padding: 0 12px;
  }

  .nav {
    padding: 0 12px;
  }

  .nav-toggle {
    margin-right: -4px;
  }

  .blog-header {
    padding: 32px 0 24px;
  }

  .blog-header h1 {
    font-size: 22px;
    line-height: 1.2;
  }

  .blog-header p {
    font-size: 14px;
    line-height: 1.6;
  }

  .article-card,
  .featured-card {
    padding: 24px 8px;
    margin: 0 -8px;
  }

  .featured-card h2 {
    font-size: 20px;
  }

  .featured-card p {
    font-size: 14px;
    line-height: 1.6;
  }

  .article-card h3 {
    font-size: 18px;
  }

  .article-card-meta {
    font-size: 12px;
  }

  .filters {
    gap: 6px;
    padding: 12px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .filters::-webkit-scrollbar { display: none; }

  .filter {
    font-size: 11px;
    padding: 5px 10px;
    white-space: nowrap;
  }

  .article-header {
    padding: 32px 0 24px;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .article-meta .dot {
    display: none;
  }
}
