@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Public+Sans:wght@400;500;600;700;800&display=swap");

/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

:root {
  --bg-page: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.98);
  --bg-card-strong: #ffffff;
  --bg-ink: #102033;
  --bg-ink-soft: #15314d;
  --border: rgba(16, 32, 51, 0.12);
  --border-strong: rgba(16, 32, 51, 0.18);
  --text: #172637;
  --muted: #586779;
  --muted-strong: #344558;
  --accent: #1c4f83;
  --accent-soft: #dce8f5;
  --accent-muted: #6f88a2;
  --shadow-soft: 0 10px 28px rgba(16, 32, 51, 0.06);
  --shadow-card: 0 16px 36px rgba(16, 32, 51, 0.08);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --page-gutter: clamp(1rem, 2.5vw, 2rem);
}

html {
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  font-family: "Public Sans", "Segoe UI", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background-color: var(--bg-page);
  background:
    radial-gradient(circle at top left, rgba(28, 79, 131, 0.04), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 50%, #f5f8fb 100%);
}

a {
  color: inherit;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

code {
  padding: 0.15rem 0.42rem;
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.08);
  color: var(--bg-ink);
  font-size: 0.9rem;
}

pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #13263b, #0f1d2d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

pre code {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #edf3f9;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.65;
}

.page-shell {
  width: min(1360px, 100%);
  margin: 0 auto;
  box-sizing: border-box;
  padding:
    max(1rem, env(safe-area-inset-top))
    calc(var(--page-gutter) + env(safe-area-inset-right))
    max(4rem, calc(env(safe-area-inset-bottom) + 2rem))
    calc(var(--page-gutter) + env(safe-area-inset-left));
}

.site-header {
  position: sticky;
  top: max(0.75rem, env(safe-area-inset-top));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.06);
}

main {
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-ink), var(--bg-ink-soft));
  color: #f6f8fb;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-copy strong,
.brand-copy small {
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 0.96rem;
  font-weight: 700;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  min-width: 0;
}

.site-nav a {
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.project-link:hover,
.project-link:focus-visible,
.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--accent);
}

.hero,
.signal-band,
.profile-section,
.project-section,
.about-section,
.contact-section,
.project-page {
  margin-top: 1.75rem;
  animation: fade-up 560ms ease both;
}

.signal-band {
  animation-delay: 70ms;
}

.profile-section {
  animation-delay: 120ms;
}

.project-section {
  animation-delay: 170ms;
}

.about-section {
  animation-delay: 220ms;
}

.contact-section {
  animation-delay: 270ms;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.82fr);
  gap: 1.4rem;
  align-items: stretch;
}

.hero > *,
.project-grid > *,
.about-grid > *,
.detail-hero > *,
.visual-grid > *,
.related-grid > * {
  min-width: 0;
}

.hero-copy,
.hero-card,
.signal-band-card,
.project-card,
.about-panel,
.contact-card,
.detail-hero,
.detail-section,
.sidebar-panel,
.readme-card,
.snippet-card,
.related-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  padding: clamp(1.8rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 253, 0.98)),
    linear-gradient(135deg, rgba(28, 79, 131, 0.025), rgba(111, 136, 162, 0.02));
}

.hero-card {
  display: grid;
  gap: 1.15rem;
  padding: 1.1rem;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
}

.hero-card-body {
  display: grid;
  gap: 0.9rem;
}

.profile-details {
  display: grid;
  gap: 0.85rem;
}

