/* skarrnd.top — shared styles for the portfolio + case-study pages.
   Extends the original single-file palette (kept intentionally: dark
   GitHub-ish ground, green primary, cyan section headers). */

:root {
  --bg: #0d1117;
  --bg-soft: #10161f;
  --card: #161b22;
  --card-hi: #1c232c;
  --border: #21262d;
  --border-hi: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --faint: #6e7681;
  --accent: #4ade80;
  --accent2: #22d3ee;
  --amber: #fbbf24;
  --radius: 12px;
  --wrap: 880px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- top nav (shared across pages) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .01em;
}
.nav-brand span { color: var(--accent); }
.nav-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--accent); }

/* ---------- hero ---------- */
header.hero { display: flex; gap: 28px; align-items: center; padding: 48px 0 36px; flex-wrap: wrap; }
.avatar {
  width: 140px; height: 140px; border-radius: 50%;
  border: 3px solid var(--accent); object-fit: cover; flex-shrink: 0;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 10%, transparent);
}
.avatar-fallback {
  width: 140px; height: 140px; border-radius: 50%; border: 3px solid var(--accent);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 700;
  background: linear-gradient(135deg, #1f2937, #111827); color: var(--accent);
}
h1 { font-size: 2.1rem; line-height: 1.15; letter-spacing: -0.02em; }
.tagline { color: var(--accent); font-weight: 600; margin-top: 6px; }
.loc { color: var(--muted); margin-top: 6px; font-size: .95rem; }

/* ---------- sections ---------- */
section { margin: 38px 0; }
h2 {
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent2); margin-bottom: 18px; font-weight: 700;
}
p.about { max-width: 660px; }
p + p { margin-top: 14px; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 16px; font-size: .9rem; color: var(--text);
}

/* ---------- project cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
/* Four work cards in an auto-fit 3-col grid left the 4th orphaned on its own row
   at every viewport >=900px, with card copy squeezed to ~29 characters a line. */
.grid-work { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .grid-work { grid-template-columns: 1fr; } }
.hero-cta { margin-top: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, background .15s;
}
a.card:hover { border-color: var(--accent); background: var(--card-hi); transform: translateY(-2px); }
.card h3 { font-size: 1.05rem; line-height: 1.35; }
.card p { color: var(--muted); font-size: .95rem; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.read-more { font-size: .85rem; color: var(--accent2); font-weight: 600; }
a.card:hover .read-more { color: var(--accent); }

/* ---------- badges ---------- */
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; border-radius: 999px; padding: 2px 10px;
  border: 1px solid currentColor;
}
.badge.live { color: var(--accent); }
.badge.progress { color: var(--amber); }
.badge.design { color: var(--muted); }

/* ---------- buttons ---------- */
.links { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 20px; color: var(--text); text-decoration: none; font-size: .95rem;
  transition: .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: var(--accent); color: var(--accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- case-study article ---------- */
.article-head { padding: 40px 0 8px; }
.back {
  display: inline-block; color: var(--muted); text-decoration: none;
  font-size: .9rem; margin-bottom: 20px;
}
.back:hover { color: var(--accent); }
.article-head h1 { font-size: 2rem; }
.article-sub { color: var(--muted); font-size: 1.05rem; margin-top: 10px; max-width: 660px; }
.meta-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 18px; padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
.meta-row .chip { font-size: .82rem; padding: 4px 12px; }

article h2 { margin-top: 40px; }
article h3 { font-size: 1.02rem; margin: 26px 0 10px; color: var(--text); }
article ul, article ol { margin: 14px 0 14px 22px; color: var(--text); }
article li { margin-bottom: 8px; }
article li::marker { color: var(--accent); }
article p { max-width: 680px; }

.callout {
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--accent2); border-radius: 8px;
  padding: 16px 18px; margin: 22px 0;
}
.callout strong { color: var(--accent2); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.fact { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.fact .n { font-size: 1.35rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.fact .l { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .88em; background: var(--card-hi); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 6px;
}

.next-nav {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
}

/* ---------- footer ---------- */
footer {
  color: var(--muted); font-size: .85rem; padding: 40px 0 28px;
  border-top: 1px solid var(--border); margin-top: 48px;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

@media (max-width: 560px) {
  header.hero { justify-content: center; text-align: center; }
  h1 { font-size: 1.7rem; }
  .nav-inner { padding: 12px 18px; }
  .wrap { padding: 18px; }
}
