* {
  scroll-behavior: smooth;
}

html,
body {
  font-family: "DM Sans", sans-serif;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.font-display {
  font-family: "Cormorant Garamond", serif;
}

#navbar {
  left: 0;
  right: 0;
  max-width: 100vw;
  overflow-x: clip;
}

@keyframes float {

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

  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(217, 134, 79, 0.3);
  }

  50% {
    box-shadow:
      0 0 40px rgba(217, 134, 79, 0.6),
      0 0 60px rgba(94, 166, 173, 0.3);
  }
}

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes bounce-subtle {

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

  50% {
    transform: translateY(-5px);
  }
}

@keyframes text-glitch {

  0%,
  100% {
    transform: translate(0);
  }

  20% {
    transform: translate(-2px, 2px);
  }

  40% {
    transform: translate(-2px, -2px);
  }

  60% {
    transform: translate(2px, 2px);
  }

  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes border-dance {

  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

@keyframes card-tilt {

  0%,
  100% {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
  }

  25% {
    transform: perspective(1000px) rotateY(2deg) rotateX(1deg);
  }

  75% {
    transform: perspective(1000px) rotateY(-2deg) rotateX(-1deg);
  }
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes blink-caret {

  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: #d9864f;
  }
}

@keyframes morph {

  0%,
  100% {
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  }

  34% {
    border-radius: 70% 30% 46% 54% / 30% 29% 71% 70%;
  }

  67% {
    border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes magnetic-float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(5px, -5px) scale(1.02);
  }

  50% {
    transform: translate(0, -8px) scale(1.01);
  }

  75% {
    transform: translate(-5px, -5px) scale(1.02);
  }
}

.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(160deg,
      #1a1410 0%,
      #2a1f14 30%,
      #3d2a1a 50%,
      #2d5a5f 100%);
}

.bg-animation::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background:
    radial-gradient(ellipse at 20% 30%,
      rgba(217, 134, 79, 0.08) 0%,
      transparent 50%),
    radial-gradient(ellipse at 80% 70%,
      rgba(94, 166, 173, 0.06) 0%,
      transparent 50%);
}

.bg-animation::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
}

