:root {
  --bg: #050816;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.3);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
}

:focus-visible {
  border-radius: 0.25rem;
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  color: #020617;
  background: var(--accent);
  font-weight: 700;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

header {
  position: sticky;
  top: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  transition: var(--transition);
}

header:hover {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.95);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover .brand-title {
  color: #f9fafb;
}

.avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 2px;
  border-radius: 999px;
  background: conic-gradient(from 220deg, #22c55e, #0ea5e9, #a855f7, #22c55e);
  transition: var(--transition);
}

.brand:hover .avatar {
  transform: scale(1.05);
}

.avatar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  color: #e5e7eb;
  background: #020617;
  font-size: 1rem;
  font-weight: 700;
}

.brand-title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.brand-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.86rem;
}

nav a {
  padding: 0.4rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

nav a:hover {
  border-color: var(--accent-soft);
  color: #f9fafb;
  background: rgba(15, 23, 42, 1);
  transform: translateY(-2px);
}

main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  align-items: start;
  gap: 2rem;
}

.content-main,
.content-secondary {
  min-width: 0;
}

section[id] {
  scroll-margin-top: 8rem;
}

.hero,
.stack,
.sidebar-card {
  margin-bottom: 1.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  transition: var(--transition);
}

.hero {
  padding: 2rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.7);
}

.hero:hover,
.stack:hover,
.sidebar-card:hover {
  border-color: rgba(148, 163, 184, 0.5);
}

.hero:hover {
  box-shadow: 0 25px 75px rgba(34, 197, 94, 0.1);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
  font-size: 0.8rem;
  font-weight: 500;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

h1 {
  margin-bottom: 1rem;
  color: #f9fafb;
  font-size: clamp(2rem, 4vw, 2.5rem);
  letter-spacing: 0.02em;
}

.hero-subtitle {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-meta,
.chips,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-meta {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.hero-meta span,
.chip,
.link-pill {
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  transition: var(--transition);
}

.hero-meta span {
  padding: 0.4rem 0.85rem;
  background: rgba(34, 197, 94, 0.05);
}

.hero-meta span:hover,
.chip:hover {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
}

.hero-body {
  color: var(--text-main);
  font-size: 0.98rem;
  line-height: 1.8;
}

.stack {
  padding: 1.75rem;
  background: rgba(15, 23, 42, 0.92);
}

.stack:hover,
.sidebar-card:hover {
  background: rgba(15, 23, 42, 0.98);
}

.section-title {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.chips {
  gap: 0.65rem;
}

.chip {
  padding: 0.4rem 0.85rem;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
  font-size: 0.8rem;
}

.chip:hover {
  transform: translateY(-2px);
}

.sidebar-card {
  padding: 2rem;
  background: rgba(15, 23, 42, 0.96);
}

.sidebar-card h2 {
  margin-bottom: 1.25rem;
  color: #f9fafb;
  font-size: 1.05rem;
}

.muted {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.timeline {
  margin-top: 1rem;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(34, 197, 94, 0.3);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
  transition: var(--transition);
}

.timeline-item:hover {
  padding-left: 0.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0.25rem;
  left: calc(-1.5rem - 6px);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.timeline-title {
  color: #f9fafb;
  font-size: 0.95rem;
  font-weight: 600;
}

.timeline-meta {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.link-row {
  margin-top: 1.25rem;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--text-main);
  background: rgba(34, 197, 94, 0.1);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
}

.link-pill:hover {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.2);
  transform: translateY(-2px);
}

footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}

.updated-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.8rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(34, 197, 94, 0.06);
  font-size: 0.72rem;
}

.updated-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

ul {
  list-style: none;
}

ul li {
  position: relative;
  margin-bottom: 0.65rem;
  padding-left: 1.5rem;
}

ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

@media (max-width: 900px) {
  main {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .content-main,
  .content-secondary {
    display: contents;
  }

  header {
    position: relative;
    top: 0;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 1.25rem;
  }

  nav {
    width: 100%;
  }

  section[id] {
    scroll-margin-top: 1.5rem;
  }

  #about { order: 1; }
  #experience { order: 2; }
  #skills { order: 3; }
  #projects { order: 4; }
  #ai-work { order: 5; }
  #education { order: 6; }
  #certs { order: 7; }
  #languages { order: 8; }
  #contact { order: 9; }
  #privacy { order: 10; }
}

@media (max-width: 520px) {
  .wrapper {
    padding: 1rem;
  }

  .hero,
  .sidebar-card {
    padding: 1.5rem;
  }

  .stack {
    padding: 1.35rem;
  }
}

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
