/* ============================================
   DARKMODE VENTURES — styles.css
   Modern, white-background, bold-text design
   ============================================ */

/* ---------- Font Face: TWK Lausanne ---------- */
@font-face {
  font-family: 'TWKLausanne';
  src: url('fonts/TWKLausanne-250.woff2') format('woff2'),
       url('fonts/TWKLausanne-250.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TWKLausanne';
  src: url('fonts/TWKLausanne-350.woff2') format('woff2'),
       url('fonts/TWKLausanne-350.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TWKLausanne';
  src: url('fonts/TWKLausanne-450.woff2') format('woff2'),
       url('fonts/TWKLausanne-450.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TWKLausanne';
  src: url('fonts/TWKLausanne-550.woff2') format('woff2'),
       url('fonts/TWKLausanne-550.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TWKLausanne';
  src: url('fonts/TWKLausanne-700.woff2') format('woff2'),
       url('fonts/TWKLausanne-700.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TWKLausanne';
  src: url('fonts/TWKLausanne-800.woff2') format('woff2'),
       url('fonts/TWKLausanne-800.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --color-black: #1a1a1a;
  --color-dark: #2f2625;
  --color-gray: #6b6b6b;
  --color-light-gray: #f5f5f5;
  --color-border: #e0e0e0;
  --color-white: #f3f2ef;
  --color-accent: #1a1a1a;
  --color-link: #1a1a1a;
  --color-link-hover: #555;
  --color-bg: #f3f2ef;
  --color-bg-alt: #eae9e6;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-nav-bg: rgba(243, 242, 239, 0.92);
  --color-card-bg: #f3f2ef;
  --color-card-border: rgba(0, 0, 0, 0.04);
  --color-card-shadow: rgba(0, 0, 0, 0.06);
  --color-nav-border: rgba(0, 0, 0, 0.06);
  --logo-filter: none;
  --font-primary: 'TWKLausanne', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
  --section-padding: 120px 0;
  --transition: 0.3s ease;
}

/* Dark mode theme */
[data-theme="dark"] {
  --color-black: #f0f0f0;
  --color-dark: #e0d8d6;
  --color-gray: #a0a0a0;
  --color-light-gray: #1e1e1e;
  --color-border: #333333;
  --color-white: #141414;
  --color-accent: #f0f0f0;
  --color-link: #f0f0f0;
  --color-link-hover: #aaa;
  --color-bg: #0f0f0f;
  --color-bg-alt: #1a1a1a;
  --color-text: #f0f0f0;
  --color-text-secondary: #a0a0a0;
  --color-nav-bg: rgba(15, 15, 15, 0.92);
  --color-card-bg: #1a1a1a;
  --color-card-border: rgba(255, 255, 255, 0.06);
  --color-card-shadow: rgba(0, 0, 0, 0.3);
  --color-nav-border: rgba(255, 255, 255, 0.08);
  --logo-filter: invert(1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 48px;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  font-size: 1.05rem;
  color: var(--color-gray);
  line-height: 1.8;
}

strong {
  color: var(--color-black);
  font-weight: 600;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

section {
  padding: var(--section-padding);
}

/* ---------- Navigation ---------- */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  transition: all var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 100%;
}

.navbar-logo {
  display: flex;
  align-items: center;
  background: transparent;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: none;
}

/* Logo background only on the home page (body with .page-home) */
.page-home .navbar-logo {
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .page-home .navbar-logo {
  background: rgba(30, 30, 30, 0.92);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.navbar-logo img {
  height: 28px;
  width: auto;
}

/* Right-side pill strip (Flexion-style white rounded bar) */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 0;
  background: #ffffff;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .navbar-right {
  background: rgba(30, 30, 30, 0.92);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.01em;
  position: relative;
  padding: 8px 18px;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-links a::after {
  display: none;
}

.navbar-links a:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .navbar-links a:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

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

/* ---------- Hero Section ---------- */
.hero {
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.92) 85%);
  pointer-events: none;
}

/* ---------- Intro Section ---------- */
.intro {
  padding: 160px 0 160px;
}

.intro-content {
  max-width: 100%;
}

.intro-statement {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 500;
  color: var(--color-black);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.intro-content a.inline-link {
  color: var(--color-black);
  font-weight: 500;
  border-bottom: 1.5px solid var(--color-black);
  padding-bottom: 1px;
  transition: border-color var(--transition), color var(--transition);
}

.intro-content a.inline-link:hover {
  color: var(--color-gray);
  border-color: var(--color-gray);
}

/* ---------- Section Label ---------- */
.section-label {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-gray);
  letter-spacing: 0.02em;
  margin-bottom: 32px;
  line-height: 1;
}

/* ---------- Portfolio Section ---------- */
.portfolio {
  padding: 80px 0 100px;
  background: #ffffff;
}

[data-theme="dark"] .portfolio {
  background: var(--color-bg);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Portfolio card container — fade reveal on hover */
.portfolio-card {
  display: block;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  position: relative;
}

.portfolio-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.portfolio-card-front,
.portfolio-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Front face */
.portfolio-card-front {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  padding: 32px;
  flex-direction: column;
  gap: 16px;
  z-index: 2;
  transition: opacity 0.45s ease;
}

[data-theme="dark"] .portfolio-card-front {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
}

.portfolio-card:hover .portfolio-card-front {
  opacity: 0;
}

.portfolio-card-front img {
  max-height: 36px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(0) invert(1);
  opacity: 0.85;
  transition: all var(--transition);
}

[data-theme="dark"] .portfolio-card-front img {
  filter: grayscale(100%) brightness(0) invert(1);
  opacity: 0.85;
}

/* Back face — revealed when front fades out */
.portfolio-card-back {
  background: #d0d0d0;
  border: 1px solid #b0b0b0;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  padding-bottom: 56px;
  text-align: center;
  z-index: 1;
  position: relative;
}

[data-theme="dark"] .portfolio-card-back {
  background: #d0d0d0;
  border: 1px solid #b0b0b0;
}

.portfolio-card-back h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

[data-theme="dark"] .portfolio-card-back h3 {
  color: #1a1a1a;
}

.portfolio-card-back .portfolio-card-desc {
  font-size: 0.92rem;
  color: #000000;
  margin: 0;
  line-height: 1.4;
}

.portfolio-card-back .portfolio-card-year {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.4;
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
}

/* ---------- Grass Section ---------- */
.grass-section {
  padding: 0;
  line-height: 0;
}

.grass-image {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Testimonials Section ---------- */
.testimonials {
  padding: 100px 0;
  background: #ffffff;
}

[data-theme="dark"] .testimonials {
  background: var(--color-bg);
}

.testimonials h2 {
  margin-bottom: 64px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.testimonial-card {
  background: var(--color-card-bg);
  border-radius: 4px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow var(--transition);
  border: 1px solid var(--color-card-border);
}

.testimonial-card:hover {
  box-shadow: 0 8px 40px var(--color-card-shadow);
}

.testimonial-quote {
  font-size: 1.02rem;
  color: var(--color-gray);
  line-height: 1.8;
  margin-bottom: 28px;
  flex-grow: 1;
}

.testimonial-author {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}

.testimonial-author h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 2px;
}

.testimonial-author p {
  font-size: 0.88rem;
  color: var(--color-gray);
}

/* ---------- Q&A / FAQ Section ---------- */
.faq {
  padding: 100px 0;
  background: #ffffff;
}

[data-theme="dark"] .faq {
  background: var(--color-bg);
}

.faq h2 {
  margin-bottom: 56px;
}

.faq-list {
  max-width: 820px;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-black);
  line-height: 1.4;
  gap: 16px;
}

.faq-question:hover {
  color: var(--color-gray);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform 0.3s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--color-black);
  transition: transform 0.3s ease;
}

.faq-icon::before {
  width: 16px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 2px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item.active .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 2000px;
}

.faq-answer-inner {
  padding-bottom: 28px;
}

.faq-answer-inner p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-gray);
}

.faq-answer-inner p + p {
  margin-top: 16px;
}

.faq-answer-inner a {
  color: var(--color-black);
  font-weight: 600;
  border-bottom: 1px solid var(--color-black);
}

.faq-answer-inner a:hover {
  color: var(--color-gray);
  border-color: var(--color-gray);
}

/* ---------- Divider ---------- */
.divider {
  padding: 0;
  border: none;
}

.divider .container {
  border-top: 1px solid var(--color-border);
}

/* ---------- Closing / Tagline Section ---------- */
.closing {
  padding: 120px 0 140px;
  text-align: center;
  background: #1a1a1a;
}

[data-theme="dark"] .closing {
  background: #f3f2ef;
}

.closing h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  color: #f0f0f0;
  letter-spacing: -0.03em;
}

[data-theme="dark"] .closing h1 {
  color: #1a1a1a;
}

/* ---------- Footer ---------- */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
  background: #ffffff;
  isolation: isolate;
}

[data-theme="dark"] .footer {
  background: var(--color-bg);
}

/* Gradient glow overlay — inspired by Framer blur+radial approach */
.footer-gradient-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  mask: linear-gradient(0deg, rgb(0, 0, 0) 0%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask: linear-gradient(0deg, rgb(0, 0, 0) 0%, rgba(0, 0, 0, 0) 100%);
  opacity: 0.8;
  pointer-events: none;
}

.footer-gradient-inner {
  width: 100%;
  height: 100%;
  border-radius: 0;
  filter: blur(40px) brightness(1.2);
  will-change: background;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 70%, #4e33ff 0%, #4e33ff 10%, rgba(0, 0, 0, 0) 30%),
    radial-gradient(circle at 75% 60%, #17aeff 0%, #17aeff 10%, rgba(0, 0, 0, 0) 30%),
    radial-gradient(circle at 50% 95%, #17feb5 0%, #17feb5 8%, rgba(0, 0, 0, 0) 30%);
}

[data-theme="dark"] .footer-gradient-glow {
  opacity: 0.25;
}

/* Noise texture overlay via SVG filter — prevents gradient banding */
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.28;
  mix-blend-mode: overlay;
  pointer-events: none;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

.footer > .container {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 80px;
}

.footer-col-heading {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-gray);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  line-height: 1;
}

.footer-col-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-links li a {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-black);
  transition: color var(--transition);
}

.footer-col-links li a:hover {
  color: var(--color-gray);
}

.footer-logo {
  margin: 40px 0 60px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 300px;
}

.footer-logo-svg {
  width: 100%;
  height: auto;
  display: block;
}

[data-theme="dark"] .footer-logo-svg path {
  fill: #f0f0f0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
}

.footer-bottom-left a {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--color-black);
  transition: color var(--transition);
}

.footer-bottom-left a:hover {
  color: var(--color-gray);
}

.footer-bottom p {
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 400;
  color: #000000;
}

[data-theme="dark"] .footer-bottom p {
  color: #ffffff;
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .theme-toggle {
  color: #f0f0f0;
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle .toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.theme-toggle .toggle-icon svg {
  width: 16px;
  height: 16px;
}

/* Sun icon (shown in dark mode) */
.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: flex;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* Logo color — black in light mode, white in dark mode on all pages */
.navbar-logo svg {
  transition: color 0.3s ease;
  color: #1a1a1a;
}

.navbar-logo svg path {
  fill: currentColor;
}

[data-theme="dark"] .navbar-logo svg {
  color: #ffffff;
}

/* ---------- Navbar Spacer (for non-hero pages) ---------- */
.navbar-spacer {
  height: 72px;
}

/* ---------- White background pages (Writing & Founders) ---------- */
.page-writing,
.page-founders {
  background-color: #ffffff;
}

.page-writing .navbar-right,
.page-founders .navbar-right {
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .page-writing,
[data-theme="dark"] .page-founders {
  background-color: var(--color-bg);
}

[data-theme="dark"] .page-writing .navbar-right,
[data-theme="dark"] .page-founders .navbar-right {
  background: transparent;
  box-shadow: none;
}

/* ---------- Letter to Founders ---------- */
.letter-section {
  padding: 80px 0 60px;
}

.letter-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
}

.letter-header h2 {
  margin-bottom: 0;
}

.letter-back-link {
  font-size: 1rem;
  font-weight: 500;
}

.letter-back-link a.inline-link {
  color: var(--color-black);
  border-bottom: 1.5px solid var(--color-black);
  padding-bottom: 1px;
  transition: border-color var(--transition), color var(--transition);
}

.letter-back-link a.inline-link:hover {
  color: var(--color-gray);
  border-color: var(--color-gray);
}

.letter-body {
  max-width: 720px;
}

.letter-body p {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--color-gray);
  margin-bottom: 20px;
}

.letter-body p:last-child {
  margin-bottom: 0;
}

.letter-signature {
  font-weight: 400;
  color: var(--color-gray) !important;
  margin-top: 8px;
}

/* ---------- Privacy Policy ---------- */
.privacy-section {
  padding: 80px 0 60px;
}

.privacy-header {
  margin-bottom: 48px;
}

.privacy-header h2 {
  margin-bottom: 0;
}

.privacy-body {
  max-width: 720px;
}

.privacy-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-black);
  margin-top: 36px;
  margin-bottom: 12px;
}

.privacy-body p {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--color-gray);
  margin-bottom: 20px;
}

