/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0b;
  color: #e4e4e7;
  line-height: 1.6;
  cursor: none;
  overflow-x: hidden;
}

::selection {
  background: rgba(245, 158, 11, 0.3);
  color: #fff;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ========== CURSOR ========== */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background: #f59e0b;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s;
}

.cursor--active .cursor {
  width: 8px;
  height: 8px;
  background: #fff;
}

.cursor--active .cursor-follower {
  width: 56px;
  height: 56px;
  border-color: rgba(255, 255, 255, 0.6);
}

/* ========== CONTAINER ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s;
}

.nav--scrolled {
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 500;
}

.nav__logo-bracket {
  color: #f59e0b;
  font-weight: 700;
  transition: transform 0.3s ease;
  display: inline-block;
}

.nav__logo:hover .nav__logo-bracket:first-child {
  transform: translateX(-2px);
}

.nav__logo:hover .nav__logo-bracket:last-child {
  transform: translateX(2px);
}

.nav__logo-text {
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0 4px;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #f59e0b;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav__link:hover,
.nav__link.active {
  color: #fff;
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle--active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle--active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle--active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 90%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
}

.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(245, 158, 11, 0.4);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(40px);
    opacity: 0;
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 120px 0 80px;
}

.hero__greeting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #f59e0b;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.hero__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.hero__title-line {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.15s forwards;
}

.hero__title-line--accent {
  color: #f59e0b;
  animation: fadeInUp 0.6s ease 0.3s forwards;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.45s forwards;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.6s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 0.6s ease 0.8s forwards;
  opacity: 0;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: #f59e0b;
  color: #0a0a0b;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

.btn--primary:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.35);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* ========== SECTION ========== */
.section {
  display: block;
  width: 100%;
  clear: both;
  padding: 120px 0;
  position: relative;
}

.section__header {
  margin-bottom: 64px;
}

.section__tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  padding: 4px 12px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 100px;
  background: rgba(245, 158, 11, 0.05);
}

.section__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.skills__intro {
  max-width: 720px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1rem;
  line-height: 1.8;
}

/* ========== ABOUT ========== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about__text p {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.about__text strong {
  color: #fff;
  font-weight: 600;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-4px);
}

.stat-card__number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: #f59e0b;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card__label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

/* ========== SKILLS ========== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.skill-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.skill-group:hover {
  border-color: rgba(245, 158, 11, 0.2);
  transform: translateY(-2px);
}

.skill-group__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.skill-logo-grid {
  position: relative;
  overflow: hidden;
}

.skill-logo-track {
  display: flex;
  gap: 16px;
  align-items: center;
  will-change: transform;
}

.skill-logo-grid:hover .skill-logo-track {
  animation-play-state: paused;
}

.skill-logo-track > .skill-logo-card {
  flex: 0 0 auto;
  min-width: 120px;
}

.skill-logo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 2px;
  background-color: rgb(242, 237, 237);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  transition: all 0.3s ease;
}

.skill-logo-card:hover {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.skill-logo-card__icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-logo-card__icon svg {
  width: 30px;
  height: 30px;
  display: block;
}

.skill-logo-card__icon img {
  width: 60px;
  height: 60px;
  display: block;
  object-fit: contain;
}

.skill-logo-card__icon svg {
  width: 30px;
  height: 30px;
  display: block;
}

.skill-logo-card__label {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgb(0, 0, 0);
  text-align: center;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.skill-logo-card:hover .skill-logo-card__label {
  color: #f59e0b;
}

/* ========== PROJECTS ========== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.project-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-card__img {
  position: relative;
  overflow: hidden;
  
}

.project-card__placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  height: 220px; /* fallback for older browsers */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  transition: transform 0.5s ease;
  background: rgba(255, 255, 255, 0.02);
}

.project-card__placeholder img {
  width: 100%;
  height: 100%;
  display: block;
}



.project-card__body {
  padding: 28px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.project-card__tags span {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
  border-radius: 100px;
}

.project-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.project-card__desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-card__links {
  display: flex;
  gap: 20px;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: #f59e0b;
}

.project-link span {
  transition: transform 0.3s ease;
}

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

/* ========== CONTACT ========== */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact__info p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.contact__icon {
  font-size: 1.2rem;
}

.contact__item a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.contact__item a:hover {
  color: #f59e0b;
}

.contact__socials {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.social-link:hover {
  border-color: #f59e0b;
  color: #f59e0b;
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.form-input {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-input:focus {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form__btn {
  align-self: flex-start;
  cursor: none;
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px 0;
}

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

.footer__copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer__tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ========== REVEAL ANIMATION ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal--visible:nth-child(2) { transition-delay: 0.1s; }
.reveal--visible:nth-child(3) { transition-delay: 0.2s; }

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .skills__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .skill-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 12px;
    animation: none;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-follower {
    display: none;
  }

  .btn {
    cursor: pointer;
  }

  .form__btn {
    cursor: pointer;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 10, 11, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: right 0.4s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav__links--open {
    right: 0;
  }

  .nav__link {
    font-size: 1.2rem;
  }

  .nav__toggle {
    display: flex;
  }

  .section {
    padding: 80px 0;
  }

  .hero__title-line {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .hero__subtitle {
    font-size: 1rem;
  }

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

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

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

  .footer__inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .hide-mobile {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Force sections to stack vertically (override potential overrides) */
#projects,
#contact,
section {
  display: block !important;
  width: 100% !important;
  clear: both !important;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a0b;
}

::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.5);
}
