/* AiTeemo — darkroom editorial */
:root {
  --bg: #0b0c0e;
  --bg-elev: #12141a;
  --bg-card: #161820;
  --ink: #e8e2d6;
  --ink-muted: #9a9488;
  --ink-faint: #5c574f;
  --accent: #c4a574;
  --accent-soft: rgba(196, 165, 116, 0.14);
  --line: rgba(232, 226, 214, 0.1);
  --line-strong: rgba(232, 226, 214, 0.18);
  --glow: rgba(196, 165, 116, 0.35);
  --font-display: "Instrument Serif", "Noto Serif SC", "Songti SC", serif;
  --font-body: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  --max: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
}

body.has-pointer #cursor-glow { opacity: 0.22; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

/* —— Nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(11, 12, 14, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease), background 0.35s;
}
.site-nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(11, 12, 14, 0.92);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.logo {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.logo .ai { font-weight: 400; color: var(--ink-muted); }
.logo .teemo { font-weight: 600; color: var(--ink); }
.logo:hover .teemo { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0; width: 18px; height: 1px;
  background: currentColor;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* —— Hero —— */
.hero {
  position: relative;
  padding: clamp(72px, 14vh, 140px) 0 clamp(64px, 10vh, 100px);
  z-index: 1;
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 14ch;
  margin-bottom: 28px;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-lead {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--ink-muted);
  max-width: 36em;
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn-primary {
  background: var(--accent);
  color: #0b0c0e;
  font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* —— Sections —— */
.section {
  position: relative;
  z-index: 1;
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.section-more {
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.section-more:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* —— Cards —— */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.35s, box-shadow 0.4s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, var(--accent-soft) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(196, 165, 116, 0.35);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
.card:hover::before { transform: translateX(120%); }

.card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 12px;
}
.card-desc {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 20px;
}
.card-link {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tool-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.3s;
}
.tool-card:not(.is-soon):hover {
  transform: translateY(-3px);
  border-color: rgba(196, 165, 116, 0.4);
}
.tool-card.is-soon {
  opacity: 0.48;
  cursor: default;
}
.tool-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.tool-badge.live {
  background: var(--accent-soft);
  color: var(--accent);
}
.tool-badge.soon {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-faint);
}
.tool-name {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 8px;
}
.tool-desc {
  font-size: 13px;
  color: var(--ink-muted);
  flex: 1;
}
.tool-cta {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* —— About —— */
.about-block {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.about-quote {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.35;
  font-style: italic;
  color: var(--ink);
}
.about-body {
  color: var(--ink-muted);
  font-size: 15px;
}
.about-body p + p { margin-top: 14px; }

/* —— Footer —— */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a:hover { color: var(--accent); }

/* —— Reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.hero .reveal:nth-child(1) { transition-delay: 0.05s; }
.hero .reveal:nth-child(2) { transition-delay: 0.18s; }
.hero .reveal:nth-child(3) { transition-delay: 0.3s; }
.hero .reveal:nth-child(4) { transition-delay: 0.42s; }

/* —— Article / posts layout —— */
.page-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-top: 12px;
}
.page-hero .lead {
  margin-top: 16px;
  color: var(--ink-muted);
  max-width: 40em;
}
.article {
  position: relative;
  z-index: 1;
  padding: 48px 0 80px;
  max-width: 680px;
}
.article h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  margin: 36px 0 14px;
}
.article p { color: var(--ink-muted); margin-bottom: 16px; }
.article ul {
  margin: 0 0 16px 1.2em;
  color: var(--ink-muted);
}
.article li + li { margin-top: 6px; }
.article a { color: var(--accent); border-bottom: 1px solid transparent; }
.article a:hover { border-bottom-color: var(--accent); }
.back-link {
  display: inline-flex;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.back-link:hover { color: var(--accent); }

.post-list {
  position: relative;
  z-index: 1;
  padding: 40px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.post-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s;
}
.post-row:hover .post-row-title { color: var(--accent); }
.post-row-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.post-row-title {
  font-family: var(--font-display);
  font-size: 22px;
}
.post-row-tag {
  font-size: 12px;
  color: var(--ink-muted);
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .card-grid,
  .tool-grid,
  .about-block { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 12, 14, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card::before,
  .card:hover,
  .tool-card:hover,
  .btn:hover { transition: none; transform: none; }
  #cursor-glow { display: none !important; }
}
