:root {
  --bg: #f3f4f6;
  --fg: #000;
  --brand: #455ce9;
  --brand-2: #2a42d5;
  --ink-2: #1C1D20;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--fg);
}

/* Page Loader */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .8s cubic-bezier(0.76, 0, 0.24, 1), opacity .6s ease-out;
  transform: translateY(0);
  opacity: 1;
}

#page-loader.is-visible {
  transform: translateY(0);
  opacity: 1;
}

#page-loader.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  transition-delay: .3s;
}

#page-loader.h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  transition: opacity .3s ease-in;
  opacity: 0;
  position: relative;
  z-index: 5;
}

#greetings-loader {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity .5s ease-out;
  opacity: 1;
}

.greeting {
  position: absolute;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  color: #9ca3af;
  opacity: 0;
  animation: fadeInOut .5s ease-in-out forwards;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  25% {
    opacity: 1;
    transform: translateY(0);
  }

  75% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.page-content {
  opacity: 1;
  transition: opacity .4s ease-in-out;
}

.page-content.hidden {
  opacity: 0;
  display: none;
}

/* Scroll reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s cubic-bezier(0.165, 0.84, 0.44, 1), transform .8s cubic-bezier(0.165, 0.84, 0.44, 1);
  transition-delay: .1s;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Marquee */
.marquee-wrapper {
  overflow: hidden;
  width: 100%;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
}

.marquee-content {
  display: inline-block;
  animation: marquee 40s linear infinite;
  animation-play-state: running;
}

.marquee-content.paused {
  animation-play-state: paused;
}

.marquee-content h1 {
  display: inline-block;
  padding-right: 2rem;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Typography scales */
.hero-name {
  font-size: clamp(2rem, 7vw, 6rem);
  color: #9ca3af;
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.05em;
}

.hero-heading {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
}

.section-heading {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
}

.footer-heading {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.04em;
}

/* Nav link underline */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #000;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform .25s ease-out;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.nav-link.is-active {
  font-weight: 700;
}

/* Badges & buttons */
.available-badge {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  background: var(--ink-2);
  color: #9ca3af;
  padding: .75rem 1.25rem;
  border-radius: 9999px;
  font-size: .875rem;
  font-weight: 500;
}

.available-badge-icon {
  width: 1.25rem;
  height: 1.25rem;
  background: #9A9DA8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-me-button {
  width: 180px;
  height: 180px;
  background: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-weight: 500;
  font-size: 1.1rem;
  transition: transform .3s ease;
}

.about-me-button:hover {
  transform: scale(1.1);
}

.recent-work-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: color .3s ease;
}

.recent-work-item:hover {
  color: #6b7280;
}

.recent-work-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.recent-work-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #6b7280;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform .3s ease-out;
}

.recent-work-item:hover .recent-work-title::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.more-work-button {
  display: inline-block;
  padding: .75rem 2rem;
  background: #f0f0f0;
  color: #000;
  border-radius: 9999px;
  font-weight: 500;
  transition: all .3s ease;
}

.more-work-button:hover {
  background: var(--brand-2);
  color: #9ca3af;
}

.work-filter {
  display: inline-block;
  padding: .6rem 1.75rem;
  background: #f0f0f0;
  color: #000;
  border-radius: 9999px;
  font-weight: 500;
  transition: all .3s ease;
  font-size: 1rem;
}

.work-filter.is-active,
.work-filter:hover {
  background: var(--brand-2);
  color: #9ca3af;
}

.project-card {
  display: block;
  border-radius: .5rem;
  overflow: hidden;
  background: #f0f0f0;
  transition: all .3s ease;
}

.project-card:hover {
  background: #e0e0e0;
}

.project-card img {
  transition: transform .4s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.archive-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  background: #111827;
  color: #9ca3af;
  border: 2px solid #374151;
  border-radius: 50%;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all .3s ease;
}

.archive-button:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: scale(1.05);
}

.service-card {
  background: #f0f0f0;
  transition: all .3s ease;
}

.service-card:hover {
  background: #e0e0e0;
}

.cta-button-wrapper {
  background: var(--brand);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  display: inline-block;
  width: 12.5rem;
  height: 12.5rem;
}

.cta-button-wrapper-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.cta-button-text {
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 500;
  transition: all .2s ease-in-out;
  opacity: 1;
  transform: translateY(0);
}

.cta-button {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background: var(--brand-2);
  color: #9ca3af;
  border-radius: 9999px;
  font-weight: 500;
  transition: all .2s ease-in-out;
  transform: translateY(100%);
  opacity: 0;
}

.cta-button-wrapper:hover .cta-button {
  transform: translateY(0);
  opacity: 1;
}

.cta-button-wrapper:hover .cta-button-text {
  transform: translateY(-100%);
  opacity: 0;
}

/* Mobile menu */
.menu-overlay {
  transform: translateX(100%);
  transition: transform .3s ease-in-out;
}

.menu-overlay.is-open {
  transform: translateX(0);
}

.menu-content {
  transform: translateX(100%);
  transition: transform .3s ease-in-out .1s;
}

.menu-overlay.is-open .menu-content {
  transform: translateX(0);
}

/* Parallax */
.parallax-wrapper {
  overflow: hidden;
  border-radius: .5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
}

#hero-image {
  will-change: transform;
}

/* Contact form */
.form-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid #4b5563;
  color: #9ca3af;
  padding: .75rem 0;
  width: 100%;
  transition: border-color .3s ease;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-bottom-color: transparent;
}

.form-label {
  color: #9ca3af;
  font-size: 1rem;
}

.submit-btn {
  background: var(--brand-2);
  color: #9ca3af;
  padding: .75rem 2rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: background-color .3s ease;
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--brand);
}

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

  #greetings-loader {
    display: none !important;
  }

  #page-loader {
    transition: none !important;
    transform: translateY(-100%) !important;
    opacity: 0 !important;
  }
}

/* Lenis Smooth Scroll */
html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Noise Overlay */
#noise-overlay {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Cursor */
@media (min-width: 768px) {

  body.cursor-none,
  body.cursor-none * {
    cursor: none !important;
  }
}

#custom-cursor {
  transition: transform 0.15s ease-out, background 0.15s ease-out;
  will-change: transform;
}

#custom-cursor.hovering {
  transform: scale(2.5) !important;
  background: rgba(255, 255, 255, 0.9);
}