/*
Theme Name: Ivy Kleinman Portfolio
Theme URI: https://www.ivykleinman.com
Author: Ivy Kleinman
Author URI: https://www.ivykleinman.com
Description: A custom editorial portfolio theme for journalist, photojournalist, and writer Ivy Kleinman. Posts in Journalism, Photography, and Writing categories automatically appear in their respective sections on the homepage.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ivykleinman
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  --ink: #1a1a1a;
  --paper: #faf9f6;
  --warm: #f5f0e8;
  --accent: #8b4513;
  --accent-light: #a0522d;
  --muted: #6b6b6b;
  --light-rule: #d4cfc6;
  --highlight: #e8dfd0;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Source Sans 3', 'Source Sans Pro', -apple-system, sans-serif;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ========================================
   NAVIGATION
   ======================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-rule);
  transition: box-shadow 0.3s ease;
}

.site-nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nav-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  padding: 160px 2rem 100px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 85vh;
}

.hero-text .tagline {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.15s forwards;
}

.hero-text h1 {
  font-family: var(--serif);
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.hero-text .bio {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 480px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero-text .bio strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.45s forwards;
}

.hero-image {
  opacity: 0;
  animation: fadeIn 1s ease 0.4s forwards;
}

.hero-image-frame {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 20px 20px 0 var(--highlight);
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(10%);
  transition: filter 0.4s ease;
}

.hero-image-frame:hover img {
  filter: grayscale(0%);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-outline {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ========================================
   SECTIONS (shared)
   ======================================== */
.home-section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.section-divider {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  border: none;
  border-top: 1px solid var(--light-rule);
}

/* ========================================
   JOURNALISM CLIPS GRID
   ======================================== */
.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.clip-card {
  background: white;
  border: 1px solid var(--light-rule);
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: block;
}

.clip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.clip-card-img {
  height: 200px;
  overflow: hidden;
  background: var(--warm);
}

.clip-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.clip-card:hover .clip-card-img img {
  transform: scale(1.04);
}

.clip-card-body {
  padding: 1.5rem;
}

.clip-pub {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.clip-card-body h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.clip-card-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.clip-role {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--warm);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
}

/* ========================================
   PHOTOGRAPHY GRID
   ======================================== */
.photo-categories {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.photo-cat-btn {
  padding: 0.5rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid var(--light-rule);
  background: transparent;
  color: var(--muted);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.photo-cat-btn:hover,
.photo-cat-btn.active {
  border-color: var(--ink);
  color: var(--ink);
  background: white;
}

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

.photo-grid-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 2px;
  position: relative;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-grid-item:hover img {
  transform: scale(1.06);
}

.photo-grid-item.tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

.photo-grid-item .photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  transition: background 0.3s ease;
}

.photo-grid-item:hover .photo-overlay {
  background: rgba(0,0,0,0.35);
}

.photo-overlay span {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
}

.photo-grid-item:hover .photo-overlay span {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   CREATIVE WRITING
   ======================================== */
.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.writing-card {
  display: block;
  background: white;
  border: 1px solid var(--light-rule);
  border-radius: 2px;
  padding: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
}

.writing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.writing-card .pub-year {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.writing-card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.writing-card .publisher {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.writing-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.writing-workshops {
  margin-top: 3rem;
  padding: 2.5rem;
  background: var(--warm);
  border-radius: 2px;
}

.writing-workshops h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.workshop-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  align-items: baseline;
}

.workshop-year {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  width: 50px;
}

.workshop-detail {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

.workshop-detail strong { color: var(--ink); }

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.about-text p strong { color: var(--ink); }

.about-sidebar {
  background: var(--warm);
  padding: 2rem;
  border-radius: 2px;
}

.about-sidebar h4 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.about-sidebar ul {
  font-size: 0.9rem;
  line-height: 2;
  color: var(--muted);
}

.about-sidebar ul li::before {
  content: '\2014\00a0';
  color: var(--accent);
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
  background: var(--ink);
  color: var(--paper);
  padding: 5rem 2rem;
  text-align: center;
}

.contact-section .section-label { color: var(--accent-light); }
.contact-section .section-title { color: var(--paper); }

.contact-info {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-item { text-align: center; }

.contact-item .label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250,249,246,0.5);
  margin-bottom: 0.25rem;
}

.contact-item a,
.contact-item .value {
  font-size: 1rem;
  color: var(--paper);
  transition: color 0.2s;
}

.contact-item a:hover { color: var(--accent-light); }

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 2rem;
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: rgba(250,249,246,0.35);
  letter-spacing: 0.05em;
}

/* ========================================
   SINGLE POST PAGE
   ======================================== */
.single-post-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 140px 2rem 5rem;
}

.single-post-wrapper .post-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.single-post-wrapper h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.single-post-wrapper .featured-img {
  margin-bottom: 2rem;
  border-radius: 2px;
  overflow: hidden;
}

.single-post-wrapper .featured-img img {
  width: 100%;
  height: auto;
}

.single-post-wrapper .entry-content {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--muted);
}

.single-post-wrapper .entry-content p { margin-bottom: 1.5rem; }
.single-post-wrapper .entry-content strong { color: var(--ink); }
.single-post-wrapper .entry-content a { color: var(--accent); text-decoration: underline; }

.single-post-wrapper .post-nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--light-rule);
  display: flex;
  justify-content: space-between;
}

.single-post-wrapper .post-nav a {
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--light-rule);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
  }

  .nav-links.open { display: flex; }

  .hero {
    grid-template-columns: 1fr;
    padding: 120px 1.5rem 60px;
    gap: 2.5rem;
    min-height: auto;
  }

  .hero-text h1 { font-size: 2.6rem; }
  .hero-image { order: -1; }
  .hero-image-frame { aspect-ratio: 4/3; box-shadow: 12px 12px 0 var(--highlight); }

  .clips-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .writing-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-info { flex-direction: column; gap: 1.5rem; }
}

/* WordPress alignment classes */
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
