/* ==========================================================================
   lindsayroseryan.com — WCAG 2.2 AA High-Contrast Stylesheet
   ========================================================================== */

:root {
  --bg-canvas: #0b0e1a;
  --bg-surface: #12172a;
  --bg-surface-alt: #18203a;
  --border-subtle: #2e3a63;
  --border-accent: #5eead4;

  /* Text colors verified >= 11:1 contrast against --bg-surface (#12172a) */
  --text-primary: #f5f7ff;
  --text-secondary: #d4dcf5;
  --text-muted: #aebad9;

  /* Interactive accents */
  --accent-primary: #5eead4;
  --accent-primary-hover: #99f6e4;
  --accent-primary-ink: #071318;
  --accent-secondary: #c4b5fd;
  --focus-ring: #7dd3fc;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 20px 50px rgba(4, 7, 18, 0.55);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  background:
    radial-gradient(circle at 15% 0%, rgba(94, 234, 212, 0.12), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(196, 181, 253, 0.12), transparent 40%),
    var(--bg-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* Visually hidden helper for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -120px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--accent-primary);
  color: var(--accent-primary-ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2rem, 58rem);
  margin-inline: auto;
}

/* Header & Pixel-Art Hero Banner */
.site-header {
  padding-block: 1.5rem 1rem;
}

.hero-frame {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.hero-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.quick-nav {
  margin-top: 1.25rem;
}

.action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

/* Main About Card */
main {
  padding-block: 1rem 3rem;
}

.about-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-card);
}

/* Optimal reading measure: 65ch–75ch */
.prose {
  max-width: 70ch;
  margin-inline: auto;
}

h1,
h2 {
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin-bottom: 1rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.15rem;
  color: var(--text-secondary);
}

strong {
  color: var(--text-primary);
  font-weight: 650;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.12em 0.42em;
  border-radius: 6px;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
}

/* Semantic Lists */
.pillar-list,
.stack-list {
  margin: 1.25rem 0 0;
  padding-left: 1.35rem;
  color: var(--text-secondary);
}

.pillar-list li,
.stack-list li {
  margin-bottom: 0.9rem;
  padding-left: 0.25rem;
}

.pillar-list li::marker,
.stack-list li::marker {
  color: var(--accent-primary);
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 2.25rem auto;
  max-width: 70ch;
}

/* Accessible Buttons & Links */
a {
  color: var(--accent-primary);
  text-underline-offset: 0.2em;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px; /* WCAG 2.2 AA comfortable touch target */
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--accent-primary-ink);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  color: var(--accent-primary-ink);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface-alt);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

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

/* Footer */
.site-footer {
  padding-block: 0 2.5rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
}

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* Windows High Contrast / Forced Colors */
@media (forced-colors: active) {
  .btn,
  .about-card,
  .hero-frame {
    border: 1px solid CanvasText;
  }
}
