@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/InterTight-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/InterTight-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/InterTight-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ortica Linear';
  src: url('fonts/OrticaLinear-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ortica Linear';
  src: url('fonts/OrticaLinear-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --text: #000000;
  --link: #808080;
  --link-hover: #0066ff;
  --muted: #969696;
  --meta: #666666;
  --media-bg: #eee;
  --toggle-bg: #ffffff;
  --side: 16px;
  --block-gap: 128px;
  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Ortica Linear', Georgia, serif;
  color-scheme: light;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --text: #ffffff;
  --link: #8a8a8a;
  --link-hover: #0066ff;
  --muted: #7a7a7a;
  --meta: #999999;
  --media-bg: #1a1a1a;
  --toggle-bg: #161616;
}

html {
  transition: background-color 0.5s ease;
}

body,
.hero-lead,
.hero-body,
.project-desc,
.footer-line,
.project-tags,
.experience-item p,
.award-item p,
.footer-bottom,
.analog-grid img,
.theme-toggle,
.view-btn {
  transition: background-color 0.5s ease, color 0.5s ease;
}

@media (min-width: 810px) {
  :root { --side: 24px; }
}

@media (min-width: 1200px) {
  :root { --block-gap: 180px; }
}

@media (min-width: 2200px) {
  :root { --block-gap: 240px; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---------- Keyboard focus (only shown when navigating with the keyboard) ---------- */

a:focus-visible,
button:focus-visible,
.project-media:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.theme-btn:focus-visible {
  outline-color: var(--text);
  outline-offset: 2px;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--side);
  z-index: 100;
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-header a,
.site-header button {
  pointer-events: auto;
}

.logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
}

.lang-btn {
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.lang-btn.is-active {
  color: #fff;
}

.lang-sep {
  color: rgba(255, 255, 255, 0.5);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  color: #fff;
}

/* ---------- Language switch content ---------- */

.lang-en {
  display: none;
}

:root[data-lang='en'] .lang-en {
  display: inline;
}

:root[data-lang='en'] .lang-es {
  display: none;
}

/* ---------- Layout helpers ---------- */

main {
  width: 100%;
  padding: 0 var(--side);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  margin: 0 0 32px 0;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px 18px;
  padding-top: 208px;
  padding-bottom: var(--block-gap);
}

@media (min-width: 810px) {
  .hero { padding-top: 328px; }
}

@media (min-width: 1200px) {
  .hero { padding-top: 388px; }
}

@media (min-width: 2200px) {
  .hero { padding-top: 404px; }
}

.hero-lead,
.hero-body {
  grid-column: span 12;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

@media (min-width: 810px) {
  .hero-lead, .hero-body { font-size: 24px; }
}

@media (min-width: 1200px) {
  .hero-lead, .hero-body { font-size: 32px; grid-column: span 9; }
}

.hero-lead a,
.hero-body a,
.project-desc a,
.footer-line a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hero-lead a:hover,
.hero-body a:hover,
.project-desc a:hover,
.footer-line a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

/* ---------- Work ---------- */

.work {
  padding-bottom: var(--block-gap);
}

.work-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.work-header .eyebrow {
  margin-bottom: 0;
}

.view-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.view-btn.is-active,
.view-btn:hover {
  color: var(--text);
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}

@media (min-width: 810px) {
  .work-grid { grid-template-columns: 1fr 1fr; gap: 64px 18px; }
}

.work-grid.is-hidden {
  display: none;
}

.moodboard-grid {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.moodboard-grid.is-active {
  display: grid;
}

@media (min-width: 810px) {
  .moodboard-grid { grid-template-columns: repeat(6, 1fr); gap: 18px; }
}

.moodboard-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.project-card { display: flex; flex-direction: column; }

.project-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--media-bg);
  margin-bottom: 12px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}

.media-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
}

.media-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.media-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  height: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.media-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), height 0.6s cubic-bezier(0.16, 1, 0.3, 1), background 0.6s ease;
  cursor: pointer;
  flex: 0 0 auto;
}

.media-dots span.is-active {
  width: 12px;
  height: 12px;
  background: #fff;
}

.award-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  pointer-events: none;
}

.award-badge-icon {
  width: 22px;
  height: auto;
  display: block;
}

.project-kicker {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  margin: 0 0 16px 0;
}

.project-desc {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 16px 0;
}

.project-tags {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* ---------- Experience ---------- */

.experience,
.awards {
  padding-bottom: var(--block-gap);
}

@media (min-width: 1200px) {
  .experience, .awards {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
    align-items: start;
  }

  .experience .eyebrow,
  .awards .eyebrow {
    grid-column: span 6;
    margin-bottom: 0;
  }

  .experience-list,
  .awards-list {
    grid-column: span 6;
  }
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.experience-item h3 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  margin: 0 0 8px 0;
}

.experience-item p {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 14px;
  color: var(--meta);
  margin: 0;
}

/* ---------- Awards ---------- */

.award-item h3 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  margin: 0 0 8px 0;
}

.award-item p {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 14px;
  color: var(--meta);
  margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 18px;
  padding-bottom: var(--side);
}

.footer-line {
  grid-column: span 12;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 16px 0;
}

@media (min-width: 1200px) {
  .footer-line { grid-column: span 9; }
}

.analog,
.footer-bottom {
  grid-column: span 12;
}

@media (min-width: 810px) {
  .footer-line { font-size: 32px; }
}

.analog {
  margin-top: var(--block-gap);
  margin-bottom: var(--block-gap);
}

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

@media (min-width: 810px) {
  .analog-grid { grid-template-columns: repeat(6, 1fr); gap: 18px; }
}

.analog-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--bg);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--text);
  text-transform: uppercase;
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  position: fixed;
  left: 50%;
  bottom: 24px;
  translate: -50% 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--toggle-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.theme-pill {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--text);
  transition: background-color 0.5s ease;
}

:root[data-theme='dark'] .theme-pill {
  transform: translateX(32px);
}

.theme-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.35s ease;
}

.theme-btn svg {
  width: 15px;
  height: 15px;
}

.theme-btn.is-active {
  color: var(--bg);
}

/* ---------- Custom cursor (position and size driven by GSAP) ---------- */

.has-cursor,
.has-cursor body,
.has-cursor a,
.has-cursor button,
.has-cursor .project-media,
.has-cursor .media-dots span {
  cursor: none;
}

.cursor-dot {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

.has-cursor .cursor-dot {
  display: block;
}

/* ---------- Animation initial states (GSAP takes over from here) ---------- */

.js-anim .site-header,
.js-anim .theme-toggle,
.js-anim .hero-lead,
.js-anim .hero-body,
.js-anim .work-header,
.js-anim .project-card,
.js-anim .experience .eyebrow,
.js-anim .awards .eyebrow,
.js-anim .analog .eyebrow,
.js-anim .experience-item,
.js-anim .award-item,
.js-anim .footer-line,
.js-anim .analog-grid img {
  visibility: hidden;
}
