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

:root {
  --bg: #080810;
  --surface: #10101e;
  --border: #2a1f3d;
  --accent: #b57bee;
  --accent-dim: #7c3aed;
  --text: #f0edf8;
  --muted: #8a7fa0;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Outfit", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(
      ellipse at 20% 20%,
      rgba(124, 58, 237, 0.12) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(181, 123, 238, 0.08) 0%,
      transparent 60%
    );
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  cursor: none;
}

/* CUSTOM CURSOR */
.cursor {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    transform 0.1s ease,
    width 0.2s,
    height 0.2s,
    background 0.2s;
}
.cursor.grow {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1.5px solid var(--accent);
}

/* LOADER */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}
#loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-text {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 4rem);
  font-style: italic;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  animation:
    type 1.4s steps(14) forwards,
    blink 0.7s step-end infinite;
}
@keyframes type {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 4rem;
  background: rgba(8, 8, 16, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}
.hamburger span {
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s;
  display: block;
}

/* HERO */
#intro {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem 4rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.6s forwards;
}
.hero-name {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-style: italic;
  line-height: 1;
  color: var(--text);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.8s forwards;
}
.hero-name span {
  color: var(--accent);
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 2s forwards;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 2.2s forwards;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(181, 123, 238, 0.3);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Decorative grid lines */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(181, 123, 238, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 123, 238, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
.hero-circle {
  position: absolute;
  top: 15%;
  right: 8%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid var(--border);
  opacity: 0.5;
  animation: spin 30s linear infinite;
}
.hero-circle::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border-radius: 50%;
  border: 1px dashed rgba(181, 123, 238, 0.25);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  right: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s ease 2.5s forwards;
}
.scroll-indicator span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SECTION SHARED */
section {
  padding: 7rem 4rem;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3rem;
}
.section-label::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent);
}
.section-heading {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-style: italic;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* ABOUT */
#about {
  border-top: 1px solid var(--border);
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}
.about-text p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1.2rem;
}
.about-text p strong {
  color: var(--text);
  font-weight: 500;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 3rem;
}
.stat-box {
  background: var(--surface);
  padding: 1.5rem;
}
.stat-num {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.about-right {
  padding-top: 0.5rem;
}
.about-quote {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
}

/* SKILLS */
#skills {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.skills-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 6rem;
  align-items: start;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.skill-item {
  background: var(--bg);
  padding: 1.2rem 1rem;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition:
    background 0.2s,
    color 0.2s;
  position: relative;
  overflow: hidden;
}
.skill-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.skill-item:hover {
  background: var(--surface);
  color: var(--text);
}
.skill-item:hover::after {
  transform: scaleX(1);
}

/* PROJECTS */
#projects {
  border-top: 1px solid var(--border);
}
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.project-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  cursor: default;
}
.project-row:first-child {
  border-top: 1px solid var(--border);
}
.project-row:hover {
  background: var(--surface);
  margin: 0 -4rem;
  padding: 2rem 4rem;
}
.project-num {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
}
.project-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.project-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--text);
  transition: color 0.2s;
}
.project-row:hover .project-title {
  color: var(--accent);
}
.project-desc {
  font-size: 13px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.6;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.ptag {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project-links {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}
.plink {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.plink:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.plink.featured {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.plink.featured:hover {
  box-shadow: 0 4px 16px rgba(181, 123, 238, 0.35);
}
.hw-badge {
  font-size: 10px;
  padding: 4px 10px;
  background: rgba(181, 123, 238, 0.12);
  border: 1px solid rgba(181, 123, 238, 0.3);
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* CONTACT */
#contact {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.contact-heading {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-style: italic;
  line-height: 1.05;
  color: var(--text);
}
.contact-heading span {
  color: var(--accent);
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--border);
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.contact-link:hover {
  border-color: var(--accent);
  background: rgba(181, 123, 238, 0.07);
}
.contact-link-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.contact-link-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.contact-link-arrow {
  font-size: 1.2rem;
  color: var(--muted);
  transition:
    color 0.2s,
    transform 0.2s;
}
.contact-link:hover .contact-link-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
footer p {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.footer-logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}

/* MOBILE NAV */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 90;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.5rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-menu a:hover {
  color: var(--accent);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  nav {
    padding: 1rem 1.5rem;
  }
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  section {
    padding: 5rem 1.5rem;
  }
  #intro {
    padding: 7rem 1.5rem 3rem;
  }
  .about-inner,
  .skills-inner,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-row {
    grid-template-columns: 50px 1fr;
  }
  .project-links {
    display: none;
  }
  .project-row:hover {
    margin: 0;
    padding: 2rem 0;
  }
  footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .hero-circle {
    display: none;
  }
  .scroll-indicator {
    display: none;
  }
}
