/* ===================================================================
   site.css — michaelrice.github.io
   Blocks: Variables | Shared nav | Homepage | Projects | Resume | Print | Responsive
   =================================================================== */

/* 1. CSS Variables */
:root {
  --color-bg: #0f172a;
  --color-surface: rgba(15, 23, 42, 0.72);
  --color-border: rgba(148, 163, 184, 0.18);
  --color-cyan: #67e8f9;
  --color-text: #f8fafc;
  --color-muted: #cbd5e1;
  --color-dim: #94a3b8;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 2. Shared nav */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

.brand {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav-links a {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 9px 14px;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus {
  border-color: rgba(34, 211, 238, 0.46);
  background: rgba(15, 23, 42, 0.72);
  transform: translateY(-1px);
}

/* 3. Homepage (body.home) */
body.home {
  min-height: 100%;
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.5;
  text-shadow: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(34, 211, 238, 0.20), transparent 26rem),
    radial-gradient(circle at 82% 10%, rgba(129, 140, 248, 0.24), transparent 24rem),
    linear-gradient(135deg, #0f172a 0%, #111827 48%, #0b1120 100%);
}

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

.home a,
.home a:focus,
.home a:hover {
  color: inherit;
}

.home-shell {
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 28px;
  align-items: stretch;
  padding: clamp(56px, 9vw, 116px) 0 34px;
}

.hero-copy,
.profile-card,
.highlights article {
  border: 1px solid var(--color-border);
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(18px);
}

.hero-copy {
  border-radius: 34px;
  padding: clamp(30px, 5vw, 58px);
  background: var(--color-surface);
}

.eyebrow,
.card-label {
  margin: 0 0 18px;
  color: var(--color-cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.275rem, 3.375vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-text {
  max-width: 700px;
  margin: 28px 0 0;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus {
  transform: translateY(-2px);
}

.button.primary {
  color: #06111f;
  background: var(--color-cyan);
  box-shadow: 0 14px 36px rgba(103, 232, 249, 0.24);
}

.button.secondary {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.08);
}

.profile-card {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 30px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.62));
}

.profile-card::before {
  position: absolute;
  inset: auto -40px -64px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
  content: "";
}

.skill-list {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-list li {
  border-radius: 18px;
  padding: 15px 16px;
  color: #e2e8f0;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.58);
}

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.highlights article {
  border-radius: 24px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.highlights span {
  display: block;
  color: #ffffff;
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.highlights p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

/* 4. Projects section (body.home) */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.project-card {
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 24px;
  background: var(--color-surface);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.34);
}

.project-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.project-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.project-tags {
  color: var(--color-dim);
  font-size: 0.8rem;
  font-weight: 600;
}

.project-card p {
  margin: 0 0 14px;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.project-link {
  color: var(--color-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

/* 5. Resume (body.resume) */
body.resume {
  margin: 0;
  background: #f1f5f9;
  font-family: var(--font-sans);
  color: #111827;
  line-height: 1.5;
  text-shadow: none;
}

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

body.resume .site-nav {
  background: #0f172a;
  padding: 14px 24px;
}

.resume-shell {
  width: min(900px, calc(100% - 40px));
  margin: 32px auto 64px;
}

.resume-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: clamp(32px, 5vw, 56px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e2e8f0;
}

.resume-header h1 {
  margin: 0 0 6px;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}

.resume-header p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.print-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: white;
  color: #374151;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 180ms ease;
  white-space: nowrap;
}

.print-btn:hover {
  border-color: var(--color-cyan);
}

.resume-section {
  margin-bottom: 32px;
}

.resume-section h3 {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #0e7490;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resume-section > p {
  margin: 0;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.7;
}

.job {
  margin-bottom: 24px;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 2px;
}

.job-company {
  font-weight: 800;
  font-size: 1rem;
  color: #111827;
}

.job-dates {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
}

.job-title {
  color: #374151;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.job ul {
  margin: 0;
  padding-left: 20px;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.65;
}

.job ul li {
  margin-bottom: 4px;
}

.project-row {
  margin-bottom: 16px;
}

.project-name {
  font-weight: 700;
  color: #111827;
}

.project-desc {
  color: #374151;
  font-size: 0.9rem;
  font-style: italic;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6b7280;
}

.project-links a {
  color: #0e7490;
  font-weight: 600;
  text-decoration: none;
}

.project-links a:hover {
  text-decoration: underline;
}

.talk {
  margin-bottom: 20px;
}

.talk-title {
  font-weight: 700;
  color: #111827;
}

.talk-event {
  font-weight: 400;
  color: #6b7280;
  font-size: 0.875rem;
  margin-left: 8px;
}

.project-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
}

.project-meta a {
  color: #0e7490;
  font-weight: 600;
  text-decoration: none;
}

.project-meta a:hover {
  text-decoration: underline;
}

.talk-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 4px;
  font-size: 0.85rem;
}

.talk-links a {
  color: #0e7490;
  font-weight: 600;
  text-decoration: none;
}

.talk-links a:hover {
  text-decoration: underline;
}

.skills-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.8;
}

/* 6. Print */
@media print {
  body.resume {
    background: white;
  }

  body.resume .site-nav,
  body.resume .print-btn {
    display: none;
  }

  .resume-shell {
    width: 100%;
    margin: 0;
  }

  .resume-content {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  @page {
    margin: 1.5cm;
  }
}

/* 7. Responsive */
@media (max-width: 840px) {
  .home-shell {
    width: min(100% - 28px, 640px);
    padding-top: 18px;
  }

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

  .nav-links {
    justify-content: flex-start;
  }

  .hero,
  .highlights,
  .projects {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 38px;
  }
}

@media (max-width: 520px) {
  .nav-links,
  .actions {
    width: 100%;
  }

  .nav-links a,
  .button {
    flex: 1 1 auto;
  }

  .hero-copy,
  .profile-card,
  .highlights article,
  .project-card {
    border-radius: 24px;
  }

  body.resume .site-nav {
    flex-direction: column;
    gap: 12px;
  }

  .resume-header {
    flex-direction: column;
  }
}
