:root {
  --bg: #f4efe7;
  --ink: #1f1a17;
  --muted: #5f5852;
  --card: rgba(255, 255, 255, 0.76);
  --line: rgba(31, 26, 23, 0.16);
  --accent: #c44d1f;
  --accent-2: #1b7a74;
  --shadow: 0 14px 34px rgba(31, 26, 23, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 0%, #f8f4ec, var(--bg) 55%, #ece5dc);
  line-height: 1.5;
  position: relative;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      to right,
      rgba(31, 26, 23, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(31, 26, 23, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 0%, black 18%, transparent 75%);
  z-index: -2;
  pointer-events: none;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(20px);
  z-index: -1;
  opacity: 0.45;
}

.bg-shape-1 {
  width: 320px;
  height: 320px;
  background: #f28e5f;
  top: -80px;
  right: -60px;
}

.bg-shape-2 {
  width: 280px;
  height: 280px;
  background: #85cfc9;
  bottom: -80px;
  left: -40px;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 2vw, 2rem);
  background: rgba(244, 239, 231, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.brand {
  font-family: "DM Serif Display", serif;
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--ink);
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.16s ease;
}

nav a:hover,
nav a.active {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.lang-switch a {
  font-size: 0.9rem;
}

.lang-switch a.active {
  font-weight: 700;
}

main {
  width: min(980px, 92vw);
  margin: 2.5rem auto 4rem;
  display: grid;
  gap: 1.2rem;
}

.hero {
  padding: clamp(1.4rem, 3vw, 2.5rem);
  border-left: 4px solid var(--accent);
}

.eyebrow {
  color: var(--accent-2);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
}

.lead {
  max-width: 56ch;
  color: var(--muted);
  margin-top: 0.9rem;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-meta {
  margin-top: 1.3rem;
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-meta p {
  margin: 0;
}

.btn {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 500;
  transition: transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2.5vw, 1.6rem);
}

.panel p,
.panel li {
  color: var(--muted);
}

.panel h2 {
  margin-bottom: 0.65rem;
}

.tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.7);
}

.timeline {
  display: grid;
  gap: 0.8rem;
}

.timeline article {
  border-left: 2px solid rgba(196, 77, 31, 0.35);
  padding-left: 0.8rem;
}

.timeline p {
  margin: 0.45rem 0 0;
}

.grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.65);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(31, 26, 23, 0.08);
}

.card h3 {
  font-size: 1.05rem;
}

.card p {
  margin: 0.55rem 0 0.8rem;
}

.card a {
  color: var(--accent-2);
  text-decoration: none;
}

ul {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
}

.contact-form {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.contact-form label {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(27, 122, 116, 0.28);
  border-color: rgba(27, 122, 116, 0.48);
}

.contact-form .btn {
  margin-top: 0.3rem;
  width: fit-content;
  cursor: pointer;
}

.form-note {
  margin-top: 0.7rem;
  font-size: 0.9rem;
}

.tweet-panel {
  min-height: 280px;
}

.tweets-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.8rem;
}

.tweet-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.tweet-text {
  margin: 0;
  color: var(--ink);
  white-space: normal;
}

.tweet-meta {
  margin: 0.6rem 0 0;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
}

.tweet-meta a {
  color: var(--accent-2);
  text-decoration: none;
}

.x-card {
  max-width: 620px;
}

.x-card h2 {
  margin-bottom: 0.5rem;
}

.x-card p {
  margin-top: 0;
}

.x-card .btn {
  margin-top: 0.4rem;
}

footer {
  width: min(980px, 92vw);
  margin: 0 auto 2rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.6s ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.08s;
}

.reveal:nth-child(3) {
  animation-delay: 0.14s;
}

.reveal:nth-child(4) {
  animation-delay: 0.2s;
}

.reveal:nth-child(5) {
  animation-delay: 0.26s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  nav {
    gap: 0.7rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
  }

  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .site-header {
    flex-wrap: wrap;
    row-gap: 0.6rem;
  }

  .hero {
    border-left: 0;
    border-top: 4px solid var(--accent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .btn,
  .card {
    transition: none;
  }
}
