/* --- CORE SETTINGS --- */
:root {
  --bg: #050505;
  --text: #ffffff;
  --dim: #999;
  --accent: #27c93f; /* Signature Green */
  --line: rgba(255, 255, 255, 0.1);
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
  width: 100vw;
}

body.loading {
  overflow: hidden;
} /* Stop scroll during preloader */

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
b {
  color: #fff;
  font-weight: 600;
}

/* --- BACKGROUND --- */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

/* =========================================
   PRELOADER: QUANTUM ORBIT
   ========================================= */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 800px;
}

.quantum-loader-box {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
}

.quantum-text {
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent);
  text-shadow: 0 0 15px rgba(39, 201, 63, 0.4);
  z-index: 10;
  letter-spacing: 2px;
}

.ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
}

/* Ring 1: Outer - White */
.ring:nth-child(1) {
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  animation: rotate1 2s linear infinite;
}

/* Ring 2: Middle - Green Accent */
.ring:nth-child(2) {
  width: 75%;
  height: 75%;
  border-right: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  animation: rotate2 2s linear infinite;
}

/* Ring 3: Inner - Dimmed White */
.ring:nth-child(3) {
  width: 50%;
  height: 50%;
  border-top: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  animation: rotate3 2s linear infinite;
}

@keyframes rotate1 {
  0% {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg);
  }
}
@keyframes rotate2 {
  0% {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(180deg) rotateY(360deg) rotateZ(180deg);
  }
}
@keyframes rotate3 {
  0% {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg) rotateZ(0deg);
  }
}

/* --- CURSOR --- */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s,
    height 0.3s,
    background 0.3s;
}
body:hover #cursor-ring.hovered {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
}

/* --- ANIMATION UTILS --- */
.reveal-text {
  opacity: 1;
}
.line {
  overflow: hidden;
}

/* --- NAVIGATION --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 30px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  mix-blend-mode: difference;
  opacity: 0; /* Hidden initially for preloader */
}
.logo {
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 1.1rem;
}
.nav-status {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}
.pulse {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: blink 2s infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* --- HERO (With Magnetic Effect Classes) --- */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5vw;
  position: relative;
}
.hero-text-container {
  margin-bottom: 20px;
}
.hero-title {
  font-family: "Syncopate", sans-serif;
  font-size: 11vw;
  line-height: 0.9;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  margin-left: -0.5vw;
  display: block;
}
.hero-title.outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4);
}
/* Enhanced Hover Logic */
.mag-text .char {
  display: inline-block;
  transition: color 0.3s;
}
.mag-text .char:hover {
  color: var(--accent) !important;
  -webkit-text-stroke: 1px var(--accent);
}

.hero-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 6vh;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.hero-role {
  font-size: 1.2rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.hero-bio {
  max-width: 500px;
  text-align: right;
  color: var(--dim);
  line-height: 1.6;
  font-size: 1.1rem;
}

/* --- SECTIONS COMMON --- */
.section-padding {
  padding: 150px 5vw;
}
.section-header {
  font-family: "Syncopate";
  font-size: 1rem;
  color: var(--dim);
  margin-bottom: 40px;
  display: block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  letter-spacing: 2px;
}

/* --- EXPERIENCE --- */
.exp-row {
  display: grid;
  grid-template-columns: 1fr 3fr;
  border-top: 1px solid var(--line);
  padding: 80px 0;
  transition: all 0.5s ease;
  position: relative;
}
.exp-row:hover {
  background: rgba(255, 255, 255, 0.02);
}
.exp-date {
  font-family: "Syncopate";
  font-size: 1.1rem;
  color: var(--dim);
  letter-spacing: 1px;
}
.exp-content h2 {
  font-family: "Syncopate";
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.exp-content h3 {
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 30px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.exp-content ul li {
  font-size: 1.05rem;
  color: #ccc;
  margin-bottom: 15px;
  position: relative;
  padding-left: 25px;
  line-height: 1.6;
}
.exp-content ul li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: "Syncopate";
}

/* --- HORIZONTAL SCROLL SECTIONS --- */
.h-section-title {
  padding: 50px 5vw 0 5vw;
  font-family: "Syncopate";
  font-size: 1rem;
  color: var(--dim);
  letter-spacing: 2px;
  display: block;
}

.pin-wrap-container {
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  background: #050505;
}
.pin-wrap {
  display: flex;
  gap: 5vw;
  padding: 0 5vw;
  width: max-content;
  height: 80vh;
  align-items: center;
}

/* --- EDUCATION CARDS --- */
.edu-card {
  width: 60vw;
  max-width: 900px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #020202;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: 0.5s;
}
.edu-card:hover {
  border-color: var(--accent);
  background: #080808;
}
.edu-year {
  color: var(--accent);
  font-family: "Syncopate";
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.edu-inst {
  font-family: "Syncopate";
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 15px;
  color: #fff;
}
.edu-deg {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
  display: inline-block;
}
.edu-details {
  color: var(--dim);
  line-height: 1.8;
  font-size: 1.1rem;
}

/* --- PROJECT CARDS --- */
.project-card {
  width: 50vw;
  height: 70vh;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #050505;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: 0.5s;
  position: relative;
}
.project-card:hover {
  border-color: var(--accent);
  background: #0a0a0a;
}
.p-cat {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 15px;
}
.p-name {
  font-family: "Syncopate";
  font-size: 3.5vw;
  line-height: 1;
  margin-bottom: 25px;
  color: #fff;
}
.p-desc {
  color: var(--dim);
  margin-bottom: 30px;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Custom Scrollbar for Project Details */
.p-desc::-webkit-scrollbar {
  width: 5px;
}
.p-desc::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
}
.p-desc::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 5px;
}
.p-desc::-webkit-scrollbar-thumb:hover {
  background: #fff;
}
.p-link {
  width: 70px;
  height: 70px;
  border: 1px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  position: absolute;
  top: 40px;
  right: 40px;
  transition: 0.3s;
}
.p-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  transform: scale(1.1) rotate(-45deg);
}

/* --- SKILLS GRID --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.skill-box {
  border: 1px solid var(--line);
  padding: 30px;
  background: rgba(255, 255, 255, 0.01);
  transition: 0.3s;
}
.skill-box:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--accent);
}
.skill-cat {
  font-family: "Syncopate";
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 20px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #ddd;
  transition: 0.3s;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- FOOTER --- */
footer {
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.footer-head {
  font-family: "Syncopate";
  font-size: 6vw;
  line-height: 1;
  margin-bottom: 30px;
}
.email-btn {
  font-size: 2rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 10px;
  color: var(--accent);
  transition: 0.3s;
}
.email-btn:hover {
  color: #fff;
  border-color: #fff;
  letter-spacing: 2px;
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .hero-title {
    font-size: 14vw;
  }
  .hero-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .hero-bio {
    text-align: left;
  }
  .exp-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pin-wrap {
    height: 60vh;
  }
  .project-card,
  .edu-card {
    width: 85vw;
  }
}
