/* =========================================================
   Likhita Krovidi — personal site
   Design concept: "Likhita, v1.0" — a personal site framed
   like a product. Spec-sheet about section, changelog-style
   blog, status-tagged project cards. Grounded in the vernacular
   a PM lives in every day, without being cute about it.
   ========================================================= */

:root {
  --ink: #1e2a38;
  --ink-soft: #3a4a57;
  --paper: #e8f1f7;
  --surface: #fafbfc;
  --line: #c9dce8;
  --muted: #64798a;
  --blue: #3d6e8c;
  --blue-dark: #2c5470;
  --blue-tint: #dceaf2;
  --clay: #c97b4a;
  --clay-tint: #f3e3d5;
  --slate: #7d9aa8;
  --slate-tint: #e3eaee;
  --grid-line: rgba(30, 42, 56, 0.06);
  --shadow-soft: 0 14px 34px -20px rgba(30, 42, 56, 0.4);
  --shadow-lift: 0 4px 14px -6px rgba(30, 42, 56, 0.18);

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --max-width: 1040px;
  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
}
body.is-ready {
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}

/* scroll-reveal: elements fade + rise into place once, on entering the viewport */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

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

a {
  color: inherit;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- eyebrow / mono labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
}
.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-tint);
}

/* ---------- header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(232, 241, 247, 0.86);
  backdrop-filter: blur(6px);
  z-index: 20;
  box-shadow: 0 0 0 rgba(30, 42, 56, 0);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: var(--shadow-lift);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
}
.brand .version {
  color: var(--blue);
  font-size: 12px;
}
.brand .version::after {
  content: "▍";
  margin-left: 2px;
  display: inline-block;
  animation: blink 1.1s steps(1, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

nav.primary-nav {
  display: flex;
  gap: 6px;
}
nav.primary-nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
nav.primary-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
nav.primary-nav a:hover,
nav.primary-nav a[aria-current="page"] {
  color: var(--ink);
}
nav.primary-nav a:hover::after,
nav.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}

@media (max-width: 720px) {
  nav.primary-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 8px;
  }
  nav.primary-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.hero .hero-copy { min-width: 0; }
@media (max-width: 780px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .portrait-frame { order: -1; width: 140px; }
}

/* ---------- portraits & article images ---------- */
.portrait-frame {
  width: 220px;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
  animation: fadeUp 0.7s var(--ease) 0.15s both;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.portrait-frame--lg {
  width: 260px;
}

figure.article-figure {
  margin: 28px 0;
}
figure.article-figure img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
}
figure.article-figure figcaption {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
}
.hero {
  position: relative;
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}
.hero .status-pill { animation: fadeUp 0.7s var(--ease) both; }
.hero h1 { animation: fadeUp 0.7s var(--ease) 0.1s both; }
.hero .lede { animation: fadeUp 0.7s var(--ease) 0.2s both; }
.hero .actions { animation: fadeUp 0.7s var(--ease) 0.3s both; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  margin: 20px 0 18px;
}
.hero .lede {
  max-width: 560px;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.hero .actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 12px 20px;
  border-radius: 7px;
  text-decoration: none;
  border: 1px solid transparent;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.25s var(--ease), color 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--blue-dark); box-shadow: var(--shadow-lift); }
.btn--ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform 0.3s var(--ease);
  z-index: -1;
}
.btn--ghost:hover {
  color: var(--paper);
  border-color: var(--ink);
}
.btn--ghost:hover::before { transform: translateX(0); }

/* ---------- spec sheet ---------- */
.spec-sheet {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-top: 24px;
}
.spec-item {
  padding-left: 14px;
  border-left: 2px solid var(--line);
  transition: border-color 0.25s ease;
}
.spec-item:hover {
  border-left-color: var(--blue);
}
.spec-item dt {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.spec-item dd {
  margin: 0;
  font-size: 1.05rem;
}

/* ---------- section headers ---------- */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: none; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 1.9rem; margin: 0; }
.section-head .see-all {
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- project cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
}
.card h3 {
  font-size: 1.3rem;
  margin: 0;
}
.card p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.98rem;
}
.card .card-foot {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* Signature interaction: hovering a project card reveals a tiny diff,
   like scrolling past a pull request — this is the "before / after"
   every teardown is really about. */
.card .diff {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  transition: max-height 0.35s var(--ease), opacity 0.3s ease;
}
.card:hover .diff,
.card:focus-visible .diff {
  max-height: 80px;
  opacity: 1;
}
.diff-line { padding-left: 16px; position: relative; }
.diff-line::before {
  position: absolute;
  left: 0;
}
.diff-remove { color: var(--clay); }
.diff-remove::before { content: "−"; }
.diff-add { color: var(--blue-dark); }
.diff-add::before { content: "+"; }

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 5px;
  width: fit-content;
}
.badge--case-study { background: var(--blue-tint); color: var(--blue-dark); }
.badge--teardown { background: var(--clay-tint); color: var(--clay); }
.badge--concept { background: var(--slate-tint); color: var(--slate); }

/* ---------- changelog / blog ---------- */
.changelog-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.25s var(--ease);
}
.changelog-entry:hover { padding-left: 6px; }
.changelog-entry:first-child { border-top: none; padding-top: 0; }
.changelog-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue-dark);
  padding-top: 4px;
  position: relative;
}
.changelog-tag::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.changelog-tag .date {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.changelog-body h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.changelog-body h3 a { text-decoration: none; }
.changelog-body h3 a:hover { text-decoration: underline; }
.changelog-body p { color: var(--ink-soft); margin-bottom: 10px; }
.read-more {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue-dark);
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s var(--ease);
}
.read-more:hover { transform: translateX(4px); }

@media (max-width: 620px) {
  .changelog-entry { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- article / detail pages ---------- */
.article-head {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.article-head h1 { font-size: clamp(2rem, 5vw, 3rem); }
.article-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}
.article-body {
  padding: 48px 0;
  max-width: 700px;
}
.article-body h2 {
  font-size: 1.5rem;
  margin-top: 1.6em;
}
.article-body p { color: var(--ink-soft); }
.article-body blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--blue);
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}
.back-link {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  color: var(--blue-dark);
  display: inline-block;
  margin-bottom: 20px;
}

/* ---------- about page ---------- */
.about-body {
  max-width: 680px;
}
.about-body p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- contact strip ---------- */
.contact-strip {
  padding: 60px 0 72px;
  text-align: left;
}
.contact-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.contact-links a {
  font-family: var(--font-mono);
  font-size: 13.5px;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 7px;
  display: inline-block;
  transition: transform 0.2s var(--ease), border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-links a:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

/* ---------- footer ---------- */
footer.site-footer {
  padding: 30px 0 50px;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
