* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ====== THREE.JS CANVAS ====== */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ====== INTRO WRAPPER ====== */
#intro-wrapper {
  height: 300vh;
  perspective: 800px;
  scroll-snap-align: start;
}

#intro-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

/* ====== MOTTO ====== */
#motto {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: opacity, transform, filter;
}

.motto-text h1 {
  font-size: clamp(1.75rem, 5vw, 4rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  font-size: 1.5rem;
  color: #555;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ====== HERO SECTION ====== */
#hero {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  mask-image: linear-gradient(to top, #000 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, #000 40%, transparent 100%);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, #000 100%);
  z-index: 1;
}

.hero-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.618fr;
  align-items: center;
  gap: 3rem;
  padding: 2rem;
  max-width: 1000px;
  width: 100%;
  will-change: transform;
}

/* ====== AVATAR ====== */
.avatar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

#avatar {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 60px rgba(255,255,255,0.25), 0 0 20px rgba(255,255,255,0.08);
  background: #1a1a1a;
}

/* ====== INFO ====== */
.hero-info h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

#username {
  font-size: 1.125rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.stats {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.125rem;
}

.karotter-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #aaa;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.karotter-link:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

/* ====== MOBILE ====== */
@media (max-width: 767px) {
  .hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
    padding: 2rem;
    padding-top: calc(38.2vh - 75px);
    gap: 1.5rem;
  }

  #avatar {
    width: 150px;
    height: 150px;
  }

  .hero-info h1 {
    font-size: 2rem;
  }

  .stats {
    justify-content: center;
  }

  .hero-bg {
    top: calc(38.2vh - 20vh);
    bottom: auto;
    height: 40vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7;
    mask-image: linear-gradient(to top, rgba(0,0,0,0) 0%, #000 35%, #000 65%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0) 0%, #000 35%, #000 65%, rgba(0,0,0,0) 100%);
  }

}

/* ====== HERO SNAP ANCHOR ====== */
#hero-snap {
  scroll-snap-align: start;
  height: 150vh;
  margin-top: -150vh;
  pointer-events: none;
}

/* ====== SERVICES SECTION ====== */
.services-bg {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 0;
}

#services {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}

.services-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  width: 100%;
  padding: 4rem 2rem 2rem;
}

/* ---- header ---- */
.services-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  font-size: 0.75rem;
  color: #666;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.5rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: #666;
  margin-top: 0.5rem;
}

/* ---- grid ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ---- card ---- */
.service-card {
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.service-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
}

.card-thumb {
  height: 140px;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb span {
  font-size: 0.8rem;
  color: #555;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.card-body p {
  font-size: 0.85rem;
  color: #888;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.card-link:hover {
  color: #fff;
}

/* ====== end marker ====== */
.end-marker {
  position: relative;
  z-index: 1;
  padding: 2rem 0 3rem;
  font-size: 0.8rem;
  color: #444;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

/* ====== MOBILE OVERRIDES ====== */
@media (max-width: 767px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}
