/* ═══════════════════════════════════════════════
   Samhan Nazar — portfolio (redesign-v4)
   1:1 recreation of the Webflow site
   Fonts: Merriweather (display) + Open Sans (body)
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;0,900;1,400&family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

:root {
  --bg:      #f8f8f8;
  --surface: #ffffff;
  --ink:     #333333;
  --heading: #2b2b2b;
  --muted:   #6f6f6f;
  --line:    #e7e7e7;
  --blue:    #3898ec;
  --blue-d:  #2b7fce;
  --accent:  #a2a9ff;
  --accent-d:#8891ff;
  --dark:    #151515;
  --dark-2:  #1e1e1e;

  --serif: 'Merriweather', Georgia, serif;
  --sans:  'Open Sans', -apple-system, Segoe UI, sans-serif;

  --wrap: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

h1, h2, h3, h4 { font-family: var(--serif); color: var(--heading); font-weight: 700; line-height: 1.3; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  padding: .8rem 1.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s, border-color .2s;
  border: 1px solid transparent;
}
.btn-blue { background: var(--accent); color: var(--dark); }
.btn-blue:hover { background: var(--accent-d); transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline:hover { border-color: #fff; }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  color: #fff;
}
.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 18px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2.2rem; list-style: none; }
.nav-links a {
  font-family: var(--sans);
  font-size: .95rem;
  color: rgba(255,255,255,.82);
  transition: color .2s;
}
.nav-links a:hover { color: #fff; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: #fff; display: block; transition: transform .25s, opacity .2s; }

@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
  }
  .nav-links a { display: block; width: 100%; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.08); }
  .nav.open .nav-links { max-height: 240px; padding: 4px 24px 12px; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── HERO (home) ── */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: #0c0c0c url('../assets/wf/hero-bg.png') center/cover no-repeat;
  padding: 6rem 1.5rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(8,8,10,.42);
}
.hero-inner { position: relative; max-width: 900px; }
.hero-eyebrow {
  font-family: var(--sans);
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 400;
  color: #fff;
  margin-bottom: 1.2rem;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  color: #fff;
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  line-height: 1.28;
  margin-bottom: 2rem;
}
.hero-title .hl { color: var(--accent); }

/* ── SECTION HEADINGS ── */
.section { padding: 5.5rem 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3.2rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.4rem); margin-bottom: 1rem; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* ── CASE CARDS (home) ── */
.cases { display: flex; flex-direction: column; gap: 1.6rem; }

.case-feature {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.case-feature:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -26px rgba(0,0,0,.28); }
.case-feature-img { background: #fff; display: flex; padding: 12px; }
.case-feature-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.case-feature-body { padding: 2.6rem 2.6rem; display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.case-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.case-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -26px rgba(0,0,0,.28); }
.case-card-img { aspect-ratio: 16/11; background: #fff; overflow: hidden; padding: 12px; }
.case-card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.case-card-body { padding: 1.7rem 1.7rem 1.9rem; display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; }

.case-logo { height: 24px; width: auto; max-width: none; object-fit: contain; margin-bottom: 1rem; }
.case-logo.tall { height: 30px; margin-bottom: calc(1rem - 6px); }
.case-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--heading); margin-bottom: .7rem; }
.case-feature-body .case-title { font-size: 1.9rem; }
.case-desc { font-family: var(--sans); color: var(--muted); font-size: .98rem; line-height: 1.7; }

@media (max-width: 900px) {
  .case-feature { grid-template-columns: 1fr; }
  .case-feature-img { aspect-ratio: 16/10; }
  .cards-3 { grid-template-columns: 1fr; }
}

