/* =========================================================
   Keven Valdez — Marketing Portfolio
   Clean, minimal, image-first.
   ========================================================= */

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --placeholder: #f2f2f0;
  --accent: #1a4fd1; /* matches the blue on Keven's resume */

  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 6px;
}

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

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

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

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--bg); padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.logo { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 15px; color: var(--muted); transition: color .2s; }
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }

.menu-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  font: inherit; font-size: 15px; color: var(--text);
}

@media (max-width: 640px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 10px 0; font-size: 18px; color: var(--text); }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(32px, 4vw, 56px); }
.hero h1 {
  font-size: clamp(28px, 3.6vw, 44px);
  max-width: 24ch;
}
.hero h1 .soft { color: var(--muted); }
.hero p.lede {
  margin-top: 16px;
  max-width: 60ch;
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--muted);
}

/* ---------- Section labels ---------- */
.section-label {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); margin-bottom: 24px;
}

/* ---------- Work grid ---------- */
.work { padding-bottom: clamp(64px, 10vw, 140px); }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px) clamp(16px, 2.5vw, 32px);
}
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }

.card { display: block; }
.card .media { aspect-ratio: 4 / 3; }
.card h3 { font-size: 20px; margin-top: 16px; }
.card .meta { font-size: 15px; color: var(--muted); margin-top: 2px; }
.card:hover img { transform: scale(1.025); }

/* ---------- Media + placeholder ---------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--placeholder);
}
.media img, .media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
/* Shown when the image file hasn't been uploaded yet */
.media.is-empty::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; text-align: center;
  font-size: 13px; color: #9a9a96; letter-spacing: 0.02em;
}

/* ---------- Project page ---------- */
.project-hero { padding: clamp(48px, 9vw, 120px) 0 clamp(32px, 5vw, 56px); }
.back { font-size: 15px; color: var(--muted); display: inline-block; margin-bottom: 32px; }
.back:hover { color: var(--text); }
.project-hero h1 { font-size: clamp(34px, 5vw, 60px); max-width: 20ch; }
.project-hero .summary {
  margin-top: 24px; max-width: 60ch; color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
}

.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px; padding: 28px 0; margin: 40px 0 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts dt { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 16px; }
@media (max-width: 720px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cover { margin: clamp(32px, 5vw, 56px) 0; }
.cover .media { aspect-ratio: 16 / 9; }

.text-block {
  display: grid; grid-template-columns: 1fr 2fr; gap: 32px;
  padding: clamp(40px, 6vw, 80px) 0;
}
.text-block h2 { font-size: 22px; }
.text-block p { color: #333; max-width: 64ch; }
@media (max-width: 720px) { .text-block { grid-template-columns: 1fr; gap: 12px; } }

.gallery { display: grid; gap: clamp(16px, 2.5vw, 32px); margin-bottom: clamp(16px, 2.5vw, 32px); }
.gallery.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery .media { aspect-ratio: 4 / 5; }
.gallery.wide .media { aspect-ratio: 16 / 9; }
@media (max-width: 720px) { .gallery.two { grid-template-columns: 1fr; } }

.results {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  padding: clamp(40px, 6vw, 80px) 0;
}
.results .num { font-size: clamp(36px, 5vw, 56px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.results .label { color: var(--muted); font-size: 15px; margin-top: 8px; }
@media (max-width: 720px) { .results { grid-template-columns: 1fr; } }
.results--text .num { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.02em; color: var(--accent); }
.results .num { color: var(--accent); }
.inline-link { color: var(--accent); border-bottom: 1px solid currentColor; }
.inline-link:hover { opacity: .75; }

.next-project {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 40px 0; border-top: 1px solid var(--line);
  font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.02em;
}
.next-project span { font-size: 15px; color: var(--muted); letter-spacing: 0; }
.next-project:hover .arrow { transform: translateX(6px); }
.arrow { display: inline-block; transition: transform .25s; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); padding: clamp(48px, 9vw, 120px) 0; }
.about .media { aspect-ratio: 4 / 5; }
.about h1 { font-size: clamp(32px, 4.4vw, 52px); margin-bottom: 28px; }
.about p { color: #333; max-width: 60ch; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

.list-cols {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
  padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--line);
}
.list-cols ul { list-style: none; padding: 0; margin: 0; }
.list-cols li { padding: 4px 0; }
.list-cols li small { color: var(--muted); display: block; font-size: 14px; }
@media (max-width: 1000px) { .list-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .list-cols { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 100px) 0 40px; }
.site-footer h2 { font-size: clamp(28px, 4vw, 48px); max-width: 16ch; }
.site-footer .email {
  display: inline-block; margin-top: 20px; font-size: clamp(18px, 2vw, 22px); color: var(--accent);
  border-bottom: 1px solid currentColor;
}
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 64px; font-size: 14px; color: var(--muted);
}
.footer-bottom ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.footer-bottom a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Design work: show pieces whole, on a brand-colored panel ---------- */
.work-figure { margin: clamp(32px, 5vw, 56px) 0; }
.showcase {
  display: grid; gap: clamp(16px, 3vw, 40px); align-items: center;
  padding: clamp(20px, 5vw, 64px);
  background: var(--panel, var(--placeholder));
  border-radius: var(--radius);
}
.showcase.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.showcase img {
  width: 100%; height: auto; border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}
.showcase.single img { max-width: var(--w, 880px); margin: 0 auto; }
.work-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
@media (max-width: 720px) { .showcase.two { grid-template-columns: 1fr; } }

/* Home cards that show a design piece whole instead of cropping it */
.card .media.contain { background: var(--panel, var(--placeholder)); }
.card .media.contain img { object-fit: contain; padding: 7%; }

/* Photo galleries that keep landscape photos uncropped (3:2) */
.gallery.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery.landscape .media { aspect-ratio: 3 / 2; }
.work-figure .gallery:last-of-type { margin-bottom: 0; }
@media (max-width: 720px) { .gallery.three { grid-template-columns: 1fr; } }

/* ---------- Home: one large card per row, centered ---------- */
.hero, .work { max-width: calc(1040px + 2 * var(--gutter)); }
.grid { grid-template-columns: 1fr; gap: clamp(48px, 7vw, 96px); }
.card .media { aspect-ratio: 3 / 2; }
.card h3 { font-size: clamp(20px, 2vw, 26px); margin-top: 18px; }
.card .meta { font-size: 16px; }
