/* ═══════════════════════════════════════════════════════════════════════
   DUSK LAB — Magazine Stylesheet
   Articles on black & white photography
   Aesthetic: Medium meets Leica Magazine
   ═══════════════════════════════════════════════════════════════════════ */


/* ── Variables (extends main site) ── */

:root {
  --blog-reading-width:   720px;
  --blog-wide-width:      960px;
  --blog-full-width:      1200px;
  --blog-body-size:       18px;
  --blog-body-leading:    1.8;
  --blog-body-color:      #c0c0c0;
  --blog-caption-size:    13px;
  --blog-caption-color:   #707070;
  --blog-rule-color:      #2a2a2a;
  --blog-card-bg:         #141414;
  --blog-card-hover:      #1c1c1c;
  --blog-gold:            #c8a050;
  --blog-gold-dim:        #a07830;
  --blog-teal:            #5a9da5;
}


/* ═══════════════════════════════════════════════════════════════════════
   ARTICLE PAGE
   ═══════════════════════════════════════════════════════════════════════ */

.blog-article { overflow-x: hidden; }


/* ── Hero Section ── */

.article-hero {
  position: relative;
  width: 100%;
  min-height: 70vh;
  max-height: 85vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.article-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(10%) contrast(1.05);
}

.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom,
    rgba(10,10,10,0.15) 0%, rgba(10,10,10,0.3) 40%,
    rgba(10,10,10,0.75) 70%, rgba(10,10,10,0.95) 100%);
}

.article-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--blog-full-width);
  margin: 0 auto;
  padding: 4rem 2rem 3.5rem;
}

.article-hero-content .article-tag {
  color: var(--blog-gold);
  margin-bottom: 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  display: inline-block;
  font-weight: 500;
  text-transform: uppercase;
}

.article-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 200;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #f0f0f0;
  max-width: 800px;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}

.article-hero-content .article-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: #909090;
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.article-hero-content .article-meta { font-size: 0.78rem; color: #707070; }
.article-hero-content .article-meta .meta-author { color: #a0a0a0; }


/* ── Article Body ── */

.article-body {
  max-width: var(--blog-reading-width);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
  font-size: var(--blog-body-size);
  font-weight: 300;
  line-height: var(--blog-body-leading);
  color: var(--blog-body-color);
}

.article-body p { margin-bottom: 1.5rem; }

.article-body p:first-of-type::first-letter {
  float: left;
  font-size: 3.8rem;
  font-weight: 200;
  line-height: 0.85;
  color: #f0f0f0;
  margin-right: 0.12em;
  margin-top: 0.07em;
}

.article-body a {
  color: var(--blog-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(200,160,80,0.25);
  transition: border-color 0.3s, color 0.3s;
}
.article-body a:hover {
  color: #e0c070;
  border-bottom-color: rgba(200,160,80,0.6);
}

.article-body strong { font-weight: 500; color: #d8d8d8; }
.article-body em { font-style: italic; color: #b8b8b8; }

.article-body h2 {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #f0f0f0;
  margin: 3rem 0 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--blog-rule-color);
}
.article-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.015em;
  color: #e0e0e0;
  margin: 2.5rem 0 1rem;
}

.article-body ul,
.article-body ol { margin: 0 0 1.5rem 1.5rem; color: #b0b0b0; }
.article-body li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
.article-body li::marker { color: var(--blog-gold-dim); }

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.75rem;
  border-left: 2px solid var(--blog-rule-color);
  color: #909090;
  font-style: italic;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.015);
  border-radius: 0 3px 3px 0;
}

.article-body hr {
  border: none;
  height: 1px;
  background: var(--blog-rule-color);
  margin: 3rem auto;
  max-width: 120px;
}

.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  color: #d0d0d0;
}


/* ── Pull Quote ── */

.pull-quote {
  position: relative;
  max-width: var(--blog-wide-width);
  margin: 3rem auto;
  padding: 2.5rem 0 2.5rem 2.5rem;
  border-left: 3px solid var(--blog-gold);
}
.pull-quote p {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 200;
  font-style: italic;
  line-height: 1.5;
  color: #d0d0d0;
  margin-bottom: 0.75rem;
}
.pull-quote p:last-of-type { margin-bottom: 0; }
.pull-quote cite {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--blog-gold-dim);
  margin-top: 1rem;
}
.pull-quote cite::before { content: '\2014\00a0'; }
.pull-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.1em;
  left: -0.15em;
  font-size: 6rem;
  font-weight: 200;
  line-height: 1;
  color: rgba(200,160,80,0.08);
  pointer-events: none;
}


/* ── Image Figure ── */

