/* sathiyancloud — refined · www.sathiyancloud.in */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading: "Plus Jakarta Sans", var(--sans);
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --shell: clamp(1.25rem, 4vw, 3rem);
  --bg: #0c0a09;
  --bg-elevated: #1c1917;
  --ink: #fafaf9;
  --muted: #a8a29e;
  --faint: rgba(250, 250, 249, 0.09);
  --accent: #2dd4bf;
  --accent-muted: rgba(45, 212, 191, 0.1);
  --header-bg: rgba(12, 10, 9, 0.88);
  --mesh: rgba(45, 212, 191, 0.05);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

/* Subtle depth — no grain (reads cleaner on all displays) */
.mesh {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(100% 80% at 50% -20%, var(--mesh), transparent 55%);
}

.noise {
  display: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  border-radius: 8px;
}
.skip-link:focus { left: 0.75rem; }

/* Fluid horizontal padding — no narrow content column */
.shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--shell);
}

.shell--text {
  max-width: 42rem;
}

.shell--wide {
  max-width: 1400px;
}

/* Header — floating, minimal rule */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--faint);
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.85rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}

.brand__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.2;
  min-width: 0;
}

.brand__title {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.025em;
}

.brand__accent {
  color: var(--accent);
  font-weight: 700;
}

.brand__tag {
  display: block;
  margin-top: 0.05rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.35;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
}

.nav-link {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--ink);
  background: var(--faint);
}

.nav-link.is-active {
  color: var(--ink);
  background: var(--faint);
  box-shadow: inset 0 0 0 1px var(--faint);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--faint);
  background: var(--bg-elevated);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.btn-link {
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--faint);
  text-decoration: none;
  color: var(--ink);
}

.btn-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.5rem;
    border-top: 1px solid var(--faint);
    margin-top: 0.35rem;
  }
  .site-nav.is-open { display: flex; }
  .header-tools .btn-link { display: none; }
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.2s;
}

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

.btn--primary {
  background: var(--accent);
  color: #042f2e;
}

.btn--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 4px 20px var(--accent-muted);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--faint);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ——— Home: full-bleed hero ——— */
.hero-fluid {
  padding: clamp(3rem, 10vh, 5rem) 0 clamp(2rem, 6vh, 3rem);
  position: relative;
}

.hero-fluid__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: end;
}

@media (min-width: 960px) {
  .hero-fluid__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: end;
  }
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.hero-fluid h1 {
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 22ch;
}

.grad {
  color: var(--accent);
}

.lede {
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 42ch;
  margin: 0 0 1.75rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.kicker {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.kicker strong {
  color: var(--ink);
  font-weight: 600;
}

/* Tag stream — not a boxed card */
.tag-stream {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag-stream li {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
  border: 1px solid transparent;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.tag-stream li:hover {
  border-color: var(--faint);
  transform: translateY(-2px);
}

.hero-aside__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.cmd-line {
  margin-top: 1.25rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.82rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: rgba(12, 18, 34, 0.92);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.15);
  overflow-x: auto;
}

.cmd-line .prompt { color: var(--accent); margin-right: 0.4rem; }

/* Journey — asymmetric strip, no card grid */
.journey {
  padding: clamp(3rem, 8vw, 5rem) 0;
  border-top: 1px solid var(--faint);
}

.journey__head {
  max-width: min(52ch, 100%);
  margin-bottom: 2.5rem;
}

.journey__head h2 {
  font-family: var(--heading);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.journey__head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.journey__cols {
  display: grid;
  gap: 0;
}

@media (min-width: 768px) {
  .journey__cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 2rem;
  }
}

.journey-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--faint);
}

@media (min-width: 768px) {
  .journey-item {
    border-top: none;
    border-left: 3px solid var(--accent);
    padding: 0 0 0 1.25rem;
    margin-left: 0;
  }
}

.journey-item:first-child { border-top: none; }

@media (min-width: 768px) {
  .journey-item:first-child { padding-top: 0; }
}

.journey-item h3 {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.journey-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.journey-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.jm {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--faint);
}

/* Story split — editorial */
.story {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  border-top: 1px solid var(--faint);
}

.story__grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .story__grid {
    grid-template-columns: 1fr minmax(0, 0.9fr);
    gap: 3rem;
  }
}

