/* ===== Reset & base ===== */

*, *::before, *::after {
  box-sizing: border-box;
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii04IC04IDExMiA3NiIgd2lkdGg9IjUyIiBoZWlnaHQ9IjM1Ij48ZyB0cmFuc2Zvcm09InJvdGF0ZSgtMTIgNDYgMzApIj48cG9seWdvbiBwb2ludHM9Ijc0LDMwIDk2LDE0IDkyLDMwIDk2LDQ2IiBmaWxsPSIjNWIyMWI2Ii8+PHBvbHlnb24gcG9pbnRzPSIzMCwxMCA0Niw0IDQyLDE4IiBmaWxsPSIjYzA4NGZjIi8+PHBvbHlnb24gcG9pbnRzPSIzNCw1MCA1MCw1NiA0Niw0MiIgZmlsbD0iI2MwODRmYyIvPjxlbGxpcHNlIGN4PSI0MiIgY3k9IjMwIiByeD0iMzIiIHJ5PSIyMCIgZmlsbD0iIzlkODZjNyIgc3Ryb2tlPSJyZ2JhKDE5MiwxMzIsMjUyLDAuNSkiIHN0cm9rZS13aWR0aD0iMiIvPjxjaXJjbGUgY3g9IjIwIiBjeT0iMjciIHI9IjYiIGZpbGw9IiMwZjBhMWUiLz48Y2lyY2xlIGN4PSIxOCIgY3k9IjI2IiByPSIyLjYiIGZpbGw9IiNjMDg0ZmMiLz48cGF0aCBkPSJNMTAgMzMgUTE2IDM4IDIyIDM0IiBzdHJva2U9IiMwZjBhMWUiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPgo=") 9 22, auto !important;
}

:root {
  --bg: #0f0a1e;
  --bg-raised: rgba(192, 132, 252, 0.02);
  --text-bright: #e9d8fd;
  --text-muted: #9d86c7;
  --accent: #c084fc;
  --accent-dim: rgba(192, 132, 252, 0.2);
  --border: rgba(192, 132, 252, 0.1);
}

body {
  margin: 0;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-muted);
}

body.site-active {
  overflow: auto;
}

h1, h2, h3 {
  font-family: 'JetBrains Mono', monospace;
}

/* ===== Landing splash ===== */

#landing {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 0 60px;
  background: #fff;
}

#landing h1 {
  font-size: 2.5rem;
  color: #111;
  margin: 0 0 8px 0;
}

#landing p {
  font-size: 1.1rem;
  color: #444;
  margin: 0 0 20px 0;
}

#aboutBtn {
  align-self: flex-start;
  font-size: 22px;
  font-family: 'Georgia', serif;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  background: linear-gradient(135deg, #4c1d95, #7c3aed, #c084fc);
  color: white;
  letter-spacing: 2px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#aboutBtn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 36px rgba(168, 85, 247, 0.6);
}

#ripple {
  position: fixed;
  border-radius: 50%;
  background: linear-gradient(135deg, #4c1d95, #7c3aed, #c084fc);
  transform: scale(0);
  transition: transform 1s ease;
  pointer-events: none;
  z-index: 9;
}

#ripple.expand {
  transform: scale(1);
}

.click-stamp {
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 1;
  transition: opacity 0.9s ease;
  z-index: 9999;
  line-height: 0;
}

/* ===== Site ===== */

#site {
  display: none;
}

/* Navbar */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 60px;
  background: rgba(15, 10, 30, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--text-bright);
  text-decoration: none;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: 6px;
}

.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-bright);
  background: rgba(192, 132, 252, 0.08);
  border-color: var(--accent-dim);
}

/* Sections */

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 60px;
}

.section {
  padding: 120px 0;
  scroll-margin-top: 90px;
}

.section-label {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin: 0 0 60px 0;
}

/* Hero */

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-top: 60px;
  padding-bottom: 60px;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  color: #c084fc;
  opacity: 0.8;
  transition: opacity 0.4s ease;
  animation: scrollHintBounce 2s ease-in-out infinite;
}

