/* =============================================
   Josh Fischer Ghost Theme
   Dark + Bronze | Monospace Labels + Modern Display
   ============================================= */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Space+Mono:wght@400;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --bg: #0a0a0a;
  --bg-subtle: rgba(255,255,255,0.02);
  --bg-hover: rgba(194,145,86,0.04);
  --text: #e8e4df;
  --text-muted: rgba(232,228,223,0.6);
  --text-faint: rgba(232,228,223,0.35);
  --text-ghost: rgba(232,228,223,0.2);
  --accent: #c29156;
  --accent-dim: rgba(194,145,86,0.15);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(194,145,86,0.2);
  --gh-font-heading: Outfit, sans-serif;
  --gh-font-body: Crimson Pro, Georgia, serif;
  --font-display: var(--gh-font-heading);
  --font-body: var(--gh-font-body);
  --font-mono: 'Space Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--text);
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(194,145,86,0.3);
}

/* --- Label Style (reused everywhere) --- */
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
}

.label--small {
  font-size: 10px;
  letter-spacing: 2px;
}

/* --- Section Headings --- */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 64px 0;
}

/* =============================================
   Navigation
   ============================================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: background 0.3s ease;
}

.site-nav.scrolled {
  background: rgba(10,10,10,0.85);
}

.site-nav__logo {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.site-nav__links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.site-nav__link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

.site-nav__link:hover,
.site-nav__link.active {
  color: var(--accent);
}

.site-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.site-nav__link:hover::after,
.site-nav__link.active::after {
  transform: scaleX(1);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

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

/* =============================================
   Hero
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0 40px;
}

.hero__accent-line {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(194,145,86,0.2), transparent);
  transform: rotate(-15deg) scaleY(1.5);
}

.hero__accent-line:nth-child(1) { right: 20%; }
.hero__accent-line:nth-child(2) {
  right: 22%;
  background: linear-gradient(to bottom, transparent, rgba(194,145,86,0.08), transparent);
}

.hero__content {
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -3px;
  margin: 0 0 32px 0;
  animation: fadeInUp 0.8s ease forwards 0.4s;
  opacity: 0;
}

.hero__title span {
  color: var(--accent);
}

.hero__subtitle {
  font-size: 22px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 48px 0;
  font-weight: 300;
  animation: fadeInUp 0.8s ease forwards 0.6s;
  opacity: 0;
}

.hero__subtitle em {
  color: var(--accent);
  font-style: italic;
}

.hero__actions {
  display: flex;
  gap: 16px;
  animation: fadeInUp 0.8s ease forwards 0.8s;
  opacity: 0;
}

/* --- Buttons --- */
.btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 32px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-block;
  border: none;
}

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

.btn--primary:hover {
  background: #d4a36a;
  color: var(--bg);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(232,228,223,0.2);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================================
   About Section
   ============================================= */
.about {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px;
}

.about__grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about__heading {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 28px 0;
}

.about__heading span {
  color: var(--text-faint);
}

.about__text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
  font-weight: 300;
}

.about__text p {
  margin: 0 0 16px 0;
}

.about__text p:last-child {
  margin: 0;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.stat-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 36px 28px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.stat-card__number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.stat-card__sub {
  font-size: 13px;
  color: var(--text-faint);
}

/* =============================================
   Work / Projects
   ============================================= */
.work {
  min-height: 100vh;
  padding: 120px 40px;
}

.work__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding: 48px 40px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  margin-bottom: 2px;
  transition: all 0.4s ease;
  align-items: start;
}

.project-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent-dim);
  transform: translateX(8px);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
}

.project-card__role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
}

.project-card__desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 20px 0;
  font-weight: 300;
}

.project-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid rgba(232,228,223,0.1);
  color: var(--text-faint);
}

/* =============================================
   Blog / Post Listing
   ============================================= */
.blog-section {
  padding: 120px 40px;
}

.blog-section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 32px 40px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text);
}

.post-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent-dim);
  transform: translateX(8px);
  color: var(--text);
}

.post-card__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.post-card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

/* Featured post card (first on listing) */
.post-card--featured {
  grid-template-columns: 1fr;
  padding: 56px 48px;
}

.post-card--featured .post-card__title {
  font-size: 32px;
  margin-bottom: 12px;
}

.post-card--featured .post-card__excerpt {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.7;
  max-width: 600px;
}

/* Post grid (alternative layout for writing section) */
.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
}

.post-grid-card {
  padding: 40px 32px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  text-decoration: none;
  color: var(--text);
}

.post-grid-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent-dim);
  color: var(--text);
}

.post-grid-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.post-grid-card__date {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 24px;
}

/* =============================================
   Single Post
   ============================================= */
.post {
  padding: 160px 40px 120px;
  max-width: 740px;
  margin: 0 auto;
}

