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

:root {
  --bg: #0a0a0a;
  --white: #ffffff;
  --gray-1: rgba(255, 255, 255, 0.85);
  --gray-2: rgba(255, 255, 255, 0.45);
  --font: 'Hanken Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SF Mono', monospace;
  --edge: 80px;
}

html { scroll-behavior: smooth; cursor: none; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
a { color: inherit; text-decoration: none; cursor: none; }

/* Page entrance — content fades and stacks in on load */
@keyframes fadeStackIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#hero,
#about,
#work,
#currently,
#previously,
#outside,
#footer {
  opacity: 0;
  animation: fadeStackIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Nav fades with opacity only — a transform here would trap the nav links
   beneath the cursor pill (stacking context), hiding hovered text. */
#nav {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 0.05s;
}

#hero, #about { animation-delay: 0.18s; }
#work, #currently { animation-delay: 0.30s; }
#previously { animation-delay: 0.42s; }
#outside { animation-delay: 0.50s; }
#footer { animation-delay: 0.30s; }

@media (prefers-reduced-motion: reduce) {
  #nav, #hero, #about, #work, #currently, #previously, #outside, #footer {
    opacity: 1;
    animation: none;
  }
}

/* CURSOR */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #e8e4de;
  pointer-events: none;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease, height 0.3s ease, margin 0.3s ease;
}

#cursor-dot.on-project {
  width: 120px;
  height: 120px;
}

#cursor-dot .cursor-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #0a0a0a;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#cursor-dot.on-project .cursor-label {
  opacity: 1;
}

#cursor-dot.on-nav {
  border-radius: 100px;
  background: #ffffff;
  mix-blend-mode: difference;
}

#cursor-dot.on-name {
  width: 44px;
  height: 44px;
  background: transparent;
}

#cursor-dot.on-name .cursor-label { display: none; }

#cursor-dot.on-name::after {
  content: "👋";
  font-size: 34px;
  line-height: 1;
}

#cursor-dot.on-cowboy {
  width: 44px;
  height: 44px;
  background: transparent;
}

#cursor-dot.on-cowboy .cursor-label { display: none; }

#cursor-dot.on-cowboy::after {
  content: "🤠";
  font-size: 34px;
  line-height: 1;
}

/* ================================ */
/* NAV                              */
/* ================================ */
#nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 48px var(--edge);
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-cactus {
  width: 41px;
  height: auto;
  object-fit: contain;
}

.nav-eyes {
  display: flex;
  gap: 2px;
  align-items: center;
}

.eye {
  width: 28px;
  height: 28px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: blink 4s ease-in-out infinite;
}

.eye:nth-child(2) {
  animation-delay: 0.05s;
}

@keyframes blink {
  0%, 18%, 22%, 100% { transform: scaleY(1); }
  20% { transform: scaleY(0.05); }
}

.pupil {
  width: 12px;
  height: 12px;
  background: #0a0a0a;
  border-radius: 50%;
  position: absolute;
  transition: transform 0.08s ease-out;
}

.nav-name {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-link {
  font-size: 16px;
  color: var(--white);
  transition: color 0.2s ease;
  position: relative;
  z-index: 10000;
}

/* No hover color change — the cursor pill uses mix-blend-mode to invert the text. */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border: none;
  cursor: none;
  position: relative;
  z-index: 60;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: transform 0.25s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* ================================ */
/* HERO                             */
/* ================================ */
#hero {
  padding: 100px var(--edge) 200px;
  max-width: 778px;
}

.hero-text {
  font-size: 45px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero-bold {
  color: var(--white);
  font-weight: 400;
}

.hero-light {
  color: var(--white);
}

/* ================================ */
/* WORK                             */
/* ================================ */
#work {
  padding: 0 var(--edge) 160px;
}

.section-label {
  display: flex;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 20px;
}

.label-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--white);
}

.label-date {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--gray-2);
}

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

.work-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.work-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #161616;
  margin-bottom: 16px;
}

.work-media video,
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-media img.zoom {
  transform: scale(1.15);
}

.work-placeholder {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
}

.work-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1px;
}

.work-desc {
  font-size: 18px;
  font-weight: 300;
  color: var(--white);
  line-height: 1.4;
}