.article-figure { margin: 2.5rem 0; }
.article-figure img { width: 100%; border-radius: 2px; filter: contrast(1.02); }
.article-figure figcaption {
  font-size: var(--blog-caption-size);
  font-weight: 400;
  font-style: italic;
  color: var(--blog-caption-color);
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  line-height: 1.5;
}
.article-figure figcaption .caption-credit { color: #505050; }


/* ── Full-Width Image ── */

.image-full {
  position: relative;
  max-width: var(--blog-wide-width);
  margin: 3rem auto;
  overflow: hidden;
  border-radius: 2px;
}
.image-full img { width: 100%; max-height: 55vh; object-fit: cover; border-radius: 2px; }
.image-full figcaption {
  max-width: var(--blog-reading-width);
  margin: 0.75rem auto 0;
  padding: 0.6rem 2rem 0;
  font-size: var(--blog-caption-size);
  font-weight: 400;
  font-style: italic;
  color: var(--blog-caption-color);
  border-top: 1px solid rgba(255,255,255,0.04);
  line-height: 1.5;
}


/* ── Image Pair ── */

.image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
  width: calc(100% + 4rem);
  margin-left: -2rem;
}
.image-pair figure { overflow: hidden; border-radius: 2px; }
.image-pair img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/2;
  transition: transform 0.7s cubic-bezier(0.25,0,0.15,1);
}
.image-pair figure:hover img { transform: scale(1.03); }
.image-pair figcaption {
  font-size: var(--blog-caption-size);
  font-style: italic;
  color: var(--blog-caption-color);
  margin-top: 0.6rem;
  line-height: 1.5;
}


/* ── Image Gallery ── */

.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 2.5rem auto;
  max-width: var(--blog-wide-width);
  padding: 0 1rem;
}
.image-gallery.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: var(--blog-reading-width); }
.image-gallery figure { overflow: hidden; border-radius: 2px; position: relative; }
.image-gallery figure img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25,0,0.15,1), filter 0.5s;
  filter: grayscale(10%);
}
.image-gallery figure:hover img { transform: scale(1.05); filter: grayscale(0%); }
.image-gallery figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 2rem 0.75rem 0.65rem;
  background: linear-gradient(to top, rgba(10,10,10,0.85), transparent);
  font-size: var(--blog-caption-size);
  font-style: italic; color: #909090;
  opacity: 0; transition: opacity 0.4s;
}
.image-gallery figure:hover figcaption { opacity: 1; }


/* ── Tech Note ── */

.tech-note {
  position: relative;
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  background: rgba(90,157,165,0.04);
  border: 1px solid rgba(90,157,165,0.1);
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #a0a0a0;
}
.tech-note::before {
  content: 'Technical Note';
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blog-teal);
  margin-bottom: 0.75rem;
}
.tech-note p { margin-bottom: 0.75rem; }
.tech-note p:last-child { margin-bottom: 0; }
.tech-note code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  padding: 0.12em 0.35em;
  background: rgba(90,157,165,0.08);
  border-radius: 3px;
  color: var(--blog-teal);
}


/* ── Author Card ── */

