/* Silva Design: hand-written CSS, no framework. */
:root {
  --ink: #14161f;
  --ink-2: #4a4f5e;
  --paper: #f5f3ee;
  --card: #ffffff;
  --night: #0c0d12;
  --night-2: #161925;
  --line: rgba(20, 22, 31, 0.09);
  --red: #ff4d4d; --orange: #ff9a3c; --yellow: #ffd23f; --green: #3ddc84; --blue: #4d9bff;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Fira Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #e9e7e1;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1.4px, transparent 1.6px) 0 0 / 22px 22px,
    radial-gradient(1200px 500px at 50% 0%, #1d2133 0%, var(--night) 70%);
  overflow: hidden;
}
.hero::after {               /* rainbow LED strip along the bottom edge */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--blue), #b06bff);
}
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,16,26,0.82);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
html { scroll-padding-top: 80px; }
.nav {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-mark img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  text-decoration: none; font-size: 15px; color: rgba(233,231,225,0.75);
  font-weight: 500; letter-spacing: 0.02em;
}
.nav-links a:hover { color: #fff; }

.hero-inner {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) 24px clamp(64px, 10vw, 120px);
}
.logo { margin: 0 0 34px; line-height: 0; }
.logo svg { width: min(520px, 86vw); height: auto; }
.tagline {
  margin: 0 0 14px;
  font-size: clamp(26px, 4.2vw, 44px);
  line-height: 1.15; font-weight: 700; letter-spacing: -0.02em;
  max-width: 18em;
}
.intro {
  margin: 0 0 30px; max-width: 36em;
  font-size: clamp(16px, 1.6vw, 19px); color: rgba(233,231,225,0.72);
}
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: #e9e7e1; color: var(--night);
  text-decoration: none; font-weight: 600; font-size: 15px;
  transition: transform .15s ease, background .15s ease;
}
.cta:hover { transform: translateY(-1px); background: #fff; }

/* ---------- Work ---------- */
.work { max-width: 1180px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) 24px; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; margin-bottom: 34px;
}
.section-head h2 {
  margin: 0; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.02em; line-height: 1.1;
}
.section-head p { margin: 0; color: var(--ink-2); font-family: var(--mono); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 28px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,22,31,0.04), 0 8px 24px rgba(20,22,31,0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,22,31,0.05), 0 18px 40px rgba(20,22,31,0.10); }
.card-media { aspect-ratio: 16 / 10; background: var(--night-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card h3 { margin: 0; font-size: 21px; letter-spacing: -0.01em; line-height: 1.2; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.status {
  flex-shrink: 0;
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-2); padding: 4px 9px; border-radius: 999px; background: #f0eee8;
}
.tags { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 999px;
  background: #eef3ff; color: #2c4f99;
}
.card-link {
  margin-top: auto; padding-top: 6px; align-self: flex-start;
  font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink);
  border-bottom: 2px solid var(--yellow);
}
.card-link:hover { border-bottom-color: var(--orange); }

/* Featured card: wide, image beside text on big screens */
.card.featured { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .card.featured { flex-direction: row; }
  .card.featured .card-media { flex: 1.35; aspect-ratio: auto; min-height: 380px; }
  .card.featured .card-body { flex: 1; padding: 36px 36px 34px; justify-content: center; gap: 14px; }
  .card.featured h3 { font-size: 32px; }
  .card.featured p { font-size: 17px; }
  .card.featured .card-link { margin-top: 8px; }
}

/* Minor list */
.minor {
  margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line);
}
.minor h3 { margin: 0 0 12px; font-size: 15px; font-family: var(--mono); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.minor ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.minor li { font-size: 15px; color: var(--ink-2); }
.minor li strong { color: var(--ink); margin-right: 6px; }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: #e9e7e1; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 48px 24px 56px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.footer-logo { width: 172px; height: auto; }
.footer-text { text-align: right; }
.footer-text p { margin: 0 0 6px; }
.footer-text a { color: #fff; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.footer .small { font-size: 13.5px; color: rgba(233,231,225,0.65); }
.footer .muted { font-style: italic; color: rgba(233,231,225,0.42); }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; gap: 22px; }
  .card-body { padding: 18px 18px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-text { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .cta { transition: none; }
}
