/* ============================================================
   Nikki Szweras — portfolio
   Palette
     bg            #191715
     ink (text)    #f7f3ec
     muted         #b3ada3 / #8c857b / #a39c92 / #cfc9bf
     accent        #ed4326 (solid)  /  #f4876a (light)
     borders       #2a2622 / #34302b / #3a352f / #4a443d
     card stripe   repeating-linear-gradient(45deg,#262220 0 12px,#2d2926 12px 24px)
   Fonts: DM Serif Display (display) · Hanken Grotesk (body) · IBM Plex Mono (labels)
   ============================================================ */

:root {
  --bg: #191715;
  --ink: #f7f3ec;
  --muted: #b3ada3;
  --muted-2: #8c857b;
  --muted-3: #a39c92;
  --muted-4: #cfc9bf;
  --accent: #ed4326;
  --accent-light: #f4876a;
  --line: #2a2622;
  --line-2: #34302b;
  --line-3: #3a352f;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --stripe: repeating-linear-gradient(45deg, #262220 0 12px, #2d2926 12px 24px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
}

body {
  font-family: var(--sans);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #36312b; border-radius: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }

a { color: inherit; }

@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
  background: rgba(25, 23, 21, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  line-height: .9;
  letter-spacing: -.015em;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  /* hidden on landing until the hero name scrolls out of view */
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.nav-brand.is-visible { opacity: 1; pointer-events: auto; }

.nav-links {
  display: flex;
  gap: 34px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--muted-2);
  text-decoration: none;
  cursor: pointer;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--accent-light); }

/* ============ PAGE / LAYOUT ============ */
.page { animation: pageIn .55s ease both; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 76px 48px 110px;
}
.container-narrow { max-width: 1080px; padding-bottom: 120px; }

.page-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 66px;
  line-height: 1.02;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0;
  max-width: 780px;
}
.page-title .accent { color: var(--accent-light); font-style: normal; }

.page-intro {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin: 22px 0 0;
}
.page-intro.wide { font-size: 18px; max-width: 560px; margin-top: 30px; }

/* ============ HERO / LANDING ============ */
.hero-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 88px 48px 56px;
  container-type: inline-size;
  container-name: heroc;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-areas: "name image" "text image";
  column-gap: 52px;
  align-items: start;
}

.hero-name {
  grid-area: name;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 75px;
  line-height: 1.0;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0;
  max-width: 960px;
}

.hero-img {
  grid-area: image;
  align-self: stretch;
  position: relative;
  display: block;
  width: 100%;
  min-height: 380px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--stripe);
  border: 1px solid var(--line-2);
}
.hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-img-ph {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hero-img.has-img .hero-img-ph { display: none; }

.hero-text { grid-area: text; min-width: 0; margin-top: -26px; }

.hero-kicker {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-light);
  line-height: 1.7;
  white-space: nowrap;
}
.hero-kicker .dot { color: #5a544c; margin: 0 10px; }
.hero-kicker .muted { color: var(--muted-2); }

.hero-blurb {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 560px;
  margin: 30px 0 0;
}
.inline-link {
  color: var(--accent-light);
  border-bottom: 1px solid var(--accent-light);
  text-decoration: none;
  cursor: pointer;
}

.hero-cta { display: flex; gap: 13px; margin-top: 34px; flex-wrap: wrap; }

.btn {
  font-size: 14px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(237, 67, 38, .6); }
.btn-ghost { border: 1px solid #4a443d; color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent-light); color: var(--accent-light); }

/* ============ MARQUEE ============ */
.marquee { overflow: hidden; }
.marquee-1 { padding: 30px 0 0; }
.marquee-2 { padding: 18px 0 70px; }

.marquee-track {
  display: flex;
  gap: 18px;
  width: max-content;
  padding: 0 9px;
  animation: marquee 46s linear infinite;
}
.marquee-2 .marquee-track { animation-duration: 54s; }
.marquee-rev { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ============ CARDS ============ */
.card {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  background: var(--stripe);
  transition: transform .25s, border-color .25s;
  text-decoration: none;
  display: block;
}
.card:hover { transform: translateY(-5px); border-color: var(--accent-light); }
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  z-index: 2;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(20, 18, 16, .55);
  border: 1px solid var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-play::after {
  content: "";
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

.card-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: #c9c2b7;
  background: var(--bg);
  padding: 4px 8px;
  border: 1px solid #3a3530;
}

/* marquee card */
.mcard { flex-shrink: 0; }
.mcard .mcard-body { position: absolute; left: 18px; bottom: 18px; right: 18px; z-index: 2; }
.mcard .mcard-title {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ink);
  margin-top: 10px;
}
.marquee-1 .mcard { width: 360px; height: 240px; }
.marquee-2 .mcard { width: 300px; height: 200px; }
.marquee-2 .mcard .mcard-body { left: 16px; bottom: 16px; right: 16px; }
.marquee-2 .mcard .mcard-title { font-size: 21px; margin-top: 9px; }

/* ============ WORK GRID ============ */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 38px 0 40px;
  border-top: 1px solid var(--line);
  padding-top: 34px;
}
.chip {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 100px;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  user-select: none;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-3);
}
.chip:hover { border-color: var(--accent-light); color: var(--accent-light); }
.chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* projects list (top level of the Work page) */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 22px;
}
.project-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  overflow: hidden;
  background: var(--stripe);
  transition: transform .25s, border-color .25s;
  animation: fadeIn .45s ease both;
}
.project-card:hover { transform: translateY(-5px); border-color: var(--accent-light); }
.project-card-media { position: relative; height: 230px; }
.project-card-media .card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-card-body { padding: 18px 20px 22px; }
.project-card-name {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}
.project-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted-3);
  margin: 8px 0 0;
}