.privacy-body p:last-child {
  margin-bottom: 0;
}

/* ---------- Founders Photo Grid ---------- */
.founders-photos {
  padding: 40px 0 100px;
}

.container-wide {
  max-width: 1400px;
}

.founders-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.founders-photo-cell {
  overflow: hidden;
  border-radius: 4px;
}

.founders-photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  display: block;
  transition: transform 0.4s ease;
}

.founders-photo-cell:hover img {
  transform: scale(1.03);
}

/* ---------- Writing Hero Section ---------- */
.writing-hero {
  padding: 0;
  background: #ffffff;
  display: flex;
  align-items: flex-end;
  min-height: 70vh;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .writing-hero {
  background: var(--color-bg);
}

.writing-hero .container {
  padding-bottom: 80px;
  max-width: 100%;
  margin-left: 0;
  padding-left: 40px;
  position: relative;
  z-index: 2;
}

/* Writing Hero Ripple Animation */
.writing-hero-ripple {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Central drop — appears and then gradually fades as ripples spread */
.ripple-drop {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  background: radial-gradient(circle, rgba(163, 254, 107, 0.5) 0%, rgba(163, 254, 107, 0.25) 40%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: rippleDrop 8s ease-out 0.3s forwards;
}

[data-theme="dark"] .ripple-drop {
  background: radial-gradient(circle, rgba(163, 254, 107, 0.4) 0%, rgba(163, 254, 107, 0.2) 40%, transparent 70%);
}

/* Ripple rings — wide bands of color that spread like water ripples */
.ripple-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  background: radial-gradient(circle,
    transparent 0%,
    transparent 35%,
    rgba(163, 254, 107, 0.04) 45%,
    rgba(163, 254, 107, 0.15) 55%,
    rgba(163, 254, 107, 0.28) 65%,
    rgba(163, 254, 107, 0.15) 75%,
    rgba(163, 254, 107, 0.04) 85%,
    transparent 100%
  );
  animation: rippleExpand 8s cubic-bezier(0.15, 0.5, 0.35, 1) forwards;
}

[data-theme="dark"] .ripple-ring {
  background: radial-gradient(circle,
    transparent 0%,
    transparent 35%,
    rgba(163, 254, 107, 0.03) 45%,
    rgba(163, 254, 107, 0.1) 55%,
    rgba(163, 254, 107, 0.2) 65%,
    rgba(163, 254, 107, 0.1) 75%,
    rgba(163, 254, 107, 0.03) 85%,
    transparent 100%
  );
}

.ripple-ring-1 {
  animation-delay: 0.6s;
}

/* Drop appears, holds, then gradually fades as rings move outward */
@keyframes rippleDrop {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  8% {
    opacity: 1;
    transform: scale(1.2);
  }
  15% {
    opacity: 0.9;
    transform: scale(1);
  }
  40% {
    opacity: 0.5;
  }
  70% {
    opacity: 0.15;
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* Rings expand outward — wide soft bands like water ripples */
@keyframes rippleExpand {
  0% {
    width: 0;
    height: 0;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    width: 220vmax;
    height: 220vmax;
    opacity: 0;
  }
}

.writing-hero-label {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--color-gray);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  line-height: 1;
}

.writing-hero-statement {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 500;
  color: var(--color-black);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 800px;
  padding-bottom: 40px;
  border-bottom: 4px solid var(--color-black);
}

/* ---------- Writing Video Section ---------- */
.writing-video-section {
  padding: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  background: #000000;
}

[data-theme="dark"] .writing-video-section {
  background: #000000;
}

.writing-video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Writing Section ---------- */
.writing-section {
  padding: 80px 0 60px;
  background: #ffffff;
}

[data-theme="dark"] .writing-section {
  background: var(--color-bg);
}

.writing-section .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* Writing Grid */
.writing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.writing-article {
  padding: 32px 0;
  border-top: 1px solid var(--color-border);
  transition: opacity 0.3s ease;
}

.writing-article:first-child {
  border-top: none;
}

.writing-article:last-child {
  border-bottom: none;
}

.writing-article-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.writing-article-link:hover .writing-title {
  color: var(--color-gray);
}

.writing-article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.writing-headshot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.writing-author {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-black);
  line-height: 1.3;
}

.writing-date {
  font-size: 0.82rem;
  color: var(--color-gray);
  line-height: 1.3;
}

.writing-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.35;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.writing-excerpt {
  font-size: 1rem;
  color: var(--color-gray);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.writing-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.writing-topic-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-gray);
  background: var(--color-light-gray);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 3px 10px;
  line-height: 1.4;
}

/* Writing No Results */
.writing-no-results {
  padding: 80px 0;
  text-align: center;
}

.writing-no-results h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 8px;
}