.animate-fadeInUp {
  animation: fadeInUp 1s ease forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.8s ease forwards;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-morph {
  animation: morph 8s ease-in-out infinite;
}

.animate-magnetic {
  animation: magnetic-float 6s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

.reveal-rotate {
  opacity: 0;
  transform: rotate(-5deg) translateY(30px);
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-rotate.active {
  opacity: 1;
  transform: rotate(0) translateY(0);
}

.section-divider {
  height: 1px;
  margin: 6rem auto;
  max-width: 80%;
  background: linear-gradient(90deg,
      transparent,
      rgba(201, 169, 110, 0.4),
      rgba(217, 134, 79, 0.4),
      rgba(201, 169, 110, 0.4),
      transparent);
}

.glass {
  background: rgba(42, 31, 20, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 169, 110, 0.15);
}

.glass-light {
  background: rgba(201, 169, 110, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 169, 110, 0.1);
}

.profile-image {
  border: 3px solid rgba(201, 169, 110, 0.3);
  box-shadow:
    0 25px 80px rgba(217, 134, 79, 0.25),
    0 0 100px rgba(94, 166, 173, 0.1);
}

.profile-container:hover .profile-glow-orange {
  opacity: 0.35;
  transform: translate(20px, -30px) scale(1.2);
}

.profile-container:hover .profile-glow-teal {
  opacity: 0.3;
  transform: translate(-20px, 20px) scale(1.3);
}

.profile-container:hover .profile-dot-1 {
  transform: translate(30px, -20px);
}

.profile-container:hover .profile-dot-2 {
  transform: translate(-25px, 15px);
}

.profile-glow-orange,
.profile-glow-teal,
.profile-dot-1,
.profile-dot-2 {
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.text-gradient {
  background: linear-gradient(135deg, #f4d792 0%, #d9864f 50%, #5ea6ad 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
}

.text-gradient-static {
  background: linear-gradient(135deg, #f4d792 0%, #d9864f 50%, #5ea6ad 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Logo hover animation */
.logo-link {
  position: relative;
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-link::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 12px;
  background: linear-gradient(135deg,
      rgba(217, 134, 79, 0.2),
      rgba(94, 166, 173, 0.2));
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.logo-link:hover::before {
  opacity: 1;
  transform: scale(1);
}

.logo-link:hover {
  transform: scale(1.1) rotate(-3deg);
  filter: drop-shadow(0 0 20px rgba(217, 134, 79, 0.5));
}

.logo-link:hover .logo-text {
  animation: text-glitch 0.3s ease;
}

.skill-tag {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.skill-tag::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(217, 134, 79, 0.2),
      rgba(94, 166, 173, 0.2));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.skill-tag:hover::before {
  opacity: 1;
}

.skill-tag:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 134, 79, 0.5);
  box-shadow: 0 10px 30px rgba(217, 134, 79, 0.2);
}

.project-card {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d9864f, #5ea6ad);
  transform: scaleX(0);
  transition: transform 0.5s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  border-color: rgba(217, 134, 79, 0.3);
}

.project-card:nth-child(even):hover {
  transform: translateY(-8px) rotateX(-2deg) rotateY(2deg);
}

.stat-number {
  background: linear-gradient(135deg, #d9864f, #e8b84a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #d9864f, #5ea6ad, transparent);
}

.timeline-dot {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d9864f, #e8b84a);
  box-shadow: 0 0 20px rgba(217, 134, 79, 0.5);
  z-index: 1;
  animation: pulse-glow 2s ease-in-out infinite;
}

.timeline-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #1a1410;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #d9864f, #5ea6ad);
  transition: width 0.3s ease;
}

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

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,
      #d9864f,
      #5ea6ad);
  /* background: linear-gradient(135deg, #d9864f, #b5623f);  */
  transition: all 0.4s ease;
  border-radius: 9999px;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #5ea6ad, #4dd4e0);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 9999px;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(217, 134, 79, 0.3);
}

.btn-primary span {
  position: relative;
  z-index: 1;
}

/* Contact icon buttons */
.contact-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.contact-icon-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #d9864f, #5ea6ad, #d9864f);
  background-size: 200% 200%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: all 0.5s ease;
}

.contact-icon-btn:hover::before {
  opacity: 1;
  animation: gradient-shift 2s ease infinite;
}

.contact-icon-btn:hover {
  transform: scale(1.15) rotate(1deg);
  box-shadow: 0 20px 40px rgba(217, 134, 79, 0.4);
}

.contact-icon-btn:first-child:hover {
  transform: scale(1.15) rotate(1deg);
}

.contact-icon-btn:last-child:hover {
  transform: scale(1.15) rotate(-1deg);
}

.contact-icon-btn:hover svg {
  transform: scale(1.1);
  color: #d9864f;
}

.contact-icon-btn svg {
  transition: all 0.4s ease;
  z-index: 1;
}

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

::-webkit-scrollbar-track {
  background: #1a1410;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d9864f, #5ea6ad);
  border-radius: 4px;
}

.nav-scrolled {
  background: rgba(26, 20, 16, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.footer {
  background: linear-gradient(to bottom,
      rgba(26, 20, 16, 0.95),
      rgba(15, 12, 9, 1));
  backdrop-filter: blur(20px);
}

.section-number {
  font-family: "Cormorant Garamond", serif;
  font-size: 8rem;
  font-weight: 700;
  color: rgba(201, 169, 110, 0.05);
  position: absolute;
  top: -2rem;
  left: -1rem;
  line-height: 1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .section-number {
    font-size: 5rem;
  }
}

/* Unique section backgrounds */
.section-work {
  background: linear-gradient(180deg,
      rgba(15, 12, 9, 0.7) 0%,
      rgba(26, 20, 16, 0.5) 100%);
  position: relative;
}

.section-work::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at 100% 0%,
      rgba(217, 134, 79, 0.08) 0%,
      transparent 60%);
  pointer-events: none;
}

.work-line-1 {
  position: absolute;
  top: 30%;
  left: 0;
  width: 60%;
  height: 80px;
  overflow: visible;
}

.work-line-2 {
  position: absolute;
  top: 60%;
  right: 0;
  width: 97%;
  height: 100px;
  overflow: visible;
}

.work-line-3 {
  position: absolute;
  bottom: 10%;
  left: 0%;
  width: 98%;
  height: 80px;
  overflow: visible;
}

.section-experience {
  background: linear-gradient(135deg,
      rgba(45, 90, 95, 0.15) 0%,
      rgba(61, 42, 26, 0.4) 50%,
      rgba(42, 31, 20, 0.3) 100%);
  position: relative;
}

.section-experience::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, rgba(26, 20, 16, 0.8), transparent);
  pointer-events: none;
}

.section-skills {
  background: linear-gradient(180deg,
      rgba(45, 90, 95, 0.2) 0%,
      rgba(26, 20, 16, 0.6) 100%);
  position: relative;
  overflow: hidden;
}

.section-skills::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg,
      transparent,
      rgba(94, 166, 173, 0.03),
      transparent,
      rgba(217, 134, 79, 0.03),
      transparent);
  animation: rotate-slow 30s linear infinite;
  pointer-events: none;
}

.section-about {
  background: linear-gradient(160deg,
      rgba(74, 60, 46, 0.5) 0%,
      rgba(45, 90, 95, 0.2) 50%,
      rgba(26, 20, 16, 0.6) 100%);
  position: relative;
}