/* ── CONTACT (new design) ── */
.contact {
  background: var(--dark);
  color: #fff;
  text-align: center;
  padding: 6.5rem 1.5rem 3rem;
}
.contact-inner { max-width: 760px; margin: 0 auto; }
.contact h2 {
  color: #fff;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.2;
  margin-bottom: 1.3rem;
}
.contact h2 em { font-style: italic; color: var(--accent); }
.contact p { color: #b6b6b6; font-size: 1.08rem; max-width: 560px; margin: 0 auto 2.4rem; }
.contact-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.contact-foot {
  margin-top: 4.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: .82rem; color: #8a8a8a;
}
@media (max-width: 560px){ .contact-foot { flex-direction: column; gap: .5rem; text-align:center; } }

/* ── ABOUT ME ── */
.about { background: var(--bg); border-top: 1px solid var(--line); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-eyebrow {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .18em;
  color: var(--blue);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.exp-list { list-style: none; padding: 0; margin: 0; }
.exp-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: flex-start;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.exp-item:first-child { padding-top: 0; }
.exp-item:last-child { border-bottom: 0; }
.exp-left { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.exp-logo {
  height: 30px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 .7rem;
  display: block;
}
.exp-date { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin: 0; }
.exp-role { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; color: var(--heading); margin: 0 0 .25rem; }
.exp-meta { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin: 0; }
.exp-meta + .exp-role { margin-top: 1.2rem; }

.about-bio { padding-left: 1rem; }
.about-avatar {
  width: 78px; height: 78px; border-radius: 50%;
  object-fit: cover; margin-bottom: 1.4rem;
  border: 3px solid var(--surface);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.about-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.2;
  color: var(--heading);
  margin-bottom: 1.8rem;
}
.about-p {
  font-family: var(--sans);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}
.about-p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .about-bio { padding-left: 0; order: -1; }
  .exp-item { grid-template-columns: 140px 1fr; gap: 1.2rem; }
}
@media (max-width: 560px) {
  .exp-item { grid-template-columns: 1fr; gap: .4rem; }
  .exp-logo { margin-bottom: .3rem; }
}

/* ── LIGHTBOX ── */
.lb-target { cursor: zoom-in; transition: opacity .2s; }
.lb-target:hover { opacity: .92; }
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,10,12,.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  z-index: 9999;
  padding: 70px 40px 90px;
  overflow: auto;
  overscroll-behavior: contain;
}
.lightbox.open { display: flex; }
/* margin:auto (not flex centering) keeps the top/left of an oversized image reachable */
.lightbox-inner { margin: auto; }
.lightbox img {
  display: block;
  max-width: none;
  height: auto;
  border-radius: 6px;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox.dragging img { cursor: grabbing; }
.lb-close {
  position: fixed;
  top: 18px; right: 22px;
  background: rgba(255,255,255,.12);
  color: #fff; border: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 22px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lb-close:hover { background: rgba(255,255,255,.24); }
.lb-controls {
  position: fixed;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: .5rem;
  background: rgba(255,255,255,.1);
  padding: 6px;
  border-radius: 999px;
}
.lb-btn {
  background: transparent;
  color: #fff; border: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 18px; font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-zoom-level {
  color: #fff; font-family: var(--sans); font-size: .82rem;
  display: flex; align-items: center; padding: 0 12px;
  min-width: 54px; justify-content: center;
}

/* ═══════════ CASE STUDY DETAIL PAGES ═══════════ */
.cs-hero { padding: 4.5rem 0 2rem; }
.cs-hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin-bottom: 0; }
.cs-cover { margin: 2.5rem 0 0; }
.cs-cover img { width: 100%; padding: 12px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }

.cs-body { max-width: 900px; margin: 0 auto; padding: 0 24px; }

.cs-section { padding: 3.2rem 0; border-top: 1px solid var(--line); }
.cs-section:first-of-type { border-top: 0; }
.cs-chapter + .cs-section { border-top: 0; padding-top: 3rem; }
.cs-section > .cs-h3:first-child { margin-top: 0; }

.cs-chapter {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .8rem;
  margin: 1.5rem 0 0;
  padding: 2.8rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cs-chapter .num {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0;
  text-transform: none;
}
.cs-chapter .label {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #8a8a8a;
  padding-left: .32em;
}

.cs-h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--heading); margin: 2.8rem 0 1rem; }
.cs-p { font-family: var(--sans); color: var(--ink); font-size: 1.02rem; line-height: 1.85; margin-bottom: 1.1rem; }
.cs-p strong { color: var(--heading); }

.cs-list { list-style: none; margin: 1rem 0 1.4rem; }
.cs-list li {
  position: relative;
  padding: .55rem 0 .55rem 1.6rem;
  color: var(--ink);
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
}
.cs-list li:first-child { border-top: 1px solid var(--line); }
.cs-list li::before { content: ''; position: absolute; left: 0; top: 1.05rem; width: 7px; height: 7px; background: var(--blue); border-radius: 50%; }

.cs-img { margin: 1.8rem 0; }
/* never upscale low-res images past their natural width */
.cs-img img { width: auto; max-width: 100%; margin: 0 auto; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.cs-cap, .cs-compare figcaption { font-size: .82rem; color: var(--muted); margin-top: .7rem; text-align: center; }

.cs-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin: 1.8rem 0; }
.cs-compare figure { margin: 0; display: flex; flex-direction: column; }
.cs-compare img { flex: 1; width: 100%; object-fit: contain; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background:#fff; }
.cs-compare--sm figure { align-items: center; }
.cs-compare--sm img { flex: none; max-height: 260px; width: auto; max-width: 100%; }
@media (max-width: 700px){ .cs-compare { grid-template-columns: 1fr; } }

.cs-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin: 1.8rem 0; }
.cs-gallery figure { margin: 0; }
.cs-gallery img { width: 100%; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.cs-gallery figcaption { font-size: .82rem; color: var(--muted); margin-top: .7rem; text-align: center; }
@media (max-width: 700px){ .cs-gallery { grid-template-columns: 1fr 1fr; } }

@media (max-width: 560px) {
  .cs-section { padding: 2.4rem 0; }
  .cs-cover img, .cs-img img, .cs-compare img { padding: 6px; border-radius: 10px; }
  .cs-gallery img { padding: 6px; }
}

/* Other case studies */
.cs-more { background: var(--bg); padding: 5rem 0; border-top: 1px solid var(--line); }
.cs-more .wrap > h3 { text-align: center; font-size: 1.6rem; margin-bottom: 2.4rem; }
.cs-more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; max-width: 900px; margin: 0 auto; }
@media (max-width: 700px){ .cs-more-grid { grid-template-columns: 1fr; } }
