/* ══════════════════════════════════════════════
   RESET
══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ══════════════════════════════════════════════
   DESIGN TOKENS
   Source: Itsyiits Website Design System (Figma)
══════════════════════════════════════════════ */
:root {
  /* ─ Colors ─────────────────────────────────── */
  --color-bg:           #ffffff;
  --color-ink:          #1a1a1a;
  --color-ink-soft:     #555555;
  --color-ink-muted:    #888888;
  --color-border:       rgba(0, 0, 0, 0.09);
  --color-placeholder:  #e4e4e4;   /* image block fill */
  --color-icon-ph:      #d0d0d0;   /* app icon placeholder */

  /* ─ Typography ──────────────────────────────── */
  --font: 'Google Sans Code', 'Courier New', monospace;

  /* ─ Scale ───────────────────────────────────── */
  --text-xs:    11px;
  --text-sm:    13px;
  --text-base:  15px;
  --text-hero:  18px;
  --text-h2:    20px;

  /* ─ Card (user-specified) ───────────────────── */
  --card-w:      254px;
  --card-h:      354px;
  --card-radius: 30px;
}

/* ══════════════════════════════════════════════
   BASE
══════════════════════════════════════════════ */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font);
  overflow-x: hidden;
}

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

/* ══════════════════════════════════════════════
   NAVBAR
   Fixed, centered, individual pill buttons
══════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 6px;
  /* Prevents wrapping on small viewports */
  white-space: nowrap;
}

/* Logo pill in nav */
.nav__logo-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,0.58) 0%, rgba(255,255,255,0.36) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.4);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-right: 6px;
}

.nav__logo-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}

.nav__logo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.5);
}

.nav__logo-video {
  width: 36px;
  height: 40px;
  display: block;
  object-fit: contain;
}

.nav__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-ink);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;

  /* Liquid glass base — frosted so it reads on dark backgrounds */
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.58) 0%,
    rgba(255, 255, 255, 0.36) 100%
  );

  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);

  /* Light-catching border */
  border: 1px solid rgba(255, 255, 255, 0.55);

  /* Layered shadows:
     1. inset top — specular highlight on the rim
     2. inset bottom — subtle underside depth
     3. outer — soft lift off the page           */
  box-shadow:
    inset 0  1px 0   rgba(255, 255, 255, 0.85),
    inset 0 -1px 0   rgba(0,   0,   0,   0.04),
    0 2px 10px       rgba(0,   0,   0,   0.08),
    0 0   0   0.5px  rgba(0,   0,   0,   0.05);

  transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

/* Specular lobe — subtle highlight at the top */
.nav__btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 45%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0)
  );
  border-radius: 0 0 50% 50%;
  pointer-events: none;
}

.nav__btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.14) 100%
  );
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0  1px 0   rgba(255, 255, 255, 1),
    inset 0 -1px 0   rgba(0,   0,   0,   0.06),
    0 8px 24px       rgba(0,   0,   0,   0.13),
    0 2px  6px       rgba(0,   0,   0,   0.07),
    0 0   0   0.5px  rgba(0,   0,   0,   0.06);
}

.nav__btn:hover::before {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0)
  );
}

.nav__btn:active {
  transform: translateY(0);
  box-shadow:
    inset 0  1px 0   rgba(255, 255, 255, 0.85),
    inset 0 -1px 0   rgba(0,   0,   0,   0.04),
    0 1px  4px       rgba(0,   0,   0,   0.08),
    0 0   0   0.5px  rgba(0,   0,   0,   0.05);
}

/* ── Active / current-page state ── */
.nav__btn.is-active {
  background: var(--color-ink);
  color: var(--color-bg);
  border-color: transparent;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.18),
    0 0   0   0.5px rgba(0, 0, 0, 0.12);
}
.nav__btn.is-active::before {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0)
  );
}
.nav__btn.is-active:hover {
  transform: none;
  background: var(--color-ink);
  border-color: transparent;
}

/* "+" pill — expands to reveal label on hover */
.nav__btn--plus {
  padding: 7px 13px;
}

.nav__plus-icon {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
}

