:root {
  --bg: #020617;
  --bg-card: rgba(9, 15, 32, 0.58);
  --bg-card-hover: rgba(13, 21, 44, 0.72);
  --border: rgba(148, 163, 184, 0.13);
  --border-hover: rgba(147, 197, 253, 0.28);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --radius: 14px;
  --radius-sm: 9px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Sapphire Silk Background --- */
.bg-silk {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #03091d 0%, #020617 60%, #020410 100%);
  pointer-events: none;
}

.silk-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  mix-blend-mode: screen;
  will-change: transform;
}

.silk-1 {
  width: 68vw;
  max-width: 820px;
  height: 460px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.46), transparent 70%);
  animation: silkFloat1 16s ease-in-out infinite alternate;
}

.silk-2 {
  width: 62vw;
  max-width: 760px;
  height: 460px;
  bottom: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.34), transparent 70%);
  animation: silkFloat2 20s ease-in-out infinite alternate;
}

.silk-3 {
  width: 48vw;
  max-width: 580px;
  height: 380px;
  top: 28%;
  left: 42%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.28), transparent 70%);
  animation: silkFloat3 14s ease-in-out infinite alternate;
}

.silk-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 28%, rgba(186, 230, 253, 0.04) 48%, transparent 64%);
}

.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes silkFloat1 {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(75px, 45px) rotate(10deg); }
}

@keyframes silkFloat2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-80px, -40px) scale(1.1); }
}

@keyframes silkFloat3 {
  from { transform: translate(0, 0); }
  to { transform: translate(-45px, 30px); }
}

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

/* --- Topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(2, 6, 23, 0.65);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.025em;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 500;
  transition: color 0.18s;
}

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

/* --- Editorial Hero (Clean, Non-AI-Slop) --- */
.hero {
  padding: 64px 0 36px;
}

.hero-editorial {
  position: relative;
  padding: 36px 0 8px;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 28px;
}

.avatar-wrap {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(147, 197, 253, 0.3);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  box-shadow:
    0 14px 36px rgba(2, 6, 23, 0.65),
    0 0 0 6px rgba(59, 130, 246, 0.08);
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hero-identity {
  flex: 1;
  min-width: 0;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #cbd5e1;
  font-weight: 500;
}

.availability-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.kicker-sep {
  color: var(--text-dim);
}

.location-tag {
  color: var(--text-muted);
}

.hero-name {
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: #f8fafc;
}

.hero-title {
  margin-top: 8px;
  font-size: 1.08rem;
  font-weight: 500;
  color: #93c5fd;
  letter-spacing: -0.01em;
}

.hero-divider {
  height: 1px;
  margin: 28px 0 24px;
  background: linear-gradient(90deg, rgba(147, 197, 253, 0.22), rgba(148, 163, 184, 0.08) 65%, transparent);
}

.hero-bottom {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-bio {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.75;
  max-width: 66ch;
  white-space: pre-line;
}

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

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.social-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

.social-btn:hover {
  background: rgba(30, 41, 59, 0.78);
  border-color: var(--border-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* --- Sections --- */
.section {
  padding: 44px 0;
}

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

.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #60a5fa;
  margin-bottom: 6px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Skills --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.skill-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s, background 0.2s;
}

.skill-group-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #93c5fd;
  font-weight: 600;
  margin-bottom: 16px;
}

.skill-item {
  margin-bottom: 14px;
}

.skill-item:last-child {
  margin-bottom: 0;
}

.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 7px;
}

.skill-pct {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.75rem;
}

.skill-bar {
  height: 5px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 999px;
}

/* --- Filters & Search --- */
.search-input {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  width: 260px;
  outline: none;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--border-hover);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
  gap: 18px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

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

.project-card.name-only {
  border-style: dashed;
  background: rgba(9, 15, 32, 0.42);
}

.project-cover {
  width: 100%;
  height: 175px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: #020617;
}

.project-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-top-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
}

.badge-cat {
  background: var(--accent-soft);
  color: #93c5fd;
}

.badge-featured {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.badge-locked {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-closed {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.project-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}

.project-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.project-name-only-note {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 14px;
  flex: 1;
}

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

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  color: #cbd5e1;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.18s;
}

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

.btn-primary:hover {
  filter: brightness(1.12);
}

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

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.hidden {
  display: none !important;
}

/* --- Footer --- */
.footer {
  margin-top: 72px;
  border-top: 1px solid var(--border);
  padding: 26px 0;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.footer-credit {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s;
}

.footer-credit:hover {
  color: #93c5fd;
}

@media (max-width: 720px) {
  .hero {
    padding: 36px 0 24px;
  }
  .hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .avatar-wrap {
    width: 86px;
    height: 86px;
  }
  .search-input,
  .project-search-wrap {
    width: 100%;
  }
  .nav-links {
    gap: 16px;
  }
}
