/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #141414;
  --border: #1e1e1e;
  --border-hover: #2a2a2a;
  --text-primary: #e8e8e8;
  --text-secondary: #888888;
  --text-muted: #555555;
  --accent: #c9a84c;
  --accent-dim: rgba(201, 168, 76, 0.1);
  --accent-glow: rgba(201, 168, 76, 0.15);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  cursor: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  cursor: none;
}

a {
  cursor: none;
}

button {
  cursor: none;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===== CURSOR CANVAS ===== */
#cursor-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}

/* ===== NAVIGATION ===== */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), padding 0.3s var(--ease);
}

#nav.scrolled {
  border-bottom-color: var(--border);
  padding: 0.85rem 3rem;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  transition: opacity 0.3s var(--ease);
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s var(--ease);
  position: relative;
}

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

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 3rem;
  position: relative;
}

.hero-content {
  max-width: 700px;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero-links {
  display: flex;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 1s forwards;
}

.hero-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease);
}

.hero-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  right: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 1.5s forwards;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  width: 1px;
  height: 60px;
  background: var(--accent);
  animation: scrollDown 2s var(--ease) infinite;
}

/* ===== SECTIONS ===== */
.section {
  padding: 8rem 3rem;
  border-top: 1px solid var(--border);
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
}

.about-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.25rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ===== EXPERIENCE ===== */
.exp-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  background: var(--bg-card);
  transition: border-color 0.3s var(--ease);
}

.exp-card:hover {
  border-color: var(--border-hover);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.exp-role {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.exp-company {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.exp-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.exp-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.exp-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  background: var(--bg-card);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

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

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.project-link-icon {
  color: var(--text-muted);
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}

.project-link-icon:hover {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.project-name {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  transition: all 0.3s var(--ease);
}

.project-card:hover .project-tags span {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags span {
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease);
  background: var(--bg-elevated);
}

.skill-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Certifications */
.certs {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  transition: border-color 0.3s var(--ease);
}

.cert-item:hover {
  border-color: var(--border-hover);
}

.cert-name {
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex: 1;
}

.cert-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
}

/* ===== LEETCODE ===== */
.lc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.lc-stat-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.75rem;
  background: var(--bg-card);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.lc-stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.lc-stat-card.lc-featured {
  border-color: rgba(201, 168, 76, 0.3);
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.04) 0%, var(--bg-card) 100%);
}

.lc-stat-card.lc-featured:hover {
  border-color: var(--accent);
}

.lc-stat-number {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.lc-stat-number.lc-accent-text {
  color: var(--accent);
}

.lc-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lc-streak-bar {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1.25rem;
}

.lc-streak-fill {
  width: 97.2%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(201, 168, 76, 0.5));
  border-radius: 2px;
  animation: streakGrow 1.5s var(--ease-out) forwards;
}

@keyframes streakGrow {
  from { width: 0; }
  to { width: 97.2%; }
}

/* ===== LEETCODE HEATMAP CARD ===== */
.lc-heatmap-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  transition: border-color 0.3s var(--ease);
}

.lc-heatmap-card:hover {
  border-color: var(--border-hover);
}

.lc-heatmap-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lc-heatmap-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lc-heatmap-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.lc-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.lc-heatmap-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lc-meta-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

.lc-heatmap-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.lc-heatmap-months {
  display: grid;
  grid-template-columns: repeat(53, 1fr);
  min-width: 680px;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.lc-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(53, 1fr);
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  min-width: 680px;
}

.lc-heatmap-cell {
  aspect-ratio: 1;
  border-radius: 2.5px;
  background: var(--bg-elevated);
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  cursor: pointer;
  position: relative;
}

.lc-heatmap-cell:hover {
  transform: scale(1.45);
  z-index: 10;
  outline: 1.5px solid var(--accent);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.4);
}

.lc-lvl-0 {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.lc-lvl-1 {
  background: rgba(201, 168, 76, 0.22);
}

.lc-lvl-2 {
  background: rgba(201, 168, 76, 0.45);
}

.lc-lvl-3 {
  background: rgba(201, 168, 76, 0.72);
}

.lc-lvl-4 {
  background: rgba(201, 168, 76, 0.96);
  box-shadow: 0 0 4px rgba(201, 168, 76, 0.4);
}

.lc-heatmap-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.lc-heatmap-streak-info strong {
  color: var(--accent);
  font-weight: 500;
}

.lc-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lc-legend-cell {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.lc-profile-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  transition: opacity 0.3s var(--ease);
  display: inline-block;
}

.lc-profile-link:hover {
  opacity: 0.7;
}

/* ===== CONTACT ===== */
.contact-inner {
  text-align: center;
}

.contact-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.contact-email {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  display: inline-block;
  margin-bottom: 2rem;
  position: relative;
  transition: color 0.3s var(--ease);
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.contact-email:hover {
  color: var(--accent);
}

.contact-email:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.contact-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  transition: color 0.3s var(--ease);
}

.contact-links a:hover {
  color: var(--text-primary);
}

/* ===== FOOTER ===== */
#footer {
  padding: 2rem 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

#footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scrollDown {
  0% { top: -60px; }
  100% { top: 60px; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #nav {
    padding: 1rem 1.5rem;
  }

  #nav.scrolled {
    padding: 0.75rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  #hero {
    padding: 0 1.5rem;
  }

  .section {
    padding: 5rem 1.5rem;
  }

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

  .exp-header {
    flex-direction: column;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .lc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .scroll-indicator {
    display: none;
  }
}

@media (pointer: coarse) {
  #cursor-canvas {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .lc-stat-number {
    font-size: 2rem;
  }
}
