/* Portfolio theme — free static rebuild of the UXFolio "theme_fourteen" look.
   Fonts: Bricolage Grotesque (headings) + Karla (body), via Google Fonts. */

:root {
  --ink: #1e1c1b;          /* warm near-black: headings, links, buttons */
  --body: #727272;         /* medium gray: body text */
  --dot: #d5d1cf;          /* warm light gray: dot grid, backdrops */
  --line: #d4d4d4;         /* light gray: dividers, pills, outlines */
  --bg: #f1f1f1;           /* off-white page background */
  --card: #ffffff;
  --rust: #b4552d;         /* terracotta accent sampled from project covers */
  --radius: 8px;
  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: 'Karla', -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', 'Karla', sans-serif;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: 44px; font-weight: 700; }
h2 { font-size: 32px; font-weight: 700; }
h3 { font-size: 24px; font-weight: 700; }
h4 { font-size: 19px; font-weight: 700; }

p { margin: 0 0 1em; }
a { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 860px; }

/* ---------- Pill navigation ---------- */
.nav-shell {
  position: sticky; top: 18px; z-index: 50;
  display: flex; justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.pillnav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 24px;
  background: rgba(241, 241, 241, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 28px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 24px rgba(30, 28, 27, 0.07);
}
.pillnav a {
  text-decoration: none; color: var(--body);
  font-size: 18px; font-weight: 400;
  position: relative; white-space: nowrap;
  transition: color .2s;
}
.pillnav a:hover { color: var(--ink); }
.pillnav a.active { color: var(--ink); font-weight: 700; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
#dotgrid { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: 72px; margin: 0; letter-spacing: -0.01em; }
.hero .role { font-size: 72px; font-weight: 400; color: var(--ink); margin: 0 0 24px; }
.hero .intro { font-size: 20px; }
.hero .intro p { margin-bottom: 0.9em; }
.hero-photo img {
  border-radius: 12px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%;
  background: var(--dot);
}
.social-row { display: flex; gap: 14px; margin-top: 22px; }
.social-row a {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-weight: 700; font-size: 20px;
  transition: transform .2s;
}
.social-row a:hover { transform: translateY(-2px); }

/* ---------- Project cards ---------- */
.work { padding: 40px 0 24px; }
.project-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 44px 0; border-top: 1px solid var(--line);
}
.project-card:first-of-type { border-top: none; }
.project-card.flip .card-text { order: 2; }
.project-card.flip .card-media { order: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  font-size: 12px; font-weight: 300; color: var(--ink);
  border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 5px 14px; white-space: nowrap;
}
.card-text h2 { font-size: 32px; margin-bottom: 12px; }
.card-text h2 a { text-decoration: none; color: var(--ink); }
.card-text h2 a:hover { text-decoration: underline; text-underline-offset: 6px; }
.card-text .sub { font-size: 18px; margin-bottom: 22px; }
.view-link {
  display: inline-block; font-size: 16px; font-weight: 700; color: var(--ink);
  text-decoration: underline; text-underline-offset: 5px;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 24px;
  background: var(--card); transition: background .2s;
}
.view-link:hover { background: var(--ink); color: var(--bg); }
.card-media img {
  border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  background: var(--dot);
}

/* ---------- Contact ---------- */
.contact-section { text-align: center; padding: 72px 0 88px; }
.contact-section h2 { font-size: 44px; margin-bottom: 12px; }
.contact-section .lede { font-size: 20px; max-width: 640px; margin: 0 auto 36px; }
.contact-form { max-width: 560px; margin: 0 auto; text-align: left; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 15px; color: var(--body); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 13px 16px;
}
.field textarea { min-height: 130px; resize: vertical; }
.btn {
  display: inline-block; border: none; cursor: pointer;
  background: var(--ink); color: var(--bg);
  font: inherit; font-size: 16px; font-weight: 700;
  border-radius: 999px; padding: 13px 34px;
  transition: opacity .2s;
}
.btn:hover { opacity: 0.85; }
.form-note { font-size: 14px; margin-top: 14px; }
.form-ok { display: none; font-size: 18px; color: var(--ink); font-weight: 700; }

/* ---------- Logo marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); padding: 30px 0 46px; }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: scroll 30s linear infinite; }
.marquee-track span {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 24px; font-weight: 700;
  color: var(--line); white-space: nowrap; letter-spacing: 0.02em;
}
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Case study pages ---------- */
.case-hero { padding: 64px 0 8px; }
.byline { font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; }
.case-hero h1 { font-size: 52px; max-width: 18ch; }
.pullquote {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 26px; font-weight: 700; color: var(--ink);
  border-left: 4px solid var(--rust);
  padding: 6px 0 6px 22px; margin: 32px 0; max-width: 34ch;
}
.case-body { padding: 8px 0 40px; }
.case-body section { margin: 56px 0; }
.case-body section > h1, .case-body section > h2 { margin-bottom: 18px; }
.lede-para { font-size: 20px; color: var(--ink); }

/* At-a-glance key/value rows */
.glance { border-top: 1px solid var(--line); margin: 28px 0; }
.glance-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px;
}
.glance-row dt { font-weight: 700; color: var(--ink); }
.glance-row dd { margin: 0; }

/* Process steps */
.steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.step {
  font-size: 14px; font-weight: 700; color: var(--ink);
  border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 8px 18px;
}
.step .n {
  display: inline-flex; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--bg); font-size: 12px;
  align-items: center; justify-content: center; margin-right: 8px;
}

