/* ========================
   GLOBAL
======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important;
}

html, body {
  height: auto;
  overflow: auto;
}

/* ========================
   BODY
======================== */
body {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  background-color: #f2f1ef;
  color: #1a1a1a;
}

/* ========================
   NAV BAR
======================== */
.nav__bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  background-color: #f2f1ef;
  z-index: 199;
}

/* ========================
   NAV
======================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  pointer-events: none;
}

.nav__toggle,
.nav__work-toggle {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3d3530;
  background: none;
  border: none;
  cursor: none;
  line-height: 1;
  padding: 0;
  position: relative;
  transition: opacity 0.3s ease;
  pointer-events: all;
}

.nav__toggle::after,
.nav__work-toggle::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #3d3530;
  transition: width 0.3s ease;
}

.nav__toggle:hover,
.nav__work-toggle:hover {
  opacity: 0.5;
}

.nav__toggle:hover::after,
.nav__work-toggle:hover::after {
  width: 100%;
}

/* ========================
   WORK DROPDOWN
======================== */
.nav__work {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 24px 40px 0 32px;
  pointer-events: all;
}

.nav__work .nav__drop {
  max-height: 0;
  overflow: hidden;
  background-color: #f2f1ef;
  transition: max-height 0.4s linear;
  margin: 0 -40px 0 -32px;
  padding: 0 40px 0 32px;
}

.nav__work.is-open .nav__drop {
  max-height: 100px;
  padding-bottom: 16px;
}

.nav__work-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin-top: 12px;
}

.nav__work-links li a {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3d3530;
  text-decoration: none;
  position: relative;
  display: inline-block;
  opacity: 0;
  transform: translateY(-6px);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: letter-spacing 0.2s ease, font-size 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.nav__work.is-open .nav__work-links li a {
  opacity: 1;
  transform: translateY(0);
}

.nav__work-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #3d3530;
  transition: width 0.3s ease;
}

.nav__work-links li a:hover {
  font-size: 10px;
  letter-spacing: 0.02em;
  opacity: 0.5;
}

.nav__work-links li a:hover::after {
  width: 100%;
}

.nav__work.is-open .nav__work-links li:nth-child(1) a { transition-delay: 0.1s; }
.nav__work.is-open .nav__work-links li:nth-child(2) a { transition-delay: 0.2s; }
.nav__work-links li:nth-child(1) a                    { transition-delay: 0s; }
.nav__work-links li:nth-child(2) a                    { transition-delay: 0s; }

/* ========================
   MENU DROPDOWN
======================== */
.nav__menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 200;
  padding: 24px 32px 0;
  text-align: right;
  pointer-events: all;
}

.nav__menu .nav__drop {
  max-height: 0;
  overflow: hidden;
  background-color: #f2f1ef;
  transition: max-height 0.4s linear;
  margin: 0 -32px;
  padding: 0 32px;
}

.nav__menu.is-open .nav__drop {
  max-height: 240px;
  padding-bottom: 16px;
}

.nav__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin-top: 12px;
}

.nav__links li a {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3d3530;
  text-decoration: none;
  position: relative;
  opacity: 0;
  white-space: nowrap;
  transform: translateY(-6px);
  transition: letter-spacing 0.2s ease, font-size 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.nav__menu.is-open .nav__links li a {
  opacity: 1;
  transform: translateY(0);
}

.nav__links li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #3d3530;
  transition: width 0.3s ease;
}

.nav__links li a:hover {
  font-size: 10px;
  letter-spacing: 0.02em;
  opacity: 1;
}

.nav__links li a:hover::after {
  width: 100%;
}

.nav__menu.is-open .nav__links li:nth-child(1) a { transition-delay: 0.1s; }
.nav__menu.is-open .nav__links li:nth-child(2) a { transition-delay: 0.2s; }
.nav__menu.is-open .nav__links li:nth-child(3) a { transition-delay: 0.3s; }
.nav__menu.is-open .nav__links li:nth-child(4) a { transition-delay: 0.4s; }
.nav__links li:nth-child(1) a                    { transition-delay: 0s; }
.nav__links li:nth-child(2) a                    { transition-delay: 0s; }
.nav__links li:nth-child(3) a                    { transition-delay: 0s; }
.nav__links li:nth-child(4) a                    { transition-delay: 0s; }

/* ========================
   PORTFOLIO HEADER
======================== */
.portfolio-page {
  padding: 0;
  max-width: 100%;
}

.portfolio-header {
  width: calc(100% - 40px);
  height: calc(100vh - 120px);
  margin: 80px 20px 80px;
  overflow: hidden;
}

.portfolio-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-header canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.portfolio-header {
  position: relative;
}

.portfolio-title {
  position: fixed;
  top: 12px;
  left: 0%;
  width: 100%;
  z-index: 200;
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3d3530;
  text-align: center;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.header-poem {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-weight: 300;
  font-style: none;
  letter-spacing: 0.08em;
  color: #fff;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation: typePoem 8s steps(57) 0.2s forwards;
}

@keyframes typePoem {
  to { width: 100%; }
}

/* ========================
   PORTFOLIO GRID
======================== */
.grid-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5% 80px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 24px;
  align-items: start;
}

.grid-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.grid-item a {
  display: block;
  overflow: hidden;
}

.grid-item a img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.grid-item a:hover img {
  opacity: 0.6;
}

.grid-item p {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a1a1a;
}

/* ========================
   CURSOR
======================== */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: #3d3530;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 1024px) {
  .nav__work { padding: 20px 24px 0; }
  .nav__menu { padding: 20px 24px 0; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__work { padding: 16px 20px 0; }
  .nav__menu { padding: 16px 20px 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
}