:root {
  --primary-cyan: #007a8c;
  --accent-gold: #c5a059;
  --surface: #f0ede6;
  --text-ink: #1a1a1a;

  --font-display: "Instrument Serif", serif;
  --font-body: "Satoshi", "Inter", sans-serif;
  --font-caption: "JetBrains Mono", monospace;

  --gutter-desktop: 32px;
  --gutter-tablet: 24px;
  --gutter-mobile: 16px;
  --max-width: 1440px;
}

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

body {
  background-color: var(--surface);
  color: var(--text-ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  /* Next line is to ensure the pseudo element noise covers the entire document height */
  min-height: 100vh;
}

/* Noise Filter Overlay */
body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  filter: url(#noiseFilter);
}
.noise-filter {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-ink);
  line-height: 1.1;
}

.display-title {
  font-size: clamp(48px, 8vw, 96px);
  letter-spacing: -0.02em;
}

.caption {
  font-family: var(--font-caption);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666; /* Subdued ink */
}

.gold-accent {
  color: var(--accent-gold);
}

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

a:hover {
  color: var(--primary-cyan);
}

/* Base Container & Grid */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter-desktop);
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter-desktop);
}

/* Nav */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px var(--gutter-desktop);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  mix-blend-mode: exclusion; /* Cool effect on white/dark text */
  color: #fff;
}
.site-nav .logo {
  font-family: var(--font-display);
  font-size: 24px;
}
.site-nav .nav-links {
  display: flex;
  gap: 32px;
  font-family: var(--font-caption);
  font-size: 12px;
  text-transform: uppercase;
}
.site-nav a {
  color: #fff;
  opacity: 0.7;
}
.site-nav a:hover {
  opacity: 1;
  color: var(--primary-cyan);
}
.mobile-nav {
  display: none;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 100px;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-image:
    radial-gradient(
      circle at 70% 30%,
      rgba(0, 122, 140, 0.05) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 30% 70%,
      rgba(197, 160, 89, 0.05) 0%,
      transparent 40%
    );
  z-index: -1;
  pointer-events: none;
}

.hero-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 48px;
  border-bottom: 0.5px solid rgba(26, 26, 26, 0.2);
  padding-bottom: 16px;
}
.indented {
  margin-left: 32px;
}

.hero-title-container {
  max-width: 800px;
}
.block {
  display: block;
}
.english-title {
  margin-top: 16px;
  font-size: clamp(32px, 5vw, 64px);
  color: var(--primary-cyan);
  opacity: 0.9;
}

/* Grid columns & Offsets helpers */
.col-1 {
  grid-column: span 1;
}
.col-4 {
  grid-column: span 4;
}
.col-5 {
  grid-column: span 5;
}
.col-6 {
  grid-column: span 6;
}
.offset-1 {
  grid-column-start: 2;
}
.offset-7 {
  grid-column-start: 8;
}

/* Manifesto & Projects */
.manifesto-section {
  padding: 128px 0;
}
.image-wrapper {
  overflow: hidden;
  border-radius: 2px;
}
.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.image-wrapper:hover img {
  transform: scale(1.03);
}
.proj-caption {
  margin-top: 16px;
}

.manifesto-block {
  display: flex;
  align-items: center;
}
.quote {
  font-family: var(--font-display);
  font-size: 32px;
  font-style: italic;
  border-left: 2px solid var(--accent-gold);
  padding-left: 24px;
}

/* View All */
.view-all-divider {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 64px 0;
}
.view-all-divider hr {
  flex-grow: 1;
  border: none;
  border-top: 0.5px solid rgba(26, 26, 26, 0.2);
}
.view-all-link {
  font-family: var(--font-caption);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

/* Blog Preview */
.blog-preview-section {
  padding: 64px 0 128px 0;
}
.blog-preview-card {
  border-top: 0.5px solid rgba(26, 26, 26, 0.2);
  padding-top: 24px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.blog-preview-card:hover {
  transform: translateY(-4px);
}
.blog-preview-card h2 {
  font-size: 32px;
  margin: 16px 0;
}

/* Footer */
.site-footer {
  border-top: 0.5px solid rgba(26, 26, 26, 0.2);
  padding: 48px var(--gutter-desktop);
}
.footer-center {
  display: flex;
  justify-content: center;
}
.social-links {
  display: flex;
  gap: 24px;
}
.social-links a {
  color: var(--text-ink);
}
.social-links a:hover {
  color: var(--primary-cyan);
}
.text-right {
  text-align: right;
}
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(8, 1fr);
    gap: var(--gutter-tablet);
  }
  .col-4,
  .col-5 {
    grid-column: span 8;
  }
  .offset-1,
  .offset-7 {
    grid-column-start: 1;
  }
  .manifesto-block {
    margin-top: 64px;
  }
  .blog-preview-card {
    margin-bottom: 48px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(240, 237, 230, 0.9);
    backdrop-filter: blur(10px);
    justify-content: space-around;
    padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
    z-index: 100;
    border-top: 0.5px solid rgba(26, 26, 26, 0.1);
  }
  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: var(--font-caption);
    font-size: 10px;
    color: var(--text-ink);
    opacity: 0.5;
  }
  .mobile-nav a.active,
  .mobile-nav a:hover {
    opacity: 1;
    color: var(--primary-cyan);
  }
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gutter-mobile);
  }
  .container {
    padding: 0 var(--gutter-mobile);
  }
  .hero-header {
    flex-direction: column;
    gap: 16px;
  }
  .indented {
    margin-left: 0;
  }
  .quote {
    font-size: 24px;
  }
}

/* Ink Trail Effect */
.ink-trail {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(0, 122, 140, 0.15) 0%,
    transparent 70%
  );
  transform: translate(-50%, -50%);
  z-index: 9998;
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
}
