/* ============================================================
   Rajib Moazzam - Portfolio
   Editorial single-column layout (modelled on dantase.com)
   Edit colours and fonts here - everything inherits from these.
   ============================================================ */

:root {
  --bg: #ffffff;          /* pure white, matching Studio Dheet */
  --ink: #000000;         /* pure black, matching Studio Dheet */
  --muted: #6f6a63;       /* secondary text (rarely used) */
  --accent: #a4fca7;      /* Studio Dheet mint green */
  --rule: #ececec;        /* hairlines & pill borders */
  --pill-bg: #f7f7f7;     /* tag pill background */
  --max: 720px;           /* content column width */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.0625rem;       /* 17px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a:hover {
  background: var(--accent);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Header ---------- */

header {
  padding: 40px 0 0;
  text-align: center;
}

.identity .name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.375rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.identity .name:hover { text-decoration: none; color: var(--accent); }

.identity .role {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 2px;
}

nav {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 0.9375rem;
}
nav a { color: var(--ink); text-decoration: none; }
nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}
nav a:hover { background: var(--accent); }

/* ---------- Hero (stacked: full-width headline, body offset right) ---------- */

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 120px 48px 96px;
}

h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 100px;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 120px;
  max-width: 820px;
}

h1 em, h2 em {
  font-style: normal;
  color: var(--ink);
  font-weight: 300;
}

.hero-body {
  max-width: 790px;
  margin-left: auto;
}
.hero-body p { margin-bottom: 20px; }
.hero-body p:last-child { margin-bottom: 0; }
.hero-body .email { font-weight: 500; margin-top: 32px; }

/* ---------- Project sections (two-column: logo left, content right) ---------- */

.project {
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px 48px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 2.4fr;
  gap: 64px;
  align-items: start;
}

.project .logo {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  padding-top: 14px;
}
.project .logo img { display: block; height: 32px; width: auto; }

.project-content { min-width: 0; }

.project h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -0.005em;
  margin-bottom: 32px;
  color: var(--ink);
}

/* All project headlines stay full black to match Studio Dheet's monochrome */
.project h2 .lede {
  color: var(--ink);
}

.project p {
  font-size: 20px;
  line-height: 30px;
  margin-bottom: 20px;
}

/* ---------- Image carousel ----------
   A full-bleed horizontal strip that breaks out of the text column.
   Swipe on mobile, scroll/drag on desktop. No JS.
*/

.carousel {
  grid-column: 1 / -1;
  width: 100vw;
  margin: 64px 0 0 calc(50% - 50vw);
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

/* Leading spacer centres the first image in the viewport on initial load.
   The 480px estimate is half the typical landscape image width at 680px tall;
   on narrower screens, falls back to 48px so the image stays visible. */
.carousel::before {
  content: '';
  flex-shrink: 0;
  width: max(48px, calc(50vw - 480px));
}
.carousel::after {
  content: '';
  flex-shrink: 0;
  width: 48px;
}

.carousel .slide {
  flex: 0 0 auto;
  height: 680px;
  width: auto;
  max-width: 92vw;
  border-radius: 12px;
  scroll-snap-align: center;
  border: 1px solid var(--rule);
  object-fit: cover;
}

@media (max-width: 1100px) {
  .carousel .slide { height: 520px; }
}

@media (max-width: 800px) {
  .carousel::before { width: 24px; }
  .carousel .slide {
    height: 380px;
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  .carousel .slide { height: 280px; }
}

.milestone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 24px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--accent);
  color: var(--ink);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.tags span {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
}

/* Note: per-project brand accent colours have been removed in favour of
   a single monochrome treatment matching Studio Dheet. To bring them back,
   set --project-accent on each .project.xxx selector and revert the
   .project h2 .lede colour to use var(--project-accent). */

/* ---------- Footer CTA ---------- */

.outro {
  max-width: 1280px;
  margin: 0 auto;
  padding: 120px 48px 96px;
  border-top: 1px solid var(--rule);
}

.outro h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 120px;
  max-width: 820px;
}