.author-card {
  display: flex; align-items: flex-start; gap: 1.5rem;
  margin: 4rem 0 3rem; padding: 2rem;
  background: var(--blog-card-bg);
  border: 1px solid rgba(255,255,255,0.04); border-radius: 4px;
}
.author-card-photo {
  flex-shrink: 0; width: 72px; height: 72px;
  border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(200,160,80,0.15);
}
.author-card-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%); }
.author-card-info { flex: 1; }
.author-card-label { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #505050; margin-bottom: 0.4rem; }
.author-card-name { font-size: 1.1rem; font-weight: 300; color: #e0e0e0; margin-bottom: 0.15rem; }
.author-card-title { font-size: 0.8rem; font-weight: 400; color: var(--blog-gold-dim); margin-bottom: 0.75rem; }
.author-card-bio { font-size: 0.85rem; font-weight: 300; line-height: 1.65; color: #808080; }
.author-card-links { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.author-card-links a { font-size: 0.72rem; font-weight: 400; letter-spacing: 0.04em; color: #606060; text-decoration: none; transition: color 0.3s; }
.author-card-links a:hover { color: var(--blog-gold); }


/* ── Article Meta Block ── */

.article-meta-block {
  display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem;
  margin-bottom: 2rem; padding-bottom: 2rem;
  border-bottom: 1px solid var(--blog-rule-color);
}
.article-meta-block .meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.article-meta-block .meta-label { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #404040; }
.article-meta-block .meta-value { font-size: 0.85rem; font-weight: 300; color: #909090; }
.article-meta-block .meta-divider { width: 1px; height: 28px; background: var(--blog-rule-color); }


/* ── Article Footer ── */

.article-footer {
  max-width: var(--blog-reading-width);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}
.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.article-tags a {
  font-size: 0.7rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase;
  color: #505050; padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.06); border-radius: 2px;
  text-decoration: none; transition: all 0.3s;
}
.article-tags a:hover { color: #b0b0b0; border-color: rgba(200,160,80,0.2); background: rgba(200,160,80,0.04); }

.article-share {
  display: flex; align-items: center; gap: 1rem;
  padding-top: 1.5rem; border-top: 1px solid var(--blog-rule-color);
}
.article-share-label { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #404040; }
.article-share a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06); color: #606060;
  text-decoration: none; font-size: 0.85rem; transition: all 0.3s;
}
.article-share a:hover { color: #d0d0d0; border-color: rgba(200,160,80,0.2); background: rgba(200,160,80,0.06); }


/* ── Related Articles ── */

.related-articles {
  max-width: var(--blog-full-width);
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  border-top: 1px solid var(--blog-rule-color);
}
.related-articles-header { text-align: center; margin-bottom: 3rem; }
.related-articles-header h2 { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: #505050; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.article-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--blog-card-bg);
  border: 1px solid rgba(255,255,255,0.04); border-radius: 3px;
  overflow: hidden; text-decoration: none;
  transition: transform 0.5s cubic-bezier(0.25,0,0.15,1), border-color 0.5s, box-shadow 0.5s;
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(200,160,80,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.article-card-image { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.article-card-image img {
  width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%);
  transition: transform 0.7s cubic-bezier(0.25,0,0.15,1), filter 0.7s;
}
.article-card:hover .article-card-image img { transform: scale(1.06); filter: grayscale(0%); }
.article-card-body { flex: 1; display: flex; flex-direction: column; padding: 1.5rem 1.5rem 1.75rem; }

.article-tag { display: inline-block; font-size: 0.6rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blog-teal); margin-bottom: 0.65rem; }
.article-card-body h3 { font-size: 1.15rem; font-weight: 300; line-height: 1.35; color: #e0e0e0; margin-bottom: 0.65rem; transition: color 0.3s; }
.article-card:hover .article-card-body h3 { color: #fff; }

.article-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.72rem; font-weight: 400; letter-spacing: 0.03em; color: #505050; }
.article-meta .meta-separator { width: 3px; height: 3px; border-radius: 50%; background: #333; }
.article-meta .meta-author { color: #707070; }


/* ── Scroll Animations ── */

.fade-in-scroll {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.25,0,0.15,1), transform 0.8s cubic-bezier(0.25,0,0.15,1);
}
.fade-in-scroll.is-visible { opacity: 1; transform: translateY(0); }

.image-reveal {
  opacity: 0; transform: translateY(20px) scale(0.98);
  transition: opacity 1s cubic-bezier(0.25,0,0.15,1), transform 1s cubic-bezier(0.25,0,0.15,1);
}
.image-reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }


/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .image-gallery { grid-template-columns: repeat(2, 1fr); }
  .image-pair { width: 100%; margin-left: 0; }
}

@media (max-width: 768px) {
  .article-hero { min-height: 55vh; }
  .article-hero-content { padding: 3rem 1.25rem 2.5rem; }
  .article-body { padding: 2.5rem 1.25rem 4rem; font-size: 16px; }
  .article-body h2 { font-size: 1.5rem; }
  .article-body h3 { font-size: 1.15rem; }
  .pull-quote { margin: 2rem -0.5rem; padding: 1.75rem 0 1.75rem 1.5rem; }
  .pull-quote p { font-size: 1.2rem; }
  .image-pair { grid-template-columns: 1fr; width: 100%; margin-left: 0; }
  .image-gallery { grid-template-columns: 1fr; padding: 0 0.75rem; }
  .image-gallery.cols-2 { grid-template-columns: 1fr; }
  .author-card { flex-direction: column; align-items: center; text-align: center; padding: 1.75rem 1.5rem; }
  .author-card-links { justify-content: center; }
  .article-meta-block { gap: 1rem; }
  .article-meta-block .meta-divider { display: none; }
  .article-footer { padding: 0 1.25rem 3rem; }
  .related-articles { padding: 3rem 1.25rem 4rem; }
  .article-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .tech-note { margin: 2rem -0.25rem; padding: 1.25rem; }
}

@media (max-width: 480px) {
  .article-hero { min-height: 45vh; }
  .article-hero-content h1 { font-size: 1.8rem; }
  .article-body p:first-of-type::first-letter { font-size: 3rem; }
}

@media print {
  .nav, .related-articles, .article-share { display: none; }
  .blog-article { background: #fff; color: #111; }
  .article-body { color: #222; font-size: 11pt; max-width: 100%; }
  .article-body h2, .article-body h3 { color: #000; }
  .pull-quote { border-left-color: #333; }
  .pull-quote p { color: #333; }
  .tech-note { border-color: #ccc; background: #f8f8f8; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-scroll, .image-reveal { opacity: 1; transform: none; transition: none; }
  .article-card, .article-card-image img, .image-pair img, .image-gallery figure img { transition: none; }
  .article-card:hover { transform: none; }
}
