/*
Theme Name: AJS Dark Portfolio
Theme URI: https://adamjsteele.com
Author: Adam J Steele
Description: A modern dark portfolio — Words, Photos, Works.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: ajs-dark
*/

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #0A0A0A;
  --surface:  #111111;
  --card:     #161514;
  --ivory:    #EDE8E0;
  --muted:    #B8B0A6;
  --dim:      #6E6760;
  --ghost:    #35302C;
  --amber:    #9B6E45;
  --amber-lo: #5C3E22;
  --rule:     #1E1B18;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ivory);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img  { display: block; max-width: 100%; height: auto; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }

/* ── GOOGLE FONTS fallback stack ── */
h1, h2, h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; }

/* ════════════════════════════
   NAV
════════════════════════════ */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 52px;
  transition: background 0.4s, padding 0.3s;
}

.site-header.scrolled {
  background: rgba(10,10,10,0.96);
  padding: 16px 52px;
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(6px);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  letter-spacing: 0.14em;
  color: var(--ivory);
}

.nav-links {
  display: flex;
  gap: 44px;
}

.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.25s;
}

.nav-links a:hover { color: var(--amber); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 201;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ivory);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ════════════════════════════
   HERO
════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 52px 80px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}

.hero-tag {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
}

.hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(68px, 10.5vw, 140px);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: 0.025em;
  color: var(--ivory);
  margin-bottom: 32px;
}

.hero-rule {
  width: 160px;
  height: 1px;
  background: var(--amber);
  margin-bottom: 28px;
}

.hero-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.55;
}

.hero-scroll {
  position: absolute;
  bottom: 44px;
  right: 52px;
  writing-mode: vertical-rl;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ghost);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-scroll::before {
  content: '';
  display: block;
  width: 1px;
  height: 52px;
  background: var(--ghost);
  animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.9;  }
}

/* ════════════════════════════
   SECTION CHROME
════════════════════════════ */
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 48px;
}

.section-eyebrow-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  white-space: nowrap;
}

.section-eyebrow-line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ════════════════════════════
   IMAGES / PHOTOGRAPHY
════════════════════════════ */
.images-section {
  padding: 96px 52px;
  border-bottom: 1px solid var(--rule);
}

.images-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 52px;
}

.images-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ivory);
}

.images-heading em {
  display: block;
  font-style: italic;
  color: var(--muted);
  font-size: 0.65em;
}

.images-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.75;
  color: var(--muted);
}

.images-body em { color: var(--ivory); font-style: normal; }

.images-cta {
  display: inline-block;
  margin-top: 24px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  border-bottom: 1px solid var(--amber-lo);
  padding-bottom: 3px;
  transition: color 0.25s, border-color 0.25s;
}

.images-cta:hover { color: var(--ivory); border-color: var(--ivory); }

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 260px 260px;
  gap: 3px;
}

.photo-card         { position: relative; overflow: hidden; background: var(--card); }
.photo-card.p1      { grid-column: 1 / 5;  grid-row: 1 / 3; }
.photo-card.p2      { grid-column: 5 / 9;  grid-row: 1; }
.photo-card.p3      { grid-column: 9 / 13; grid-row: 1; }
.photo-card.p4      { grid-column: 5 / 8;  grid-row: 2; }
.photo-card.p5      { grid-column: 8 / 13; grid-row: 2; }

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.7s cubic-bezier(0.4,0,0.2,1), opacity 0.4s;
}

.photo-card:hover img { transform: scale(1.05); opacity: 0.75; }

.photo-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
  z-index: 2;
}

.photo-card:hover::after { transform: scaleX(1); }

.photo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.55) 0%, transparent 55%);
  z-index: 1;
}

.photo-meta {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 2;
}

.photo-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 300;
  color: rgba(255,255,255,0.1);
  line-height: 1;
}

.photo-caption {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ghost);
}

.photo-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* ════════════════════════════
   WRITINGS
════════════════════════════ */
.writings-section {
  padding: 96px 52px;
  border-bottom: 1px solid var(--rule);
}

.writings-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 52px;
}

.writings-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ivory);
}

.writings-heading em {
  display: block;
  font-style: italic;
  color: var(--amber);
}

