@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: 0.2s var(--ease-out-expo);
  --transition-medium: 0.4s var(--ease-out-expo);
  --transition-slow: 0.8s var(--ease-out-expo);
  --cursor-size: 20px;
}

#bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  background: var(--text-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo), background 0.3s var(--ease-out-expo);
  will-change: transform;
}

.custom-cursor.active {
  width: 60px;
  height: 60px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a,
button,
.work-card {
  cursor: none !important;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* ===== INTRO ===== */
#intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-out-expo);
}

#intro-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

#intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#intro-overlay {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out-expo);
}

#intro-overlay.visible {
  opacity: 1;
}

#intro-overlay h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-medium);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.btn-enter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-out-expo);
}

.btn-enter:hover::before {
  transform: translateX(0);
}

.btn-enter:hover {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
}

.btn-enter .arrow {
  transition: transform 0.4s var(--ease-out-expo);
}

.btn-enter:hover .arrow {
  transform: translateX(4px);
}

/* ===== TRANSITION OVERLAY ===== */
#transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--bg-primary);
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
  transition: clip-path 1s var(--ease-in-out);
}

#transition-overlay.expanding {
  clip-path: circle(150% at var(--cx) var(--cy));
  pointer-events: all;
}

#transition-overlay.shrinking {
  clip-path: circle(0% at var(--cx) var(--cy));
  transition: clip-path 0.8s var(--ease-in-out);
}

/* ===== NAVIGATION ===== */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.2rem 3rem;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.6s var(--ease-out-expo), opacity 0.6s var(--ease-out-expo);
}

#main-nav.visible {
  transform: translateY(0);
  opacity: 1;
}

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

.nav-logo-img {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  object-fit: cover;
}

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

.nav-link {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
  position: relative;
}

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

.nav-link:hover {
  color: var(--text-primary);
}

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

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-nav {
  padding: 0.5rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.btn-nav:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-nav-filled {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.btn-nav-filled:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--bg-primary);
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 3rem 3rem;
}

.hero-bg-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.float-el {
  position: absolute;
  left: var(--x);
  top: var(--y);
  animation: float 8s var(--ease-in-out) infinite;
  animation-delay: var(--delay);
  opacity: 0.06;
}

.float-circle {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
}

.float-ring {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.float-dot {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--text-primary);
  opacity: 0.2;
}

.float-line {
  width: 120px;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(-30deg);
}

.float-cross {
  width: var(--size);
  height: var(--size);
  position: relative;
}

.float-cross::before,
.float-cross::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
}

.float-cross::before {
  width: 100%;
  height: 1px;
  top: 50%;
}

.float-cross::after {
  height: 100%;
  width: 1px;
  left: 50%;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-25px) rotate(3deg);
  }
}

.hero-content {
  text-align: center;
  max-width: 900px;
  z-index: 1;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.hero-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
}

.hero-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-line {
  display: block;
}

.hero-line-outline {
  -webkit-text-stroke: 1.5px var(--text-primary);
  color: transparent;
  font-style: italic;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.8;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.2rem;
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.btn-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out-expo);
}

.btn-hero:hover::before {
  transform: translateY(0);
}

.btn-hero:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

/* ===== WORK SECTION ===== */
#work {
  padding: 8rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 4rem;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  perspective: 1000px;
}

.work-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 350px;
  cursor: pointer;
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
  transform-style: preserve-3d;
}

.work-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.work-card-wide {
  grid-column: span 2;
  min-height: 300px;
}

.work-card-bg {
  position: absolute;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  transition: transform 0.6s var(--ease-out-expo);
  will-change: transform;
}

.work-card-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.4s var(--ease-out-expo);
}

.work-card:hover .work-card-bg::after {
  background: rgba(0, 0, 0, 0.4);
}

.work-card:hover .work-card-bg {
  transform: scale(1.05);
}

.work-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  z-index: 2;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.work-category {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-bottom: 0.5rem;
}

.work-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.work-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.work-card-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out-expo);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.work-card:hover .work-card-hover {
  opacity: 1;
}

/* ===== ABOUT ===== */
#about {
  padding: 8rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.about-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 6rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.9;
  margin-top: 1.5rem;
  font-weight: 300;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  display: block;
}

/* ===== FOOTER ===== */
#contact {
  padding: 8rem 3rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid var(--border-subtle);
}

.footer-cta {
  text-align: center;
  margin-bottom: 6rem;
}

.footer-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 2rem;
}

.btn-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
  transition: all var(--transition-medium);
}

.btn-footer:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ===== AUTH VIEWS ===== */
.auth-view {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}

.auth-view.active {
  display: flex;
}

.auth-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.auth-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 3rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  backdrop-filter: blur(30px);
  text-align: center;
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.input-group {
  margin-bottom: 1rem;
}

.input-group input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
  outline: none;
}

.input-group input::placeholder {
  color: var(--text-tertiary);
}

.input-group input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-auth {
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.5rem;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-auth:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.auth-switch {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin-top: 1.5rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #hero {
    padding: 6rem 1.5rem 3rem;
  }

  #work,
  #about,
  #contact {
    padding: 4rem 1.5rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-card-wide {
    grid-column: span 1;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-stats {
    flex-direction: row;
    justify-content: center;
  }

  .nav-links {
    display: none;
  }

  #main-nav {
    padding: 1rem 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}