/* ─── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #1a1a1a;
  --text: #f0ede8;
  --text-muted: #888580;
  --text-dim: #444240;
  --accent: #c8b89a;
  --accent-dim: rgba(200, 184, 154, 0.12);
  --border: rgba(255,255,255,0.07);
  --radius: 12px;
  --nav-h: 72px;
  --font: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Scrollbar ────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 2px; }

/* ─── Custom Cursor ────────────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}
.cursor-follower {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(240,237,232,0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, width 0.3s, height 0.3s, opacity 0.3s;
}
body:has(a:hover) .cursor,
body:has(button:hover) .cursor { width: 14px; height: 14px; }
body:has(a:hover) .cursor-follower,
body:has(button:hover) .cursor-follower { width: 56px; height: 56px; opacity: 0.6; }

/* ─── Container ────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─── Navigation ───────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: flex;
  align-items: center;
  opacity: 1;
  transition: opacity 0.2s;
}
.nav__logo:hover { opacity: 0.7; }
.nav__logo-img {
  height: 28px;
  width: auto;
}
.nav__links {
  list-style: none;
  display: flex;
  gap: 40px;
}
.nav__link {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  transition: color 0.2s;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }

.nav__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}
.nav__menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav__menu-toggle.open span:first-child { transform: translateY(6.5px) rotate(45deg); }
.nav__menu-toggle.open span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
}
.nav__mobile.open { max-height: 300px; }
.nav__mobile-link {
  padding: 18px 32px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, padding-left 0.3s;
}
.nav__mobile-link:hover { color: var(--text); padding-left: 40px; }

/* ─── Section Commons ──────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-header {
  margin-bottom: 60px;
}

/* ─── Reveal Animations ────────────────────────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal-up.visible { opacity: 1; transform: translateY(0); }

.reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal-word.visible { opacity: 1; transform: translateY(0); }

.reveal-card {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal-card.visible { opacity: 1; transform: translateY(0); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ─── Hero ─────────────────────────────────────────────────────────── */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 60px) 0 120px;
  position: relative;
}

/* Subtle grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 30%, transparent 80%);
  pointer-events: none;
}

.hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 0 12px;
}

.hero__ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  margin-bottom: 48px;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.hero__ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticker 22s linear infinite;
}
.hero__ticker-track:hover { animation-play-state: paused; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.hero__ticker-item {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 28px;
  white-space: nowrap;
}
.hero__ticker-sep {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.hero__dot {
  width: 6px; height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero__title {
  font-size: clamp(60px, 11vw, 158px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 48px;
  overflow: hidden;
}
.hero__line {
  overflow: hidden;
  display: block;
  margin-bottom: 4px;
}
.hero__line--sub {
  display: flex;
  gap: 0.25em;
  flex-wrap: wrap;
}
.hero__accent { color: var(--accent); }

.hero__meta {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.hero__desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.7;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 24px;
  border-radius: 100px;
  transition: background 0.3s, border-color 0.3s, gap 0.3s;
  white-space: nowrap;
}
.hero__cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  gap: 16px;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollLine 2s ease infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─── Works ────────────────────────────────────────────────────────── */
.works {
  padding: 120px 0;
}

.works__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.work-card { grid-column: span 4; }
.work-card--large { grid-column: span 8; }
.work-card--wide { grid-column: span 8; }

/* stagger reveal */
.work-card[data-index="0"] { transition-delay: 0s; }
.work-card[data-index="1"] { transition-delay: 0.1s; }
.work-card[data-index="2"] { transition-delay: 0.2s; }
.work-card[data-index="3"] { transition-delay: 0s; }
.work-card[data-index="4"] { transition-delay: 0.1s; }
.work-card[data-index="5"] { transition-delay: 0.2s; }

.work-card__link {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.work-card__link:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-6px); }

.work-card__image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.work-card--large .work-card__image { aspect-ratio: 16/9; }

