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

:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --text-secondary: #555555;
  --footer-text: #999999;
  --header-bg: rgba(255, 255, 255, 0.8);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;

  --btn-height-desktop: 40px;
  --btn-height-mobile: 56px;
  --hero-btn-height: 54px;

  /* PALETTE */
  --c-orange: #f79f1f;
  --c-peach: #ffc371;
  --c-white: #ffffff;
  --c-mint: #c4efe6;
  --c-teal: #36c5b5;

  /* PROJECT ACCENTS */
  --p-purple-bg: #f3e8ff;
  --p-purple-text: #7e22ce;
  --p-orange-bg: #ffedd5;
  --p-orange-text: #c2410c;
  --p-teal-bg: #ccfbf1;
  --p-teal-text: #0f766e;
}

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

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: content-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- FIXED HEADER --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  color: var(--text-color);
  letter-spacing: -0.02em;
  z-index: 1002;
}

/* --- NAV LINKS --- */
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a.link {
  text-decoration: none;
  color: #444;
  font-size: 15px;
  font-weight: 450;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a.link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--text-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out-expo);
}
.nav-links a.link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-links a.link:hover {
  color: var(--text-color);
}

/* --- MOBILE MENU TOGGLE --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1002;
  width: 24px;
  height: 24px;
  justify-content: center;
}
.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}
.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

::selection, ::-moz-selection {
  background-color: #292929;
  color: #ffffff;
}

/* --- RESPONSIVE HEADER --- */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    backdrop-filter: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0 32px;
    gap: 2rem;
    padding-top: 100px;
    transform: translateY(-100%);
    transition: transform 0.6s var(--ease-out-expo);
    z-index: 1001;
  }

  .nav-links.active {
    transform: translateY(0%);
  }

  .nav-links li a.link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .nav-links li {
    list-style: none;
    width: 100%;
    text-align: center;
  }

  .nav-links a.link {
    display: inline-block;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
  }
  .nav-links a.link::after {
    display: none;
  }

  .nav-links.active li:nth-child(1) a.link {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
  }
  .nav-links.active li:nth-child(2) a.link {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
  }
  .nav-links.active li:nth-child(3) a.link {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
  }
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 32px 64px;
  overflow: hidden;

  background: linear-gradient(
    -45deg,
    var(--c-orange),
    var(--c-peach),
    var(--c-white),
    var(--c-white),
    var(--c-mint),
    var(--c-teal)
  );
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.noise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.06;
  pointer-events: none;
  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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  animation: fadeIn 0.8s ease-out forwards;
}

.greeting {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 24px;
  display: block;
}

.hero h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  color: #000;
}

.hero-sub {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  max-width: 700px;
  margin: 0 auto 48px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-hero {
  height: var(--hero-btn-height);
  padding: 0 40px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out-expo),
    box-shadow 0.4s var(--ease-out-expo), background-color 0.3s ease;
}

.btn-white {
  background: rgba(255, 255, 255, 0.348);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
}
.btn-white:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

.btn-black {
  background: #000;
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  padding: 0 40px;
}
.btn-black:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-roll-container {
  display: block;
  position: relative;
  height: 100%;
  width: 100%;
  transition: transform 0.5s var(--ease-out-expo);
  will-change: transform;
  transform: translateY(0);
}

.hero-roll-text {
  height: var(--hero-btn-height);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  white-space: nowrap;
}

