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

@font-face {
  font-family: font1;
  src: url(./fontcase/Inter-Bold.latin-UCM45LQF.ttf);
}

@font-face {
  font-family: font2;
  src: url(./fontcase/Inter-Medium.latin-Y3IVPL46.ttf);
}

@font-face {
  font-family: use;
  src: url(./fontcase/NoiGrotesk-Regular.woff2);
}

@font-face {
  font-family: use1;
  src: url(./fontcase/UcCo3FwrK3iLTcviYwY.woff2);
}

@font-face {
  font-family: Northwell;
  src: url(./fontcase/Northwell.ttf);
}

@font-face {
  font-family: chaloops1;
  src: url(./fontcase/Chaloops-Bold.ttf);
}

@font-face {
  font-family: chaloops2;
  src: url(./fontcase/Chaloops-Medium.ttf);
}

@font-face {
  font-family: chaloops3;
  src: url(./fontcase/Chaloops-Regular.ttf);
}

@font-face {
  font-family: Gilroy1;
  src: url(./fontcase/Gilroy-Bold.ttf);
}

@font-face {
  font-family: Gilroy2;
  src: url(./fontcase/Gilroy-ExtraBold.ttf);
}

@font-face {
  font-family: Gilroy3;
  src: url(./fontcase/Gilroy-SemiBoldItalic.ttf);
}

@font-face {
  font-family: Gilroy4;
  src: url(./fontcase/Gilroy-Light.ttf);
}

@font-face {
  font-family: Gilroy5;
  src: url(./fontcase/Gilroy-MediumItalic.ttf);
}

:root {
  --bg-color: #fafafa;
  --bg-surface: rgba(255, 255, 255, 0.6);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-primary: #121212;
  --text-secondary: #555555;
  --accent-pink: #000000;
  --accent-cyan: #333333;
  --font-heading: 'use', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-accent: 'Gilroy1', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
}

body {
  overflow-x: hidden;
}

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

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

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

/* Custom Cursor */
.cursor {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  --size: 40px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 1px solid var(--accent-cyan);
  margin: calc(var(--size) * -0.5) 0 0 calc(var(--size) * -0.5);
  transition: transform .1s ease-out;
  pointer-events: none;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.cursor2 {
  --size: 10px;
  background: var(--accent-pink);
  border: none;
  transition-duration: .05s;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {

  .cursor,
  .cursor2 {
    display: none !important;
  }
}

/* Nav */
nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  padding: 15px 30px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04);
}

.nav-logo {
  font-family: 'Gilroy2';
  font-size: 24px;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.nav-social {
  display: flex;
  gap: 15px;
}

.nav-social a {
  color: var(--text-primary);
  font-size: 20px;
  transition: 0.3s;
}

.nav-social a:hover {
  color: var(--accent-pink);
  transform: translateY(-3px);
}

/* Typography Helpers */
.accent-white {
  color: transparent;
  -webkit-text-stroke: 2px var(--text-primary);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.accent-grey {
  color: var(--accent-cyan);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
  padding: 15px 35px;
  border-radius: 30px;
  font-family: var(--font-accent);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s;
  z-index: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn-primary {
  background: var(--text-primary);
  border: none;
  color: var(--bg-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Hero */
#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  filter: blur(50px);
}

#hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -5%;
  width: 30vw;
  height: 30vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  filter: blur(40px);
}

.hero-content {
  width: 55%;
}

.glow-text {
  font-family: 'chaloops2';
  font-size: 24px;
  color: var(--text-secondary);
  letter-spacing: 5px;
  margin-bottom: 20px;
}

.massive-text {
  font-family: var(--font-heading);
  font-size: clamp(60px, 8vw, 120px);
  line-height: 1;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 80%;
  margin-bottom: 40px;
}

.hero-btns {
  display: flex;
  gap: 20px;
}

.hero-visual {
  width: 40%;
  position: relative;
  display: flex;
  justify-content: center;
}

.image-wrapper {
  position: relative;
  width: clamp(250px, 25vw, 400px);
  height: clamp(250px, 25vw, 400px);
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 2;
  position: relative;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.glow-ring {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--text-secondary), transparent, var(--text-primary));
  filter: blur(20px);
  opacity: 0.3;
  animation: rotate 10s linear infinite;
  z-index: 1;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

/* Projects (Preserving Carousel structure but restyling container & cards) */
#projects {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #ffffff 0%, #e6e6f0 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section-title {
  position: absolute;
  top: 15%;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 2;
  font-family: 'Gilroy2';
  font-size: clamp(40px, 5vw, 80px);
}

.project-toggle-container {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  background: #e0e0e0;
  padding: 5px;
  border-radius: 50px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 3;
  overflow: hidden;
}

.project-toggle-container::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  bottom: 5px;
  width: calc(50% - 5px);
  background: white;
  border-radius: 40px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
}

.project-toggle-container:has(.project-toggle:nth-child(2).active)::before {
  transform: translateX(100%);
}

.project-toggle {
  position: relative;
  background: transparent;
  border: none;
  color: #666;
  padding: 10px 25px;
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 2;
}

.project-toggle:hover {
  color: #333;
}

.project-toggle.active {
  color: black;
}

/* Original Carousel CSS Logic Ported */
.carousel {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 80vh;
  perspective: 1000px;
}

.carousel-item {
  --items: 10;
  --width: clamp(300px, 35vw, 450px);
  --height: clamp(400px, 45vw, 600px);

  /* Replicating the arc logic from the original */
  --x: calc(var(--active) * 400%);
  --y: calc(var(--active) * 10%);
  --rot: calc(var(--active) * 45deg);
  --opacity: calc(var(--zIndex) / var(--items) * 3 - 2);

  position: absolute;
  z-index: var(--zIndex);
  width: var(--width);
  height: var(--height);
  margin: calc(var(--height) * -0.5) 0 0 calc(var(--width) * -0.5);
  top: 50%;
  left: 50%;
  transform-origin: center center;
  transform: translate(var(--x), var(--y)) rotateZ(0deg) rotateY(var(--rot));
  transition: transform 0.8s cubic-bezier(0.2, 0, 0, 1);
  pointer-events: auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
}

.carousel-box {
  width: 100%;
  height: 100%;
  position: relative;
  opacity: var(--opacity);
  transition: opacity 0.8s;
}

.carousel-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: 0.5s;
}

