/* ==================================================================
   Mindami Theme - Steampunk x Cyberpunk
   ================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Audiowide&family=Chakra+Petch:wght@300;400;500;600;700&family=Uncial+Antiqua&display=swap');

:root {
  --ink-950: #07080b;
  --ink-900: #0d1016;
  --ink-850: #121722;
  --panel-800: #161d2a;
  --panel-780: #1a2231;
  --line-700: #2a3144;
  --text-100: #f8f3e7;
  --text-300: #d0c7b5;
  --text-500: #948a7b;
  --copper-500: #d98b3c;
  --copper-400: #f3b371;
  --rust-500: #b44d25;
  --teal-500: #00e8cf;
  --teal-400: #7afbe9;
  --violet-500: #7f55ff;

  --radius: 1rem;
  --radius-sm: 0.6rem;
  --max-w: 1180px;
  --section-pad: clamp(3.75rem, 7vw, 7.5rem);
  --transition-fast: 180ms ease;
  --transition-med: 280ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-100);
  background-color: var(--ink-950);
  background-image:
    radial-gradient(circle at 15% -10%, rgba(217, 139, 60, 0.24), transparent 44%),
    radial-gradient(circle at 85% 14%, rgba(0, 232, 207, 0.2), transparent 37%),
    linear-gradient(180deg, rgba(127, 85, 255, 0.05), transparent 24%),
    repeating-linear-gradient(125deg, rgba(248, 243, 231, 0.02) 0 2px, transparent 2px 10px),
    linear-gradient(180deg, var(--ink-850), var(--ink-950));
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0 32%, rgba(0, 0, 0, 0.45) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cpath d='M0 90h180M90 0v180' stroke='rgba(244,196,137,0.06)' stroke-width='1'/%3E%3C/svg%3E");
}

main {
  position: relative;
  z-index: 1;
}

a {
  color: var(--teal-500);
  text-decoration: none;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

a:hover {
  color: var(--teal-400);
  text-shadow: 0 0 16px rgba(0, 232, 207, 0.35);
}

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

.container {
  width: min(100%, var(--max-w));
  margin-inline: auto;
  padding-inline: clamp(1rem, 3.5vw, 2rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(243, 179, 113, 0.18);
  background:
    linear-gradient(90deg, rgba(10, 12, 18, 0.9), rgba(14, 20, 30, 0.83), rgba(10, 12, 18, 0.9));
  backdrop-filter: blur(14px);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 232, 207, 0.65), transparent);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.05rem;
}

.site-logo {
  font-family: 'Uncial Antiqua', serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(1.02rem, 1.6vw, 1.35rem);
  color: var(--copper-400);
  text-shadow: 0 0 16px rgba(217, 139, 60, 0.45);
}

.site-logo span {
  color: var(--teal-500);
}

.site-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.7rem, 2vw, 1.8rem);
}

.site-nav a {
  position: relative;
  display: inline-block;
  font-family: 'Audiowide', cursive;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-300);
  padding: 0.25rem 0.1rem;
}

.site-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 1px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, transparent, var(--teal-500), transparent);
  transition: transform var(--transition-med);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--teal-400);
}

.site-nav a:hover::before,
.site-nav a.active::before {
  transform: scaleX(1);
}

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 10vw, 9rem);
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 15% auto auto -14%;
  width: clamp(16rem, 30vw, 24rem);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(243, 179, 113, 0.35);
  box-shadow:
    inset 0 0 0 1.2rem rgba(243, 179, 113, 0.06),
    inset 0 0 0 2.5rem rgba(0, 232, 207, 0.05),
    0 0 42px rgba(243, 179, 113, 0.18);
  animation: gearSpin 34s linear infinite;
}

.hero::after {
  inset: auto -10% 9% auto;
  width: clamp(15rem, 31vw, 27rem);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed rgba(0, 232, 207, 0.33);
  box-shadow: inset 0 0 0 2rem rgba(127, 85, 255, 0.06);
  animation: gearSpinReverse 42s linear infinite;
}

.hero .container {
  position: relative;
  text-align: center;
  animation: riseIn 850ms ease both;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 1.35rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(243, 179, 113, 0.35);
  border-radius: 999px;
  color: var(--copper-400);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(17, 23, 35, 0.72);
}

.hero h1 {
  margin-inline: auto;
  margin-bottom: 1.25rem;
  max-width: 14ch;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  font-size: clamp(2.35rem, 6.8vw, 5rem);
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--text-100);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.3),
    0 0 22px rgba(217, 139, 60, 0.16);
}

.hero h1 em {
  font-style: normal;
  color: var(--teal-500);
  text-shadow: 0 0 20px rgba(0, 232, 207, 0.42);
}

.hero-desc {
  max-width: 58ch;
  margin-inline: auto;
  margin-bottom: 2.4rem;
  color: var(--text-300);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Audiowide', cursive;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #0a1118;
  background: linear-gradient(135deg, var(--teal-500), #31f0d9);
  box-shadow:
    0 0 0 1px rgba(0, 232, 207, 0.35),
    0 12px 26px rgba(0, 232, 207, 0.22);
}

.btn-primary:hover {
  color: #05080d;
  box-shadow:
    0 0 0 1px rgba(0, 232, 207, 0.6),
    0 16px 32px rgba(0, 232, 207, 0.3);
}

.btn-ghost {
  color: var(--copper-400);
  background: rgba(19, 26, 39, 0.6);
  border-color: rgba(243, 179, 113, 0.34);
}

.btn-ghost:hover {
  color: var(--text-100);
  border-color: rgba(243, 179, 113, 0.6);
  box-shadow: 0 0 18px rgba(243, 179, 113, 0.22);
}

.section {
  padding-block: var(--section-pad);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}

.section-title {
  font-family: 'Audiowide', cursive;
  font-size: clamp(1.45rem, 3.5vw, 2.6rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-100);
}

.section-link {
  font-family: 'Audiowide', cursive;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal-500);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.05rem, 2.3vw, 1.85rem);
}

.card,
.news-card,
.video-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(217, 139, 60, 0.06), transparent 26%),
    linear-gradient(0deg, rgba(10, 14, 21, 0.9), rgba(19, 25, 37, 0.95));
  border: 1px solid rgba(243, 179, 113, 0.18);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.34);
  transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med);
}

.card::before,
.news-card::before,
.video-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(130deg, rgba(0, 232, 207, 0.06), transparent 26%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 8px);
  opacity: 0.8;
}

.card:hover,
.news-card:hover,
.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 232, 207, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 36px rgba(0, 0, 0, 0.42),
    0 0 26px rgba(0, 232, 207, 0.16);
}

.card-body,
.video-body {
  position: relative;
  z-index: 1;
  padding: 1.45rem;
}

.card-meta,
.news-card-meta,
.post-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.card-meta {
  margin-bottom: 0.8rem;
}

.tag {
  padding: 0.23rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 179, 113, 0.33);
  background: rgba(120, 51, 23, 0.26);
  color: var(--copper-400);
  font-family: 'Audiowide', cursive;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-date {
  color: var(--text-500);
  font-size: 0.73rem;
  letter-spacing: 0.04em;
}

.card-title,
.news-card-title,
.video-title {
  color: var(--text-100);
  font-family: 'Audiowide', cursive;
  font-size: clamp(1rem, 1.9vw, 1.26rem);
  line-height: 1.34;
  margin-bottom: 0.6rem;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.card:hover .card-title,
.news-card:hover .news-card-title,
.video-card:hover .video-title {
  color: var(--teal-400);
  text-shadow: 0 0 16px rgba(0, 232, 207, 0.32);
}

.card-desc,
.news-card-desc,
.video-desc {
  color: var(--text-300);
  font-size: 0.95rem;
  line-height: 1.66;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.35rem;
}

.news-source {
  color: var(--teal-500);
  font-family: 'Audiowide', cursive;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.45rem 1.15rem;
  border-top: 1px solid rgba(243, 179, 113, 0.2);
}

.card-author {
  color: var(--text-500);
  font-size: 0.78rem;
}

.read-more {
  color: var(--teal-500);
  font-family: 'Audiowide', cursive;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-card a {
  color: inherit;
}

.video-thumb {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid rgba(243, 179, 113, 0.16);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  filter: saturate(1.1) contrast(1.02);
  transition: transform 420ms ease, opacity 250ms ease, filter 300ms ease;
}

.video-card:hover .video-thumb img {
  opacity: 1;
  transform: scale(1.04);
  filter: saturate(1.22) contrast(1.08);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.play-btn {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(0, 232, 207, 0.7);
  background: radial-gradient(circle at 40% 30%, rgba(122, 251, 233, 0.96), rgba(0, 232, 207, 0.8));
  box-shadow: 0 0 28px rgba(0, 232, 207, 0.34);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.video-card:hover .play-btn {
  transform: scale(1.08);
  box-shadow: 0 0 34px rgba(0, 232, 207, 0.45);
}

.play-btn svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: #041218;
  margin-left: 0.16rem;
}

.video-duration {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  border: 1px solid rgba(243, 179, 113, 0.38);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  background: rgba(8, 11, 16, 0.84);
  font-family: 'Audiowide', cursive;
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  color: var(--copper-400);
}

.post-hero,
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.9rem, 6vw, 5.2rem);
  border-bottom: 1px solid rgba(243, 179, 113, 0.22);
}

.post-hero::before,
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(217, 139, 60, 0.08), transparent 28%, rgba(0, 232, 207, 0.1) 68%, transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 12px);
}

.post-title,
.page-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: clamp(2rem, 5.5vw, 4rem);
  letter-spacing: 0.01em;
  line-height: 1.14;
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.post-desc,
.page-desc {
  max-width: 62ch;
  color: var(--text-300);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
}

.post-content {
  max-width: 74ch;
  margin-inline: auto;
  padding-block: clamp(2.2rem, 5vw, 4rem);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.06rem;
  line-height: 1.78;
}

.post-content > * + * {
  margin-top: 1.25rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2.3rem;
  margin-bottom: 0.7rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-100);
  text-wrap: balance;
}

.post-content h2 {
  font-size: clamp(1.42rem, 3vw, 2rem);
}

.post-content h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
}

.post-content p,
.post-content li {
  color: var(--text-300);
}

.blog-list .card-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.02rem, 2vw, 1.3rem);
  line-height: 1.42;
}

.blog-list .card-desc {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.98rem;
  line-height: 1.72;
}

.post-content ul,
.post-content ol {
  padding-left: 1.35rem;
}

.post-content blockquote {
  margin-block: 1.8rem;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--teal-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(17, 24, 36, 0.8);
  color: var(--text-100);
}

.post-content code {
  font-family: 'Courier New', monospace;
  background: rgba(15, 21, 31, 0.86);
  border: 1px solid rgba(127, 85, 255, 0.28);
  color: var(--teal-400);
  border-radius: 0.35rem;
  padding: 0.14em 0.4em;
}

.post-content pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(127, 85, 255, 0.28);
  background: linear-gradient(180deg, rgba(14, 19, 29, 0.96), rgba(10, 14, 21, 0.92));
}

.post-content pre code {
  border: none;
  background: transparent;
  padding: 0;
}

.video-embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(243, 179, 113, 0.28);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.36);
  margin-top: 2rem;
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(243, 179, 113, 0.2);
  background: linear-gradient(180deg, rgba(13, 18, 27, 0.48), rgba(8, 11, 16, 0.78));
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem 2rem;
}

.footer-brand {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--copper-400);
}

.footer-brand span {
  color: var(--teal-500);
}

.footer-copy {
  margin-top: 0.25rem;
  color: var(--text-500);
  font-size: 0.8rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
}

.footer-links a {
  color: var(--text-300);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes gearSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes gearSpinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes riseIn {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .site-nav {
    gap: 0.75rem;
  }
}

@media (max-width: 760px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-block: clamp(3.25rem, 12vw, 5rem);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-footer,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-content {
    font-size: 0.98rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
