/* V3 Redesign Styles (Optimized & Consolidated) */

/* --- Floating Nav --- */
.v3-nav {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: auto;
}

.v3-nav__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: rgba(15, 23, 42, 0.6); /* Dark glass default */
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition:
    background 0.3s,
    border-color 0.3s;
}

.v3-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v3-nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: var(--muted);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  z-index: 1;
}

.v3-nav__link .icon {
  width: 24px;
  height: 24px;
  stroke-width: 2px;
}

/* Label Tooltip */
.v3-nav__label {
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.v3-nav__item:hover .v3-nav__label {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.v3-nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.v3-nav__link.active {
  background: var(--accent);
  color: #fff;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4);
}

/* --- Global Buttons (Consolidated) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: none;
  line-height: 1.2;
  font-size: 1rem;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0f172a;
  box-shadow: 0 6px 20px -5px rgba(100, 255, 218, 0.35);
}

.btn--primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -8px rgba(100, 255, 218, 0.5);
  color: #0f172a;
}

.btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  background: transparent;
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(100, 255, 218, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px -5px rgba(0, 0, 0, 0.3);
}

.btn--sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  gap: 0.4rem;
  border-radius: 8px;
}

.btn--large {
  padding: 1rem 2.2rem;
  font-size: 1.1rem;
}

/* --- Sections --- */
.v3-section {
  min-height: 100vh;
  padding: 6rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 1;
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.text-center {
  text-align: center;
}

/* --- Hero --- */
.v3-hero {
  position: relative;
  padding-top: 0;
}

.v3-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
}

.v3-eyebrow {
  display: block;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
}

.v3-heading {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.v3-heading .line-1 {
  display: block;
  color: var(--text);
}
.v3-heading .line-2 {
  display: block;
}

.v3-lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.v3-lead .highlight {
  color: var(--accent-2);
  font-weight: 500;
}

.v3-actions {
  display: flex;
  gap: 1rem;
}

/* --- Hero Image (Morphed) --- */
.hero-image-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(100, 255, 218, 0.3);
  box-shadow:
    0 0 30px rgba(100, 255, 218, 0.15),
    0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: heroMorph 8s ease-in-out infinite;
  transition:
    transform 0.5s ease,
    box-shadow 0.3s;
  margin: 0 auto;
}

.hero-image-wrapper:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 50px rgba(100, 255, 218, 0.3),
    0 20px 40px rgba(0, 0, 0, 0.3);
}

@keyframes heroMorph {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.2),
    transparent 70%
  );
  mix-blend-mode: overlay;
  pointer-events: none;
}

@media (min-width: 900px) {
  .v3-hero__content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 3rem;
    text-align: left;
  }

  .hero-image-wrapper {
    width: 340px;
    height: 380px;
    margin: 0;
  }
}

/* --- Bento Grid (Projects) --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.bento-item {
  position: relative;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.bento-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.bento-item .media {
  overflow: hidden;
  height: 220px;
  position: relative;
  background: var(--card); /* Fallback */
}

.bento-item .thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.bento-item:hover .thumb {
  transform: scale(1.08);
}

/* Advanced Card Glows (Merged from old components) */
.bento-item::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 2;
}

.bento-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(255, 255, 255, 0.1),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.bento-item:hover::before,
.bento-item:hover::after {
  opacity: 1;
}

.project-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  /* Optional: uncomment to enable gradient text on cards */
  /* color: transparent; */
}

.project-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
}

/* --- Skills Marquee --- */
.v3-skills {
  padding: 2rem 0;
}

.marquee-wrapper {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  padding: 2rem 0;
}

.marquee {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: scroll 40s linear infinite;
}

.mq-item {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.9;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem 1.5rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mq-item:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: var(--accent);
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  opacity: 1;
}

@keyframes scroll {
  to {
    transform: translateX(-50%);
  }
}

/* --- Education Section --- */
.v3-education {
  justify-content: flex-start;
  padding-top: 15vh;
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.edu-card {
  padding: 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition:
    transform 0.3s ease,
    border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.edu-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.edu-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

.edu-year {
  background: rgba(100, 255, 218, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.edu-degree {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.edu-place {
  color: var(--muted);
  font-size: 1rem;
}

/* --- Contact --- */
.v3-contact__inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.v3-contact__heading {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
}

.v3-contact__text {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 3rem;
}

.v3-footer {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.v3-social-link {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.v3-social-link svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.v3-social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  color: #fff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.v3-social-link:hover svg {
  transform: scale(1.1);
}

.v3-social-link[aria-label="GitHub"]:hover {
  border-color: #a855f7;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.v3-social-link[aria-label="LinkedIn"]:hover {
  border-color: #0ea5e9;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

/* Glass Utility */
.v3-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Blobs --- */
.blob {
  position: absolute;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.4;
  border-radius: 50%;
  animation: blobFloat 10s infinite alternate;
}

.blob--1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -100px;
  right: -100px;
}

.blob--2 {
  width: 400px;
  height: 400px;
  background: var(--accent-2);
  bottom: 20%;
  left: -150px;
  animation-delay: -5s;
}

@keyframes blobFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, -50px) scale(1.1);
  }
}

/* --- Animation Utilities --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

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

.v3-hero__text.reveal-on-scroll {
  transition-delay: 0.1s;
}

html {
  scroll-behavior: smooth;
}

.icon-sm {
  width: 16px;
  height: 16px;
}