.nav__plus-label {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  font-size: var(--text-sm);
  line-height: 1.4;
  transition: max-width 0.35s ease, opacity 0.25s ease, margin-left 0.35s ease;
  margin-left: 0;
}

.nav__btn--plus:hover .nav__plus-label {
  max-width: 150px;
  opacity: 1;
  margin-left: 5px;
}

/* ══════════════════════════════════════════════
   PAGE WRAPPER
══════════════════════════════════════════════ */
.page {
  height: 100vh;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ══════════════════════════════════════════════
   HERO SECTION
   Logo mark + bio text + 2 featured cards
══════════════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero__text {
  position: relative;
  z-index: 5;
  pointer-events: none;
  padding: 0 24px;
}

.hero__scroll-hint {
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
  margin-top: 28px;
  opacity: 0;
  animation:
    blurReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) both 1s,
    scrollHintPulse 2.4s ease-in-out infinite 1.8s;
}

@keyframes scrollHintPulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.85; }
}


/* ── Float card ── */
.float-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 300px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  cursor: grab;
  will-change: transform;
  user-select: none;
  touch-action: none;
  transform-origin: center;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
  animation: blurReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.float-card:active {
  cursor: grabbing;
}

.float-card:hover {
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.13);
}

.float-card__video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.float-card__body {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              opacity    0.28s ease 0.06s,
              padding    0.38s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.float-card.is-expanded .float-card__body {
  max-height: 240px;
  padding: 16px 18px 20px;
  opacity: 1;
  pointer-events: auto;
}

.float-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  margin-bottom: 12px;
  object-fit: cover;
  display: block;
}

.float-card__name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.3;
  margin-bottom: 2px;
}

.float-card__type {
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
  margin-bottom: 2px;
}

.float-card__discipline {
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
  margin-bottom: 14px;
}

/*
 * LOGO PLACEHOLDER
 * ─────────────────────────────────────────────
 * Replace this element with your actual SVG:
 *   <img src="logo.svg" alt="Yigit Kantel" class="hero__logo" />
 * or inline SVG with class="hero__logo"
 * Remove background, border-radius, and pseudo-content.
 */
.hero__logo {
  width: 160px;
  height: 176px;
  margin-bottom: 40px;
  display: block;
  object-fit: contain;
  letter-spacing: 0.04em;
}

.hero__bio {
  max-width: 640px;
  font-size: var(--text-hero);
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1.65;
  animation: blurReveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) both 0.2s;
}

@keyframes blurReveal {
  from {
    opacity: 0;
    filter: blur(14px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
  }
}

/* ─── Featured project cards ─────────────────── */
.featured-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.featured-card {
  width: 300px;
  /* Height is driven by content; keep to spec with min-height */
  min-height: 400px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}

.featured-card:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
}

/*
 * FEATURED CARD — IMAGE PLACEHOLDER
 * ─────────────────────────────────────────────
 * Replace this div with:
 *   <img src="piki-mockup.png" alt="Piki app" class="featured-card__img" />
 * On the img: object-fit: contain; background: #f5f5f5;
 */
.featured-card__img {
  width: 100%;
  height: 220px;
  background: var(--color-placeholder);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  font-size: var(--text-xs);
  color: rgba(0, 0, 0, 0.25);
  letter-spacing: 0.04em;
}

.featured-card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left;
}

/*
 * FEATURED CARD — APP ICON PLACEHOLDER
 * ─────────────────────────────────────────────
 * Replace this div with:
 *   <img src="piki-icon.png" alt="Piki icon" class="featured-card__icon" />
 */
.featured-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  margin-bottom: 12px;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
  font-size: 9px;
  color: rgba(0, 0, 0, 0.25);
  letter-spacing: 0.04em;
}

.featured-card__name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.3;
  margin-bottom: 3px;
}

.featured-card__type {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-ink-soft);
  line-height: 1.4;
  margin-bottom: 2px;
}

.featured-card__discipline {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-ink-soft);
  line-height: 1.4;
  margin-bottom: 16px;
}

