:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --amber-500: #f59e0b;
  --cyan-500: #06b6d4;
  --cyan-300: #67e8f9;
  --cyan-600: #0891b2;
  --emerald-400: #34d399;
  --zinc-950: #09090b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--slate-950);
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* mouse-tracking spotlight background */
.bg-fx {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  transition: opacity .3s;
  background: radial-gradient(600px at 50% 50%, rgba(59,130,246,0.15), transparent 40%);
}
.bg-fx-2 {
  background: radial-gradient(300px at 50% 50%, rgba(139,92,246,0.1), transparent 50%);
}

/* nav */
.navbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  transition: all .3s;
  opacity: 0;
  animation: navIn .6s ease forwards .1s;
}
@keyframes navIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.glass-panel {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}
.navbar.scrolled .glass-panel {
  background: rgba(255,255,255,0.03);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}
.nav-inner {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.logo { font-size: 0.875rem; font-weight: 700; letter-spacing: -0.05em; color: #fff; }
.logo .accent { color: var(--blue-500); }
.nav-links { display: none; gap: 1.5rem; align-items: center; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-link {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--slate-400);
  position: relative;
  padding-bottom: 4px;
  transition: color .2s;
  font-weight: 500;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; font-weight: 700; }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue-500);
}
.nav-resume { color: var(--slate-400); }
.nav-resume:hover { color: #fff; }

/* hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 10; max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; width: 100%; }
.hero-row { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 3rem; }
@media (min-width: 768px) { .hero-row { flex-direction: row; } }
.hero-text { flex: 1; text-align: left; width: 100%; }

.badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(59,130,246,0.2);
  background: rgba(59,130,246,0.05);
  color: var(--blue-400);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: clamp(2.75rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff;
  margin: 0 0 1.5rem;
  line-height: 0.95;
}
.hero-title-fade {
  display: block;
  color: transparent;
  background: linear-gradient(to bottom, #fff, var(--slate-500));
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-desc { font-size: 1.125rem; color: var(--slate-400); max-width: 36rem; margin-bottom: 2.5rem; line-height: 1.7; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; align-items: center; } }

.btn-primary {
  padding: 1rem 2rem;
  background: #fff;
  color: #000;
  border-radius: 999px;
  font-weight: 700;
  display: inline-block;
  transition: transform .2s;
}
.btn-primary:hover { transform: scale(1.05); }

.social-row { display: flex; gap: 1rem; }
.icon-btn {
  padding: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--slate-400);
  display: inline-flex;
  transition: all .2s;
}
.icon-btn:hover { color: #fff; border-color: rgba(255,255,255,0.2); }

.hero-photo-wrap { flex-shrink: 0; }
.hero-photo { position: relative; width: 16rem; height: 16rem; }
@media (min-width: 768px) { .hero-photo { width: 20rem; height: 20rem; } }
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--slate-800);
  animation: morph 8s ease-in-out infinite;
}
.hero-photo.placeholder {
  background: linear-gradient(135deg, var(--slate-800), var(--slate-700));
  animation: morph 8s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-500);
  font-size: 0.875rem;
}
.hero-photo.placeholder::after { content: 'Your Photo'; }

@keyframes morph {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50% { border-radius: 55% 45% 30% 55% / 30% 45% 70% 40%; }
  75% { border-radius: 40% 60% 50% 40% / 60% 40% 60% 50%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* sections */
.section { padding: 8rem 1.5rem; max-width: 80rem; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 5rem; }
.section-title { font-size: clamp(2.5rem, 6vw, 3.75rem); font-weight: 900; letter-spacing: -0.04em; color: #fff; margin: 1.5rem 0; }
.section-sub { color: var(--slate-400); font-size: 1.125rem; max-width: 42rem; margin: 0 auto; }

/* filter */
.filter-row { display: flex; justify-content: center; gap: 1rem; margin-bottom: 4rem; }
.filter-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--slate-400);
  transition: all .2s;
}
.filter-btn:hover { color: #fff; }
.filter-btn.active { background: #fff; color: #000; border-color: #fff; }

/* projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 768px) { .projects-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .projects-grid { grid-template-columns: 1fr 1fr 1fr; } }

.pin-slot { height: 25rem; width: 100%; display: flex; align-items: center; justify-content: center; }
.pin-slot.hidden-by-filter { display: none; }

.pin-container { position: relative; cursor: pointer; }
.pin-container.is-static { cursor: default; }
.pin-perspective {
  perspective: 1000px;
  transform: rotateX(70deg);
  position: absolute;
  left: 50%; top: 50%;
  margin-left: 0.09375rem;
  margin-top: 1rem;
  translate: -50% -50%;
}
.pin-card {
  transform: translate(-50%,-50%) rotateX(0deg);
  position: absolute;
  left: 50%; top: 50%;
  padding: 1rem;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color .7s;
  overflow: hidden;
}
.pin-container:hover .pin-card { border-color: rgba(255,255,255,0.2); }
.pin-card-inner {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  width: 20rem;
  height: 20rem;
  color: rgba(241,245,249,0.5);
}
.tag-featured, .tag-soon {
  padding: 0.25rem 0.5rem;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  width: fit-content;
}
.tag-featured { background: #fff; color: #000; }
.tag-soon { background: var(--amber-500); color: #fff; }
.pin-title { font-size: 1rem; font-weight: 700; color: var(--slate-100); margin: 0 0 0.5rem; max-width: 20rem; }
.pin-desc {
  color: var(--slate-400);
  font-size: 0.875rem;
  margin: 0 0 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pin-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1rem; }
.chip {
  padding: 0.125rem 0.5rem;
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 4px;
  color: var(--slate-400);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.chip-plain { text-transform: none; }
.pin-thumb {
  flex: 1;
  width: 100%;
  border-radius: 0.5rem;
  margin-top: auto;
  overflow: hidden;
  position: relative;
}
.placeholder-thumb {
  background: linear-gradient(135deg, var(--slate-800), var(--slate-700), var(--slate-800));
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-500);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.soon-thumb { color: #fff; font-size: 1rem; text-transform: none; letter-spacing: normal; font-weight: 700; }

.pin-beam-wrap {
  pointer-events: none;
  width: 24rem;
  height: 20rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 60;
  transition: opacity .5s;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -70%);
}
.pin-container:hover .pin-beam-wrap { opacity: 1; }
.pin-beam-inner { width: 100%; height: 100%; margin-top: -1.75rem; flex: none; position: relative; inset: 0; }
.pin-badge-row { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: center; }
.pin-badge {
  position: relative;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  z-index: 10;
  border-radius: 999px;
  background: var(--zinc-950);
  padding: 0.125rem 1rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}
.pin-badge span { color: #fff; font-size: 0.75rem; font-weight: 700; padding: 0.125rem 0; display: inline-block; }
.pin-beam {
  position: absolute;
  right: 50%;
  bottom: 50%;
  background: linear-gradient(to bottom, transparent, var(--cyan-500));
  translate: 0 14px;
  width: 1px;
  height: 5rem;
  transition: height .3s;
}
.pin-container:hover .pin-beam { height: 10rem; }
.pin-beam-blur { filter: blur(2px); }
.pin-dot {
  position: absolute;
  right: calc(50% - 1px);
  bottom: 50%;
  background: var(--cyan-300);
  translate: 0 14px;
  width: 2px; height: 2px;
  border-radius: 999px;
  z-index: 40;
}
.pin-dot-blur { right: calc(50% - 2px); width: 4px; height: 4px; background: var(--cyan-600); filter: blur(3px); }

/* skills */
.skills-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 768px) { .skills-grid { grid-template-columns: 1fr 1fr; } }
.skill-card {
  background: rgba(15,23,42,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 1rem;
  padding: 2rem;
  backdrop-filter: blur(4px);
}
.skill-card h3 { font-size: 1.125rem; font-weight: 700; color: #fff; margin: 0 0 1.5rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  padding: 0.375rem 0.75rem;
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 0.5rem;
  color: var(--slate-300);
  font-size: 0.875rem;
  transition: all .2s;
  cursor: default;
}
.tag:hover { color: #fff; border-color: rgba(255,255,255,0.1); }

.about-card {
  margin-top: 5rem;
  max-width: 56rem;
  margin-left: auto; margin-right: auto;
  background: rgba(15,23,42,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 1rem;
  padding: 2.5rem;
  backdrop-filter: blur(4px);
}
.about-card h3 { font-size: 1.5rem; font-weight: 700; color: #fff; margin: 0 0 1rem; }
.about-card p { color: var(--slate-300); font-size: 1.125rem; line-height: 1.7; margin: 0; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.info-card {
  background: rgba(15,23,42,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 1rem;
  padding: 2rem;
  backdrop-filter: blur(4px);
}
.info-card h3 { font-size: 1.25rem; font-weight: 700; color: #fff; margin: 0 0 2rem; }
.contact-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.contact-icon {
  padding: 0.75rem;
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 0.75rem;
  color: var(--blue-400);
  transition: border-color .2s;
  display: flex;
}
.contact-row:hover .contact-icon { border-color: rgba(59,130,246,0.5); }
.label { font-size: 0.75rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.25rem; }
.value { color: #fff; font-weight: 500; margin: 0; transition: color .2s; }
.contact-row:hover .value { color: var(--blue-400); }
.follow-block { padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.05); }
.follow-label { font-size: 0.875rem; color: var(--slate-500); margin: 0 0 1rem; }
.follow-row { display: flex; gap: 0.75rem; }
.icon-btn-sm {
  padding: 0.75rem;
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 0.75rem;
  color: var(--slate-400);
  display: inline-flex;
  transition: all .2s;
}
.icon-btn-sm:hover { color: #fff; border-color: rgba(255,255,255,0.1); }

.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.field label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--slate-300); margin-bottom: 0.5rem; }
.field input, .field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 0.75rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color .2s;
  outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--slate-500); }
.field input:focus, .field textarea:focus { border-color: rgba(59,130,246,0.5); }
.field textarea { resize: none; }
.btn-submit {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 0.75rem;
  font-weight: 700;
  transition: background .2s;
}
.btn-submit:hover { background: #eff6ff; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.footer-note {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  color: var(--slate-500);
  font-size: 0.875rem;
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.hero-title.reveal, .hero-desc.reveal, .badge.reveal, .hero-actions.reveal { transition-delay: 0.05s; }