.work-card__placeholder {
  width: 100%; height: 100%;
  background: var(--bg);
  background: radial-gradient(ellipse at 50% 80%, var(--bg-3), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 0.1em;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.work-card__link:hover .work-card__placeholder { transform: scale(1.04); }

/* PlayJoy tile artwork */
.work-card__playjoy {
  position: relative;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 90% 80% at 75% 20%, rgba(88, 21, 134, 0.8), transparent 70%),
    radial-gradient(ellipse 70% 60% at 15% 90%, rgba(27, 2, 132, 0.7), transparent 65%),
    #12001d;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.work-card__link:hover .work-card__playjoy { transform: scale(1.04); }
.work-card__playjoy-logo {
  position: absolute;
  top: 24px; left: 28px;
  height: 26px;
  width: auto;
}
.work-card__playjoy-pad {
  position: absolute;
  right: 4%; bottom: -18%;
  height: 105%;
  width: auto;
  filter: drop-shadow(0 20px 40px rgba(161, 0, 255, 0.35));
}

/* Work card real image */
.work-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.work-card__link:hover .work-card__img { transform: scale(1.04); }

.work-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s;
}
.work-card__overlay svg { color: var(--text); }
.work-card__link:hover .work-card__overlay { opacity: 1; }

.work-card__info { padding: 20px 24px 24px; }
.work-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.work-card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}
.work-card__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text);
}
.work-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── About ────────────────────────────────────────────────────────── */
.about {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about__body {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 16px;
}
.about__links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about__link {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  transition: color 0.2s, padding-left 0.3s;
}
.about__link:last-child { border-bottom: none; padding-bottom: 0; }
.about__link:hover { color: var(--text); padding-left: 8px; }

/* ─── How I use AI ─────────────────────────────────────────────────── */
.ai { padding: 120px 0 0; }
.ai__sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-top: 20px;
}
.ai__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ai-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 28px;
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.16,1,0.3,1),
              opacity 0.8s cubic-bezier(0.16,1,0.3,1);
}
.ai-box:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
}
.ai-box[data-index="1"], .ai-box[data-index="4"] { transition-delay: 0.1s; }
.ai-box[data-index="2"], .ai-box[data-index="5"] { transition-delay: 0.2s; }
.ai-box:hover { transition-delay: 0s; }
.ai-box__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text);
}
.ai-box__desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.ai__ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  margin-top: 80px;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.ai__ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 30s linear infinite;
}
.ai__ticker:hover .ai__ticker-track { animation-play-state: paused; }
.ai-tool {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 36px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.ai-tool img {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}
.ai-tool__mono {
  width: 22px; height: 22px;
  border: 1px solid var(--text-dim);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ─── Blog ─────────────────────────────────────────────────────────── */
.blog { padding: 120px 0; }

.blog__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.blog-item {
  border-top: 1px solid var(--border);
}
.blog-item:last-child { border-bottom: 1px solid var(--border); }

/* stagger for blog items */
.blog-item[data-index="0"] { transition-delay: 0s; }
.blog-item[data-index="1"] { transition-delay: 0.08s; }
.blog-item[data-index="2"] { transition-delay: 0.16s; }
.blog-item[data-index="3"] { transition-delay: 0.24s; }

.blog-item__link { display: block; padding: 28px 0; }
.blog-item__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: padding-left 0.3s ease;
}
.blog-item__link:hover .blog-item__inner { padding-left: 12px; }

.blog-item__left {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}
.blog-item__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 4px;
  min-width: 28px;
}
.blog-item__title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  transition: color 0.2s;
}
.blog-item__link:hover .blog-item__title { color: var(--accent); }
.blog-item__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.blog-item__right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.blog-item__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}
.blog-item__arrow {
  color: var(--text-dim);
  transition: transform 0.3s, color 0.3s;
  flex-shrink: 0;
}
.blog-item__link:hover .blog-item__arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ─── Contact ──────────────────────────────────────────────────────── */
.contact {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(200,184,154,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.contact__inner { position: relative; }
.contact__title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  margin-top: 12px;
}
.contact__sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 48px;
}
.contact__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  transition: color 0.3s, border-color 0.3s, gap 0.3s;
}
.contact__cta:hover { color: var(--accent); border-color: var(--accent); gap: 20px; }

/* ─── Footer ───────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.footer__socials { display: flex; gap: 28px; }
.footer__social {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__social:hover { color: var(--text); }

/* ─── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .work-card { grid-column: span 6; }
  .work-card--large { grid-column: span 12; }
  .work-card--wide { grid-column: span 12; }

  .ai__grid { grid-template-columns: repeat(2, 1fr); }
  .ai-box { padding: 24px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .container { padding: 0 20px; }

  body { cursor: auto; }
  .cursor, .cursor-follower { display: none; }

  .nav__links { display: none; }
  .nav__menu-toggle { display: flex; }
  .nav__mobile { display: flex; }

  .hero__title { font-size: clamp(52px, 13vw, 80px); }
  .hero__meta { flex-direction: column; align-items: flex-start; gap: 24px; }

  .works { padding: 80px 0; }
  .works__grid { grid-template-columns: 1fr; gap: 12px; }
  .work-card,
  .work-card--large,
  .work-card--wide { grid-column: span 1; }

  .about__inner { grid-template-columns: 1fr; gap: 40px; }
  .about__body { font-size: 16px; }

  .blog { padding: 80px 0; }
  .blog-item__right { display: none; }
  .blog-item__title { font-size: 16px; }

  .ai { padding: 80px 0 0; }
  .ai__ticker { margin-top: 56px; padding: 16px 0; }
  .ai-tool { padding: 0 24px; font-size: 14px; }

  .contact { padding: 80px 0; }
  .contact__cta { font-size: 16px; }

  .footer__inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer__socials { justify-content: center; }

  .section-header { margin-bottom: 40px; }
}

@media (max-width: 640px) {
  .ai__grid { grid-template-columns: 1fr; gap: 12px; }
  .ai-box { padding: 22px; }
  .ai-box[data-index] { transition-delay: 0s; }
}

@media (max-width: 480px) {
  .hero__tag { font-size: 10px; }
  .works__grid { gap: 10px; }
  .blog-item__left { gap: 16px; }
}