@media (min-width: 901px) {
  .btn-hero:hover .hero-roll-container {
    transform: translateY(calc(var(--hero-btn-height) * -1));
  }
  .btn-black.copied .hero-roll-container {
    transform: translateY(0) !important;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 70vh;
  }
  .hero h1 {
    font-size: 40px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  .btn-hero {
    width: 100%;
  }
  .btn-white .hero-roll-container {
    transform: translateY(0) !important;
  }
  .btn-black .hero-roll-container {
    transform: translateY(calc(var(--hero-btn-height) * -1));
  }
  .btn-black.copied .hero-roll-container {
    transform: translateY(0) !important;
  }
  .btn-white:hover,
  .btn-black:hover {
    transform: none;
    box-shadow: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- SECTIONS COMMON --- */
.section-padding {
  padding: 100px 32px;
  position: relative;
  z-index: 2;
}

.section-work {
  background-color: #fafafa;
}

.section-ui-shots {
  background-color: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 100px 32px 100px 32px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-header {
  margin-bottom: 64px;
  text-align: left;
}

.section-h2 {
  font-size: 40px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
}

/* --- MODERN CARD --- */
.project-card {
  display: flex;
  text-decoration: none;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 64px;
  height: 480px;
  position: relative;
  transition: transform 1.4s var(--ease-out-expo),
    box-shadow 1.4s var(--ease-out-expo);
  cursor: pointer;
}

.project-card:last-child {
  margin-bottom: 0px;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
}

.card-content {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
  height: 100%;
}

.card-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-badge {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  display: inline-block;
}

.card-h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #111;
  line-height: 1.2;
}

.card-desc {
  font-size: 16px;
  color: #666;
  margin-bottom: 32px;
  max-width: 380px;
  line-height: 1.6;
}

.card-link-label {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  position: relative;
}

.card-link-label::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: #111;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out-expo);
}

.project-card:hover .card-link-label::after {
  transform: scaleX(1);
  transform-origin: left;
}

.card-visual {
  flex: 1.2;
  position: relative;
  background-color: #f4f4f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1s var(--ease-out-expo);
}

#studioProject {
  background: url(./Images/3dStudio-project-thumbnail.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#cebProject {
  background: url(./Images/ceb-project-thumbnail.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#eCommerceProject {
  background: url(./Images/solastyle-project-thumbnail.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

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

.theme-purple .card-badge {
  background-color: var(--p-purple-bg);
  color: var(--p-purple-text);
}
.theme-purple .visual-inner {
  background: linear-gradient(135deg, #e9d5ff 0%, #f5f3ff 100%);
}
.theme-purple .browser-body {
  color: var(--p-purple-text);
  opacity: 0.5;
}

.theme-orange .card-badge {
  background-color: var(--p-orange-bg);
  color: var(--p-orange-text);
}
.theme-orange .visual-inner {
  background: linear-gradient(135deg, #ffedd5 0%, #fff7ed 100%);
}
.theme-orange .phone-screen {
  color: var(--p-orange-text);
  opacity: 0.5;
}

.theme-teal .card-badge {
  background-color: #FFE2F5;
  color: #B91768;
}
.theme-teal .visual-inner {
  background: linear-gradient(135deg, #ccfbf1 0%, #f0fdfa 100%);
}
.theme-teal .phone-screen {
  color: var(--p-teal-text);
  opacity: 0.5;
}

/* --- UI SHOTS CAROUSEL SECTION --- */
.carousel-container {
  width: 100%;
  overflow: hidden;
  padding: 32px 0;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.carousel-track {
  display: flex;
  width: max-content;
  gap: 24px;
  animation: scrollMarquee 60s linear infinite;
}

.carousel-track:hover {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.carousel-item {
  height: 550px;
  width: auto;
  aspect-ratio: 16/9; /* Widescreen Format */
  border-radius: 20px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #f4f4f5;
}

.carousel-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- LIGHTBOX --- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 32px;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative; /* For absolute positioning of image */
  max-width: 90%;
  max-height: 90vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-out-expo);
  display: flex; /* Centers image */
  align-items: center;
  justify-content: center;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  display: block;
  object-fit: contain;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2001;
  backdrop-filter: blur(5px);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
  left: 30px;
}
.lightbox-nav.next {
  right: 30px;
}

/* --- SIMPLE FOOTER --- */
.footer {
  padding: 40px 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #ffffff;
  position: relative;
  z-index: 2;
  margin-top: auto;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  font-size: 14px;
  color: var(--footer-text);
}

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

.footer-link {
  text-decoration: none;
  color: var(--footer-text);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}

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

/* Navbar-style Underline for Footer Links */
.footer-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--text-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out-expo);
}

.footer-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 900px) {
  .section-padding {
    padding: 72px 24px;
  }

  .section-ui-shots {
    padding: 64px 32px 72px 32px;
  }

  .section-h2 {
    font-size: 32px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .project-card {
    flex-direction: column-reverse;
    height: auto;
  }

  .card-visual {
    height: 300px;
    width: 100%;
    flex: none;
  }
  .browser-mockup {
    width: 90%;
    transform: translateY(30px);
  }
  .phone-mockup {
    height: 400px;
    transform: translateY(30px);
  }

  .card-content {
    padding: 40px 30px;
    flex: none;
    justify-content: flex-start;
    gap: 20px;
  }
  .card-link-label {
    margin-top: 20px;
  }
  .card-h3 {
    font-size: 24px;
  }
  .card-desc {
    max-width: 100%;
  }

  /* Carousel Mobile */
  .carousel-item {
    height: 280px;
  }

  /* Lightbox Mobile Nav */
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .lightbox-nav.prev {
    left: 10px;
  }
  .lightbox-nav.next {
    right: 10px;
  }

  /* Simple Footer Mobile */
  .footer-container {
    flex-direction: column-reverse;
    gap: 1.5rem;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .container {
    padding: 0 8px;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 90vh;
  }
}
