/* ==========================================================================
   Cody Van De Mark — portfolio styles
   Dark, techy & minimal. Hand-written, no framework.
   ========================================================================== */

:root {
  /* Color */
  --bg: #0c0f13;
  --surface: #141920;
  --surface-2: #191f27;
  --text: #e7ecf2;
  --text-muted: #8793a3;
  --border: #232a34;
  --accent: #d9a15b;
  --accent-ink: #181008;
  --accent-soft: rgba(217, 161, 91, 0.12);
  --focus-ring: #f0c184;

  /* Type */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  /* Layout */
  --container-w: 1120px;
  --radius: 12px;
  --radius-sm: 8px;
}

/* -------------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; color: var(--text); }
p:last-child { margin-bottom: 0; }

ul { margin: 0; padding: 0; list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* -------------------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------------------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.container--prose { max-width: 720px; }

/* Used for the homepage card-grid sections: grows with the viewport (up to a
   cap) so cards get noticeably bigger on large screens, instead of freezing
   at the same width as every other section once the viewport passes 1120px. */
.container--wide { max-width: 1560px; }

.container--split {
  display: grid;
  gap: 32px;
  align-items: center;
}

.section { padding: 64px 0; }
.section--about { background: var(--surface); }

.section__heading {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

@media (min-width: 800px) {
  .container--split { grid-template-columns: 1.3fr 1fr; }
}

/* -------------------------------------------------------------------------
   Buttons & chips
   ------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
}
.button--primary { background: var(--accent); color: var(--accent-ink); }
.button--primary:hover { background: #e8b371; text-decoration: none; }
.button--ghost { border-color: var(--border); color: var(--text); }
.button--ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 100px;
}

.link-list li { margin-bottom: 8px; }
.link-list a { font-weight: 600; }

/* -------------------------------------------------------------------------
   Header & nav
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 15, 19, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
}
.logo:hover { text-decoration: none; color: var(--accent); }
.logo__dot { color: var(--accent); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  padding: 0;
}
.nav-toggle__box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle__bar {
  width: 18px;
  height: 2px;
  background: var(--text);
  display: block;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px 24px;
}
.site-nav.is-open { display: block; }

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-nav__list a {
  display: block;
  padding: 12px 4px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.site-nav__list a:hover { color: var(--accent); text-decoration: none; }

.site-nav__resume {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    align-items: center;
    gap: 28px;
    background: transparent;
    border: 0;
    padding: 0;
    width: auto;
  }
  .site-nav__list {
    flex-direction: row;
    gap: 28px;
  }
  .site-nav__list a {
    padding: 4px 0;
    border-bottom: 0;
  }
  .site-nav__resume { margin-top: 0; width: auto; }
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero { padding: 88px 0 56px; }
.hero__name {
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.hero__tagline {
  max-width: 56ch;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
}

/* -------------------------------------------------------------------------
   Skills
   ------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.skills-group__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* -------------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .card__media img { transform: scale(1.04); }

.card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: rgba(12, 15, 19, 0.25);
}

.card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card__eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.card__title { font-size: 18px; margin: 0; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--accent); text-decoration: none; }
.card__meta { font-size: 13px; color: var(--text-muted); margin: 0; }
.card .chip-list { margin-top: auto; padding-top: 4px; }

/* -------------------------------------------------------------------------
   Detail pages
   ------------------------------------------------------------------------- */
.detail-hero { padding: 40px 0 48px; border-bottom: 1px solid var(--border); }
.detail-hero--compact { padding-bottom: 24px; }

.detail-hero__grid {
  display: grid;
  gap: 28px;
  align-items: center;
}
.detail-hero__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}
.detail-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero__title { font-size: clamp(28px, 5vw, 40px); margin-bottom: 8px; }
.detail-hero__subtitle { font-size: 17px; color: var(--text-muted); margin-bottom: 10px; }

@media (min-width: 760px) {
  .detail-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (min-width: 1080px) {
  .detail-hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

.highlight-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.highlight {
  display: grid;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.highlight:last-child { border-bottom: 0; padding-bottom: 0; }
.highlight__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
}
.highlight__media img { width: 100%; height: 100%; object-fit: cover; }
.highlight__role {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 4px;
}
.highlight__title { font-size: 19px; margin-bottom: 10px; }

@media (min-width: 700px) {
  .highlight { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 1080px) {
  .highlight { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 24px;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* -------------------------------------------------------------------------
   About page
   ------------------------------------------------------------------------- */
.about-figure { margin: 32px 0; }
.about-figure img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.about-figure figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

.about-teaser__image {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
}
.about-teaser__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-figure__trigger { display: block; width: 100%; }

/* -------------------------------------------------------------------------
   Zoomable images & lightbox
   ------------------------------------------------------------------------- */
button.zoomable {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: zoom-in;
  position: relative;
}
button.zoomable::after {
  content: "🔍";
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(12, 15, 19, 0.78);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}
button.zoomable:hover::after,
button.zoomable:focus-visible::after {
  opacity: 1;
}
@media (hover: none) {
  /* Touch devices: show the affordance without needing a hover state. */
  button.zoomable::after { opacity: 0.85; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  background: rgba(6, 8, 10, 0.92);
}
.lightbox[hidden] { display: none; }
.lightbox__image {
  display: block;
  max-width: min(92vw, 1400px);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.lightbox__caption {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}
.lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

body.lightbox-open { overflow: hidden; }

.favorites { margin: 32px 0; }
.favorites__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 12px;
}

/* -------------------------------------------------------------------------
   Contact form
   ------------------------------------------------------------------------- */
.contact-form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 520px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.form-row input,
.form-row textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
}
.contact-form .button { align-self: flex-start; }
.contact-alt { margin-top: 20px; color: var(--text-muted); font-size: 14px; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  background: var(--surface);
}
.site-footer__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
.site-footer__name { font-family: var(--font-display); font-weight: 700; margin-bottom: 6px; }
.site-footer__tagline { color: var(--text-muted); font-size: 14px; max-width: 40ch; }
.footer-list li { margin-bottom: 6px; }
.footer-list a { color: var(--text); }
.footer-list a:hover { color: var(--accent); }

.site-footer__bottom {
  max-width: var(--container-w);
  margin: 32px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer__bottom a { color: var(--text-muted); }

@media (min-width: 760px) {
  .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
}
