:root {
  --ink: #1a2421;
  --ink-soft: #3d4a45;
  --foam: #f3f6f4;
  --mist: #d7e3dc;
  --sea: #1f6f64;
  --sea-deep: #145048;
  --sand: #e8dfd0;
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --space: clamp(1.25rem, 3vw, 2.5rem);
  --max: 68rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem);
  line-height: 1.65;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, #c8ddd4 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, #eadfcf 0%, transparent 50%),
    linear-gradient(180deg, #eef3f0 0%, var(--foam) 40%, #e6ebe7 100%);
  min-height: 100vh;
}

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

a {
  color: var(--sea-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.25s var(--ease);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--foam);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  padding: 1.25rem var(--space);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__end {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.5vw, 1.75rem);
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--foam);
  text-decoration: none;
  opacity: 0.92;
}

.nav__brand:hover {
  color: #fff;
}

.nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(0.85rem, 2vw, 1.75rem);
}

.nav__links a {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(243, 246, 244, 0.88);
  text-decoration: none;
}

.nav__links a:hover {
  color: #fff;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border: 1px solid rgba(243, 246, 244, 0.35);
  border-radius: 0.35rem;
}

.lang-switch__btn {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0.28rem 0.45rem;
  border-radius: 0.25rem;
  background: transparent;
  color: rgba(243, 246, 244, 0.75);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-switch__btn:hover {
  color: #fff;
}

.lang-switch__btn.is-active,
.lang-switch__btn[aria-current="page"] {
  background: rgba(232, 223, 208, 0.92);
  color: var(--ink);
}

.lang-switch__btn.is-active:hover,
.lang-switch__btn[aria-current="page"]:hover {
  color: var(--ink);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--foam);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media .hero__photo,
.hero__media .hero__tech {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero__media .hero__photo {
  transform: scale(1.06);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

.hero__media .hero__tech {
  opacity: 0.42;
  mix-blend-mode: soft-light;
  transform: scale(1.04);
  animation: hero-drift 22s var(--ease) infinite alternate-reverse;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(15, 28, 24, 0.35) 0%,
      rgba(15, 28, 24, 0.18) 35%,
      rgba(15, 28, 24, 0.72) 78%,
      rgba(12, 22, 19, 0.92) 100%
    );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: clamp(5.5rem, 12vh, 8rem) var(--space) clamp(3rem, 8vh, 5rem);
}

.hero__brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise 0.9s var(--ease) 0.15s forwards;
}

.hero__title {
  margin: 0 0 0.85rem;
  max-width: 22ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: rgba(243, 246, 244, 0.92);
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise 0.9s var(--ease) 0.32s forwards;
}

.hero__lead {
  margin: 0 0 1.75rem;
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: rgba(232, 223, 208, 0.9);
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise 0.9s var(--ease) 0.48s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise 0.9s var(--ease) 0.62s forwards;
}

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  padding: 0.7rem 1.25rem;
  border-radius: 0.35rem;
  text-decoration: none;
  display: inline-block;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

.btn--primary {
  background: var(--sand);
  color: var(--ink);
}

.btn--primary:hover {
  background: #f2ebe0;
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--foam);
  box-shadow: inset 0 0 0 1px rgba(243, 246, 244, 0.55);
}

.btn--ghost:hover {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(243, 246, 244, 0.9);
}

/* Sections */
.section {
  padding: clamp(4rem, 10vh, 7rem) var(--space);
}

.section__inner {
  max-width: 40rem;
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section__text,
.section__intro {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.section__text:last-child,
.section__intro {
  margin-bottom: 0;
}

.section__intro {
  margin-bottom: 2rem;
  max-width: 36ch;
}

.section--about {
  background:
    linear-gradient(180deg, transparent, rgba(215, 227, 220, 0.45) 40%, transparent);
}

.section__inner--about {
  display: grid;
  gap: 2rem;
  align-items: start;
  max-width: 44rem;
}

@media (min-width: 640px) {
  .section__inner--about {
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
  }
}

.about__photo {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(31, 111, 100, 0.2);
}

.about__copy .section__text {
  margin-bottom: 1rem;
}

.about__copy .section__text:last-child {
  margin-bottom: 0;
}

.section--work {
  background:
    linear-gradient(135deg, rgba(31, 111, 100, 0.06), transparent 45%),
    linear-gradient(180deg, transparent, rgba(232, 223, 208, 0.35));
}

.writing-list {
  display: grid;
  gap: 2.5rem;
}

.writing__meta {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.writing__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.writing__title a {
  color: var(--ink);
  text-decoration: none;
}

.writing__title a:hover {
  color: var(--sea);
}

.writing__excerpt {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.writing__more {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid rgba(31, 111, 100, 0.35);
}

.writing__more:hover {
  border-bottom-color: var(--sea);
}

.section--contact {
  text-align: center;
}

.section--contact .section__inner {
  max-width: 32rem;
}

.section--contact .section__text {
  margin-bottom: 1.75rem;
}

.social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}

.social a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--sea-deep);
  text-decoration: none;
  border-bottom: 2px solid rgba(31, 111, 100, 0.3);
}

.social a:hover {
  color: var(--sea);
  border-bottom-color: var(--sea);
}

.site-footer {
  padding: 2rem var(--space) 2.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.site-footer p {
  margin: 0;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes hero-drift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.2%, -0.8%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__media .hero__photo,
  .hero__media .hero__tech,
  .hero__brand,
  .hero__title,
  .hero__lead,
  .hero__actions,
  .reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }

  .hero__media .hero__tech {
    opacity: 0.42;
  }
}

@media (max-width: 560px) {
  .nav {
    flex-wrap: wrap;
    row-gap: 0.65rem;
  }

  .nav__end {
    width: 100%;
    justify-content: space-between;
  }

  .nav__links {
    gap: 0.75rem;
  }

  .nav__links a {
    font-size: 0.82rem;
  }
}
