/* ---------- Base ---------- */
* {
  cursor: none;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  background: #050505;
}

::selection {
  background: #39ff8f;
  color: #050505;
}

a, button {
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Custom cursor ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: #39ff8f;
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(57, 255, 143, 0.5);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.cursor-ring.is-hover {
  width: 60px;
  height: 60px;
  background: rgba(57, 255, 143, 0.08);
  border-color: #39ff8f;
}

@media (max-width: 768px) {
  .cursor-dot, .cursor-ring { display: none; }
  * { cursor: auto; }
}

/* ---------- Ambient background ---------- */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(57, 255, 143, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 143, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

section, header, footer {
  position: relative;
  z-index: 2;
}

/* ---------- Typography helpers ---------- */
.text-outline {
  -webkit-text-stroke: 1.5px #ffffff;
  color: transparent;
}

.blink-cursor {
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #39ff8f;
  box-shadow: 0 0 8px 2px rgba(57, 255, 143, 0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Nav ---------- */
.nav-link {
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1px;
  background: #39ff8f;
  transition: width 0.35s ease;
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link:hover {
  color: #39ff8f;
}

/* ---------- Magnetic button ---------- */
.magnetic-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  border: 1px solid #39ff8f;
  border-radius: 999px;
  color: #050505;
  background: #39ff8f;
  overflow: hidden;
  isolation: isolate;
}
.magnetic-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #050505;
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}
.magnetic-btn:hover::before {
  transform: translateY(0%);
}
.magnetic-btn:hover {
  color: #39ff8f;
}
.magnetic-btn span {
  transition: color 0.3s ease;
}

/* ---------- Tags ---------- */
.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8b9296;
  border: 1px solid #1f2224;
  border-radius: 999px;
  padding: 6px 14px;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.exp-card:hover .tag,
.project-card:hover .tag {
  border-color: #1c8a52;
  color: #39ff8f;
}

/* ---------- Experience cards ---------- */
.exp-card {
  border: 1px solid #1f2224;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent);
  transition: border-color 0.4s ease, background 0.4s ease, transform 0.4s ease;
}
.exp-card:hover {
  border-color: #39ff8f;
  transform: translateY(-4px);
}
.exp-card-inner {
  padding: 40px;
}
@media (max-width: 768px) {
  .exp-card-inner { padding: 28px 22px; }
}

/* ---------- Project cards ---------- */
.project-card {
  position: relative;
  border: 1px solid #1f2224;
  border-radius: 20px;
  overflow: hidden;
  min-height: 320px;
  transition: border-color 0.4s ease, transform 0.4s ease;
}
.project-card:hover {
  border-color: #39ff8f;
  transform: translateY(-6px);
}
.project-card-inner {
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.project-reveal {
  margin-top: auto;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.project-card:hover .project-reveal {
  opacity: 1;
  transform: translateY(0);
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(57,255,143,0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.project-card:hover::before {
  opacity: 1;
}

/* ---------- Education cards ---------- */
.edu-card {
  border: 1px solid #1f2224;
  border-radius: 20px;
  padding: 40px;
  transition: border-color 0.4s ease, transform 0.4s ease;
}
.edu-card:hover {
  border-color: #39ff8f;
  transform: translateY(-4px);
}

.gpa-bar-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #1f2224;
  overflow: hidden;
}
.gpa-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1c8a52, #39ff8f);
}

/* ---------- Contact links ---------- */
.contact-link {
  display: block;
  border: 1px solid #1f2224;
  border-radius: 20px;
  padding: 28px;
  transition: border-color 0.4s ease, transform 0.4s ease, background 0.4s ease;
}
.contact-link:hover {
  border-color: #39ff8f;
  transform: translateY(-4px);
  background: rgba(57, 255, 143, 0.03);
}
.contact-link .arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1), color 0.35s ease;
  color: #8b9296;
}
.contact-link:hover .arrow {
  transform: translate(4px, -4px);
  color: #39ff8f;
}

/* ---------- Scroll cue ---------- */
.scroll-line {
  overflow: hidden;
  position: relative;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #39ff8f;
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: -100%; }
  50% { top: 0%; }
  100% { top: 100%; }
}

/* ---------- Reveal helpers (JS-driven initial states) ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}
.hero-fade {
  opacity: 0;
  transform: translateY(20px);
}
.hero-word {
  transform: translateY(110%);
}
.reveal-line {
  transform: translateY(100%);
}