.section-about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a96e' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.section-contact {
  background: linear-gradient(180deg,
      rgba(15, 12, 9, 0.9) 0%,
      rgba(45, 90, 95, 0.15) 50%,
      rgba(26, 20, 16, 0.95) 100%);
  position: relative;
}

.section-contact::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle,
      rgba(217, 134, 79, 0.1) 0%,
      transparent 70%);
  pointer-events: none;
}

/* Skill card hover effects */
.skill-card {
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.skill-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.skill-card:nth-child(1):hover {
  border-color: rgba(217, 134, 79, 0.5);
}

.skill-card:nth-child(2):hover {
  border-color: rgba(94, 166, 173, 0.5);
}

.skill-card:nth-child(3):hover {
  border-color: rgba(232, 184, 74, 0.5);
}

.skill-card:nth-child(4):hover {
  border-color: rgba(181, 98, 63, 0.5);
}

/* Stagger animations for skill tags */
.skill-tag-animated {
  opacity: 0.5;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.skill-card:hover .skill-tag-animated {
  opacity: 1;
  transform: translateY(0);
}

.skill-card:hover .skill-tag-animated:nth-child(1) {
  transition-delay: 0.05s;
}

.skill-card:hover .skill-tag-animated:nth-child(2) {
  transition-delay: 0.1s;
}

.skill-card:hover .skill-tag-animated:nth-child(3) {
  transition-delay: 0.15s;
}

.skill-card:hover .skill-tag-animated:nth-child(4) {
  transition-delay: 0.2s;
}

.skill-card:hover .skill-tag-animated:nth-child(5) {
  transition-delay: 0.25s;
}

.skill-card:hover .skill-tag-animated:nth-child(6) {
  transition-delay: 0.3s;
}

.skill-card:hover .skill-tag-animated:nth-child(7) {
  transition-delay: 0.35s;
}

/* About image morph */
.about-image-container {
  position: relative;
}

.about-image-container::before {
  content: "";
  position: absolute;
  inset: -20px;
  border: 2px solid rgba(201, 169, 110, 0.2);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 8s ease-in-out infinite;
}

.about-image-container:hover::before {
  border-color: rgba(217, 134, 79, 0.4);
}

/* Floating particles */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(217, 134, 79, 0.6);
  border-radius: 50%;
  pointer-events: none;
}

.particle-1 {
  top: 20%;
  left: 10%;
  animation: float 6s ease-in-out infinite;
}

.particle-2 {
  top: 60%;
  left: 85%;
  animation: float 8s ease-in-out infinite 1s;
}

.particle-3 {
  top: 80%;
  left: 20%;
  animation: float 7s ease-in-out infinite 2s;
  background: rgba(94, 166, 173, 0.6);
}

.particle-4 {
  top: 30%;
  left: 90%;
  animation: float 5s ease-in-out infinite 0.5s;
  background: rgba(232, 184, 74, 0.6);
}

/* Experience card unique styling */
.exp-card {
  position: relative;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.exp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(217, 134, 79, 0.05), transparent);
  border-radius: 1rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.exp-card:hover::before {
  opacity: 1;
}

.exp-card:hover {
  transform: translateX(10px);
  box-shadow: -10px 20px 40px rgba(0, 0, 0, 0.3);
}

/* Certification badge animation */
.cert-badge {
  position: relative;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.cert-badge:hover {
  transform: scale(1.05);
}

.cert-badge:hover .cert-icon {
  animation: bounce-subtle 0.5s ease infinite;
}

.contact-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

.contact-orb-1 {
  top: 10%;
  left: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(217, 134, 79, 0.15), transparent);
  animation-delay: 0s;
  opacity: 30%;
}

.contact-orb-2 {
  top: 50%;
  right: 15%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(94, 166, 173, 0.12), transparent);
  animation-delay: 2s;
  opacity: 80%;
}

.contact-orb-3 {
  bottom: 15%;
  left: 20%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(232, 184, 74, 0.1), transparent);
  animation-delay: 4s;
  opacity: 70%;
}

/* Skill shapes - start hidden and fade in with parent reveal */
.skill-shape {
  opacity: 0 !important;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
}

.reveal-scale.active .skill-shape,
.reveal-rotate.active .skill-shape {
  opacity: 0.1 !important;
}

/* Specific opacity overrides for different shapes */
.reveal-scale.active .skill-shape[style*="opacity: 0.08"] {
  opacity: 0.08 !important;
}

.reveal-scale.active .skill-shape[style*="opacity: 0.06"] {
  opacity: 0.06 !important;
}

.reveal-scale.active .skill-shape[style*="opacity: 0.05"],
.reveal-rotate.active .skill-shape[style*="opacity: 0.05"] {
  opacity: 0.05 !important;
}