.writings-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.75;
  color: var(--muted);
}

.writings-body em { color: var(--ivory); font-style: normal; }

.writings-cta {
  display: inline-block;
  margin-top: 24px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  border-bottom: 1px solid var(--amber-lo);
  padding-bottom: 3px;
  transition: color 0.25s, border-color 0.25s;
}

.writings-cta:hover { color: var(--ivory); border-color: var(--ivory); }

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

.post-card {
  background: var(--card);
  padding: 36px 30px;
  position: relative;
  transition: background 0.25s;
}

.post-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}

.post-card:hover { background: #1A1714; }
.post-card:hover::after { transform: scaleX(1); }

.post-date {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

.post-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 300;
  line-height: 1.2;
  color: var(--ivory);
  margin-bottom: 14px;
}

.post-excerpt {
  font-size: 14px;
  line-height: 1.7;
  color: var(--dim);
  margin-bottom: 22px;
}

.post-read {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ghost);
  transition: color 0.25s;
}

.post-card:hover .post-read { color: var(--amber); }

/* ════════════════════════════
   WORKS
════════════════════════════ */
.works-section {
  padding: 96px 52px;
  border-bottom: 1px solid var(--rule);
}

.works-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 52px;
}

.works-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 300;
  line-height: 1;
  color: var(--ivory);
}

.works-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.75;
  color: var(--muted);
}

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

.work-card {
  background: var(--card);
  padding: 36px 30px;
  position: relative;
  transition: background 0.25s;
}

.work-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}

.work-card:hover { background: #1A1714; }
.work-card:hover::after { transform: scaleX(1); }

.work-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 24px;
  background: var(--ghost);
}

.work-category {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}

.work-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 300;
  color: var(--ivory);
  margin-bottom: 10px;
}

.work-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--dim);
}

/* ════════════════════════════
   FOOTER
════════════════════════════ */
.site-footer {
  padding: 32px 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ghost);
}

.footer-nav { display: flex; gap: 28px; }

.footer-nav a {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ghost);
  transition: color 0.25s;
}

.footer-nav a:hover { color: var(--amber); }

.footer-copy {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--ghost);
  letter-spacing: 0.1em;
}

/* ════════════════════════════
   INNER PAGES
════════════════════════════ */
.page-hero {
  min-height: 38vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px 52px 56px;
  border-bottom: 1px solid var(--rule);
}

.page-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: 0.02em;
}

.entry-content {
  padding: 72px 52px;
  max-width: 780px;
}

.entry-content p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1.6em;
}

.entry-content p em { color: var(--ivory); font-style: normal; }
.entry-content h2 { font-size: 38px; color: var(--ivory); margin: 2em 0 0.8em; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 64px 52px;
}

/* ════════════════════════════
   MOBILE
════════════════════════════ */
@media (max-width: 860px) {
  .site-header          { padding: 18px 24px; }
  .site-header.scrolled { padding: 14px 24px; }
  .nav-links            { display: none; position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center; align-items: center; gap: 36px; }
  .nav-links.open       { display: flex; }
  .nav-links.open a     { font-size: 13px; }
  .nav-toggle           { display: flex; }

  .hero                 { padding: 0 24px 64px; }
  .hero-scroll          { display: none; }

  .images-section,
  .writings-section,
  .works-section,
  .site-footer          { padding-left: 24px; padding-right: 24px; }

  .images-intro,
  .writings-intro,
  .works-intro          { grid-template-columns: 1fr; gap: 24px; }

  .photo-grid           { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .photo-card.p1        { grid-column: 1 / 3; min-height: 240px; }
  .photo-card.p2,
  .photo-card.p3,
  .photo-card.p4,
  .photo-card.p5        { grid-column: span 1; min-height: 180px; }

  .posts-grid,
  .works-grid           { grid-template-columns: 1fr; }

  .site-footer          { flex-direction: column; gap: 18px; text-align: center; }
  .archive-grid         { grid-template-columns: 1fr; padding: 48px 24px; }
  .page-hero            { padding: 120px 24px 48px; }
  .entry-content        { padding: 56px 24px; }
}