.profile-frame {
  min-height: 360px;
  border-radius: calc(var(--radius-xl) - 8px);
  overflow: hidden;
  background: linear-gradient(180deg, #e8eff6, #f7fafc);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: saturate(0.9) contrast(1.02);
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
}

.profile-facts div {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(16, 32, 51, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(250, 252, 253, 0.96);
}

.profile-facts dt,
.profile-facts dd {
  margin: 0;
}

.profile-facts dt,
.project-type,
.coursework-type,
.panel-kicker,
.fact-label,
.eyebrow,
.contact-list span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-facts dd {
  margin-top: 0.4rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 0.95rem;
}

h1,
h2,
h3,
p,
dl {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  color: #142335;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1.1rem;
  font-size: clamp(2.8rem, 6vw, 4.7rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

h2 {
  max-width: 17ch;
  margin-bottom: 0.35rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.28rem;
  line-height: 1.25;
}

.hero-text,
.section-copy,
.project-body p,
.about-panel p,
.contact-card p,
.profile-note,
.detail-deck,
.summary-callout p,
.signal-card p,
.snippet-copy p,
.visual-copy p,
.readme-card p,
.related-copy,
.sidebar-panel p,
.detail-list,
.detail-section p {
  color: var(--muted);
  font-size: 1rem;
}

.hero-text {
  max-width: 42rem;
  margin-bottom: 1.75rem;
  font-size: 1.08rem;
  line-height: 1.8;
}

.profile-kicker {
  margin-bottom: 0.25rem;
  color: var(--text);
  font-weight: 700;
}

.profile-note,
.section-copy {
  line-height: 1.75;
}

.section-heading {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1.4rem;
}

.section-copy {
  max-width: 48rem;
  margin-bottom: 0;
}

.hero-actions,
.contact-links,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: flex-start;
}

.hero-actions > *,
.contact-links > *,
.project-actions > * {
  min-width: 0;
  max-width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.125rem;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button:hover,
.button:focus-visible,
.project-nav-item a:hover,
.project-nav-item a:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--bg-ink), var(--bg-ink-soft));
  color: #f7f9fc;
  box-shadow: 0 14px 28px rgba(16, 32, 51, 0.18);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 0 18px 32px rgba(16, 32, 51, 0.24);
}

.button-secondary {
  border-color: rgba(16, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted-strong);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(16, 32, 51, 0.22);
  color: var(--bg-ink);
}

.button-small {
  min-height: 2.75rem;
  padding: 0 1rem;
}

.button-full {
  width: 100%;
}

.hero-meta,
.tag-list,
.mini-contact,
.contact-list {
  padding: 0;
  list-style: none;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.8rem 0 0;
}

.hero-meta li,
.tag-list li {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.2rem 0.8rem;
  border: 1px solid rgba(16, 32, 51, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(251, 252, 253, 0.98);
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 600;
}

.project-grid,
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-card,
.about-panel,
.contact-card {
  border-radius: var(--radius-lg);
}

.project-card {
  overflow: hidden;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.project-card:hover,
.project-card:focus-within,
.about-panel:hover,
.related-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.project-art {
  display: flex;
  align-items: flex-end;
  min-height: 152px;
  padding: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.project-art span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.15rem;
  min-height: 4.15rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
  color: var(--bg-ink);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 18px rgba(16, 32, 51, 0.12);
}

.art-churn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #20394f, #2b4c6b 54%, #7690aa);
}

.art-urban {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #22354a, #315673 56%, #8aa0b6);
}

.art-housing {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #2c3f52, #536a79 58%, #9da9b0);
}

.art-sql {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #163748, #276179 56%, #6b9db6);
}

.art-coursework {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #2a3442, #44556b 56%, #90a0b0);
}

.project-body,
.about-panel,
.contact-card,
.detail-section,
.sidebar-panel,
.readme-card,
.snippet-card,
.related-card {
  padding: 1.45rem;
}

.project-body h3 {
  margin-bottom: 0.65rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 1.25rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted-strong);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.project-link::after {
  content: "->";
}

.focus-grid,
.detail-main-stack,
.sidebar-stack,
.readme-grid,
.snippet-grid,
.related-grid,
.visual-grid,
.fact-grid,
.step-grid,
.signal-grid,
.connection-grid,
.compact-card-grid {
  display: grid;
  gap: 1rem;
}

.focus-card,
.fact-card,
.step-card,
.signal-card,
.visual-card,
.project-nav-item a {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(251, 252, 253, 0.98);
}

.focus-card,
.fact-card,
.step-card,
.signal-card {
  padding: 1rem;
}

.focus-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 1rem;
}

.focus-card span {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  align-items: flex-start;
}

.contact-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  width: 100%;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(251, 252, 253, 0.98);
}

.contact-list a,
.contact-value {
  color: var(--muted-strong);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.project-page {
  display: grid;
  gap: 1.5rem;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.8fr);
  gap: 1.25rem;
  padding: clamp(1.45rem, 3vw, 2.2rem);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 253, 0.98));
}

.detail-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-hero h1 {
  max-width: 15ch;
  font-size: clamp(2.45rem, 4.8vw, 4.1rem);
  text-wrap: balance;
}

.detail-deck {
  max-width: 46rem;
  margin-bottom: 1rem;
  font-size: 1.06rem;
  line-height: 1.8;
}

.summary-callout {
  margin-bottom: 1.25rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(250, 252, 253, 0.98);
}

.summary-callout p:last-child,
.signal-card p:last-child,
.visual-copy p:last-child,
.snippet-copy p:last-child,
.readme-card p:last-child,
.related-card p:last-child,
.sidebar-panel p:last-of-type,
.contact-card p:last-child {
  margin-bottom: 0;
}

.detail-hero-card {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-xl) - 6px);
  background: rgba(251, 252, 253, 0.98);
}

.fact-card {
  background: rgba(255, 255, 255, 0.94);
}

.fact-label {
  margin-bottom: 0.2rem;
}

