/* Fab Academy personal site — shared styles */

:root {
  --bg: #0c0f12;
  --bg-card: #151a21;
  --border: #2a3444;
  --text: #e8edf4;
  --muted: #8b9bb0;
  --accent: #3ddc84;
  --accent-dim: #2bb86a;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 220, 132, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 220, 132, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.site-header {
  text-align: center;
  margin-bottom: clamp(2rem, 6vw, 4rem);
}

.site-header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tagline strong {
  color: var(--accent);
  font-weight: 600;
}

/* Home: three panels */
.panels {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  max-width: 1100px;
  width: 100%;
}

@media (max-width: 820px) {
  .panel-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

.panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  min-height: 220px;
}

.panel:hover,
.panel:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(61, 220, 132, 0.25);
  outline: none;
}

.panel-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

.panel-cta {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Home page: industrial gear style */
.home-page {
  background:
    radial-gradient(circle at 20% 12%, rgba(181, 190, 202, 0.18), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(147, 157, 169, 0.16), transparent 28%),
    linear-gradient(145deg, #0f1218 0%, #141922 42%, #0c1016 100%);
}

.home-page::before {
  background-image:
    linear-gradient(rgba(180, 192, 205, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 192, 205, 0.05) 1px, transparent 1px),
    repeating-linear-gradient(
      25deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 2px,
      transparent 2px,
      transparent 9px
    );
  background-size:
    56px 56px,
    56px 56px,
    20px 20px;
}

.home-page .site-header h1 {
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.home-page .tagline strong {
  color: #d2dae4;
}

.home-page .panel-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1080px;
  gap: 0;
  padding: 1.2rem 0.8rem 0.8rem;
  position: relative;
}

.home-page .panel-grid::before {
  content: "";
  position: absolute;
  width: min(86vw, 860px);
  height: min(34vw, 300px);
  border-radius: 999px;
  background:
    radial-gradient(circle at 25% 50%, rgba(154, 166, 178, 0.2), transparent 36%),
    radial-gradient(circle at 50% 48%, rgba(154, 166, 178, 0.2), transparent 38%),
    radial-gradient(circle at 75% 50%, rgba(154, 166, 178, 0.2), transparent 36%);
  filter: blur(12px);
  z-index: -1;
}

@media (max-width: 820px) {
  .home-page .panel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    max-width: 600px;
    padding: 0;
  }
}

.gear-panel {
  --gear-speed: 18s;
  --gear-rotation: spin-clockwise;
  --gear-image: url("images/gears/gear-web-1.svg");
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  aspect-ratio: 1 / 1;
  width: clamp(300px, 34vw, 390px);
  border-radius: 50%;
  border: 1px solid rgba(218, 227, 238, 0.18);
  overflow: visible;
  padding: 0;
  background: radial-gradient(circle at center, rgba(20, 26, 34, 0.35), rgba(5, 8, 12, 0.75) 70%);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.52),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -10px 16px rgba(0, 0, 0, 0.35);
}

.gear-rotor {
  position: absolute;
  inset: -10%;
  animation: var(--gear-rotation) var(--gear-speed) linear infinite;
  z-index: 1;
}

.gear-rotor::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--gear-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter:
    drop-shadow(0 10px 12px rgba(0, 0, 0, 0.48))
    contrast(1.16)
    saturate(0.72)
    brightness(0.96);
}

.gear-panel::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(247, 251, 255, 0.88), rgba(122, 133, 145, 0.82) 62%, rgba(45, 52, 61, 0.95) 100%);
  border: 1px solid rgba(240, 246, 255, 0.36);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.48),
    inset 0 -3px 8px rgba(0, 0, 0, 0.58);
  z-index: 2;
}

.gear-edge-svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: visible;
}

