/* ==========================================================================
   Ethan Miller — Video Editor Portfolio
   Faithful recreation of the original Wix site: white background, black
   ink, thin gray nav, circular portrait, underline form fields.
   ========================================================================== */

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

:root {
  --bg: #ffffff;
  --ink: #141414;
  --ink-soft: #7a7a7a;
  --ink-faint: #b5b5b5;
  --line: #e2e2e2;
  --line-strong: #141414;
  --font: 'Poppins', -apple-system, sans-serif;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: #fff; }

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

/* ---------- Header ---------- */
header.site-head {
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 40px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand .mark { width: 46px; height: 46px; flex-shrink: 0; }
.brand .mark circle.outer { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.brand .mark circle.dot { fill: var(--ink); }
.brand .text { display: flex; flex-direction: column; line-height: 1.25; }
.brand .name { font-size: 20px; font-weight: 600; letter-spacing: 0.03em; color: var(--ink); }
.brand .role { font-size: 16px; font-weight: 300; color: var(--ink-soft); }

nav.primary { display: flex; align-items: center; gap: 34px; }
nav.primary a {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
nav.primary a:hover, nav.primary a:focus-visible { color: var(--ink); }
nav.primary a.active { color: var(--ink-faint); }

.socials { display: flex; gap: 16px; align-items: center; }
.socials a {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: all 0.2s ease;
}
.socials a:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.socials svg { width: 14px; height: 14px; }

.menu-toggle {
  display: none;
  background: none; border: 1px solid var(--line); color: var(--ink);
  border-radius: 4px; padding: 8px 12px; font-family: var(--font); font-size: 12px;
}

@media (max-width: 880px) {
  nav.primary { display: none; }
  .menu-toggle { display: inline-flex; }
  nav.primary.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 40px 20px;
    z-index: 50;
  }
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Shared page scaffolding ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 40px; }

/* ---------- About page ---------- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
  padding: 72px 0 64px;
}
.about-intro p {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  max-width: 560px;
}
.portrait {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  background: #eee;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

.about-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding: 24px 0 80px;
}
.about-cols h3 {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--ink);
}
.about-cols p {
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 900px) {
  .about-intro { grid-template-columns: 1fr; }
  .portrait { max-width: 320px; margin: 0 auto; }
  .about-cols { grid-template-columns: 1fr; }
}

/* ---------- Reel page ---------- */
.reel-frame {
  margin: 56px 0 80px;
  width: 100%;
  aspect-ratio: 16/9;
  background: #c9c9c9 url('images/reel-thumb.jpg') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.reel-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.reel-frame .cover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
}
.reel-frame .cover .title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 56px);
  color: #1c4b56;
  text-align: center;
  line-height: 1.2;
}
.play-btn {
  width: 62px; height: 62px; border-radius: 50%;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(0,0,0,0.15);
  cursor: pointer;
}
.play-btn svg { width: 20px; height: 20px; margin-left: 3px; }

/* ---------- Projects page ---------- */
.project-hero {
  margin: 56px 0 80px;
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
}
.project-hero img, .project-hero video { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-links {
  position: absolute;
  left: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.project-links a {
  font-size: 20px;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.project-links a:hover { color: #ccc; }
.project-links .slash { color: #fff; opacity: 0.7; }

.subpage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 4px;
  margin-bottom: 80px;
}
.subpage-grid .card { aspect-ratio: 4/3; background: #e6e6e6; overflow: hidden; }
.subpage-grid .card img { width: 100%; height: 100%; object-fit: cover; }
.back-link { display: inline-block; margin: 40px 0 0; font-size: 14px; color: var(--ink-soft); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.back-link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Video showcase — horizontal scroll carousel ---------- */
.vscroll {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 8px 8px 28px;
  margin: 0 -8px 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-faint) transparent;
}
.vscroll::-webkit-scrollbar { height: 8px; }
.vscroll::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 4px; }
.vscroll::-webkit-scrollbar-track { background: transparent; }

.vcard {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: min(78vw, 780px);
  scroll-snap-align: start;
}
.vcard-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
}
.vcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.vcard-media .play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.15);
  transition: background 0.2s ease;
}
.vcard-media:hover .play-overlay { background: rgba(0,0,0,0.32); }
.vcard-media .play-overlay .ring {
  width: 74px; height: 74px; border-radius: 50%;
  border: 2px solid #fff; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.vcard-media .play-overlay .ring svg { width: 26px; height: 26px; margin-left: 3px; }
.vcard-media .source-tag {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,0.55);
  padding: 5px 10px;
}
.vcard-title { font-size: 21px; font-weight: 500; color: var(--ink); margin: 20px 0 8px; }
.vcard-desc {
  font-size: 14.5px; color: var(--ink-soft); font-weight: 300;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.vcard.instagram .vcard-media .play-overlay .ring { border-color: #fff; }

.vscroll-hint {
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: -8px 0 32px;
}

@media (max-width: 780px) {
  .vcard { width: 88vw; }
}

/* ---------- Photo showcase — horizontal scroll carousel ---------- */
.pscroll-hint {
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 20px;
}
.pscroll {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 8px 8px 28px;
  margin: 0 -8px 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-faint) transparent;
}
.pscroll::-webkit-scrollbar { height: 8px; }
.pscroll::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 4px; }
.pscroll::-webkit-scrollbar-track { background: transparent; }

.pcard {
  flex: 0 0 auto;
  height: 78vh;
  max-height: 720px;
  scroll-snap-align: start;
  background: #eee;
}
.pcard img { height: 100%; width: auto; max-width: none; display: block; }

@media (max-width: 780px) {
  .pcard { height: 62vh; }
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: 64px 0 80px;
}
form.contact-form { display: flex; flex-direction: column; gap: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field label { font-size: 15px; color: var(--ink); font-weight: 400; }
.field input, .field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  padding: 6px 2px;
  border-radius: 0;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-width: 2px; }
.submit-btn {
  align-self: flex-start;
  margin-top: 8px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 38px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.submit-btn:hover { opacity: 0.8; }
.form-note { font-size: 12px; color: var(--ink-faint); }

.map-embed { width: 100%; height: 100%; min-height: 460px; background: #222; border: 0; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-row {
  max-width: var(--max); margin: 0 auto;
  padding: 24px 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--ink-faint);
}
