/*
Theme Name:  Neyaz Saberi
Theme URI:   https://neyazsaberi.ca
Description: Personal site for Neyaz Saberi, President of People Properties Limited, Halifax NS.
Version:     1.0.0
Author:      trippl inc
Author URI:  https://trippl.ca
License:     Private
Text Domain: neyaz-saberi
*/

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

/* ===== TOKENS ===== */
:root {
  --cream:     #F7F5F2;
  --ink:       #1C1C1A;
  --stone:     #6B6860;
  --rule:      #D8D4CE;
  --hero-fg:   rgba(247, 245, 242, 0.92);
  --ppl-green: #81b542;
}

/* ===== BASE ===== */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--ink); text-decoration: none; transition: color 0.2s ease, transform 0.2s ease; }
a:hover { opacity: 1; color: var(--ppl-green); transform: scale(1.05); }
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -999px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.875rem;
  z-index: 200;
}
.skip-link:focus { top: 1rem; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== NAV ===== */

/* On interior pages (no hero image), lock nav into its scrolled state */
body:not(.home):not(.single) #site-nav {
  background: rgba(247, 245, 242, 0.98);
  box-shadow: 0 1px 0 var(--rule);
}
body:not(.home):not(.single) #site-nav .nav-name,
body:not(.home):not(.single) #site-nav .nav-links a {
  color: var(--ink);
  text-shadow: none;
}
body:not(.home):not(.single) #site-nav .nav-links a { color: var(--stone); }
body:not(.home):not(.single) #site-nav .nav-cta {
  border-color: var(--ink);
  color: var(--ink) !important;
}

#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 1.25rem 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto;
}
#site-nav a { pointer-events: auto; }
#site-nav.scrolled {
  background: rgba(247, 245, 242, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--rule);
}
#site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
#site-nav.scrolled .nav-name {
  color: var(--ink);
  text-shadow: none;
}

.nav-links {
  display: none;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
@media (min-width: 640px) { .nav-links { display: flex; } }

.nav-links a {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  display: inline-block;
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}
#site-nav.scrolled .nav-links a {
  color: var(--stone);
  text-shadow: none;
}
.nav-links a:hover {
  opacity: 1;
  color: var(--ppl-green);
  text-shadow: none;
  transform: scale(1.1);
}
#site-nav.scrolled .nav-links a:hover { color: var(--ppl-green); }

.nav-cta {
  padding: 0.45rem 1rem;
  border: 1px solid rgba(247, 245, 242, 0.6);
  color: var(--hero-fg) !important;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
#site-nav.scrolled .nav-cta {
  border-color: var(--ink);
  color: var(--ink) !important;
}
.nav-cta:hover {
  background: var(--hero-fg);
  color: var(--ink) !important;
  opacity: 1;
}
#site-nav.scrolled .nav-cta:hover {
  background: var(--ink);
  color: var(--cream) !important;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 20, 18, 0.55) 0%,
    rgba(20, 20, 18, 0.0)  22%,
    rgba(20, 20, 18, 0.0)  55%,
    rgba(20, 20, 18, 0.80) 100%
  );
}

@media (max-width: 639px) {
  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(20, 20, 18, 0.55) 0%,
      rgba(20, 20, 18, 0.35) 22%,
      rgba(20, 20, 18, 0.35) 55%,
      rgba(20, 20, 18, 0.80) 100%
    );
  }
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(3rem, 8vw, 5.5rem);
}
.hero-eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}
h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--hero-fg);
  margin-bottom: 1rem;
}
.hero-tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.3rem, 2.5vw, 1.45rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(247, 245, 242, 0.75);
}

/* ===== SECTIONS ===== */
section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
section + section { border-top: 1px solid var(--rule); }

.section-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 2.5rem;
}

@media (max-width: 639px) {
  .section-label {
    font-size: 0.82rem;
  }
}
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 2.5rem;
}

h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 1.75rem;
  max-width: 22ch;
}

p {
  color: var(--stone);
  max-width: 60ch;
  margin-bottom: 1.25rem;
}
p:last-child { margin-bottom: 0; }

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}
@media (min-width: 760px) {
  .about-grid {
    grid-template-columns: 1fr 380px;
    gap: 6rem;
  }
}
.about-portrait {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  order: -1;
}
@media (min-width: 760px) { .about-portrait { order: 0; } }

/* ===== PHILOSOPHY ===== */
.tenets {
  list-style: none;
  margin-top: 0.5rem;
}
.tenets li {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 2rem;
  align-items: baseline;
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.tenets li:last-child { border-bottom: 1px solid var(--rule); }
.tenet-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--stone);
  line-height: 1.7;  /* match text line-height so baseline aligns */
}
.tenet-text,
.tenet-text p,
.tenet-text .wp-block-paragraph {
  font-size: 0.975rem;
  color: var(--ink);
  line-height: 1.7;
  max-width: none;
  margin: 0;
}
/* Strip block editor spacing from tenet content */
.tenet-text > * { margin-top: 0; margin-bottom: 0; }

/* ===== PPL ===== */
.ppl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}
@media (min-width: 760px) {
  .ppl-grid {
    grid-template-columns: 380px 1fr;
    gap: 6rem;
  }
}
.ppl-portrait {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: left top;
}
.ppl-text { max-width: 58ch; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.2rem;
}
.arrow-link:hover {
  border-color: var(--ppl-green);
}

