/* ============================================================
   RF Personal Site — style.css
   Palette: Charcoal bg, off-white text, forest green accent
   Fonts: Fraunces (display) + Source Serif 4 (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  --bg:          #1c1c1a;
  --bg-card:     #242422;
  --bg-subtle:   #2a2a27;
  --border:      #333330;
  --text:        #e8e4dd;
  --text-muted:  #8a8680;
  --accent:      #4a7c59;
  --accent-light:#5d9970;
  --accent-dim:  #3a6147;
  --white:       #f5f2ec;
  --font-display:'Fraunces', Georgia, serif;
  --font-body:   'Source Serif 4', Georgia, serif;
  --nav-h:       68px;
  --radius:      4px;
  --max-w:       860px;
  --transition:  0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.75;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--white); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--white);
}

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout Helpers ───────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--sm {
  padding: 3rem 0;
}

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

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 1rem 0 2rem;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(28, 28, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.04em;
}
.nav__logo:hover { color: var(--white); }

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  font-family: var(--font-body);
}
.nav__links a:hover,
.nav__links a.active { color: var(--white); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s ease;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

/* Subtle grain texture overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-family: var(--font-body);
  font-weight: 400;
  margin-bottom: 1rem;
}

.hero__name {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.hero__tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-family: var(--font-body);
  max-width: 420px;
}

.hero__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  font-size: 0.8rem;
  font-family: var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-weight: 400;
  cursor: pointer;
  border: none;
}

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

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--white);
}

/* Hero photo */
.hero__photo-wrap {
  position: relative;
}

.hero__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 2px;
  filter: grayscale(15%);
}

/* placeholder when no photo */
.hero__photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  gap: 0.5rem;
}

.hero__photo-accent {
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 60%;
  height: 60%;
  border: 1px solid var(--accent-dim);
  border-radius: 2px;
  z-index: -1;
}

/* ── Quick Nav Cards ──────────────────────────────────────── */
.quick-nav {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.quick-nav__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.quick-nav__item {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--border);
  text-align: center;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}
.quick-nav__item:last-child { border-right: none; }
.quick-nav__item:hover {
  background: var(--bg-subtle);
  color: var(--white);
  text-decoration: none;
}

.quick-nav__icon {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}
.quick-nav__label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 400;
}

/* ── Recent Posts (Homepage) ──────────────────────────────── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: start;
}
.post-item:first-child { border-top: 1px solid var(--border); }

.post-item__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  font-family: var(--font-body);
  white-space: nowrap;
  padding-top: 0.2rem;
  min-width: 80px;
}

.post-item__body {}

.post-item__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.35rem;
  transition: color var(--transition);
}
.post-item:hover .post-item__title { color: var(--accent-light); }

.post-item__excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.post-item__arrow {
  color: var(--text-muted);
  font-size: 1rem;
  padding-top: 0.15rem;
  transition: transform var(--transition), color var(--transition);
}
.post-item:hover .post-item__arrow {
  color: var(--accent-light);
  transform: translateX(3px);
}

/* ── About Page ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.about-photo {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.about-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 2px;
  filter: grayscale(10%);
}

.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.85;
}

.about-content .lead {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  margin-bottom: 1.75rem;
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.6;
}

/* ── Hobbies ──────────────────────────────────────────────── */
.hobby-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}
.hobby-section:last-child { border-bottom: none; }

.hobby-section__header {
  margin-bottom: 2rem;
}

.hobby-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.hobby-section p {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 600px;
}

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

.photo-grid--wide {
  grid-template-columns: 2fr 1fr 1fr;
}

.photo-grid img,
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.photo-grid img:hover { opacity: 0.85; }

.photo-placeholder {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: default;
}

.photo-placeholder.tall {
  aspect-ratio: 3/4;
}

/* ── Projects ─────────────────────────────────────────────── */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  transition: border-color var(--transition);
}
.project-card:hover { border-color: var(--accent-dim); }

.project-card__title {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.project-card__desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.project-card__tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  border: 1px solid var(--accent-dim);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  margin-top: 0.75rem;
  font-family: var(--font-body);
}

.project-card__link {
  white-space: nowrap;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-body);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  transition: all var(--transition);
}
.project-card__link:hover {
  border-color: var(--accent);
  color: var(--white);
}

/* ── Blog Index ───────────────────────────────────────────── */
.blog-list {
  display: flex;
  flex-direction: column;
}

.blog-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: all var(--transition);
}
.blog-item:first-child { border-top: 1px solid var(--border); }

.blog-item__date-block {
  text-align: right;
  padding-top: 0.2rem;
}

.blog-item__month {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-family: var(--font-body);
}

.blog-item__day {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1;
}

.blog-item__year {
  font-size: 0.7rem;
  color: var(--border);
  font-family: var(--font-body);
}

.blog-item__title {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
  transition: color var(--transition);
}
.blog-item:hover .blog-item__title { color: var(--accent-light); }

.blog-item__excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 0.75rem;
}

.read-more {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition);
}
.blog-item:hover .read-more { gap: 0.6rem; }

/* ── Blog Post ────────────────────────────────────────────── */
.post-header {
  padding: calc(var(--nav-h) + 4rem) 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.post-header__meta {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-family: var(--font-body);
  margin-bottom: 1rem;
}

.post-header__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  font-style: italic;
}

.post-body {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 5rem;
}

.post-body h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 2.5rem 0 1rem;
}

.post-body p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}

.post-body img {
  width: 100%;
  border-radius: 2px;
  margin: 2rem 0;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  gap: 1rem;
}

.post-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-body);
  transition: color var(--transition);
}
.post-nav a:hover { color: var(--white); }

/* ── Contact ──────────────────────────────────────────────── */
.contact-wrap {
  max-width: 520px;
}

.contact-wrap p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-body);
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  transition: border-color var(--transition);
  outline: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-success {
  display: none;
  padding: 1rem 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  color: var(--accent-light);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--border);
  font-family: var(--font-body);
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition);
}
.lightbox__close:hover { color: var(--white); }

/* ── Page header (inner pages) ────────────────────────────── */
.page-header {
  padding: calc(var(--nav-h) + 4rem) 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

.page-header__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  font-style: italic;
}

.page-header__sub {
  margin-top: 0.75rem;
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .nav__links.open { display: flex; }
  .nav__links a {
    padding: 0.85rem 1.5rem;
    display: block;
    font-size: 0.85rem;
  }
  .nav__toggle { display: flex; }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero__photo-wrap { order: -1; }
  .hero__photo, .hero__photo-placeholder { aspect-ratio: 4/3; }
  .hero__photo-accent { display: none; }

  .quick-nav__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quick-nav__item:nth-child(2) { border-right: none; }
  .quick-nav__item:nth-child(3) { border-top: 1px solid var(--border); }
  .quick-nav__item:nth-child(4) {
    border-top: 1px solid var(--border);
    border-right: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-photo { position: static; }
  .about-photo img, .about-photo-placeholder { aspect-ratio: 16/9; }

  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid--wide { grid-template-columns: 1fr 1fr; }

  .project-card {
    grid-template-columns: 1fr;
  }

  .blog-item {
    grid-template-columns: 70px 1fr;
    gap: 1rem;
  }

  .post-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .quick-nav__grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: 1fr; }
  .hero__name { font-size: 2.4rem; }
}
