@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --background: hsl(230, 25%, 95%);
  --foreground: hsl(0, 0%, 8%);
  --popover: hsl(0, 0%, 100%);
  --popover-foreground: hsl(0, 0%, 8%);
  --primary: hsl(0, 0%, 8%);
  --primary-foreground: hsl(0, 0%, 98%);
  --secondary: hsl(230, 20%, 90%);
  --secondary-foreground: hsl(0, 0%, 8%);
  --muted: hsl(230, 15%, 88%);
  --muted-foreground: hsl(0, 0%, 45%);
  --border: hsl(230, 15%, 85%);
  --radius: 0.75rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; border-color: var(--border); }
body {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animations */
@keyframes fade-up {
  0% { opacity: 0; transform: translateY(24px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
.animate-fade-up {
  opacity: 0;
  animation: fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-marquee {
  animation: marquee 20s linear infinite;
}

/* Splash Canvas */
#splash-canvas {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh; z-index: 0;
}

/* Layout */
.page { position: relative; min-height: 100vh; }
.z-10 { position: relative; z-index: 10; }
.z-50 { position: relative; z-index: 50; }

/* Nav */
.portfolio-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
}
@media (min-width: 768px) { .portfolio-nav { padding: 1.25rem 2.5rem; } }
.nav-logo { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.025em; color: var(--foreground); }
@media (min-width: 768px) { .nav-logo { font-size: 1.25rem; } }
.nav-buttons { display: flex; align-items: center; gap: 0.75rem; }
.btn-talk {
  display: none; align-items: center; gap: 0.5rem;
  background: var(--foreground); color: var(--primary-foreground);
  padding: 0.625rem 1.25rem; border-radius: 9999px;
  font-size: 0.875rem; font-weight: 500; text-decoration: none;
  transition: opacity 0.2s;
}
.btn-talk:hover { opacity: 0.9; }
.btn-talk:active { transform: scale(0.97); }
@media (min-width: 768px) { .btn-talk { display: flex; } }
.btn-talk-dot { width: 0.375rem; height: 0.375rem; border-radius: 9999px; background: rgba(255,255,255,0.6); }
.btn-menu {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--popover); border: 1px solid var(--border);
  padding: 0.625rem 1.25rem; border-radius: 9999px;
  font-size: 0.875rem; font-weight: 500; color: var(--foreground);
  cursor: pointer; transition: background 0.2s;
}
.btn-menu:hover { background: var(--secondary); }
.btn-menu:active { transform: scale(0.97); }
.menu-dots { display: flex; gap: 0.125rem; }
.menu-dot { width: 0.25rem; height: 0.25rem; border-radius: 9999px; background: var(--foreground); }

/* Header */
.page-header {
  padding: 7rem 1.5rem 2.5rem;
}
@media (min-width: 768px) { .page-header { padding: 9rem 2.5rem 3.5rem; } }
.header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.header-label {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.3em; color: var(--muted-foreground);
}
.header-count {
  font-size: 2.25rem; font-weight: 300;
  color: rgba(0,0,0,0.2); font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .header-count { font-size: 3rem; } }

/* Projects Grid */
.projects-section { padding: 0 1.5rem 6rem; position: relative; z-index: 10; }
@media (min-width: 768px) { .projects-section { padding: 0 2.5rem 10rem; } }
.projects-grid {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr;
  gap: 3rem 1.5rem;
}
@media (min-width: 768px) {
  .projects-grid { grid-template-columns: 1fr 1fr; gap: 4rem 2rem; }
}

/* Project Card */
.project-card { cursor: pointer; }
.project-card-image {
  position: relative; overflow: hidden;
  border-radius: var(--radius); margin-bottom: 1.25rem;
  aspect-ratio: 4/3;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}
.project-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s ease-out;
}
.project-card:hover .project-card-image img { transform: scale(1.06); }
.shine-overlay {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.5s; pointer-events: none;
}
.project-card:hover .shine-overlay { opacity: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.5rem; }
.project-tag {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--muted-foreground);
}
@media (min-width: 768px) { .project-tag { font-size: 0.75rem; } }
.tag-dot { margin: 0 0.375rem; color: rgba(0,0,0,0.15); }
.project-title {
  font-size: 1.25rem; font-weight: 300;
  letter-spacing: -0.025em; color: var(--foreground); line-height: 1.25;
}
@media (min-width: 768px) { .project-title { font-size: 1.5rem; } }
@media (min-width: 1024px) { .project-title { font-size: 1.875rem; } }

/* CTA Section */
.cta-section {
  position: relative; z-index: 10;
  padding: 6rem 1.5rem; text-align: center;
}
@media (min-width: 768px) { .cta-section { padding: 10rem 2.5rem; } }
.cta-label {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.3em; color: var(--muted-foreground); margin-bottom: 1.5rem;
}
.cta-title {
  font-size: 2.25rem; font-weight: 300;
  letter-spacing: -0.05em; line-height: 1.05; margin-bottom: 1rem;
}
@media (min-width: 768px) { .cta-title { font-size: 3.75rem; } }
@media (min-width: 1024px) { .cta-title { font-size: 4.5rem; } }
.cta-title-italic { font-style: italic; margin-bottom: 3rem; }

/* Marquee */
.marquee-wrap {
  margin-top: 4rem; overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
@media (min-width: 768px) { .marquee-wrap { margin-top: 6rem; } }
.marquee-track { display: flex; white-space: nowrap; }
.marquee-text {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.4em; color: rgba(0,0,0,0.2); margin: 0 2rem;
}

/* Footer */
.portfolio-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
}
@media (min-width: 768px) { .portfolio-footer { padding: 4rem 3rem; } }
.footer-grid {
  max-width: 80rem; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
.footer-label {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted-foreground); margin-bottom: 0.75rem;
}
.footer-text { font-size: 0.875rem; color: rgba(0,0,0,0.8); line-height: 1.6; }
.footer-links { display: flex; flex-direction: column; gap: 0.25rem; }
.footer-link {
  font-size: 0.875rem; color: rgba(0,0,0,0.8);
  text-decoration: none; width: fit-content; transition: color 0.2s;
}
.footer-link:hover { color: var(--foreground); }
.footer-bottom {
  max-width: 80rem; margin: 3rem auto 0;
  padding-top: 2rem; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
  align-items: center; gap: 1rem;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }
.footer-copy { font-size: 0.75rem; color: var(--muted-foreground); }