.fact-value,
.signal-value {
  margin: 0;
  color: var(--bg-ink);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.35;
}

.detail-tech-stack .tag-list {
  margin-bottom: 0;
}

.detail-grid {
  display: grid;
  gap: 1.25rem;
}

.quickscan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1rem;
}

.quickscan-panel {
  min-width: 0;
}

.quick-fact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finding-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finding-list li,
.connection-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(251, 252, 253, 0.98);
}

.table-wrap {
  overflow-x: auto;
}

.mapping-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(251, 252, 253, 0.98);
}

.mapping-table th,
.mapping-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.mapping-table thead th {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(236, 244, 251, 0.88);
}

.mapping-table tbody th {
  width: 28%;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.88);
}

.mapping-table tbody tr:last-child th,
.mapping-table tbody tr:last-child td {
  border-bottom: 0;
}

.connection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.connection-card h3 {
  margin-bottom: 0.55rem;
}

.connection-card p:last-of-type {
  margin-bottom: 0.95rem;
}

.compact-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compact-signal-card {
  height: 100%;
}

.detail-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.75;
}

.detail-list li + li {
  margin-top: 0.55rem;
}

.section-copy-tight {
  margin-bottom: 1rem;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.8rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.signal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-nav-list {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.project-nav-item a {
  display: block;
  padding: 0.9rem 1rem;
  color: var(--muted-strong);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.project-nav-item.is-current-page a {
  border-color: rgba(28, 79, 131, 0.26);
  background: rgba(236, 244, 251, 0.9);
  color: var(--bg-ink);
}

.snippet-card {
  overflow: hidden;
  padding: 0;
}

pre {
  max-width: 100%;
}

.snippet-copy {
  padding: 1.35rem 1.35rem 0.95rem;
}

.visual-grid,
.related-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-card {
  margin: 0;
  overflow: hidden;
}

.visual-frame {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafcfe, #f3f7fb);
}

.mini-contact {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.mini-contact li {
  color: var(--muted-strong);
  font-weight: 500;
}

.visual-image {
  width: 100%;
  border: 1px solid rgba(16, 32, 51, 0.08);
  border-radius: var(--radius-sm);
  background: #fff;
}

.visual-copy {
  padding: 1rem 1.1rem 1.1rem;
}

.readme-card {
  border-radius: var(--radius-md);
}

.related-section {
  margin-top: 0;
}

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

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

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

.invisible {
  visibility: hidden;
}

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media only screen and (max-width: 1080px) {
  .hero,
  .detail-hero,
  .contact-card,
  .signal-grid,
  .quickscan-grid {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .about-grid,
  .visual-grid,
  .related-grid,
  .connection-grid {
    grid-template-columns: 1fr;
  }
}

@media only screen and (max-width: 900px) {
  .hero-actions,
  .contact-links,
  .project-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  }

  .project-link {
    justify-content: center;
    min-height: 3.125rem;
    padding: 0.7rem 0.95rem;
    border: 1px solid rgba(16, 32, 51, 0.12);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.8);
  }
}

@media only screen and (max-width: 760px) {
  .page-shell {
    padding:
      max(0.75rem, env(safe-area-inset-top))
      calc(0.875rem + env(safe-area-inset-right))
      max(2.5rem, calc(env(safe-area-inset-bottom) + 1.5rem))
      calc(0.875rem + env(safe-area-inset-left));
  }

  .site-header {
    top: max(0.35rem, env(safe-area-inset-top));
    gap: 0.85rem;
    padding: 0.85rem;
  }

  .site-header,
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.5rem;
  }

  .site-nav a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(251, 252, 253, 0.98);
  }

  .hero-copy,
  .hero-card,
  .project-body,
  .about-panel,
  .contact-card,
  .detail-hero,
  .detail-section,
  .sidebar-panel,
  .readme-card,
  .related-card {
    padding: 1.1rem;
  }

  .project-grid,
  .about-grid,
  .visual-grid,
  .related-grid,
  .quick-fact-grid,
  .connection-grid {
    grid-template-columns: 1fr;
  }

  .profile-frame {
    min-height: 280px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }

  .detail-hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  h2 {
    max-width: none;
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .hero-actions,
  .contact-links,
  .project-actions {
    align-items: stretch;
  }

  .button,
  .button-small,
  .button-full {
    width: 100%;
  }

  .project-link {
    width: 100%;
    box-sizing: border-box;
  }

  pre {
    padding: 0.9rem 1rem;
  }

  pre code {
    font-size: 0.84rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-meta,
  .tag-list {
    gap: 0.5rem;
  }

  .hero-meta li,
  .tag-list li {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }

  .contact-list li {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header {
    background: #ffffff;
  }
}

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
