/* ============================================
   Ethernet Cable Termination - Multimedia Project
   Style matched to christiesaavedra.com
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Light theme — refined palette per instructor feedback */
  --bg-primary: #fdfcfa;
  --bg-secondary: #f5f3ee;
  --bg-card: #ffffff;
  --bg-card-hover: #faf8f3;
  --text-primary: #1a202c;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #0f766e;
  --accent-dim: rgba(15, 118, 110, 0.08);
  --accent-border: rgba(15, 118, 110, 0.25);
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --success: #15803d;
  --error: #b91c1c;
  --warning: #b45309;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 900px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ---- Navigation ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav .nav-inner {
  width: 100%;
  max-width: 1100px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

nav .nav-brand span {
  color: var(--accent);
}

nav .nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

nav .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

nav .nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

/* ---- Hero Section ---- */
.hero {
  margin-top: var(--nav-height);
  padding: 80px 24px 60px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.05) 0%, transparent 60%);
}

.hero-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  font-weight: 400;
}

/* ---- Main Content ---- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ---- Section Headings ---- */
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 8px;
}

h2 {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.25;
}

h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  line-height: 1.3;
}

p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

p + h2, p + h3 {
  margin-top: 36px;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-light);
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 24px 0;
}

.card-grid > .card {
  flex: 0 1 calc(50% - 10px);
  min-width: 300px;
  margin-bottom: 0;
}

/* ---- Images ---- */
.content-image {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 24px 0;
}

.image-caption {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: -16px;
  margin-bottom: 24px;
  font-style: italic;
}

/* ---- Audio Player ---- */
.audio-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.audio-block .audio-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-block audio {
  width: 100%;
  height: 40px;
  border-radius: 8px;
}

/* ---- Interactive Containers ---- */
.interactive-section {
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  padding: 32px;
  margin: 32px 0;
}

.interactive-section .interactive-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: #115e59;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.btn-reset {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 13px;
  padding: 8px 16px;
}

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

/* ---- Callout Boxes ---- */
.callout {
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
  border-left: 3px solid;
}

.callout-info {
  background: rgba(15, 118, 110, 0.07);
  border-color: var(--accent);
}

.callout-warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: var(--warning);
}

.callout-warning .callout-title {
  color: var(--warning);
}

.callout-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.callout p {
  font-size: 14px;
  margin-bottom: 0;
}

/* ---- Steps ---- */
.step {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.step-content h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.step-content p {
  font-size: 16px;
  margin-bottom: 12px;
}
.step-content p:last-child { margin-bottom: 0; }

.step-actions {
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
  border-left: 2px solid var(--accent-border);
  padding-left: 16px;
}
.step-actions li {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.55;
  position: relative;
}
.step-actions li::before {
  content: "▸";
  color: var(--accent);
  position: absolute;
  left: -16px;
  top: 0;
  font-size: 13px;
}
.step-actions li:last-child { margin-bottom: 0; }

.wire-sequence {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(15, 118, 110, 0.09);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ---- Video Container ---- */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---- Page Nav (prev/next) ---- */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
  flex: 1;
}

.page-nav a:hover {
  border-color: var(--accent-border);
  background: var(--bg-card-hover);
}

.page-nav a .nav-direction {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.page-nav a .nav-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.page-nav a:last-child {
  text-align: right;
}

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ---- Lists ---- */
ul, ol {
  margin: 12px 0 20px 24px;
  color: var(--text-secondary);
}

li {
  margin-bottom: 8px;
  font-size: 15px;
}

/* ---- Links ---- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #115e59;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Responsive ---- */

/* Nav collapses to hamburger at 900px (6 links overflow below this) */
@media (max-width: 900px) {
  .nav-links {
    display: none !important;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
  }

  .nav-links.open {
    display: flex !important;
  }

  .nav-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 20px 40px;
  }

  main {
    padding: 32px 20px 60px;
  }

  .card-grid > .card {
    flex: 1 1 100%;
    min-width: 0;
  }

  .step {
    flex-direction: column;
    gap: 12px;
  }

  .page-nav {
    flex-direction: column;
  }

  .interactive-section {
    padding: 20px;
  }
}
