/* =============================================================
   EggBlox.com — Main stylesheet
   Theme: Minimal & light (near-white, charcoal/navy, indigo accent)
   Mobile-first, CSS custom properties throughout
   ============================================================= */

/* ----------------------------------------------------------------
   1. Design tokens
---------------------------------------------------------------- */
:root {
  --color-bg:            #FFFFFF;
  --color-bg-alt:        #F7F8FA;
  --color-bg-card:       #FFFFFF;
  --color-text:          #0F172A;
  --color-text-muted:    #475569;
  --color-accent:        #2563EB;
  --color-accent-strong: #1D4ED8;
  --color-accent-soft:   #DBEAFE;
  --color-border:        #E2E8F0;
  --color-border-strong: #CBD5E1;
  --color-live:          #047857;
  --color-live-bg:       #ECFDF5;
  --color-wip:           #B45309;
  --color-wip-bg:        #FFFBEB;
  --color-archived:      #475569;
  --color-archived-bg:   #F1F5F9;
  --color-info:          #1D4ED8;
  --color-info-bg:       #EFF6FF;
  --color-opensource:    #6D28D9;
  --color-opensource-bg: #F5F3FF;

  --font-heading: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-md:   1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;

  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.10);

  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  --max-width: 1120px;
  --header-h:  72px;

  --bp-sm: 360px;
  --bp-md: 768px;
  --bp-lg: 1280px;
}

/* ----------------------------------------------------------------
   2. Reset & base
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-accent-strong); }

main { flex: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: -0.03em;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 2000;
  background: var(--color-text);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  top: var(--space-sm);
  color: #fff;
}

/* ----------------------------------------------------------------
   3. Utilities
---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page { display: block; }
.page[hidden] { display: none !important; }

.page--entering {
  animation: fadeIn 0.25s ease forwards;
}

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

.text-link {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--color-accent-strong); }

/* ----------------------------------------------------------------
   4. Buttons
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.2;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  white-space: nowrap;
}

.btn--primary {
  /* Fill uses the darker sibling of D-10's #2563EB so white label text meets WCAG AA. */
  background: var(--color-accent-strong);
  color: #fff;
  border-color: var(--color-accent-strong);
}
.btn--primary:hover {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn--ghost:hover {
  border-color: var(--color-text);
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.btn--sm {
  font-size: var(--text-sm);
  padding: 0.5rem 1rem;
  min-height: 40px;
}

.btn--lg {
  font-size: var(--text-lg);
  padding: 1rem 2rem;
}

.btn:active { transform: scale(0.98); }

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.btn__spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Invisible hit-area expansion for small icon controls (UX standard §5) */
.hit-target {
  position: relative;
}
.hit-target::after {
  content: '';
  position: absolute;
  inset: -4px;
}
@media (pointer: coarse) {
  .hit-target::after { inset: -10px; }
}

/* ----------------------------------------------------------------
   5. Cookie consent banner (gates the GA4 loader)
---------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  padding: var(--space-sm) 0;
}
.cookie-banner[hidden] { display: none !important; }

.cookie-banner__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
}
.cookie-banner__text {
  flex: 1;
  min-width: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.cookie-banner__actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ----------------------------------------------------------------
   6. Header
---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  min-height: var(--header-h);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--space-md);
}

.site-logo {
  display: flex;
  align-items: center;
  color: inherit;
}
.site-logo:hover { color: inherit; }
.site-logo__img {
  height: 40px;
  width: auto;
}

.site-nav__list {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.site-nav__link {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  position: relative;
}
.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 10px;
  position: relative;
}
.hamburger__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0 var(--space-md);
}
.mobile-nav[hidden] { display: none !important; }
.mobile-nav__list { display: flex; flex-direction: column; }
.mobile-nav__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-sm) var(--space-lg);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-text);
  border-left: 3px solid transparent;
}
.mobile-nav__link:hover,
.mobile-nav__link[aria-current="page"] {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* ----------------------------------------------------------------
   7. Hero
---------------------------------------------------------------- */
.hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  background:
    radial-gradient(ellipse at top left, rgba(37, 99, 235, 0.08), transparent 55%),
    var(--color-bg);
}

.hero__content { max-width: 720px; }

.hero__eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-size: clamp(2rem, 5vw, var(--text-4xl));
  margin-bottom: var(--space-lg);
}

