/* Travlr Getaways / CS-499 ePortfolio — single stylesheet, no build step */

:root {
  --color-bg: #f7f9fa;
  --color-surface: #ffffff;
  --color-text: #1b2430;
  --color-text-muted: #4a5563;
  --color-accent: #0b6e73;
  --color-accent-dark: #084f53;
  --color-border: #d9e0e3;
  --color-focus: #1b8a91;
  --max-width: 950px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(15, 30, 35, 0.08), 0 1px 2px rgba(15, 30, 35, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent-dark);
}

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

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

/* Header */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 1.25rem;
}

.site-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.9rem;
}

.site-header .subtitle {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

p.site-title-link {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.site-title-link a,
a.site-title-link {
  color: var(--color-text);
  text-decoration: none;
}

.site-title-link a:hover,
a.site-title-link:hover {
  color: var(--color-accent);
}

/* Sticky nav */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-accent-dark);
  border-bottom: 1px solid var(--color-border);
}

.site-nav ul {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.75rem 0.1rem;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-bottom-color: #ffffff;
}

/* Main / sections */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 4rem;
}

section > h2 {
  font-size: 1.6rem;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
  color: var(--color-accent-dark);
}

h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
}

.narrative-body p,
.narrative-body li {
  max-width: 72ch;
}

.narrative-body h2:first-of-type,
.narrative-body > p:first-of-type {
  margin-top: 0;
}

/* References */

.references p {
  padding-left: 2rem;
  text-indent: -2rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Video / code review */

.video-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-meta {
  margin-top: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Figures / before-after pairs */

.figure-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.figure-pair figure {
  flex: 1 1 280px;
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

figure.single {
  max-width: 480px;
  margin: 1.5rem 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.figure-pair figure img,
figure.single img {
  width: 100%;
}

figcaption {
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

/* Enhancement links list */

.enhancement-links {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.enhancement-links li {
  font-size: 0.98rem;
}

/* Architecture */

.diagram-link {
  display: inline-block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--color-surface);
}

/* Alignment table */

details.alignment {
  margin-top: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

details.alignment summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  color: var(--color-accent-dark);
}

details.alignment summary:hover {
  color: var(--color-accent);
}

.table-scroll {
  overflow-x: auto;
  padding: 0 1.1rem 1.1rem;
}

table.alignment-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 700px;
  font-size: 0.9rem;
}

table.alignment-table th,
table.alignment-table td {
  border: 1px solid var(--color-border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

table.alignment-table th {
  background: var(--color-bg);
  font-weight: 600;
}

table.alignment-table td:first-child {
  text-align: center;
  width: 2.5rem;
}

/* Cards (more.html) */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card a.card-link {
  font-weight: 600;
  text-decoration: none;
}

.card a.card-link:hover {
  text-decoration: underline;
}

/* Narrative pages */

.lead-in {
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: -0.5rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-footer .footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .site-header .header-inner {
    padding: 1.5rem 1rem 1rem;
  }

  main {
    padding: 2rem 1rem 2.5rem;
  }
}

/* Live test section — the first thing on the page, holding the two
   links to the running application on its public server. */
.live-demo {
  background: var(--color-accent);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}

.live-demo h2 {
  color: #ffffff;
  margin-top: 0;
  border: 0;
}

.live-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.1rem 0 0.9rem;
}

.live-button {
  display: inline-block;
  background: #ffffff;
  color: var(--color-accent-dark);
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.live-button:hover,
.live-button:focus {
  background: #eef7f7;
  text-decoration: underline;
}

.live-note {
  font-size: 0.92rem;
  margin-bottom: 0;
  color: #e4f2f2;
}
