:root {
  --bg: #0b0f17;
  --surface: #111827;
  --surface-soft: rgba(255, 255, 255, 0.055);
  --surface-hover: rgba(255, 255, 255, 0.085);
  --text: #f8fafc;
  --muted: #9ca8ba;
  --muted-strong: #cbd5e1;
  --border: rgba(255, 255, 255, 0.11);
  --accent: #8b7cff;
  --accent-2: #5cc8ff;
  --accent-soft: rgba(125, 211, 252, 0.1);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 124, 255, 0.12), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(92, 200, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #0b0f17 0%, #0d121c 48%, #0b0f17 100%);
  overflow-x: hidden;
}

body.cursor-enabled,
body.cursor-enabled a,
body.cursor-enabled button,
body.cursor-enabled .project-card,
body.cursor-enabled .skill-bubble,
body.cursor-enabled .contact-pill {
  cursor: none;
}

a {
  color: inherit;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(248, 250, 252, 0.42);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2147483647;
  isolation: isolate;
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  background: rgba(11, 15, 23, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  will-change: transform;
  transition:
    opacity 160ms ease,
    width 160ms ease,
    height 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.custom-cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.95);
  transform: translate(-50%, -50%);
  z-index: 1;
}

.custom-cursor.visible {
  opacity: 1;
}

.custom-cursor.hovering {
  width: 38px;
  height: 38px;
  border-color: rgba(125, 211, 252, 0.8);
  background: rgba(11, 15, 23, 0.56);
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin-inline: auto;
}

.navbar {
  position: sticky;
  top: 16px;
  z-index: 100;
  width: min(var(--max-width), calc(100% - 40px));
  margin: 16px auto 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(11, 15, 23, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 0.78rem;
  box-shadow: 0 10px 28px rgba(92, 200, 255, 0.13);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  transition: color 170ms ease, background 170ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 1.2rem;
}

section {
  scroll-margin-top: 110px;
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  align-items: center;
  padding: 78px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 24px;
  align-items: stretch;
}

.glass-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-soft);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: clamp(32px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 200, 255, 0.13), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  padding: 9px 13px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: var(--radius-pill);
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.07);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.1);
}

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff, #c7d2fe 46%, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  max-width: 660px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  font-weight: 750;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.btn:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 14px 30px rgba(92, 200, 255, 0.13);
}

.side-panel {
  padding: 18px;
  display: grid;
  gap: 18px;
}

.mini-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
}

.mini-card h2,
.section-heading h2,
.project-card h3,
.resume-card h3,
.contact-card h3 {
  letter-spacing: -0.045em;
}

.mini-card h2 {
  margin-bottom: 16px;
  font-size: 1.45rem;
}

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

.skill-bubble {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  color: #dce6f8;
  background: rgba(255, 255, 255, 0.058);
  font-size: 0.88rem;
  transition: transform 170ms ease, background 170ms ease, border-color 170ms ease;
}

.skill-bubble:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.38);
  background: var(--accent-soft);
}

.contact-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.contact-line:last-child {
  border-bottom: 0;
}

.contact-line a {
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
}

.section-block {
  padding: 70px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-heading h2 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1;
}

.section-heading p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: transform 210ms ease, border-color 210ms ease, background 210ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(125, 211, 252, 0.12), transparent 32%);
  opacity: 0;
  transition: opacity 210ms ease;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--surface-hover);
}

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

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-index {
  color: #7dd3fc;
  font-weight: 850;
}

.project-card h3 {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.project-card p {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.project-card .skill-list {
  margin-top: auto;
  margin-bottom: 22px;
}

.project-card .button-row {
  gap: 10px;
}

.project-card .btn {
  min-height: 42px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.resume-card {
  padding: 30px;
}

.resume-card h3 {
  margin-bottom: 20px;
  font-size: 1.7rem;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  position: relative;
  padding: 18px 0 18px 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 24px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.1);
}

.timeline-item h4 {
  margin-bottom: 6px;
  font-size: 1.06rem;
}

.timeline-meta {
  margin-bottom: 8px;
  color: #7dd3fc;
  font-size: 0.88rem;
  font-weight: 750;
}

.timeline-item p,
.resume-card li {
  color: var(--muted);
  line-height: 1.65;
}

.resume-card ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.resume-divider {
  height: 1px;
  margin: 26px 0;
  background: rgba(255, 255, 255, 0.1);
}

.contact-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 48px);
}

.contact-card::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 124, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.contact-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 28px;
  align-items: start;
}

.contact-card h3 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.contact-card p {
  color: var(--muted);
  line-height: 1.75;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
  transition: transform 170ms ease, background 170ms ease, border-color 170ms ease;
}

.contact-pill:hover {
  transform: translateX(6px);
  border-color: rgba(125, 211, 252, 0.38);
  background: var(--accent-soft);
}

.contact-pill span:first-child {
  color: var(--muted);
}

footer {
  padding: 26px 0 40px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms ease, transform 650ms ease;
}

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

@media (max-width: 980px) {
  body.cursor-enabled,
  body.cursor-enabled a,
  body.cursor-enabled button,
  body.cursor-enabled .project-card,
  body.cursor-enabled .skill-bubble,
  body.cursor-enabled .contact-pill {
    cursor: auto;
  }

  .custom-cursor {
    display: none;
  }

  .hero-grid,
  .resume-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .navbar {
    top: 10px;
    border-radius: 24px;
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(11, 15, 23, 0.96);
    backdrop-filter: blur(18px);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .hero-copy {
    min-height: auto;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .button-row,
  .project-card .button-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .contact-pill {
    align-items: flex-start;
    flex-direction: column;
  }
}