.hero__sub {
  font-size: clamp(1rem, 2vw, var(--text-lg));
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: var(--space-xl);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ----------------------------------------------------------------
   8. Sections
---------------------------------------------------------------- */
.section { padding: var(--space-3xl) 0; }
.section--alt { background: var(--color-bg-alt); }

.section__header {
  margin-bottom: var(--space-xl);
}

.section__title {
  font-size: clamp(1.5rem, 3vw, var(--text-3xl));
  margin-bottom: var(--space-sm);
}

.section__sub {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  max-width: 640px;
}

.page-hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  background: var(--color-bg-alt);
}
.page-hero__title {
  font-size: clamp(1.75rem, 4vw, var(--text-3xl));
  margin-bottom: var(--space-sm);
}
.page-hero__sub {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 640px;
}

.cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}
.cta-banner__title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 3vw, var(--text-2xl));
  color: #fff;
  margin-bottom: var(--space-sm);
}
.cta-banner__text {
  color: #CBD5E1;
  max-width: 520px;
}
.cta-banner .btn--primary:hover { box-shadow: none; }

/* ----------------------------------------------------------------
   9. Project cards
---------------------------------------------------------------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  min-height: 20rem;
}

.project-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}
.project-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project-card__media {
  aspect-ratio: 16 / 9;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  flex: 1;
}

.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

.project-card__title {
  font-size: var(--text-xl);
}

.project-card__tagline {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  flex: 1;
}

.project-card__archived-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

.project-card__tags,
.capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tag-chip,
.capability-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
}

.capability-badge {
  background: var(--color-accent-soft);
  border-color: transparent;
  color: var(--color-accent-strong);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-chip--live        { background: var(--color-live-bg); color: var(--color-live); }
.status-chip--wip         { background: var(--color-wip-bg); color: var(--color-wip); }
.status-chip--archived    { background: var(--color-archived-bg); color: var(--color-archived); }
.status-chip--informational { background: var(--color-info-bg); color: var(--color-info); }
.status-chip--open-source { background: var(--color-opensource-bg); color: var(--color-opensource); }

.project-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xs);
}
.project-card__link {
  font-size: var(--text-sm);
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.expand-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  margin-top: var(--space-sm);
  padding: var(--space-sm) 0 0;
  background: none;
  border: none;
  border-top: 1px solid var(--color-border);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-align: left;
}
.expand-toggle__icon {
  transition: transform var(--transition);
}
.expand-toggle[aria-expanded="true"] .expand-toggle__icon {
  transform: rotate(180deg);
}

.expand-panel {
  padding-top: var(--space-sm);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.expand-panel[hidden] { display: none !important; }

.subitem-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.subitem-list li strong {
  color: var(--color-text);
  display: block;
}

/* ----------------------------------------------------------------
   9b. Archive detail pages (ReSharper Plugins / Windows Phone Apps)
---------------------------------------------------------------- */
.detail-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.detail-back-link:hover { color: var(--color-accent); }

.expand-toggle--link {
  text-decoration: none;
  color: var(--color-accent);
}
.expand-toggle--link:hover { color: var(--color-accent-strong); }

.feature-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.feature-group {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.feature-group__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}
.feature-group__note {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-style: italic;
  margin-bottom: var(--space-md);
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.feature-item--static {
  color: var(--color-text-muted);
  padding-left: calc(52px + var(--space-sm));
}

.feature-item__thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  padding: 0;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.feature-item__thumb:hover,
.feature-item__thumb:focus-visible {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}
.feature-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feature-item__label { flex: 1; }

.subapp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.subapp-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}
.subapp-card:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.subapp-card__logo {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--color-bg-alt);
}
.subapp-card__title { font-size: var(--text-lg); margin-bottom: var(--space-xs); }
.subapp-card__tagline { color: var(--color-text-muted); font-size: var(--text-sm); }

.app-detail__header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.app-detail__logo {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--color-bg-alt);
}
.app-detail__title { font-size: var(--text-2xl); margin-bottom: var(--space-xs); }
.app-detail__tagline { color: var(--color-text-muted); font-size: var(--text-md); }

