@font-face {
  font-family: 'NDot47';
  src: url('fonts/ndot-47-inspired-by-nothing.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@media (hover: hover) { *, *::before, *::after { cursor: none !important; } }

/* ── TOKENS ── */
:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #999;
  --card-bg: #c8cbbf;
  --border: #e8e8e8;
}

body.dark {
  --bg: #000000;
  --text: #e8e8e8;
  --muted: #444;
  --card-bg: #1a1a1a;
  --border: #222;
}

body {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.6s ease, color 0.6s ease;
}

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

/* ── CUSTOM CURSOR ── */
#cursor {
  position: fixed;
  width: 7px;
  height: 7px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  transition:
    width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.6s ease,
    opacity 0.3s ease;
  opacity: 0;
}

#cursor.visible { opacity: 1; }
#cursor.hovering { width: 18px; height: 18px; }
#cursor.clicking { width: 4px; height: 4px; }

/* ── NAV ── */
.nav-muted {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.6s ease;
}

nav {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 20px;
  opacity: 0;
  animation: navIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes navIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-name { font-size: 14px; }
.nav-role  { font-size: 14px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a, nav a { transition: opacity 0.2s; }
.nav-links a:hover, nav a:hover { opacity: 0.4; }

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.nav-dot {
  width: 10px;
  height: 10px;
  background: var(--text);
  border-radius: 2px;
  flex-shrink: 0;
  border: none;
  padding: 0;
  transition:
    background-color 0.6s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-radius 0.3s ease;
}

.nav-dot:hover {
  transform: scale(1.4);
  border-radius: 50%;
}

/* ── PROJECT CARDS ── */
.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.4s ease;
}

.featured-grid:hover .project-card { opacity: 0.3; }
.featured-grid:hover .project-card:hover { opacity: 1; }

.project-card-title {
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.6s ease;
}

.project-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  transition: background-color 0.6s ease;
}

.project-card-thumb img,
.project-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-card-thumb img,
.project-card:hover .project-card-thumb video { transform: scale(1.05); }

.project-card-view {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  transition: color 0.2s, gap 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card-view::after {
  content: '→';
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.project-card:hover .project-card-view { color: var(--text); gap: 8px; }
.project-card:hover .project-card-view::after { opacity: 1; transform: translateX(0); }

/* ── ARROW SWIPE (about page) ── */
.arrow-wrap {
  display: inline-block;
  width: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.arrow-char {
  display: inline-block;
}

@keyframes arrowExit {
  0%   { transform: translateX(0);     opacity: 1; }
  45%  { transform: translateX(16px);  opacity: 0; }
  46%  { transform: translateX(-16px); opacity: 0; }
  100% { transform: translateX(0);     opacity: 1; }
}

.client-item:hover .arrow-char {
  animation: arrowExit 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── SCROLL REVEAL ── */
.fade-in {
  opacity: 0;
  transform: translateY(48px) scale(0.96);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── MOBILE ── */
@media (max-width: 768px) {

  /* Restore system cursor on touch devices */
  #cursor { display: none; }

  /* Nav: show only name + dot */
  nav {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    column-gap: 0;
  }

  .nav-role   { display: none; }
  .nav-links  { display: none; }
  .nav-muted  { display: none; }

  .nav-right {
    gap: 14px;
  }

  /* Project cards: 2 columns */
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Disable sibling dim on touch (no hover) */
  .featured-grid:hover .project-card { opacity: 1; }

  /* Softer reveal on mobile */
  .fade-in {
    transform: translateY(24px) scale(0.98);
  }
}

@media (max-width: 480px) {
  /* Single column cards on very small screens */
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

/* ── STORE POPUP ── */
.store-popup {
  position: fixed;
  z-index: 500;
  background: #1a1a1a;
  border-radius: 16px;
  padding: 14px 22px;
  color: #fff;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.9);
  transform-origin: top center;
  transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.store-popup.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

body.dark .store-popup { background: #2c2c2c; }

/* ── CONTACT MODULES ── */
.contact-modules {
  position: fixed;
  top: 62px;
  right: 20px;
  z-index: 500;
  display: grid;
  grid-template-columns: 148px 230px;
  gap: 8px;
  pointer-events: none;
  visibility: hidden;
}

.contact-modules.is-open {
  pointer-events: auto;
  visibility: visible;
}

.contact-module {
  border-radius: 20px;
  opacity: 0;
  transform: scale(0.88) translateY(-8px);
  transition: opacity 0.22s ease,
              transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-modules.is-open .contact-module:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.contact-modules.is-open .contact-module:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.07s; }
.contact-modules.is-open .contact-module:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.03s; }

.cm-location {
  background: #00ff28;
  color: #0a0a0a;
  padding: 16px 18px 20px;
  grid-column: 1; grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.cm-location__city {
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
}

.cm-location__time {
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.cm-social {
  background: #1a1a1a;
  padding: 16px 20px;
  grid-column: 1; grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.25s;
}

body.dark .cm-social { background: #2c2c2c; }

.cm-social__link {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  opacity: 1;
  transition: opacity 0.18s;
}

.cm-social__link:hover { opacity: 0.4; }
.cm-social__link svg { width: 20px; height: 20px; }

.cm-cta {
  background: #1a1a1a;
  grid-column: 2; grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  cursor: pointer;
  transition: background-color 0.18s;
}

.cm-cta:hover { background: #2a2a2a; }
body.dark .cm-cta { background: #2c2c2c; }
body.dark .cm-cta:hover { background: #383838; }

.cm-cta__btn {
  background: none;
  border: none;
  color: #fff;
  font-family: 'NDot47', 'Courier New', monospace;
  font-size: 28px;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: none;
}
