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

:root {
  --color-bg: #0a0a0a;
  --color-text: #ffffff;
  --color-text-muted: #888888;
  --color-accent: #e0e0e0;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', monospace;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 2rem;
  mix-blend-mode: difference;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--transition-bounce), opacity 0.3s ease;
  opacity: 0.8;
}

.nav-link:hover {
  transform: scale(1.2);
  opacity: 1;
}

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

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image,
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.8s var(--transition-smooth), transform 1.2s var(--transition-smooth);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.5) 50%,
    rgba(10, 10, 10, 0.9) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s var(--transition-smooth) forwards;
}

.title-line:nth-child(2) {
  animation-delay: 0.2s;
}

.title-is {
  font-weight: 300;
  font-style: italic;
  color: var(--color-text-muted);
}

.hero-location {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 2vw, 1rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--transition-smooth) 0.4s forwards;
  color: var(--color-accent);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s var(--transition-smooth) 1s forwards;
}

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

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* Projects Section */
.projects {
  padding: 4rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

.project {
  padding: 4rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

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

.project-link {
  display: inline-block;
  transition: transform 0.3s var(--transition-bounce);
}

.project-link:hover {
  transform: translateX(10px);
}

.project-header {
  margin-bottom: 1.5rem;
}

.project-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.project-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--color-text);
  transition: width 0.4s var(--transition-smooth);
}

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

.project-phonetic {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 0.5rem;
}

.project-definitions {
  margin-bottom: 1.5rem;
}

.project-definitions p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.project-definitions em {
  color: var(--color-accent);
  font-style: italic;
}

.project-description {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 700px;
}

.project-description a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 0.2s ease;
}

.project-description a:hover {
  text-decoration-thickness: 2px;
}

.project-subproject {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 8px 8px 0;
}

.project-subproject h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.project-subproject p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Footer */
.footer {
  padding: 3rem 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scrollPulse {
  0%, 100% {
    opacity: 1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.5;
    transform: scaleY(0.8);
  }
}

/* Cursor effect for interactive elements */
.project:hover {
  cursor: pointer;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .hero-location {
    letter-spacing: 0.15em;
  }

  .project {
    padding: 3rem 1.5rem;
  }

  .project-description {
    font-size: 1rem;
  }

  .scroll-indicator {
    bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .nav-link svg {
    width: 18px;
    height: 18px;
  }

  .project {
    padding: 2.5rem 1rem;
  }

  .project-subproject {
    padding: 1rem;
  }
}

/* Reduced motion support */
@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;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-text-muted: #cccccc;
  }

  .hero-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
}
