/* ─── TOKENS (mirrors index exactly) ─────────────────── */
:root {
  --ink:        #0D1117;
  --ink-dim:    #6B7280;
  --surface:    #FFFFFF;
  --panel:      #F4F5F6;
  --dark:       #0F1B2D;
  --navy:       #1A3A5C;
  --blue:       #2563AE;
  --sky:        #5BA8D9;
  --lime:       #C8E84A;
  --lime-dark:  #A8C832;
  --border-l:   #E5E7EB;
  --radius:     12px;
  --radius-lg:  18px;
  --nav-h:      56px;

  /* ── motion tokens (same as index) ── */
  --ease-out-expo: cubic-bezier(.16,1,.3,1);
  --ease-spring:   cubic-bezier(.34,1.56,.64,1);
  --ease-gentle:   cubic-bezier(.25,.46,.45,.94);
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Noto Sans', sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ─── NAV ────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: var(--nav-h);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-l);
  transition: box-shadow .3s var(--ease-out-expo);
}
nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.07); }

.nav-left { display: flex; align-items: center; gap: 20px; }
.nav-logo {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.3px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity .2s;
}
.nav-logo:hover { opacity: .75; }
.nav-logo span {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--ink);
  border-radius: 4px;
}
.nav-status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-dim); }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22C55E;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--ink-dim); transition: color .2s; }

.nav-links a:not(.nav-cta) { position: relative; padding-bottom: 2px; }
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--lime-dark);
  border-radius: 2px;
  transition: width .25s var(--ease-out-expo);
}
.nav-links a:not(.nav-cta):hover        { color: var(--ink); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }

.nav-active { font-weight: 600; color: var(--ink) !important; }
.nav-active:not(.nav-cta)::after { width: 100% !important; }

.nav-cta {
  font-size: 13px; font-weight: 600; padding: 8px 16px;
  background: #d0d0d0; color: #000 !important;
  border-radius: 8px;
  transition: background .2s, transform .15s;
}
.nav-cta:hover { background: #e1e1e1; transform: translateY(-1px); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .25s var(--ease-out-expo), opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border-l);
  padding: 20px 32px 24px;
  z-index: 99; flex-direction: column; gap: 4px;
  transform: translateY(-6px); opacity: 0;
  transition: transform .25s var(--ease-out-expo), opacity .2s;
}
.mobile-menu.open { display: flex; transform: translateY(0); opacity: 1; }
.mobile-menu a {
  font-size: 16px; color: var(--ink-dim);
  padding: 12px 0; border-bottom: 1px solid var(--border-l);
  transition: color .2s;
}
.mobile-menu a:hover { color: var(--ink); }
.mobile-menu a:last-child { border-bottom: none; }

/* ─── MAIN TWO-COLUMN LAYOUT ─────────────────────────── */
.work-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

/* ─── LEFT PANEL ─────────────────────────────────────── */
.work-left {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  background: var(--dark);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.work-left::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(37,99,174,.25) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 70%, rgba(26,58,92,.4)  0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.work-left > img:not(.featured-img) {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: .45; z-index: 0;
}
.featured-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .4s ease; z-index: 1;
}
.featured-placeholder.visible { opacity: 1; }
.featured-placeholder-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; text-align: center; padding: 32px;
}
.featured-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
}
.featured-placeholder-label {
  font-family: 'Noto Sans', sans-serif; font-size: 14px;
  font-weight: 700; color: rgba(255,255,255,.5);
}
.featured-placeholder-hint { font-size: 12px; color: rgba(255,255,255,.3); line-height: 1.6; }
.featured-placeholder-hint code {
  font-family: monospace; font-size: 11px;
  background: rgba(255,255,255,.08); padding: 1px 5px;
  border-radius: 4px; color: var(--sky);
}
.featured-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .5s var(--ease-gentle);
  pointer-events: none; z-index: 1;
}
.featured-img.visible { opacity: 1; }
.featured-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 48px 28px 24px;
  background: linear-gradient(to top, rgba(10,18,30,.8) 0%, transparent 100%);
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s var(--ease-gentle), transform .35s var(--ease-gentle);
  pointer-events: none; z-index: 2;
}
.featured-caption.visible { opacity: 1; transform: translateY(0); }
.featured-caption-text {
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.9); letter-spacing: .2px;
}

/* ─── RIGHT PANEL ────────────────────────────────────── */
.work-right {
  display: flex; flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border-l);
}

/* ── Work header ─────────────────────────────────────── */
.work-header { padding: 52px 60px 36px; border-bottom: 1px solid var(--border-l); }
.work-heading {
  font-family: 'Noto Sans', sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700; color: var(--ink);
  letter-spacing: -1px; line-height: 1.1; margin-bottom: 16px;
}
.work-sub { font-size: 15px; line-height: 1.65; color: var(--ink-dim); }
.work-sub + .work-sub { margin-top: 2px; }