.outro-body {
  max-width: 790px;
  margin-left: auto;
}
.outro-body p { margin-bottom: 20px; }
.outro-body p:last-child { margin-bottom: 0; }
.outro-body .email { font-weight: 500; margin-top: 32px; }

footer {
  padding: 0 0 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- About page ---------- */

.about { padding: 72px 0; }
.about h1 { margin-bottom: 28px; }
.about p { margin-bottom: 20px; }

/* ---------- Mobile ---------- */

@media (max-width: 800px) {
  .hero, .outro {
    padding: 72px 24px;
  }
  .hero h1, .outro h2 {
    font-size: 48px;
    margin-bottom: 56px;
  }
  .hero-body, .outro-body {
    margin-left: 0;
  }
  .project {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 64px 24px;
  }
  .project .logo {
    padding-top: 0;
  }
  .project h2 {
    font-size: 32px;
    line-height: 40px;
  }
  .project p {
    font-size: 18px;
    line-height: 28px;
  }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  nav { gap: 20px; }
}

/* ============================================================
   Case Study Pages
   Layout matches the Squarespace deep-dive structure:
   hero image → title → alternating text sections and images.
   ============================================================ */

.case-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 0;
}
.case-hero img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 80vh;
  object-fit: cover;
}

.case-intro {
  max-width: 820px;
  margin: 0 auto;
  padding: 96px 48px 64px;
  text-align: center;
}

.case-eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.case-intro h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 32px;
  max-width: none;
}

.case-lede {
  font-size: 22px;
  line-height: 34px;
  color: var(--ink);
  margin: 0;
}

.case-figure {
  max-width: 1280px;
  margin: 0 auto 64px;
  padding: 0 48px;
}
.case-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.case-figure.bleed {
  max-width: 100%;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0;
}
.case-figure.bleed img { border-radius: 0; }

.case-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 48px 64px;
}

.case-section .case-eyebrow {
  text-align: left;
}

.case-section h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  max-width: none;
}

.case-section h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 30px;
  margin: 48px 0 16px;
  color: var(--ink);
}

.case-section p {
  font-size: 20px;
  line-height: 32px;
  margin-bottom: 24px;
}
.case-section p:last-child { margin-bottom: 0; }

.case-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px 48px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}
.case-nav a {
  text-decoration: none;
  background: none;
}
.case-nav a:hover { background: var(--accent); }
.case-nav .prev::before { content: '← '; }
.case-nav .next::after { content: ' →'; }
.case-nav .prev-label,
.case-nav .next-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.case-nav .next { text-align: right; }

@media (max-width: 800px) {
  .case-intro { padding: 64px 24px 48px; }
  .case-figure { padding: 0 24px; margin-bottom: 48px; }
  .case-section { padding: 24px 24px 48px; }
  .case-section p,
  .case-section h3 { font-size: 18px; line-height: 28px; }
  .case-lede { font-size: 19px; line-height: 30px; }
  .case-nav { padding: 64px 24px; }
}

/* "Read the case study" link under each project's tags */
.case-study-link {
  display: inline-block;
  margin-top: 28px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
}
.case-study-link::after { content: ' →'; }
.case-study-link:hover { background: var(--accent); border-bottom-color: var(--accent); }

/* Case study metadata strip */
.case-meta {
  max-width: 1280px;
  margin: 0 auto 64px;
  padding: 0 48px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  border-top: 3px solid var(--accent);
  padding-top: 32px;
}
.case-meta-item h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 12px;
  color: var(--ink);
}
.case-meta-item p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 800px) {
  .case-meta {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 24px;
    padding-top: 24px;
    gap: 28px;
  }
}
@media (max-width: 480px) {
  .case-meta {
    grid-template-columns: 1fr;
  }
}

