/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design tokens ── */
:root {
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.65);
  --color-text-faint: rgba(255, 255, 255, 0.4);
  --color-border: rgba(255, 255, 255, 0.15);
  --color-border-subtle: rgba(255, 255, 255, 0.08);
}

/* ── Reset ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
  outline: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

/* ── Buttons ── */
.primary-button,
.outline-button {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.primary-button:hover,
.outline-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.85);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 3rem;
}

/* ── Fixed background ── */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.12);
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.125rem;
  padding-bottom: 1.125rem;
}

.logo a {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.menu-button span {
  width: 22px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.75);
  display: block;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-button.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-button.open span:nth-child(2) {
  opacity: 0;
}

.menu-button.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Main ── */
main {
  flex: 1;
  position: relative;
  z-index: 1;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.375rem 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo {
  font-weight: 600;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.04em;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.38);
}

.footer-right {
  display: flex;
  gap: 2rem;
}

.footer-right a {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-right a:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* ══════════════ HOME TAB ══════════════ */

.hero {
  padding: 6rem 0 4.5rem;
  text-align: center;
}

.hero .container {
  max-width: 780px;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Mission quote ── */
.mission {
  padding: 5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mission .container {
  max-width: 760px;
}

.mission-text {
  font-size: clamp(1.1rem, 2.5vw, 1.375rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  text-align: center;
}

/* ── About / What I Do cards ── */
.about-cards {
  padding: 5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-card {
  background: rgba(0, 0, 0, 0.3);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card .card-icon {
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.85);
  stroke-width: 1.6;
}

.info-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

.info-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
  flex: 1;
}

.info-card p a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.info-card p a:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.8);
}

.info-card .card-meta {
  font-size: 0.7375rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
  font-weight: 500;
}

.info-card .outline-button {
  align-self: flex-start;
  font-size: 0.75rem;
}

/* ── CTA Banner ── */
.cta-banner {
  padding: 5rem 0 6rem;
  text-align: center;
}

.cta-banner .container {
  max-width: 620px;
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
  margin-bottom: 2.25rem;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ══════════════ NEWSLETTER TAB ══════════════ */

.newsletter-page {
  padding: 4rem 0 5rem;
  min-height: calc(100vh - 56px);
}

/* ── Page header ── */
.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
}

.page-header p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Two-column layout ── */
.page-layout {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 256px;
  flex-shrink: 0;
  position: sticky;
  top: 72px;
}

/* ── Filters ── */
.blog-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-categories {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.35rem 0.875rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.search-box {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.search-box input {
  background: transparent;
  border: none;
  padding: 0.35rem 0.75rem;
  color: #fff;
  font-size: 0.8125rem;
  width: 150px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.search-btn {
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.search-btn:hover {
  color: #fff;
}

/* ── Featured Post ── */
.featured-post {
  padding: 1.75rem 0 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 0.5rem;
}

.featured-post h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.featured-post p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.featured-post img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  margin-bottom: 1.25rem;
}

/* ── Article grid (2 col) ── */
.article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.article-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.article-item:nth-child(odd) {
  padding-right: 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
}

.article-item:nth-child(even) {
  padding-left: 2rem;
}

.article-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.article-item p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.65;
  margin-bottom: 0.875rem;
}

/* ── Meta ── */
.post-meta {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.post-category {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.post-date {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Read more ── */
.read-more {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
  display: inline-block;
}

.read-more:hover {
  color: #fff;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  padding: 2rem 0 0.5rem;
  flex-wrap: wrap;
}

.page-btn {
  padding: 0.45rem 0.875rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.page-btn:hover:not([disabled]),
.page-btn.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.page-btn[disabled] {
  opacity: 0.28;
  cursor: not-allowed;
}

/* ── Articles count ── */
.articles-info {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Loading / Error ── */
.loading-indicator {
  padding: 3rem 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9375rem;
}

.error-message {
  padding: 2rem 0;
  color: rgba(255, 255, 255, 0.65);
}

.error-message p {
  margin-bottom: 1rem;
}

.retry-btn {
  padding: 0.45rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.retry-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.no-articles {
  padding: 3rem 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9375rem;
}

/* ── Sidebar ── */
.sidebar-section {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
}

.sidebar-section h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
}

.sidebar-section p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subscribe-form input {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 0.6rem 0.75rem;
  font-size: 0.8125rem;
  transition: border-color 0.2s ease;
}

.subscribe-form input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.subscribe-form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.subscribe-btn {
  width: 100%;
  padding: 0.625rem;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.subscribe-btn[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
}

.subscription-message {
  margin-top: 0.875rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid;
  line-height: 1.5;
}

.subscription-message.success {
  color: rgba(110, 210, 130, 0.9);
  border-color: rgba(110, 210, 130, 0.25);
}

.subscription-message.error {
  color: rgba(220, 100, 100, 0.9);
  border-color: rgba(220, 100, 100, 0.25);
}

.form-errors {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: rgba(220, 100, 100, 0.8);
}

.form-errors p {
  margin: 0.2rem 0;
  color: rgba(220, 100, 100, 0.8);
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 99;
  }

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

  .nav-links a {
    padding: 1rem 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.875rem;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .menu-button {
    display: flex;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .footer-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .footer-right {
    gap: 1.25rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 960px) {
  .page-layout {
    flex-direction: column-reverse;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .sidebar-section {
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 0;
    padding-bottom: 2rem;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 640px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .article-item:nth-child(odd) {
    padding-right: 0;
    border-right: none;
  }

  .article-item:nth-child(even) {
    padding-left: 0;
  }

  .blog-filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-box input {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 4rem 0 3rem;
  }
}