.featured-card__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  align-self: flex-start;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-ink);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;

  /* Liquid glass — matches nav__btn */
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0  1px 0   rgba(255, 255, 255, 0.85),
    inset 0 -1px 0   rgba(0,   0,   0,   0.04),
    0 2px 10px       rgba(0,   0,   0,   0.08),
    0 0   0   0.5px  rgba(0,   0,   0,   0.05);

  transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

/* Specular lobe */
.featured-card__cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 45%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0)
  );
  border-radius: 0 0 50% 50%;
  pointer-events: none;
}

.featured-card__cta:hover {
  transform: translateY(-2px);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.14) 100%
  );
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0  1px 0   rgba(255, 255, 255, 1),
    inset 0 -1px 0   rgba(0,   0,   0,   0.06),
    0 8px 24px       rgba(0,   0,   0,   0.13),
    0 2px  6px       rgba(0,   0,   0,   0.07),
    0 0   0   0.5px  rgba(0,   0,   0,   0.06);
}

.featured-card__cta:active {
  transform: translateY(0);
  box-shadow:
    inset 0  1px 0   rgba(255, 255, 255, 0.85),
    inset 0 -1px 0   rgba(0,   0,   0,   0.04),
    0 1px  4px       rgba(0,   0,   0,   0.08),
    0 0   0   0.5px  rgba(0,   0,   0,   0.05);
}

/* ══════════════════════════════════════════════
   SELECTED WORK
══════════════════════════════════════════════ */
.selected-work {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 24px 100px;
}

.selected-work__heading {
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 40px;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

/* ─── Work card grid ─────────────────────────── */
/*
 * Using flexbox so the last row of 2 cards
 * auto-centers rather than left-aligning.
 */
.work-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: calc(var(--card-w) * 2 + 20px);
}

.work-card {
  width: var(--card-w);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.work-card:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

/*
 * WORK CARD — IMAGE PLACEHOLDER
 * ─────────────────────────────────────────────
 * Replace this div with:
 *   <img src="project.jpg" alt="Project name" class="work-card__img" />
 * On the img add: object-fit: cover; display: block; width: 100%;
 * and set height in CSS or via the .work-card__img rule.
 */
.work-card__img {
  width: 100%;
  height: 186px;
  background: var(--color-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: rgba(0, 0, 0, 0.25);
  object-fit: cover;
  object-position: center;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.work-card__body {
  padding: 14px 16px 18px;
}

.work-card__name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.35;
  margin-bottom: 3px;
}

.work-card__subtitle {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-ink-soft);
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Tags: pill strokes */
.work-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work-card__tags--float {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.work-card__tag {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-ink-muted);
  line-height: 1.4;
  padding: 3px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.footer {
  width: 100%;
  padding:24px 24px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer__line {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1.6;
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

/* Social links — liquid glass, same as nav */
.footer__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-ink);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;

  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0  1px 0   rgba(255, 255, 255, 0.85),
    inset 0 -1px 0   rgba(0,   0,   0,   0.04),
    0 2px 10px       rgba(0,   0,   0,   0.08),
    0 0   0   0.5px  rgba(0,   0,   0,   0.05);

  transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.footer__link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 45%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0)
  );
  border-radius: 0 0 50% 50%;
  pointer-events: none;
}

.footer__link:hover {
  transform: translateY(-2px);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.14) 100%
  );
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0  1px 0   rgba(255, 255, 255, 1),
    inset 0 -1px 0   rgba(0,   0,   0,   0.06),
    0 8px 24px       rgba(0,   0,   0,   0.13),
    0 2px  6px       rgba(0,   0,   0,   0.07),
    0 0   0   0.5px  rgba(0,   0,   0,   0.06);
}

.footer__link:active {
  transform: translateY(0);
  box-shadow:
    inset 0  1px 0   rgba(255, 255, 255, 0.85),
    inset 0 -1px 0   rgba(0,   0,   0,   0.04),
    0 1px  4px       rgba(0,   0,   0,   0.08),
    0 0   0   0.5px  rgba(0,   0,   0,   0.05);
}

