/* ═══════════════════════════════════════════════════════════════
   Thomas Mboto — Personal Site
   A minimalist digital art piece
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0a0a;
  --bg-subtle: #111111;
  --text: #fafafa;
  --text-muted: #666666;
  --text-subtle: #333333;
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.1);
  
  --font-main: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--text-subtle) var(--bg);
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

/* ═══ Custom Cursor ═══ */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.1s var(--ease-out-expo),
              width 0.3s var(--ease-out-expo),
              height 0.3s var(--ease-out-expo);
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.5;
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease-out-expo),
              width 0.3s var(--ease-out-expo),
              height 0.3s var(--ease-out-expo),
              opacity 0.3s ease;
}

body:hover .cursor-follower {
  opacity: 0.5;
}

.cursor.hovering {
  transform: translate(-50%, -50%) scale(3);
  background: transparent;
  border: 1px solid var(--accent);
}

.cursor-follower.hovering {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 0.2;
}

/* ═══ Background Canvas ═══ */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

/* ═══ Navigation ═══ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  mix-blend-mode: difference;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.logo-char {
  display: inline-block;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-logo:hover .logo-char:first-child {
  transform: translateY(-2px) rotate(-5deg);
}

.nav-logo:hover .logo-char:last-child {
  transform: translateY(2px) rotate(5deg);
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-link:hover::after {
  width: 100%;
}

/* ═══ Hero Section ═══ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
}

.hero-content {
  text-align: center;
}

.hero-title {
  font-size: clamp(3rem, 15vw, 12rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.title-line {
  display: block;
  overflow: hidden;
}

.char {
  display: inline-block;
  animation: charReveal 1s var(--ease-out-expo) backwards;
  transition: transform 0.3s var(--ease-out-expo),
              color 0.3s ease;
}

.char:hover {
  color: var(--accent);
  transform: translateY(-5px) rotate(-2deg);
}

@keyframes charReveal {
  from {
    opacity: 0;
    transform: translateY(100%) rotate(10deg);
  }
}

.title-line:nth-child(1) .char:nth-child(1) { animation-delay: 0.1s; }
.title-line:nth-child(1) .char:nth-child(2) { animation-delay: 0.15s; }
.title-line:nth-child(1) .char:nth-child(3) { animation-delay: 0.2s; }
.title-line:nth-child(1) .char:nth-child(4) { animation-delay: 0.25s; }
.title-line:nth-child(1) .char:nth-child(5) { animation-delay: 0.3s; }
.title-line:nth-child(1) .char:nth-child(6) { animation-delay: 0.35s; }
.title-line:nth-child(2) .char:nth-child(1) { animation-delay: 0.5s; }
.title-line:nth-child(2) .char:nth-child(2) { animation-delay: 0.55s; }
.title-line:nth-child(2) .char:nth-child(3) { animation-delay: 0.6s; }
.title-line:nth-child(2) .char:nth-child(4) { animation-delay: 0.65s; }
.title-line:nth-child(2) .char:nth-child(5) { animation-delay: 0.7s; }

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  animation: fadeIn 1s var(--ease-out-expo) 1s backwards;
}

.subtitle-word {
  transition: color 0.3s ease;
}

.subtitle-word:hover {
  color: var(--accent);
}

.subtitle-dot {
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: fadeIn 1s var(--ease-out-expo) 1.5s backwards;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: var(--accent);
  animation: scrollDown 1.5s var(--ease-in-out) infinite;
}

@keyframes scrollDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(400%); }
}

/* ═══ Section Styles ═══ */
section {
  min-height: 100vh;
  padding: 8rem 3rem;
  display: flex;
  align-items: center;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

.label-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.label-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══ About Section ═══ */
.about-content {
  max-width: 700px;
  margin-bottom: 4rem;
}

.about-text {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.about-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.detail-item {
  border-top: 1px solid var(--text-subtle);
  padding-top: 1rem;
}

.detail-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.detail-value {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ═══ Work Section ═══ */
.work {
  background: var(--bg-subtle);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.work-item {
  position: relative;
  cursor: none;
}

.work-item::before {
  content: attr(data-index);
  position: absolute;
  top: -1rem;
  right: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-subtle);
}

.work-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--bg);
  border-radius: 4px;
}

.work-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg) 0%, var(--text-subtle) 100%);
  transition: transform 0.6s var(--ease-out-expo);
}

.work-item:hover .work-placeholder {
  transform: scale(1.05);
}

.work-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.work-item:hover .work-title {
  color: var(--accent);
}

.work-desc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ═══ Contact Section ═══ */
.contact-content {
  max-width: 800px;
}

.contact-heading {
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-link {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--text-subtle);
  transition: background 0.3s ease, padding 0.3s ease;
}

.contact-link:last-child {
  border-bottom: 1px solid var(--text-subtle);
}

.contact-link:hover {
  background: var(--accent-dim);
  padding-left: 1rem;
  padding-right: 1rem;
}

.link-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.link-value {
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.contact-link:hover .link-value {
  color: var(--accent);
}

.link-arrow {
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.contact-link:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ═══ Footer ═══ */
.footer {
  padding: 2rem 3rem;
  border-top: 1px solid var(--text-subtle);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.easter-egg {
  transition: color 0.3s ease;
  cursor: none;
}

.easter-egg:hover {
  color: var(--accent);
}

/* ═══ Reveal Animations ═══ */
.reveal-text,
.reveal-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}

.reveal-text.revealed,
.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for items */
.reveal-item:nth-child(1) { transition-delay: 0s; }
.reveal-item:nth-child(2) { transition-delay: 0.1s; }
.reveal-item:nth-child(3) { transition-delay: 0.2s; }
.reveal-item:nth-child(4) { transition-delay: 0.3s; }

/* ═══ Konami Easter Egg ═══ */
.konami-reward {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.konami-reward.active {
  opacity: 1;
  pointer-events: auto;
}

.konami-content {
  text-align: center;
}

.konami-emoji {
  font-size: 5rem;
  display: block;
  margin-bottom: 1rem;
  animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
  to { transform: translateY(-20px); }
}

.konami-reward p {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent);
}

/* ═══ Mobile Responsive ═══ */
@media (max-width: 768px) {
  body {
    cursor: auto;
  }
  
  .cursor,
  .cursor-follower {
    display: none;
  }
  
  .nav {
    padding: 1.5rem;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .nav-link {
    font-size: 0.75rem;
  }
  
  section {
    padding: 6rem 1.5rem;
  }
  
  .hero-subtitle {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }
  
  .contact-link {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  
  .link-arrow {
    display: none;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* ═══ Reduced Motion ═══ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