/* back link on a project's detail view */
.work-back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--accent-light);
  text-decoration: none;
  margin-bottom: 30px;
}
.work-back:hover { color: var(--accent); }

/* project groupings on the Work page */
.work-project { margin-top: 56px; }
.work-project:first-child { margin-top: 0; }
.work-project-head { max-width: 720px; }
.work-project-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}
.work-project-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 0 0;
}
.work-project .card-grid { margin-top: 26px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 22px;
}
.card-static { cursor: default; }
.grid-item { animation: fadeIn .45s ease both; }
.grid-item .card { height: 230px; }
.grid-item .card .card-tag { position: absolute; left: 16px; top: 16px; z-index: 2; }
.grid-title {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  margin-top: 16px;
  line-height: 1.2;
}
.grid-tagstr {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--accent-light);
  margin-top: 8px;
}
.grid-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted-3);
  margin: 10px 0 0;
}

/* ============ IMAGE MODAL ============ */
.img-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(15, 13, 12, .92);
  animation: fadeIn .2s ease both;
}
.img-modal[hidden] { display: none; }
.img-modal-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
}
.img-modal-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  background: transparent;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.img-modal-close:hover { border-color: var(--accent-light); color: var(--accent-light); }

@media (max-width: 720px) {
  .img-modal { padding: 20px; }
  .img-modal-close { top: 12px; right: 14px; }
}

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 54px;
  max-width: 740px;
}
.contact-card {
  text-decoration: none;
  display: block;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 26px;
  transition: border-color .25s, transform .25s;
}
.contact-card:hover { border-color: var(--accent-light); transform: translateY(-3px); }
.contact-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--muted-2); }
.contact-value { font-family: var(--serif); font-size: 23px; color: var(--ink); margin-top: 12px; word-break: break-word; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 38px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--ink); cursor: pointer; text-decoration: none; }
.footer-links { display: flex; gap: 24px; font-size: 13px; color: var(--muted-2); flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--muted-2); transition: color .2s; }
.footer-links a:hover { color: var(--accent-light); }
.footer-copy { font-family: var(--mono); font-size: 11px; color: #6b6359; }

/* ============ RESPONSIVE ============ */
@container heroc (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "name" "image" "text"; }
  .hero-img { min-height: 430px; margin: 26px 0 6px; }
  .hero-text { margin-top: 6px; }
}

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

@media (max-width: 720px) {
  .nav { padding: 16px 22px; }
  .nav-links { gap: 20px; font-size: 12px; }
  .hero-wrap { padding: 56px 22px 40px; }
  .hero-name { font-size: 52px; }
  .container { padding: 52px 22px 80px; }
  .page-title { font-size: 46px; }
  .card-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer { padding: 30px 22px; }
}

@media (max-width: 420px) {
  .hero-name { font-size: 42px; }
  .page-title { font-size: 38px; }
  .nav-brand { font-size: 20px; }
}