.story__grid h2 {
  font-family: var(--heading);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.8vw, 2rem);
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.story__grid .lead {
  font-family: var(--sans);
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.pullquote {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.45;
  color: var(--ink);
  border: none;
  font-weight: 500;
}

.pullquote footer {
  margin-top: 1.25rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
}

.cta-band {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: 1.75rem 0;
  border-top: 1px solid var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cta-band p {
  margin: 0;
  color: var(--muted);
  max-width: 46ch;
  font-size: 1rem;
}

/* ——— Blog index: bento ——— */
.blog-hero {
  padding: clamp(2.5rem, 8vw, 4rem) 0 1rem;
}

.blog-hero h1 {
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 0.75rem;
}

.blog-hero .lede-blog {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 40ch;
}

.bento {
  display: grid;
  gap: 1rem;
  padding: 2rem 0 4rem;
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 1.25rem;
  }
}

.bento__card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 140px;
  padding: 1.35rem 1.5rem;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--faint);
  transition: transform 0.25s var(--ease), border-color 0.2s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.bento__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--accent-muted), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.bento__card:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.bento__card:hover::after { opacity: 1; }

.bento__card--featured {
  min-height: 220px;
}

@media (min-width: 900px) {
  .bento__card--featured {
    grid-column: span 7;
    grid-row: span 2;
    min-height: auto;
  }
  .bento__card--side {
    grid-column: span 5;
    grid-row: span 2;
    min-height: auto;
  }
  .bento__card--third {
    grid-column: span 4;
  }
  .bento__card--full {
    grid-column: span 12;
  }
}

.bento__date {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.bento__title {
  font-family: var(--heading);
  font-weight: 600;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

.bento__card--featured .bento__title {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
}

.bento__excerpt {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 52ch;
}

/* ——— Article: magazine cover + readable body ——— */
.page--post { padding-bottom: 4rem; }

.article-cover {
  padding: clamp(2rem, 6vw, 3.5rem) 0 2rem;
  border-bottom: 1px solid var(--faint);
  position: relative;
}

.article-cover::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: min(55vh, 420px);
  background: linear-gradient(180deg, var(--accent-muted), transparent);
  pointer-events: none;
  z-index: -1;
}

.article-cover .post-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.article-cover h1 {
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin: 0 0 0.75rem;
  max-width: min(22ch, 100%);
}

.article-cover .subtitle {
  font-family: var(--sans);
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0;
  max-width: 40ch;
}

.article-content {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.article-content.prose {
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.75;
}

.article-content.prose h2 {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.35rem;
  margin-top: 2.25rem;
  letter-spacing: -0.02em;
}

.article-content.prose h3 {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.article-content.prose p,
.article-content.prose li {
  color: var(--muted);
}

.article-content.prose strong {
  color: var(--ink);
}

.article-content.prose a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content.prose pre {
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: #0c1222;
  color: #e2e8f0;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.article-content.prose code {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--faint);
  padding: 0.12em 0.35em;
  border-radius: 6px;
}

.article-content.prose pre code {
  background: none;
  padding: 0;
}

.article-content.prose blockquote {
  margin: 1.5rem 0;
  padding: 0 0 0 1.15rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--muted);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2.5rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: none;
}

.back:hover { text-decoration: underline; }

/* Generic prose pages (about, contact, session) */
.page {
  padding: clamp(2rem, 5vw, 3rem) 0 4rem;
}

.prose {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose h1 {
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  letter-spacing: -0.04em;
  margin-top: 0;
}

.prose h2 {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.3rem;
  margin-top: 2rem;
}

.prose p,
.prose li { color: var(--muted); }

.prose a {
  color: var(--accent);
  font-weight: 600;
}

.prose pre {
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #0c1222;
  color: #e2e8f0;
  overflow-x: auto;
}

.prose code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--faint);
  padding: 0.12em 0.35em;
  border-radius: 6px;
}

.prose blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--faint);
  color: var(--muted);
}

.prose .btn {
  font-family: var(--sans);
  text-decoration: none;
  margin-top: 0.35rem;
}

/* .prose a { color: accent } must not override button labels on accent fill */
.prose a.btn--primary,
.prose a.btn--primary:hover {
  color: #042f2e;
}

.prose a.btn--ghost {
  color: var(--ink);
}

.prose a.btn--ghost:hover {
  color: var(--accent);
}

.cta {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--faint);
  background: var(--bg-elevated);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cta p { margin: 0; color: var(--muted); }

/* Footer — minimal */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--faint);
  padding: 2.5rem 0 2rem;
}

.footer__grid {
  display: grid;
  gap: 1.25rem;
  text-align: center;
}

@media (min-width: 720px) {
  .footer__grid {
    grid-template-columns: 1fr auto;
    text-align: left;
    align-items: center;
  }
}

.footer__grid strong {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.footer__tag {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
}

@media (min-width: 720px) {
  .footer__links { justify-content: flex-end; }
}

.footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

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

.footer__copy {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* 404 */
.miss {
  text-align: center;
  padding: clamp(3rem, 12vh, 6rem) 0;
}

.miss h1 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}

/* Legacy class aliases used in older HTML fragments */
.container { /* maps to shell behavior */
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--shell);
}

.post-meta { /* alias */
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
