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

:root {
  --bg: #05080f;
  --surface: #0d1117;
  --surface2: #161b22;
  --text: #f0f6fc;
  --muted: #8b949e;
  --subtle: #484f58;
  --accent: #58a6ff;
  --accent2: #bc8cff;
  --accent-glow: rgba(88, 166, 255, 0.12);
  --green: #3fb950;
  --orange: #d29922;
  --border: #21262d;
  --radius: 12px;
  --radius-sm: 6px;
}

/* =======================
   RESET / BASE
======================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: 0.1px;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  cursor: none;
}

/* .cursor, .cyber-cursor { display: none !important; } */

.cyber-cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 2px solid #00ffe7;
  border-radius: 50%;
  background: rgba(0,255,231,0.08);
  box-shadow: 0 0 18px #00ffe7, 0 0 2px #0070f3;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: lighten;
  transition: transform 0.1s, width 0.2s, height 0.2s, border-color 0.2s;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  display: block;
}

.cyber-cursor.active {
  border-color: #ff00c8;
  box-shadow: 0 0 24px #ff00c8, 0 0 2px #0070f3;
  background: rgba(255,0,200,0.08);
  transform: translate(-50%, -50%) scale(1.2);
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =======================
   BACKGROUND ORBS
======================= */

.bg-orb {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
}

.bg-orb-1 {
  width: 700px;
  height: 700px;
  background: rgba(88, 166, 255, 0.055);
  top: -150px;
  right: -150px;
}

.bg-orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(188, 140, 255, 0.045);
  bottom: 5%;
  left: -150px;
}

/* =======================
   NAVBAR
======================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 8, 15, 0.82);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

/* =======================
   MAIN CONTENT
======================= */

main {
  position: relative;
  z-index: 1;
  padding: 80px 0 60px;
}

/* =======================
   HERO
======================= */

.hero {
  padding: 60px 0 80px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding: 5px 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 999px;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  margin: 0 0 18px;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 40%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 22px;
  min-height: 2em;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 36px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* =======================
   BUTTONS
======================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: #79b8ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88, 166, 255, 0.3);
  opacity: 1;
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  opacity: 1;
}

/* =======================
   SECTIONS
======================= */

section {
  margin-bottom: 72px;
}

h2 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--subtle);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
}

p {
  color: var(--muted);
  max-width: 68ch;
}

/* =======================
   ABOUT GRID
======================= */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.2s ease;
}

.about-card:hover {
  border-color: rgba(88, 166, 255, 0.3);
}

.about-card h3 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--subtle);
  margin-bottom: 8px;
}

.about-card p {
  font-size: 0.92rem;
  color: var(--text);
  margin: 0;
  max-width: none;
}

/* =======================
   SKILLS
======================= */

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

.skill-tag {
  padding: 6px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--muted);
  transition: all 0.2s ease;
  cursor: default;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* =======================
   GRID
======================= */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

/* =======================
   CARDS
======================= */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, var(--accent-glow), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  border-color: rgba(88, 166, 255, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(88, 166, 255, 0.08);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.status-live {
  background: rgba(63, 185, 80, 0.14);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.status-research {
  background: rgba(188, 140, 255, 0.14);
  color: var(--accent2);
  border: 1px solid rgba(188, 140, 255, 0.3);
}

.status-wip {
  background: rgba(210, 153, 34, 0.14);
  color: var(--orange);
  border: 1px solid rgba(210, 153, 34, 0.3);
}

.card p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 10px;
}

.card p:last-of-type {
  margin-bottom: 0;
}

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

.tag {
  font-size: 0.73rem;
  padding: 2px 9px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.links {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s;
}

.links a:hover {
  color: var(--text);
  opacity: 1;
}

/* =======================
   FOOTER
======================= */

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--subtle);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--subtle);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
  opacity: 1;
}

/* =======================
   CURSOR
======================= */

.cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, width 0.2s, height 0.2s, border-color 0.2s;
  z-index: 9999;
  mix-blend-mode: difference;
  opacity: 0;
}

/* =======================
   SCROLL REVEAL
======================= */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* =======================
   RESUME PAGE
======================= */

.resume-page {
  padding: 60px 0;
}

.pdf-container {
  width: 100%;
  height: 85vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 0;
}

/* =======================
   LINKS (GLOBAL)
======================= */

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.85;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* =======================
   SCROLLBAR
======================= */

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

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

::-webkit-scrollbar-thumb {
  background: var(--surface2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

/* =======================
   TECH ACCENT STYLES
======================= */

.tech-gradient {
  background: linear-gradient(90deg, #00ffe7, #0070f3, #ff00c8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
}

.techy-bg {
  background: linear-gradient(90deg, rgba(0,255,231,0.08), rgba(0,112,243,0.08), rgba(255,0,200,0.08));
  border-radius: 12px;
  padding: 12px 0;
}

.hero-icons {
  margin-top: 18px;
  display: flex;
  gap: 18px;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.icon-tech img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 6px #00ffe7);
  border-radius: 6px;
  background: rgba(0,0,0,0.04);
  padding: 2px;
}

.tech-matrix {
  font-family: 'Fira Mono', 'Consolas', monospace;
  color: #00ffe7;
  font-size: 0.95em;
  margin-top: 10px;
  opacity: 0.7;
  overflow: hidden;
}

.matrix-row {
  display: block;
  letter-spacing: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tech-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 60% 20%, rgba(0,255,231,0.12) 0, rgba(0,0,0,0) 60%),
    radial-gradient(circle at 20% 80%, rgba(255,0,200,0.10) 0, rgba(0,0,0,0) 60%);
  mix-blend-mode: lighten;
}

/* =======================
   MOTION REDUCTION
======================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =======================
   TABLET
======================= */

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

  .navbar-inner {
    padding: 0 16px;
  }

  .footer-inner {
    padding: 0 16px;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero {
    padding: 40px 0 60px;
  }

  .pdf-container {
    height: 60vh;
  }
}

/* =======================
   MOBILE
======================= */

@media (max-width: 640px) {
  .navbar-inner {
    height: 54px;
  }

  main {
    padding: 48px 0 40px;
  }

  .hero {
    padding: 36px 0 56px;
  }

  h1 {
    font-size: 2.2rem;
  }

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

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

  .nav-links {
    gap: 16px;
  }

  .nav-brand {
    font-size: 0.85rem;
  }

  .tech-matrix {
    display: none;
  }

  .cyber-cursor {
    display: none;
  }

  .cursor {
    display: none;
  }
}

/* =======================
   TOUCH DEVICES
======================= */

@media (hover: none) and (pointer: coarse) {
  .cyber-cursor,
  .cursor {
    display: none;
  }

  body {
    cursor: auto;
  }
}