/* Case study results block */
.case-results {
  max-width: 1280px;
  margin: 0 auto 72px;
  padding: 0 48px;
}
.case-results .case-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  text-align: left;
}
.results-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.result-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
}
.result-metric {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 16px;
}
.result-card h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  font-style: italic;
  margin-bottom: 10px;
  color: var(--ink);
}
.result-card p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 1000px) {
  .results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .results-grid { grid-template-columns: 1fr; }
  .case-results { padding: 0 24px; }
}

/* ---- Match Wix-style side gutters across case study pages ---- */
:root { --page-gutter: clamp(24px, 6vw, 120px); }

.project,
.case-meta,
.case-results,
.case-nav {
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.case-intro,
.case-section {
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.case-figure {
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

/* Rein in the full-bleed elements so they respect the gutter */
.case-figure.bleed {
  width: auto;
  margin-left: 0;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}
.case-figure.bleed img { border-radius: 12px; }

.case-hero {
  width: auto;
  margin-left: 0;
  padding: 0 var(--page-gutter);
}
.case-hero img { border-radius: 12px; }

.carousel {
  padding-left: var(--page-gutter) !important;
}

/* ============ DANTASE-STYLE PERSONAL HERO ============ */
.ph-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(120px, 16vw, 240px) 48px clamp(64px, 9vw, 120px);
}
.ph-headline {
  font-family: 'Denton', 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(64px, 8vw, 120px);
  max-width: none;
}
.ph-headline em {
  font-style: italic;
  font-weight: 300;
}
.ph-grid {
  display: grid;
  grid-template-columns: 1fr 2.4fr;
  gap: 64px;
}
.ph-body {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.65;
}
.ph-body p { margin: 0 0 20px; }
.ph-email a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--green, #a4fca7);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
@media (max-width: 700px) {
  .ph-headline br { display: none; }
  .ph-headline { max-width: none; }
  .ph-grid {
  display: grid;
  grid-template-columns: 1fr 2.4fr;
  gap: 64px;
}
.ph-body {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.65;
}
}
/* ============ RESPONSIVE (dantase-style stacking) ============ */

/* Tablet and down: stack hero grid, scale headline */
@media (max-width: 900px) {
  .ph-hero {
    padding: clamp(80px, 14vw, 140px) 24px clamp(48px, 8vw, 80px);
  }
  .ph-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ph-headline {
    font-size: clamp(2.25rem, 9vw, 4rem);
  }
  .ph-headline br { display: none; }
  .ph-body {
    max-width: 640px;
    font-size: 17px;
  }
}

/* Project sections: stack label above headline like Dan's mobile */
@media (max-width: 800px) {
  .project {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 56px 24px;
  }
  .project .logo { padding-top: 0; }
  .project h2 {
    font-size: clamp(1.5rem, 6.5vw, 2rem);
    line-height: 1.25;
  }
  .project p {
    font-size: 17px;
    line-height: 27px;
  }
  .case-intro, .case-section, .case-figure,
  .case-meta, .case-results, .case-nav {
    padding-left: 24px;
    padding-right: 24px;
  }
  .case-meta { grid-template-columns: 1fr 1fr; gap: 24px; }
  .results-grid { grid-template-columns: 1fr; }
}

/* Phone: tighter still */
@media (max-width: 520px) {
  .ph-hero { padding-top: 64px; }
  .ph-headline { font-size: clamp(2rem, 10vw, 2.75rem); }
  .tags span { padding: 8px 16px; font-size: 0.85rem; }
  .carousel .slide { height: 240px; }
  .case-meta { grid-template-columns: 1fr; }
}

/* Outro reuses hero styles with a top border */
.ph-outro {
  border-top: 1px solid var(--rule, #ececec);
  padding-top: clamp(80px, 12vw, 180px);
}

/* Wider reading column on case study pages */
.case-section {
  max-width: 860px;
}
.case-intro {
  max-width: 960px;
}