.app-detail__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.app-detail__description p {
  margin-bottom: var(--space-md);
}
.app-detail__description p:last-child { margin-bottom: 0; }

.app-detail__screenshots-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-md);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.screenshot-thumb {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 0;
  background: var(--color-bg-alt);
  cursor: pointer;
  aspect-ratio: 9 / 16;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.screenshot-thumb:hover,
.screenshot-thumb:focus-visible {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}
.screenshot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------------------------------------------
   9c. Lightbox (screenshot / feature-GIF preview)
---------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.88);
  padding: var(--space-xl);
}
.lightbox[hidden] { display: none !important; }

.lightbox__img {
  max-width: min(100%, 900px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.22); }

body.lightbox-open { overflow: hidden; }

/* ----------------------------------------------------------------
   10. Tag filter (Work page)
---------------------------------------------------------------- */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.tag-filter__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition);
}
.tag-filter__chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.tag-filter__chip[aria-pressed="true"] {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  color: #fff;
}

.filter-empty {
  color: var(--color-text-muted);
  padding: var(--space-xl) 0;
}

/* ----------------------------------------------------------------
   11. About
---------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.prose-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}
.prose-card h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}
.prose-card p { color: var(--color-text-muted); margin-bottom: var(--space-md); }
.prose-card p:last-child { margin-bottom: 0; }

.stack-list,
.capability-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.stack-list li,
.capability-grid li {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 600;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--color-border);
  padding-left: var(--space-lg);
  margin-left: var(--space-xs);
}
.timeline__item {
  position: relative;
  padding-bottom: var(--space-xl);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-lg) - 6px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}
.timeline__year {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}
.timeline__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}
.timeline__text { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ----------------------------------------------------------------
   12. Contact
---------------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-form {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.contact-aside__card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.contact-aside__card h2 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}
.contact-aside__card p,
.contact-aside__card a { font-size: var(--text-sm); }

.form-group { display: flex; flex-direction: column; gap: var(--space-xs); }

.form-label {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.required { color: var(--color-accent); }

.form-input {
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-input::placeholder { color: #94A3B8; }
.form-input.error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-textarea { resize: vertical; min-height: 140px; }

.form-hint { font-size: var(--text-xs); color: var(--color-text-muted); }
.form-hint--warn { color: var(--color-wip); }

.form-status {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
}
.form-status[hidden] { display: none !important; }
.form-status--success {
  background: var(--color-live-bg);
  border: 1px solid #A7F3D0;
  color: var(--color-live);
}
.form-status--error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ----------------------------------------------------------------
   13. Footer
---------------------------------------------------------------- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-xl);
}

.footer-brand__logo {
  height: 36px;
  width: auto;
  margin-bottom: var(--space-sm);
}
.footer-brand__tagline {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.footer-nav__heading {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}
.footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.footer-nav__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.footer-nav__link:hover { color: var(--color-accent); }

.footer-nav__link--quiet {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.social-list a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}
.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-bottom__copy {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ----------------------------------------------------------------
   14. Responsive — 360 / 768 / 1280
---------------------------------------------------------------- */
@media (min-width: 360px) {
  .project-grid { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
  .site-nav { display: block; }
  .hamburger { display: none; }
  .mobile-nav { display: none !important; }

  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1.2fr 0.8fr; }
  .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }

  .feature-groups { grid-template-columns: repeat(2, 1fr); }
  .feature-list { grid-template-columns: 1fr 1fr; }
  .subapp-grid { grid-template-columns: repeat(2, 1fr); }
  .app-detail__layout { grid-template-columns: 1.4fr 1fr; }
  .screenshot-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
  .site-nav { display: none; }
  .hamburger { display: flex; }
  .hero { padding: var(--space-2xl) 0 var(--space-xl); }
  .section { padding: var(--space-2xl) 0; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 1280px) {
  .container { padding-inline: var(--space-xl); }
  .project-grid { grid-template-columns: repeat(4, 1fr); }
  .project-grid--work,
  .project-grid--archive { grid-template-columns: repeat(3, 1fr); }

  .feature-groups { grid-template-columns: repeat(3, 1fr); }
}

/* ----------------------------------------------------------------
   15. Reduced motion
---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .page--entering { animation: none; }
  .project-card:hover { transform: none; }
  .btn:active { transform: none; }
}