/* Figures */
.figure { margin: 30px 0; }
.figure img { border-radius: var(--radius); background: var(--dot); width: 100%; }
.figure figcaption { font-size: 14px; margin-top: 10px; color: var(--body); }

/* Text + image two-column */
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; margin: 30px 0; }
.twocol .figure { margin: 0; }

/* Stat blocks */
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0; }
.stat {
  background: var(--ink); color: var(--bg); border-radius: var(--radius);
  padding: 20px 26px; text-align: center; flex: 1 1 160px;
}
.stat .num { font-family: 'Bricolage Grotesque', sans-serif; font-size: 34px; font-weight: 700; display: block; }
.stat .lbl { font-size: 14px; opacity: 0.85; }

/* Cards row */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 26px 0; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.card h3, .card h4 { margin-top: 0; }

/* Blockquotes */
blockquote {
  margin: 26px 0; padding: 4px 0 4px 22px;
  border-left: 4px solid var(--line);
  font-style: italic; color: var(--ink);
}
blockquote strong, blockquote .q-label { font-style: normal; }

/* Accordions */
details.accordion {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); margin: 12px 0; overflow: hidden;
}
details.accordion summary {
  cursor: pointer; font-weight: 700; color: var(--ink);
  padding: 16px 20px; list-style: none; font-size: 17px;
}
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after { content: '+'; float: right; font-size: 20px; }
details.accordion[open] summary::after { content: '–'; }
details.accordion .acc-body { padding: 0 20px 20px; font-size: 16.5px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 26px 0; }
.gallery .figure { margin: 0; }
.gallery-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Testimonial */
.testimonial { text-align: center; max-width: 720px; margin: 34px auto; }
.testimonial p { font-style: italic; font-size: 20px; color: var(--ink); }
.testimonial .attr { font-style: normal; font-size: 15px; color: var(--body); }

/* Lists */
.case-body ul, .case-body ol { padding-left: 1.4em; margin: 0 0 1em; }
.case-body li { margin-bottom: 0.55em; }
.case-body li::marker { color: var(--ink); }

/* Prev / next project footer */
.pagenav {
  display: flex; justify-content: space-between; gap: 18px;
  border-top: 1px solid var(--line); padding: 34px 0 60px; margin-top: 20px;
}
.pagenav a { text-decoration: none; font-weight: 700; font-size: 18px; }
.pagenav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.pagenav .next { text-align: right; }

/* About page */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 60px; align-items: start; padding: 64px 0 80px; }
.about-grid img { border-radius: 12px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; background: var(--dot); }
.about-grid h1 { font-size: 52px; }

/* Contact page */
.contact-page { padding: 64px 0 90px; max-width: 640px; }
.contact-page h1 { font-size: 52px; }

/* Footer mini */
.footer { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: 14px; }

/* Responsive */
@media (max-width: 900px) {
  h1 { font-size: 36px; }
  .hero h1, .hero .role { font-size: 44px; }
  .hero-inner, .project-card, .twocol, .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .project-card.flip .card-text { order: 1; }
  .project-card.flip .card-media { order: 2; }
  .case-hero h1, .about-grid h1, .contact-page h1 { font-size: 36px; }
  .glance-row { grid-template-columns: 1fr; gap: 4px; }
  .gallery, .gallery-3 { grid-template-columns: 1fr; }
  .pillnav { gap: 16px; padding: 10px 20px; }
  .pillnav a { font-size: 16px; }
  .marquee-track { gap: 40px; }
}