.writing-no-results p {
  font-size: 1rem;
  color: var(--color-gray);
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

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

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  .container {
    padding: 0 24px;
  }

  .navbar .container {
    height: 64px;
  }

  .hero {
    padding-top: 0;
  }

  /* Mobile nav */
  .navbar-toggle {
    display: block;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-nav-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
  }

  .navbar-links.active {
    display: flex;
  }

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

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .testimonial-card {
    padding: 28px;
  }

  .intro {
    padding: 72px 0 60px;
  }

  .closing {
    padding: 80px 0 100px;
  }

  h2 {
    margin-bottom: 36px;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 48px;
  }

  .navbar-spacer {
    height: 64px;
  }

  .letter-header {
    flex-direction: column;
    gap: 12px;
  }

  .letter-section {
    padding: 48px 0 40px;
  }

  .founders-photos {
    padding: 24px 0 60px;
  }

  .founders-photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .writing-section {
    padding: 48px 0 40px;
  }

  .writing-hero {
    min-height: 50vh;
  }

  .writing-hero .container {
    padding-bottom: 48px;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .portfolio-card-front img {
    max-height: 28px;
    max-width: 110px;
  }

  .portfolio-card-back h3 {
    font-size: 1rem;
  }

  .portfolio-card-back .portfolio-card-desc {
    font-size: 0.82rem;
  }

  .portfolio-card-back .portfolio-card-year {
    font-size: 0.85rem;
  }
}