.post__header {
  margin-bottom: 64px;
}

.post__tag {
  margin-bottom: 20px;
}

.post__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin: 0 0 24px 0;
}

.post__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 1px;
}

.post__feature-image {
  width: calc(100% + 80px);
  margin-left: -40px;
  margin-bottom: 48px;
  border: 1px solid var(--border);
}

.post__feature-image img {
  width: 100%;
  display: block;
}

/* --- Post Content (Ghost editor output) --- */
.post__content {
  font-size: 19px;
  line-height: 1.8;
  color: var(--text-muted);
}

.post__content h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin: 64px 0 24px;
  letter-spacing: -1px;
}

.post__content h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin: 48px 0 16px;
}

.post__content p {
  margin: 0 0 24px;
}

.post__content a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.3s;
}

.post__content a:hover {
  border-color: var(--accent);
}

.post__content blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 28px;
  margin: 40px 0;
  font-style: italic;
  color: var(--text);
  font-size: 22px;
  line-height: 1.6;
}

.post__content code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: rgba(255,255,255,0.06);
  padding: 3px 8px;
  border-radius: 2px;
  color: var(--accent);
}

.post__content pre {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 24px 28px;
  margin: 40px 0;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
}

.post__content pre code {
  background: none;
  padding: 0;
  color: var(--text-muted);
}

.post__content ul,
.post__content ol {
  margin: 0 0 24px 24px;
}

.post__content li {
  margin-bottom: 8px;
}

.post__content img {
  border: 1px solid var(--border);
  margin: 40px 0;
}

.post__content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 64px 0;
}

.post__content figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  margin-top: -28px;
  margin-bottom: 40px;
}

/* Ghost-specific cards */
.post__content .kg-card {
  margin: 40px 0;
}

.post__content .kg-image-card img {
  width: 100%;
}

.post__content .kg-width-wide {
  width: calc(100% + 80px);
  margin-left: -40px;
}

.post__content .kg-width-full {
  width: calc(100% + 160px);
  margin-left: -80px;
}

.post__content .kg-bookmark-card {
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}

.post__content .kg-bookmark-card:hover {
  border-color: var(--accent-dim);
}

/* =============================================
   Contact / Subscribe
   ============================================= */
.contact {
  min-height: 50vh;
  padding: 120px 40px;
  display: flex;
  align-items: center;
}

.contact__inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact__heading {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 24px 0;
}

.contact__text {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-weight: 300;
}

/* Email signup form */
.subscribe-form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto 48px;
}

.subscribe-form input[type="email"] {
  flex: 1;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--accent);
}

.subscribe-form input[type="email"]::placeholder {
  color: var(--text-faint);
}

.subscribe-form button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  cursor: pointer;
  font-weight: 700;
  transition: background 0.3s;
  white-space: nowrap;
}

.subscribe-form button:hover {
  background: #d4a36a;
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.social-link {
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.social-link:hover {
  transform: translateY(-4px);
}

.social-link__platform {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.social-link__handle {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
  padding: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer__identity {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-faint);
}

.site-footer__location {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-ghost);
}

/* =============================================
   Pagination
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 64px 0;
}

.pagination a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 24px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.animate-in--d1 { animation-delay: 0.2s; }
.animate-in--d2 { animation-delay: 0.4s; }
.animate-in--d3 { animation-delay: 0.6s; }
.animate-in--d4 { animation-delay: 0.8s; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 32px 24px;
  }

  .project-card:hover {
    transform: none;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .post-card:hover {
    transform: none;
  }

  .post__content .kg-width-wide,
  .post__content .kg-width-full {
    width: 100%;
    margin-left: 0;
  }

  .post__feature-image {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 680px) {
  .site-nav {
    padding: 16px 24px;
  }

  .site-nav__links {
    display: none;
  }

  .site-nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.95);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 0 24px;
  }

  .hero__actions {
    flex-direction: column;
  }

  .about,
  .work,
  .blog-section,
  .contact {
    padding: 80px 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .subscribe-form input[type="email"] {
    border-right: 1px solid var(--border);
  }

  .social-links {
    gap: 24px;
  }

  .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 32px 24px;
  }

  .contact__heading {
    font-size: 36px;
  }
}

/*
 * subscribe confirmation and error
 */

/* Subscribe form states */
.subscribe-success,
.subscribe-error {
    display: none;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 1px;
    text-align: center;
    max-width: 480px;
    margin: 16px auto 48px;
}

.subscribe-success {
    color: var(--accent);
}

.subscribe-error {
    color: #e25656;
}

[data-members-success] ~ .subscribe-success {
    display: block;
}

[data-members-success] {
    display: none;
}

[data-members-error] ~ .subscribe-error {
    display: block;
}