/* ── Project list ────────────────────────────────────── */
.project-list { display: flex; flex-direction: column; flex: 1; }

.project-row {
  display: flex; align-items: center; gap: 20px;
  padding: 24px 60px;
  border-bottom: 1px solid var(--border-l);
  cursor: pointer;
  transition: background .2s var(--ease-gentle);
  position: relative;
}
.project-row:hover { background: var(--panel); }
.project-row:hover .project-arrow { opacity: 1; transform: translate(0, 0); }
.project-row:hover .project-name  { color: var(--blue); }

.project-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.project-name {
  font-family: 'Noto Sans', sans-serif; font-size: 24px; font-weight: 700;
  color: var(--ink); letter-spacing: -.3px; transition: color .2s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-desc {
  font-size: 15px; color: var(--ink-dim); line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-tag {
  font-size: 12px; font-weight: 600; color: var(--ink-dim);
  white-space: nowrap; flex-shrink: 0; letter-spacing: .2px;
  padding: 4px 10px; border: 1px solid var(--border-l);
  border-radius: 20px; background: var(--surface);
  transition: border-color .2s, color .2s, background .2s;
}
.project-row:hover .project-tag {
  border-color: var(--blue); color: var(--blue); background: rgba(37,99,174,.05);
}
.project-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; opacity: 0; transform: translate(-4px, 4px);
  transition: opacity .2s, transform .25s var(--ease-spring), background .2s;
}
.project-row:hover .project-arrow { background: var(--blue); }

/* ── CTA strip ───────────────────────────────────────── */
.work-cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 36px 60px;
  border-top: 1px solid var(--border-l);
  flex-wrap: wrap;
}
.work-cta-copy { font-size: 15px; color: var(--ink-dim); }

/* ── Button — desktop base ───────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  width: auto;          /* size to content on desktop */
  background: var(--lime);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .2s var(--ease-spring), box-shadow .2s;
}
.btn-primary:hover {
  background: var(--lime-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168,200,50,.3);
}
.btn-primary:active { transform: translateY(0); }

/* ── Footer ──────────────────────────────────────────── */
.work-footer {
  padding: 28px 60px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--border-l);
}
.footer-copy { font-size: 12px; color: var(--ink-dim); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--ink-dim); transition: color .2s; }
.footer-links a:hover { color: var(--ink); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE  960 → 768 → 480
   ═══════════════════════════════════════════════════════ */

@media (max-width: 960px) {
  .work-layout         { grid-template-columns: 1fr; }
  .work-right          { border-left: none; }

  .work-left {
    position: relative; top: auto;
    height: 52vw; min-height: 280px;
    border-bottom: 1px solid var(--border-l);
  }
  .featured-img        { pointer-events: none; }

  .work-header         { padding: 40px 36px 28px; }
  .project-row         { padding: 20px 36px; }

  /* Strip: stacked column, fixed 36px horizontal padding each side */
  .work-cta-strip {
    padding: 28px 36px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* Button: explicit fixed width of 260px — does not depend on container */
  .btn-primary {
    width: 260px;
    max-width: 260px;
    justify-content: center;
    font-size: 16px;
  }

  .work-footer         { padding: 24px 36px; }
}

@media (max-width: 768px) {
  nav                  { padding: 0 20px; }
  .nav-links,
  .nav-status,
  .nav-cta             { display: none; }
  .hamburger           { display: flex; }

  .work-left           { height: 56vw; min-height: 240px; }
  .work-left > img:not(.featured-img) { object-position: center 30%; }

  .work-header         { padding: 32px 24px 24px; }
  .work-sub            { font-size: 14px; }

  .project-row         { padding: 18px 24px; gap: 12px; }
  .project-name        { font-size: 18px; }
  .project-desc        { font-size: 14px; }
  .project-tag         { display: none; }
  .project-arrow       { opacity: 1; transform: none; }

  /* Strip: same column layout, tighter vertical padding, same 24px horizontal */
  .work-cta-strip {
    padding: 24px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* Button: explicit fixed width of 220px — smaller than 960px but still readable */
  .btn-primary {
    width: 220px;
    max-width: 220px;
    justify-content: center;
    font-size: 15px;
  }

  .work-footer         { padding: 20px 24px; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .work-left           { height: 60vw; min-height: 200px; }
  .work-heading        { font-size: 28px; letter-spacing: -.5px; }

  .project-row         { padding: 16px 20px; gap: 10px; }
  .project-name        { font-size: 16px; }
  .project-desc        { font-size: 13px; }
  .featured-caption-text { font-size: 12px; }

  /* Strip: tightest padding at small phones */
  .work-cta-strip {
    padding: 20px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Button: explicit fixed width of 200px on small phones */
  .btn-primary {
    width: 200px;
    max-width: 200px;
    justify-content: center;
    font-size: 14px;
  }
}
