/* Obsidian-inspired dark UI (HTML + CSS only) */

:root {
  --bg: #0f1117;
  --bg2: #0b0d12;
  --surface: #1a1d24;
  --surface2: #151821;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 12px;
  --accent: #7aa2ff;
  --accent2: #6ee7ff;
  --glow: 0 0 0 1px rgba(122, 162, 255, 0.16), 0 12px 30px rgba(122, 162, 255, 0.18);
  --container: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 450px at 10% -10%, rgba(122, 162, 255, 0.20), transparent 55%),
    radial-gradient(700px 380px at 85% 0%, rgba(110, 231, 255, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(26, 29, 36, 0.9);
}

.skip-link:focus {
  left: 12px;
  z-index: 1000;
}

/* Layout helpers */
.shell {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 88px 0;
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(var(--container), calc(100% - 40px));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.section:first-of-type::before {
  display: none;
}

.section-head {
  display: grid;
  gap: 10px;
  max-width: 70ch;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
  margin: 18px 0;
}

.text-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

/* Sticky header / glass */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px rgba(122, 162, 255, 0.10);
}

.nav-links {
  display: none;
  gap: 18px;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 500;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
}

.nav-cta {
  display: inline-flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: linear-gradient(180deg, rgba(122, 162, 255, 0.20), rgba(122, 162, 255, 0.10));
  border-color: rgba(122, 162, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: var(--glow);
  border-color: rgba(122, 162, 255, 0.42);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* Hero */
.hero {
  padding-top: 56px;
}

.hero-grid {
  display: grid;
  gap: 22px;
}

.eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}

.headline {
  margin: 10px 0 0;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.headline-sub {
  display: block;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(16px, 2.2vw, 20px);
  margin-top: 10px;
  letter-spacing: -0.01em;
}

.lead {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.chip:hover {
  transform: translateY(-3px);
  border-color: rgba(122, 162, 255, 0.32);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.hero-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(180deg, rgba(26, 29, 36, 0.72), rgba(21, 24, 33, 0.72));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-pic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.profile-name {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.profile-role {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.stat-k {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-l {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

/* Surfaces / cards */
.surface {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 29, 36, 0.78), rgba(21, 24, 33, 0.78));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
  padding: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.surface h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.surface p {
  line-height: 1.7;
}

.grid-2 {
  display: grid;
  gap: 16px;
}

.bullet {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  font-size: 13px;
}

.skills-grid {
  display: grid;
  gap: 16px;
}

.skill-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(26, 29, 36, 0.66);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.33);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(122, 162, 255, 0.28);
  box-shadow: var(--glow);
}

.skill-card h3 {
  margin: 0;
}

.skill-card p {
  margin: 10px 0 0;
  line-height: 1.7;
}

/* Projects cards */
.projects-grid {
  display: grid;
  gap: 16px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(180deg, rgba(26, 29, 36, 0.70), rgba(21, 24, 33, 0.70));
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.42);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(600px 200px at 20% 0%, rgba(122, 162, 255, 0.22), transparent 60%);
  opacity: 0.55;
  pointer-events: none;
}

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

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(122, 162, 255, 0.30);
  box-shadow: var(--glow);
}

.project-top h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.project-top p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  font-size: 12px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 16px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

/* Footer */
.footer {
  padding: 32px 0 46px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 18px;
}

.to-top {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* CSS-only entrance animation */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 800ms ease forwards;
  animation-delay: var(--d, 0ms);
}

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

/* Responsive */
@media (min-width: 780px) {
  .nav-links {
    display: inline-flex;
  }

  .hero-grid {
    grid-template-columns: 1.25fr 0.75fr;
    align-items: center;
  }

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

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .btn,
  .chip,
  .project-card,
  .skill-card,
  .to-top {
    transition: none;
  }
}