.gear-edge-text {
  fill: #e6ecf5;
  font-family: var(--font-mono);
  font-size: 4.8px;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.gear-edge-text textPath {
  dominant-baseline: middle;
  text-anchor: middle;
  baseline-shift: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.gear-content {
  position: relative;
  z-index: 4;
  width: 42%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding: 0.2rem;
  background: radial-gradient(circle at 40% 30%, rgba(248, 252, 255, 0.95), rgba(174, 186, 198, 0.82) 60%, rgba(72, 82, 94, 0.95) 100%);
  border: 1px solid rgba(236, 243, 252, 0.48);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -6px 10px rgba(0, 0, 0, 0.45);
}

.gear-center-logo {
  width: 88%;
  height: 88%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(232, 240, 248, 0.8);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.gear-center-mark {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42%;
  aspect-ratio: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gear-center-letter {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    contrast(1.1)
    saturate(0.95)
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
}

.gear-center-letter--f {
  object-position: 50% 50%;
  transform: scale(1.12);
}

.gear-center-letter--a {
  object-position: 50% 50%;
  transform: scale(1.16);
}

.gear-center-letter--b {
  object-position: 50% 50%;
  transform: scale(1.12);
}

.gear-center-fallback {
  display: none;
}

.gear-panel:hover,
.gear-panel:focus-visible {
  border-color: rgba(229, 237, 246, 0.52);
  box-shadow:
    0 34px 65px rgba(0, 0, 0, 0.62),
    inset 0 2px 4px rgba(255, 255, 255, 0.45),
    inset 0 -12px 18px rgba(0, 0, 0, 0.56);
}

.gear-panel--counter {
  --gear-rotation: spin-counterclockwise;
  --gear-speed: 16s;
}

.gear-panel--slow {
  --gear-speed: 22s;
}

.gear-panel--one {
  --gear-image: url("images/gears/gear-web-1.svg");
  transform: translate(20px, -16px);
  z-index: 2;
}

.gear-panel--two {
  --gear-image: url("images/gears/gear-web-1.svg");
  transform: translate(0, 10px);
  margin-left: -36px;
  margin-right: -36px;
  z-index: 4;
}

.gear-panel--three {
  --gear-image: url("images/gears/gear-web-1.svg");
  transform: translate(-20px, -18px);
  z-index: 3;
}

@media (max-width: 820px) {
  .gear-panel,
  .gear-panel--two {
    width: min(82vw, 390px);
  }

  .gear-panel--one,
  .gear-panel--two,
  .gear-panel--three {
    transform: none;
    margin: 0 auto;
  }
}

@keyframes spin-clockwise {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-counterclockwise {
  to {
    transform: rotate(-360deg);
  }
}

.site-footer {
  margin-top: auto;
  padding-top: 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* Inner pages */
.content-page .page-wrap {
  max-width: 1008px;
  margin: 0 auto;
}

.content-page--wide .page-wrap {
  max-width: 1040px;
}

.back-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
}

.back-nav:hover {
  text-decoration: underline;
}

.content-page main h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.content-page main h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.week-section {
  margin-top: 1.75rem;
}

.week-section:first-of-type {
  margin-top: 1.25rem;
}

.week-section--group {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.week12-integration-photos {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

.week12-integration-photos figure {
  margin: 0;
}

.content-page main .week-section h2 {
  margin-top: 0;
}

.content-page main .week-section > p:first-of-type {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 1rem;
}

.content-page main h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.content-page main h4 {
  margin: 1rem 0 0.4rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.content-page main .lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

.content-page main p {
  margin: 0 0 1rem;
}

.content-page main ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
}

.content-page main li {
  margin-bottom: 0.35rem;
}

.content-page main ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  color: var(--muted);
}

.content-page main ol li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.content-page main a {
  color: var(--accent);
}

.content-page main code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.12em 0.35em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

.content-page main pre {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.content-page main pre code {
  padding: 0;
  background: none;
  border: none;
  font-size: inherit;
}

.content-page main hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

.content-page main blockquote {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  border-left: 3px solid var(--accent-dim);
  background: rgba(61, 220, 132, 0.06);
  color: var(--muted);
  font-size: 0.95rem;
}

.content-page main blockquote p {
  margin: 0;
}

/* About page */
.about-name {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about-name span {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.95em;
}

.about-role {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.45;
}

.about-role-sub {
  display: block;
  margin-top: 0.35rem;
  font-weight: 500;
  font-size: 0.92em;
  color: var(--muted);
}

.about-card {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-checklist {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem;
}

.about-checklist li {
  position: relative;
  padding-left: 1.45rem;
  margin-bottom: 0.65rem;
  color: var(--muted);
}

.about-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.content-page main .table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.content-page main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.content-page main th,
.content-page main td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.content-page main th {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
}

.content-page main tr:last-child td {
  border-bottom: none;
}

.content-page main figure {
  margin: 1.25rem 0 1.75rem;
}

.content-page main figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* Videos are often portrait or square; cap height so they match image scale on the page. */
.content-page main figure video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.content-page main figcaption {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.about-inline-media {
  width: min(100%, 640px);
  margin: 1rem auto 1.4rem;
}

.about-inline-media img {
  width: 100%;
}

.about-inline-media figcaption {
  display: none;
}

.about-photo-note {
  width: min(100%, 640px);
  margin: 0.45rem auto 1.25rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.about-photo-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.about-photo-duo figure {
  margin: 0;
}

.about-photo-duo img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.about-photo-duo figcaption {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .about-photo-duo {
    grid-template-columns: 1fr;
  }
}

.content-hint {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.content-hint code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
}

/* Weekly assignments: 4 columns × 5 rows */
.week-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 2vw, 1.1rem);
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

@media (max-width: 700px) {
  .week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .week-grid {
    grid-template-columns: 1fr;
  }
}

.week-grid a.week-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 132px;
  padding: 1rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.week-grid a.week-tile:hover,
.week-grid a.week-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent-dim);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(61, 220, 132, 0.22);
  outline: none;
}

.week-grid a.week-tile:has(.week-tile-sub) {
  min-height: 156px;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.week-tile-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.week-grid a.week-tile--cover {
  min-height: 156px;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
  border-color: rgba(255, 255, 255, 0.18);
}

.week-grid a.week-tile--cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(7, 10, 14, 0.36) 0%,
    rgba(7, 10, 14, 0.5) 55%,
    rgba(7, 10, 14, 0.64) 100%
  );
}

.week-grid a.week-tile--cover .week-tile-number {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
  letter-spacing: 0.1em;
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  white-space: nowrap;
}

.week-grid a.week-tile--cover .week-tile-title,
.week-grid a.week-tile--cover .week-tile-sub {
  display: none;
}

.week-tile-title {
  margin: 0;
  font-size: clamp(0.82rem, 1.65vw, 0.95rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.35;
  max-width: 14rem;
}

.week-tile-sub {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.3;
  max-width: 11rem;
}

.content-page main .week-tile-sub--inline {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  max-width: none;
}