.scroll-hint:hover {
  opacity: 1;
}

.scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

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

.hero-greeting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  color: var(--text-bright);
  margin: 0;
}

.hero-name {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 8px 0;
  letter-spacing: -1px;
}

.typed-cursor {
  display: inline-block;
  margin-left: 3px;
  color: var(--accent);
  font-weight: 400;
  opacity: 1;
}

.typed-cursor.blinking {
  animation: typedCursorBlink 0.8s step-end infinite;
}

@keyframes typedCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--accent);
  margin: 0;
}

.hero-art {
  position: relative;
  width: 260px;
  height: 260px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#catFace {
  overflow: visible;
  filter: drop-shadow(0 0 40px rgba(192, 132, 252, 0.25));
}

#catHead {
  transform-origin: 100px 112px;
  transition: transform 0.1s ease-out;
}

.cat-pupil {
  transition: transform 0.05s linear;
}

/* About */

.about-grid {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 720px;
  margin: 0 auto;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 18px 0;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Headshot flip */

.headshot-flip {
  width: 170px;
  height: 170px;
  flex-shrink: 0;
  perspective: 800px;
}

.flip-hint {
  display: block;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  margin-bottom: 6px;
}

.headshot-flip:hover .flip-hint {
  opacity: 1;
  transform: translateY(0);
}

.flip-inner {
  position: relative;
  width: 170px;
  height: 170px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.headshot-flip:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}

.flip-back {
  transform: rotateY(180deg);
}

.headshot {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.1);
  display: block;
}

.paw-back {
  border-radius: 50%;
  background: #1a1230;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.1);
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Experience timeline */

.timeline {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--accent-dim);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-node {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.15);
}

.timeline-date {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.timeline-card {
  padding: 20px 22px;
  border-radius: 8px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  background: var(--bg-raised);
  transition: background 0.2s, border-left-color 0.2s;
}

.timeline-card:hover {
  background: rgba(192, 132, 252, 0.06);
  border-left-color: var(--accent);
}

.timeline-org {
  font-size: 0.82rem;
  color: var(--accent);
  margin: 0 0 12px 0;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0 0 10px 0;
}

.card-desc {
  font-size: 0.88rem;
  line-height: 1.75;
  margin: 0 0 16px 0;
}

/* Projects / Research grid */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.project-card {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
}

.project-banner {
  height: 120px;
  background-size: cover;
  background-position: center;
}

.banner-1 { background-image: url("hooshungry.png"); background-color: #4c1d95; }
.banner-2 { background-image: url("bfree.png"); background-color: #f5f5f0; background-size: contain; background-repeat: no-repeat; }
.banner-3 { background-image: url("liftinglog.png"); background-color: #ffffff; background-size: contain; background-repeat: no-repeat; }

.project-body {
  padding: 20px 22px 24px;
}

.project-kind {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}

.project-body .card-title {
  margin-top: 10px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: rgba(192, 132, 252, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.card-link {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(157, 134, 199, 0.25);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.card-link:hover {
  color: var(--accent);
  border-color: rgba(192, 132, 252, 0.5);
  background: rgba(192, 132, 252, 0.06);
}

/* Contact */

.contact-section {
  text-align: center;
  padding-bottom: 100px;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 28px;
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text-muted);
  border: 1px solid rgba(157, 134, 199, 0.25);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.icon-link svg {
  width: 20px;
  height: 20px;
}

.icon-link:hover {
  color: var(--accent);
  border-color: rgba(192, 132, 252, 0.5);
  background: rgba(192, 132, 252, 0.06);
  transform: translateY(-2px);
}

.built-with {
  justify-content: center;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
  .navbar {
    padding: 16px 24px;
  }

  .nav-links {
    display: none;
  }

  main {
    padding: 0 24px;
  }

  .section {
    padding: 80px 0;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    min-height: auto;
    padding-top: 60px;
    gap: 40px;
  }

  .hero-art {
    width: 200px;
    height: 200px;
  }

  .hero-orb {
    width: 140px;
    height: 140px;
  }

  .about-grid {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
}