/* ══════════════════════════════════════════════
   RESPONSIVE — basic mobile adjustments
══════════════════════════════════════════════ */
/* Desktop: rest of text always visible */
.nav__rest {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
}

/* Small desktop / large tablet landscape (≤1100px) */
@media (max-width: 1100px) {
  .float-card {
    width: 240px;
  }

  .float-card__video {
    height: 180px;
  }
}

/* Tablet portrait / large phone landscape (≤768px, pointer device) */
@media (max-width: 768px) and (hover: hover) {
  .float-card {
    width: 200px;
  }

  .float-card__video {
    height: 155px;
  }

  .float-card.is-expanded:not(:has(.featured-card__cta)) .float-card__body {
    max-height: 160px;
    padding: 10px 14px 14px;
  }
}

@media (max-width: 600px), (hover: none) and (max-width: 896px) {
  .nav {
    top: 12px;
    gap: 4px;
  }

  .nav__btn {
    padding: 6px 11px;
    font-size: 15px;
  }

  /* Collapse to first letter on mobile */
  .nav__rest {
    max-width: 0;
    opacity: 0;
    transition: max-width 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                opacity    0.25s ease;
  }

  /* Expand on tap or when active (current page) */
  .nav__btn--collapsible.is-expanded .nav__rest,
  .nav__btn--collapsible.is-active .nav__rest {
    max-width: 120px;
    opacity: 1;
  }

  /* Hide "start a project" label on mobile — just show + */
  .nav__plus-label {
    display: none !important;
  }

  .hero__bio {
    font-size: 16px;
  }

  .float-card {
    width: 160px;
  }

  .float-card__video {
    height: 120px;
  }

  .float-card .featured-card__cta {
    width: 100%;
    align-self: flex-start;
    justify-content: center;
    padding: 9px 12px;
    font-size: var(--text-xs);
  }

  .float-card.is-expanded:has(.featured-card__cta) .float-card__body {
    max-height: 400px;
    padding: 12px 12px 16px;
  }

  .float-card.is-expanded:not(:has(.featured-card__cta)) .float-card__body {
    max-height: 180px;
    padding: 10px 12px 14px;
  }

  .featured-grid {
    flex-direction: column;
    align-items: center;
  }

  .work-grid {
    max-width: none;
  }
}


/* ══════════════════════════════════════════════
   3D TILT EFFECT — js-tilt
   Undo: remove .js-tilt from card HTML + the
   matching script block in index.html
══════════════════════════════════════════════ */
.js-tilt {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  /* Instant tracking — card follows cursor in real time */
  transition: none;
}

.js-tilt.is-leaving {
  transition: transform 0.55s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.55s cubic-bezier(0.23, 1, 0.32, 1);
}


/* ══════════════════════════════════════════════
   SCROLL ANIMATIONS
   Uses @keyframes so it's independent from the
   tilt effect's transition: none
══════════════════════════════════════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.featured-card,
.work-card {
  opacity: 0;
}

.featured-card.is-visible,
.work-card.is-visible {
  animation: fadeUp 0.5s ease both;
}

/* Once animation ends, anim-done takes over:
   kills the animation so transform is free for the tilt JS */
.featured-card.anim-done,
.work-card.anim-done {
  opacity: 1;
  animation: none;
}

/* Stagger delays for work grid cards */
.work-card:nth-child(2) { animation-delay: 0.08s; }
.work-card:nth-child(3) { animation-delay: 0.16s; }
.work-card:nth-child(4) { animation-delay: 0.08s; }
.work-card:nth-child(5) { animation-delay: 0.16s; }
.work-card:nth-child(6) { animation-delay: 0.24s; }
.work-card:nth-child(7) { animation-delay: 0.08s; }
.work-card:nth-child(8) { animation-delay: 0.16s; }

/* Override scroll-animation transition for tilt cards — must be last */
.featured-card.js-tilt,
.work-card.js-tilt {
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.featured-card.js-tilt.is-leaving,
.work-card.js-tilt.is-leaving {
  transition: transform 0.55s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.55s cubic-bezier(0.23, 1, 0.32, 1);
}