.carousel-box:hover img {
  opacity: 1;
  transform: scale(1.05);
}

.carousel-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent 50%);
  pointer-events: none;
}

.carousel-box .title {
  position: absolute;
  bottom: 30px;
  left: 30px;
  z-index: 2;
  font-family: 'Gilroy1';
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  /* Ensuring text is dark */
}

.carousel-box .num {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  font-family: 'use';
  font-size: 60px;
  color: rgba(0, 0, 0, 0.1);
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.3);
}

.carousel-box a {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 3;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(5px);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: bold;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}

.carousel-box a:hover {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
}

/* Bento Box About */
#about {
  padding: 15vh 10vw;
  background: var(--bg-color);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-container {
  display: grid;
  width: 100%;
  max-width: 1200px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(250px, auto);
  gap: 20px;
}

.bento-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.3s, border-color 0.3s;
}

.bento-box:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.bento-box h2 {
  font-family: 'Gilroy2';
  font-size: 24px;
  margin-bottom: 20px;
  letter-spacing: 2px;
  color: var(--accent-cyan);
}

.about-main {
  grid-column: span 3;
  grid-row: span 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-main p {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.image-tile {
  grid-column: span 1;
  grid-row: span 2;
  padding: 0;
}

.image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0, 0, 1);
}

.image-tile:hover img {
  transform: scale(1.05);
}

.stats-tile {
  grid-column: span 1;
  grid-row: span 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.stat h3 {
  font-family: 'use';
  font-size: 48px;
  color: var(--accent-pink);
  line-height: 1;
}

.stat p {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skills-tile {
  grid-column: span 2;
  grid-row: span 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.skill-icon {
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.3s;
}

.skill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.1));
}

.skill-icon:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent-cyan);
  transform: scale(1.1);
}

/* Contact */
#contact {
  padding: 15vh 10vw 5vh;
  min-height: 100vh;
  background: linear-gradient(to bottom, var(--bg-color), #f8f8fb);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.contact-wrapper {
  width: 100%;
  max-width: 600px;
}

.contact-header {
  text-align: center;
  margin-bottom: 50px;
}

.contact-header h2 {
  font-family: 'Gilroy2';
  font-size: 60px;
  margin-bottom: 10px;
}

.contact-header p {
  color: var(--text-secondary);
  font-size: 18px;
}

.input-group {
  position: relative;
  margin-bottom: 30px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 20px;
  color: black;
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  transition: 0.3s;
}

.input-group textarea {
  resize: none;
  border-radius: 20px;
}

.input-group label {
  position: absolute;
  left: 20px;
  top: 20px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.05);
}

.input-group input:focus~label,
.input-group input:not(:placeholder-shown)~label,
.input-group textarea:focus~label,
.input-group textarea:not(:placeholder-shown)~label {
  transform: translateY(-30px) scale(0.85);
  left: 10px;
  color: var(--accent-cyan);
}

.footer {
  width: 100%;
  text-align: center;
  padding-top: 50px;
  border-top: 1px solid var(--border-color);
  margin-top: 50px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Responsive Layouts */
@media (max-width: 1024px) {
  .hero-content {
    width: 100%;
    z-index: 2;
  }

  .hero-visual {
    position: absolute;
    opacity: 0.15;
    right: 0;
    z-index: 0;
  }

  .bento-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-main,
  .skills-tile {
    grid-column: span 2;
  }

  .image-tile {
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 12px 20px;
  }

  .massive-text {
    font-size: clamp(45px, 12vw, 80px);
  }

  .glow-text {
    font-size: 18px;
  }

  .hero-desc {
    max-width: 100%;
    font-size: 16px;
  }

  .project-toggle-container {
    width: 90%;
    bottom: 3%;
  }

  .project-toggle {
    padding: 10px 10px;
    font-size: 12px;
    flex: 1;
    /* Make buttons equal width to fit side by side equally */
    text-align: center;
  }

  .carousel-item {
    --width: 250px;
    --height: 380px;
  }

  .carousel-box .title {
    font-size: 18px;
    bottom: 20px;
    left: 20px;
  }

  .carousel-box a {
    bottom: 20px;
    right: 20px;
    padding: 8px 16px;
    font-size: 12px;
  }

  .bento-box {
    padding: 25px;
  }

  .contact-header h2 {
    font-size: 40px;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .bento-container {
    grid-template-columns: 1fr;
  }

  .about-main,
  .skills-tile,
  .stats-tile,
  .image-tile {
    grid-column: span 1;
  }

  .skills-grid {
    justify-content: center;
  }

  .stat h3 {
    font-size: 36px;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .carousel-item {
    --width: 220px;
    --height: 340px;
  }
}

@media (max-width: 380px) {
  .nav-logo {
    font-size: 20px;
  }

  .nav-social a {
    font-size: 16px;
  }

  .nav-social img {
    width: 16px !important;
    height: 16px !important;
  }

  .carousel-item {
    --width: 200px;
    --height: 300px;
  }
}