/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(160%) blur(12px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}
header.scrolled {
  background: var(--bg-elev);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.25px;
}
.brand .name {
  font-size: 1.05rem;
}
.brand .tag {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
nav ul {
  display: flex;
  list-style: none;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}
nav a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
nav a.active {
  transform: scale(1.05);
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in oklab, var(--bg-elev) 75%, var(--accent) 10%);
  box-shadow: 0 0 12px var(--ring);
}

@media (max-width: 768px) {
  header {
    display: none;
  }
}

/* ── Hero ── */
.hero {
  padding: 64px 0 28px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  margin: 0 0 6px;
  font-weight: 900;
}
.gradient-text {
  background: linear-gradient(
    270deg,
    var(--grad-a),
    var(--grad-b),
    var(--grad-c),
    var(--grad-a)
  );
  background-size: 800% 800%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  color: var(--muted);
  font-size: 18px;
  margin-top: 0;
}

/* ── CTA Row & Buttons ── */
.cta-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.95rem;
  border-radius: 12px;
  font-weight: 700;
  background: color-mix(in oklab, var(--bg-elev) 85%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
  will-change: transform;
}
.btn:active {
  transform: translateY(0);
}

/* ── Quick Links & Chips ── */
.quicklinks {
  margin-top: 8px;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  transition: all 0.25s ease;
}
.chip {
  font-weight: 700;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg-elev) 88%, transparent);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: all 0.25s ease;
}

/* ── Grid & Cards ── */
.grid {
  display: grid;
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
}

.card {
  background:
    radial-gradient(
      600px 300px at 10% -20%,
      rgba(88, 166, 255, 0.08),
      transparent 40%
    ),
    var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.card h3 {
  margin: 4px 0 2px;
  font-size: 18px;
}
.card ul li {
  margin-bottom: 0.4rem;
}

/* ── Actions ── */
.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 10px;
}
.backToTop {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 10px;
}
.action {
  font-weight: 700;
  border: 1px solid var(--border);
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: color-mix(in oklab, var(--bg-elev) 90%, transparent);
  transition: all 0.25s ease;
}

/* ── About ── */
.about {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 15px;
  background: var(--bg-elev);
  border: 1px dashed var(--border);
  padding: 14px 16px;
  border-radius: 12px;
}

/* ── Experience Roles ── */
.role {
  margin: 0 0 18px;
}
.role h4 {
  color: var(--accent);
  margin: 0;
  font-size: 17px;
}
.role .when {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.role ul {
  margin: 8px 0 0 0;
  padding-left: 18px;
}

/* ── Tech Stack ── */
.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: fit-content;
  margin: 0 auto;
}
.tech-category {
  display: flex;
  align-items: baseline;
  gap: 2rem;
}
.category-title {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  width: 110px;
  flex-shrink: 0;
  text-align: left;
}
.pills-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.pill {
  border: 1px solid var(--border);
  padding: 0.4rem 0.65rem;
  border-radius: 1999px;
  font-weight: 700;
  background: color-mix(in oklab, var(--bg-elev) 90%, transparent);
  transition: all 0.25s ease;
  cursor: pointer;
  display: inline-block;
}

/* ── Contact ── */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.contact-list a {
  word-break: break-word;
}

/* ── Footer ── */
footer {
  padding: 34px 0 60px;
  color: var(--muted);
  text-align: center;
}

/* ── Theme Toggle Button ── */
.toggle-btn {
  position: fixed;
  top: 0.5rem;
  right: 1rem;
  z-index: 50;
  font-size: 1.2rem;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .toggle-btn {
    top: auto;
    bottom: 18px;
    right: 18px;
    font-size: 1.2rem;
    width: 3rem;
    height: 3rem;
  }
}