/* ===== WRITING (front page teaser) ===== */
.writing-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.writing-header h2 { margin-bottom: 0; }

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 760px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 3rem;
  }
}

.post-card {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .post-card { border-top: 1px solid var(--rule); }
}

.post-card__meta {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.85rem;
}

.post-card__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 300;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.85rem;
  max-width: 26ch;
}
.post-card__title a { color: var(--ink); }

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--stone);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.post-card__read-more { margin-top: 0; }

/* ===== CONTACT ===== */
.contact-wrap { max-width: 540px; }

.contact-email:hover { transform: none; }

.contact-email {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 300;
  color: var(--ink);
  margin: 1.75rem 0 2.25rem;
  word-break: break-all;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}
.social-links a {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.15rem;
}
.social-links a:hover { color: var(--ink); border-color: var(--ink); opacity: 1; }

/* ===== MOBILE NAV TOGGLE ===== */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
  flex-shrink: 0;
}
@media (min-width: 640px) { .nav-toggle { display: none; } }

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.3s ease;
  transform-origin: center;
}
/* White bars when over the hero (unscrolled, on home/single) */
.home #site-nav:not(.scrolled) .nav-toggle__bar,
.single #site-nav:not(.scrolled) .nav-toggle__bar {
  background: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}

/* Open state — animate to × */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu drawer */
@media (max-width: 639px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--cream);
    padding: 6rem 2rem 2rem;
    z-index: 9998;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    list-style: none;
  }
  .nav-links.is-open {
    transform: translateX(0);
  }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--rule); }
  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    color: var(--ink);
    text-shadow: none;
  }
  .nav-links a:hover { color: var(--ppl-green); }
  .nav-cta {
    border-color: var(--ink);
    color: var(--ink) !important;
    margin-top: 0.5rem;
  }
}

/* ===== FOOTER ===== */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-main {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
@media (min-width: 600px) {
  .footer-main {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
footer p {
  font-size: 0.72rem;
  color: var(--stone);
  max-width: none;
  margin: 0;
}
.footer-login {
  font-size: 0.72rem;
  color: var(--stone);
  border-bottom: 1px solid transparent;
}
.footer-login:hover {
  color: var(--ink);
  border-color: var(--ink);
  opacity: 1;
}

/* Social Icons */
.footer-social {
  padding-top: 0;
}
.social-icons {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--stone);
  transition: color 0.2s ease, transform 0.2s ease;
}
.social-icons a:hover {
  color: var(--ppl-green);
  transform: scale(1.15);
}
.social-icons svg {
  width: 18px;
  height: 18px;
}

/* ===== ARCHIVE ===== */
.archive-wrap {
  padding-top: clamp(6rem, 10vw, 8rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.archive-header { margin-bottom: 3rem; }
.archive-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--ink);
  max-width: 30ch;
  margin-bottom: 0;
}

.archive-list { display: flex; flex-direction: column; }

.archive-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
}
@media (min-width: 600px) {
  .archive-entry {
    grid-template-columns: 200px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
}

.archive-entry__image-link {
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}
.archive-entry__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.archive-entry__image-link:hover .archive-entry__image { transform: scale(1.03); }

.archive-entry__meta {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.75rem;
}
.archive-entry__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 300;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.85rem;
  max-width: 30ch;
}
.archive-entry__title a { color: var(--ink); }
.archive-entry__excerpt { margin-bottom: 1.25rem; }
.archive-entry__excerpt p { font-size: 0.9rem; }

/* Pagination */
.pagination .nav-links { display: flex; gap: 0.5rem; margin-top: 3rem; }
.pagination .page-numbers {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--stone);
  padding: 0.3rem 0.6rem;
  border: 1px solid transparent;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  color: var(--ink);
  border-color: var(--rule);
}

/* ===== SINGLE POST ===== */
.single-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.single-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.single-header {
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}
.single-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
  max-width: 28ch;
  margin-bottom: 1.25rem;
}
.single-meta {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  max-width: none;
  margin: 0;
}

.single-content {
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.entry-content {
  max-width: 68ch;
}
.entry-content p {
  margin-bottom: 1.5rem;
}
.entry-content h2,
.entry-content h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
}
.entry-content a {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.1rem;
}
.entry-content a:hover {
  border-color: var(--ppl-green);
}
.entry-content em { font-style: italic; color: var(--stone); }

/* Post card image */
.post-card__image-link { display: block; overflow: hidden; margin-bottom: 1.25rem; }
.post-card__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card__image-link:hover .post-card__image { transform: scale(1.03); }

/* Post nav */
.post-nav {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
}
.post-nav .container {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}
.post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 40ch;
}
.post-nav__link--next { text-align: right; margin-left: auto; }
.post-nav__label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
}
.post-nav__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--ink);
}

/* ===== WORDPRESS: BLOG / ARCHIVE / SINGLE =====
 * Styles for blog index, single posts, and archive pages.
 *
 * .post-grid        — archive listing layout
 * .post-card        — individual post card
 * .post-card__meta  — date + category label
 * .post-card__title — h2/h3 post title
 * .entry-content    — WP post body (prose styles)
 * .entry-content h2, h3, h4, blockquote, ul, ol, pre
 * .wp-block-*       — Gutenberg block overrides
 * ============================================== */
