/* ===== Design Tokens ===== */
:root {
  --color-1: #141416;
  --color-2: #23262f;
  --color-3: #353945;
  --color-4: #777e90;
  --color-6: #e6e8ec;
  --color-7: #f4f5f6;
  --color-white: #ffffff;

  --font-heading: 'Josefin Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'DM Sans', sans-serif;

  --header-height: 96px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
  --radius-full: 999px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
address { font-style: normal; }
a { text-decoration: none; color: inherit; }

/* ===== Keyframes ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInBottom { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Scroll Entrance ===== */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.animate-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== Base ===== */
html, body {
  background: var(--color-white);
  color: var(--color-1);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ===== Page Wrapper ===== */
.work-page {
  background: var(--color-white);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 56px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 331px;
  flex-shrink: 0;
  cursor: pointer;
}

.header-logo {
  width: 48px; height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.header-name {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  color: var(--color-1);
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 1;
  justify-content: center;
}

.nav-item {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  color: var(--color-4);
  cursor: pointer;
  transition: color var(--transition-fast);
  user-select: none;
}
.nav-item:hover { color: var(--color-1); }
.nav-item.selected {
  font-weight: 700;
  color: var(--color-1);
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 24px;
  border-radius: var(--radius-full);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  white-space: nowrap;
  border: none;
  outline: none;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--color-2);
  color: var(--color-2);
}
.btn-outline:hover { background: var(--color-7); transform: translateY(-1px); }
.btn-filled {
  background: var(--color-2);
  color: var(--color-white);
}
.btn-filled:hover { background: #363b48; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(35,38,47,0.25); }

/* ===== Page Body ===== */
.work-body {
  display: flex;
  align-items: stretch;
  padding-top: var(--header-height);
  height: 100vh;
  overflow: hidden;
}

/* ===== Left Column ===== */
.work-left {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 104px 56px 56px 56px;
}

/* ===== Intro ===== */
.work-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-label {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--color-4);
  font-weight: 400;
}

.work-quote {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0.2px;
  color: var(--color-3);
}

/* ===== Bottom Fixed ===== */
.work-fixed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.work-note {
  display: flex;
  align-items: center;
  gap: 16px;
}

.note-icon {
  width: 26px;
  height: 24px;
  flex-shrink: 0;
}

.note-text {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0.2px;
  color: var(--color-4);
  white-space: nowrap;
}

.work-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-4);
  white-space: nowrap;
}

.info-label { font-weight: 700; }

/* ===== Right Column: Project Names ===== */
.work-right {
  width: 50%;
  display: flex;
  align-items: flex-start;
  padding: 104px 56px 56px 0;
  overflow: hidden;
  margin-left: -70px;
}

.project-name-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 56px;
  width: 100%;
}

/* ===== Project Link ===== */
.project-link {
  position: relative;
  display: block;
  cursor: none;
}

.project-link-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(22px, 4.5vh, 48px);
  line-height: 1.33;
  color: var(--color-2);
  white-space: nowrap;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.project-link:hover .project-link-label {
  opacity: 0;
  transform: translateX(12px);
}

/* ===== Global Marquee ===== */
.global-marquee {
  position: fixed;
  left: 0;
  width: 100vw;
  display: flex;
  align-items: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  z-index: 50;
}

.global-marquee.active {
  opacity: 1;
}

.marquee-track {
  display: flex;
  gap: 128px;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(22px, 4.5vh, 48px);
  line-height: 1.33;
  color: #b1b5c3;
  animation: marqueeRTL 20s linear infinite;
  will-change: transform;
}

@keyframes marqueeRTL {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== Cursor Image ===== */
.project-cursor {
  position: fixed;
  width: 144px;
  height: 104px;
  pointer-events: none;
  z-index: 200;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
  overflow: hidden;
}

.project-cursor.active {
  opacity: 1;
}

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

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .header { padding: 16px 32px; }
  .header-brand { width: auto; }
  .work-left { padding: 72px 32px 40px 32px; }
  .work-right { padding: 72px 32px 40px 0; margin-left: -40px; }
  .work-quote { font-size: 18px; line-height: 26px; }
  .note-text { font-size: 18px; }
}

@media (max-width: 767px) {
  .header { padding: 16px 24px; height: 72px; }
  .header-name { display: none; }
  .header-actions { display: none; }
  .work-body {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }
  .work-left {
    width: 100%;
    padding: 48px 24px 32px;
  }
  .work-right {
    width: 100%;
    margin-left: 0;
    padding: 0 24px 48px;
  }
  .work-quote { font-size: 16px; line-height: 24px; }
  .note-text { font-size: 16px; line-height: 22px; }
  .project-name-list { gap: 24px; }
  .global-marquee { display: none; }
  .project-cursor { display: none; }
  .project-link { cursor: auto; }
}
