/* ─────────────────────────────────────────
   Tokens
───────────────────────────────────────── */
:root {
  --black:   #000000;
  --white:   #FFFFFF;
  --bg:      #f0ead6;
  --accent:  #ECFF01;
  --surface: #F5F5F5;
  --muted:   #6B6B6B;

  --font-serif: 'Averia Serif Libre', serif;
  --font-sans:  'Libre Franklin', sans-serif;

  --max-width: 1200px;
  --gutter:    32px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--black);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

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

/* ─────────────────────────────────────────
   Typography
───────────────────────────────────────── */
h1 {
  font-family: var(--font-serif);
  font-size: 72px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}

/* ─────────────────────────────────────────
   Buttons
───────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 5px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}

.btn-ghost:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--accent);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

/* ─────────────────────────────────────────
   Nav
───────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#nav.scrolled {
  background: var(--bg);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
}

.nav-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ─────────────────────────────────────────
   Hero
───────────────────────────────────────── */
#hero {
  padding: 200px 0 120px;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: #595959;
  display: inline-block;
  margin-bottom: 32px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#hero h1 {
  max-width: 840px;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 18px;
  color: #595959;
  max-width: 620px;
  margin-bottom: 48px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────
   Works Section
───────────────────────────────────────── */
#works {
  padding: 120px 0 160px;
  background: var(--bg);
}

#works h2 {
  margin-bottom: 80px;
}

.works-columns {
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.works-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.works-col--right {
  margin-top: 200px;
}

/* ─────────────────────────────────────────
   Cards
───────────────────────────────────────── */
.card {
  background: transparent;
  margin-bottom: 120px;
  cursor: default;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #d8d8d8;
  border-radius: 5px;
  margin-bottom: 20px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.03);
}

.card-title {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 10px;
}

.card-desc {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--black);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--black);
  background: #F0F0F0;
  border: 1px solid #C8C8C8;
  padding: 4px 10px;
  border-radius: 5px;
  letter-spacing: 0.03em;
}

/* ─────────────────────────────────────────
   Hero name link
───────────────────────────────────────── */
#hero h1 a,
.hero-sub a {
  color: inherit;
  padding: 1px 0;
  text-decoration: none;
  background-image: linear-gradient(
    transparent 0%,
    transparent calc(50% - 0.4ex),
    #ECFF01 calc(50% - 0.4ex),
    #ECFF01 100%
  );
  background-size: 100% 200%;
  background-position: 0 0;
  transition: background-position 0.6s ease-in-out, color 0.6s;
}

#hero h1 a:hover,
#hero h1 a:active,
.hero-sub a:hover,
.hero-sub a:active {
  background-position: 0 100%;
  color: #000000;
}

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
footer {
  border-top: 1px solid #E0E0E0;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 13px;
  color: #595959;
}

.footer-nav {
  display: flex;
  gap: 32px;
}

.footer-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}

.footer-nav a:hover {
  color: var(--muted);
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 900px) {
  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 36px;
  }

  #hero {
    padding: 160px 0 80px;
  }

  #works {
    padding: 80px 0 100px;
  }

  #works h2 {
    margin-bottom: 48px;
  }

  .works-columns {
    flex-direction: column;
    gap: 0;
  }

  .works-col {
    display: contents;
  }

  .works-col--left .card:nth-child(1) { order: 1; }
  .works-col--right .card:nth-child(1) { order: 2; }
  .works-col--left .card:nth-child(2) { order: 3; }
  .works-col--right .card:nth-child(2) { order: 4; }
  .works-col--right .card:nth-child(3) { order: 5; }
  .works-col--left .card:nth-child(3) { order: 6; }
  .works-col--right .card:nth-child(4) { order: 7; }
  .works-col--left .card:nth-child(4) { order: 8; }
  .works-col--left .card:nth-child(5) { order: 9; }
  .works-col--right .card:nth-child(5) { order: 10; }

  .card {
    margin-bottom: 56px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }

  .nav-inner {
    padding: 16px 20px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 30px;
  }

  #hero {
    padding: 120px 0 64px;
  }

  .hero-sub {
    max-width: 480px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    text-align: center;
  }

  .card {
    margin-bottom: 48px;
  }
}
