/* ==========================================================================
   Video-editor portfolio — demo stylesheet
   No build step, no framework: plain CSS using Grid + Flexbox + a mobile-
   first media query, plus the modern `aspect-ratio` property for the
   responsive video embed. See ../../002_static_html_with_claude_code.md
   for why these choices were made.
   ========================================================================== */

:root {
  --bg: #0b0d12;
  --bg-raised: #151923;
  --text: #f2f4f8;
  --text-muted: #a8afbd;
  --accent: #ffb648;
  --accent-text: #1a1204;
  --border: #262c3a;
  --focus-ring: #7fb2ff;
  --max-width: 72rem;
  --radius: 0.75rem;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

/* Light-mode palette — the dark theme above is the default (most video
   portfolios lean dark to make thumbnails/video pop); this override
   follows the visitor's OS/browser preference when it's set to light. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8;
    --bg-raised: #ffffff;
    --text: #14171c;
    --text-muted: #545c6a;
    --accent: #92400e;
    --accent-text: #fff8f0;
    --border: #d7dbe3;
    --focus-ring: #1d4ed8;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
}

img, iframe {
  max-width: 100%;
}

/* Fluid type scale so headings don't need separate mobile/desktop rules */
h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
p, li { font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem); color: var(--text-muted); }

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

/* Visible keyboard-focus indicator — required for WCAG 2.2 (2.4.11/2.4.7) */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* Skip link: hidden until keyboard-focused, then jumps past the nav */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---- Header / nav --------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgb(11 13 18 / 92%);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.site-title {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  font-size: 1.15rem;
}

/* mo-media branding: the homepage's header title only (not the sub-page's
   matching link) is shown in red. Scoped to this one class so no other
   link text on the site is affected. */
.site-header .site-title-home {
  color: #d92525;
}

.nav-toggle {
  display: inline-flex;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /*color: var(--text);*/
  color: #d92525;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
}

.site-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav.is-open {
  display: flex;
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
}

.site-nav a {
  padding: 0.6rem 0.25rem;
  text-decoration: none;
  color: var(--text);
}

@media (min-width: 48rem) {
  .nav-toggle { display: none; }
  .site-nav,
  .site-nav.is-open {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 1.5rem;
    background: none;
    border: none;
    padding: 0;
  }
}

/* ---- Hero ------------------------------------------------------------ */

.hero {
  padding-block: clamp(3rem, 6vw, 6rem);
  border-bottom: 1px solid var(--border);
}

.hero p {
  max-width: 40rem;
}

.button {
  display: inline-block;
  margin-top: 1.5rem;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
}

/* ---- Portfolio grid ---------------------------------------------------
   auto-fill + minmax means the number of columns adjusts on its own —
   no separate breakpoints needed for 1 / 2 / 3-column layouts. */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.5rem;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
}

.project-thumb {
  aspect-ratio: 16 / 9;
  /* Placeholder gradient stands in for a real thumbnail image/poster frame.
     Colour is fixed (not a --text-muted variable) because this background
     stays dark in both light and dark mode. */
  background: linear-gradient(135deg, #2a3350, #171a24);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c7ccd6;
  font-size: 0.85rem;
}

.project-card .project-info {
  padding: 1rem 1.1rem 1.25rem;
}

.project-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-top: 0.4rem;
}

/* ---- Section shared spacing ------------------------------------------ */

section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--border);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
}

.skills-list li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
}

/* ---- Responsive video embed (template page) ---------------------------
   `aspect-ratio` is the current recommended technique, replacing the old
   "padding-bottom percentage hack". See 002_static_html_with_claude_code.md
   for the source. */

.video-wrap {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

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

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-block: 1.5rem;
  padding: 0;
  list-style: none;
}

.project-meta dt {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-meta dd {
  margin: 0;
  font-weight: 600;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.site-footer {
  padding-block: 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Respect users who've asked for less motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