/* ================================ */
/* MODAL                            */
/* ================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 40px;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: #141414;
  border-radius: 28px;
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  margin: auto;
}

.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin-right: 20px;
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.modal-close:hover { opacity: 1; }

.modal-hero {
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  overflow: hidden;
  border-radius: 28px;
  margin: 43px 32px 0;
}

.modal-hero video,
.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 28px 32px 43px;
}

.modal-title {
  font-size: 44px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 24px;
}

.modal-meta {
  display: flex;
  gap: 60px;
  margin-bottom: 24px;
}

.modal-meta-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-2);
}

.modal-value {
  font-size: 16px;
  color: var(--white);
}

.modal-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 32px;
}

.modal-section {
  margin-bottom: 32px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-2);
  margin-bottom: 12px;
}

.modal-section-text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--white);
}

.modal-bullets {
  list-style: none;
  font-size: 18px;
  line-height: 1.55;
  color: var(--white);
}

.modal-bullets li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
}

.modal-bullets li:last-child { margin-bottom: 0; }

.modal-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gray-2);
}

.modal-section-img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  margin-top: 16px;
  display: block;
}

.modal-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 16px;
  border-radius: 28px;
  overflow: hidden;
}

.modal-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-embed-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-embed-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 14px;
  z-index: 2;
  transition: background 0.2s ease;
}

.modal-embed:hover .modal-embed-play {
  background: #ff0000;
}

.modal-embed-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

/* ================================ */
/* FOOTER                           */
/* ================================ */
#footer {
  position: relative;
  padding: 80px var(--edge) 200px;
  margin-top: 60px;
}

#footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--edge);
  right: var(--edge);
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.footer-heading {
  font-size: 45px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-email {
  font-size: 24px;
  color: var(--gray-2);
  display: block;
  margin-bottom: 4px;
  transition: color 0.2s;
}

.footer-email:hover { color: var(--white); }

.footer-location {
  font-size: 24px;
  color: var(--white);
}

.footer-bottom {
  margin-top: 80px;
}

.footer-copy {
  font-size: 14px;
  color: var(--gray-2);
}

/* ================================ */
/* ABOUT PAGE                       */
/* ================================ */
#about {
  padding: 120px var(--edge) 100px;
  max-width: 1240px;
}

.about-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gray-2);
  margin-bottom: 36px;
}

.about-text {
  font-size: 44px;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 48px;
}

.about-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 36px;
}

.about-link {
  font-size: 17px;
  color: var(--white);
  transition: opacity 0.2s;
}

.about-link:hover { opacity: 0.5; }

#currently, #previously, #outside {
  padding: 0 var(--edge) 60px;
}

.currently-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 60px;
}

.currently-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.currently-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gray-2);
  padding-top: 6px;
}

.currently-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 12px;
}

.currently-desc {
  font-size: 17px;
  color: var(--gray-2);
  line-height: 1.55;
  max-width: 600px;
}

.resume-link {
  display: inline-block;
  margin-top: 28px;
  font-size: 16px;
  color: var(--white);
  transition: opacity 0.2s;
}

.resume-link:hover { opacity: 0.5; }

.prev-item .currently-title { margin-bottom: 10px; }

.prev-date {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--gray-2);
}

.sep {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 8px;
  vertical-align: middle;
}
.prev-item {
  margin-bottom: 32px;
}

.prev-item:last-child {
  margin-bottom: 0;
}

/* ================================ */
/* RESPONSIVE                       */
/* ================================ */
@media (max-width: 900px) {
  :root { --edge: 32px; }
  .hero-text { font-size: 40px; }
  .footer-heading { font-size: 40px; }
  .about-text { font-size: 34px; }
  #hero { padding: 60px var(--edge) 130px; }
  .work-grid { grid-template-columns: 1fr; gap: 56px; }
  .currently-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 900px) {
  #nav {
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 1000;
    padding: 24px var(--edge);
  }
  .nav-toggle { display: flex; }
  .nav-name { position: relative; z-index: 60; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    margin: 0;
    padding: 96px var(--edge) 40px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.5s;
    z-index: 50;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
  }
  .nav-link {
    font-size: 40px;
    font-weight: 400;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-links.open .nav-link {
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links.open .nav-link:nth-child(1) { transition-delay: 0.10s; }
  .nav-links.open .nav-link:nth-child(2) { transition-delay: 0.18s; }
  .nav-links.open .nav-link:nth-child(3) { transition-delay: 0.26s; }
  .nav-links.open .nav-link:nth-child(4) { transition-delay: 0.34s; }
}

@media (max-width: 480px) {
  :root { --edge: 20px; }
  .hero-text { font-size: 34px; }
  .footer-heading { font-size: 34px; }
  .about-text { font-size: 27px; }
  .nav-name { font-size: 13px; }
  .nav-link { font-size: 34px; }
}
