/* ─── Reset & Base ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #0d0d0d;
  --white: #ffffff;
  --yellow: #f5e44e;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --font-display: "Outfit", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --text: #141414;
  --muted: #6b6b6b;
  --card: rgba(255, 255, 255, 0.75);
  --stroke: rgba(0, 0, 0, 0.10);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: var(--font-body);
  scroll-behavior: smooth;
  color: var(--text);
}

a {
  color: inherit;
}

.container {
  min-height: 100vh;
  position: relative;
  overflow: hidden;

  background:
    radial-gradient(1200px 600px at 50% 50%, #ffffff 0%, #f4f4f4 55%, #efefef 100%),
    linear-gradient(#ffffff, #f3f3f3);
}

/* grain layer */
.container::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.015) 0px,
      rgba(0, 0, 0, 0.015) 1px,
      transparent 1px,
      transparent 3px),
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.015) 0px,
      rgba(0, 0, 0, 0.015) 1px,
      transparent 1px,
      transparent 4px);
  opacity: 0.4;
}

/* vignette */
.container::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1200px 800px at 50% 30%,
      transparent 60%,
      rgba(0, 0, 0, 0.073) 100%);
  opacity: 0.55;
}

/* Interactive Canvas Background */
#bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 60px;
}

/* ─── HAMBURGER (hidden on desktop) ────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 101;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger span+span {
  margin-top: 5px;
}

/* X state */
.navbar.open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar.open .hamburger span:nth-child(2) {
  opacity: 0;
}

.navbar.open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── OVERLAY (mobile menu backdrop) ──────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 97;
}

.nav-overlay.show {
  display: block;
}

/* ─── NAVBAR ───────────────────────────────────────────────────── */
.navbar {
  position: absolute;
  z-index: 99;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);

  width: fit-content;
  max-width: calc(100% - 40px);
  height: 63px;

  background: #363636;
  border-radius: var(--radius-lg);

  display: flex;
  align-items: center;

  padding: 7px 10px;
}

.nav-pill {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  background-color: #232323;
  border-radius: var(--radius-md);
  padding: 15px 5px;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  flex: 0 0 auto;
  margin-right: 20px;
  text-decoration: none;
}

.logo img {
  display: block;
}

.links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 7px 10px;
  border-radius: 15px;

  font-size: 16px;
  font-weight: 500;
  text-decoration: none;

  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);

  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link.active {
  background: #fff;
  color: #000;
  border-color: transparent;
  font-weight: 700;
}

/* ─── HERO ─────────────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  scroll-margin-top: 110px;
  /* keeps fixed navbar from covering section titles */
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 140px 20px 80px;
}

.title-and-left-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-name {
  display: inline-block;
  padding: 12px 28px;
  margin-bottom: 40px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #000;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-10px);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(-10px);
  }

  50% {
    transform: translateY(-15px);
  }


  100% {
    transform: translateY(-10px);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn.primary {
  background: #111;
  color: #fff;
}

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

.btn.secondary {
  background: transparent;
  border-color: #cfcfcf;
  color: #111;
}

.btn.secondary:hover {
  background: #f3f3f3;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

/* ─── STATUS ───────────────────────────────────────────────────── */
.status {
  position: absolute;
  z-index: 50;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);

  background: #d1f8d4;
  color: #2e7d32;

  padding: 8px 16px;
  border-radius: 16px;
  font-size: 13px;
}

/* ─── BADGE ────────────────────────────────────────────────────── */
.badge {
  position: absolute;
  right: clamp(24px, 6vw, 80px);
  bottom: clamp(24px, 8vh, 80px);

  z-index: 10;

  display: flex;
  align-items: center;
  gap: 12px;

  transform: rotate(-6deg);
  transform-origin: bottom right;

  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15));
  animation: fadeUp 0.7s 0.25s ease both;
}

.badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
}

.badge-top {
  font-size: 35px;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px #000;
  letter-spacing: 0.02em;
}

.badge-bottom {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 30px);
  font-weight: 900;
  color: #000;
  letter-spacing: 0.12em;
}

.avatar-placeholder {
  width: clamp(44px, 5vw, 62px);
  height: clamp(44px, 5vw, 62px);
  border-radius: 16px;
  overflow: hidden;
  background: #eee;
  transform: rotate(15deg);
  display: grid;
  place-items: center;
}

.avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── SECTIONS ─────────────────────────────────────────────────── */
.section-head {
  padding: 60px 0 22px;
  text-align: left;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin-top: 8px;
  color: var(--muted);
  max-width: 680px;
}

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

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

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

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(8px);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
}

.card-title a {
  text-decoration: none;
}

.card-title a:hover {
  text-decoration: underline;
}

.card-text {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.skills-grid .card {
  grid-column: span 1;
}


.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 600;
}

/* Projects */
.project {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
}

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

.chip {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245, 228, 78, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

/* GitHub link */
.github-link {
  color: var(--text);
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
  display: inline-flex;
}

.github-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.github-link svg {
  transform: scale(1.1);
}

/* ─── Filter Bar ───────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.65);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.15s;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: #111;
  color: #fff;
  border-color: transparent;
}

/* ─── Carousel ─────────────────────────────────────────────────── */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: #e8e8e8;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-track img {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}

/* Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  color: #111;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s, background 0.2s, transform 0.15s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.carousel:hover .carousel-arrow {
  opacity: 1;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-50%) scale(1.08);
}

.carousel-prev {
  left: 8px;
}

.carousel-next {
  right: 8px;
}

.carousel-arrow:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.25);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.85);
}

/* ─── Project Lightbox Modal ──────────────────────────────────── */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.project-modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.modal-image {
  position: relative;
  z-index: 1;
  max-width: 88vw;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  animation: modalFadeIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes modalFadeIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}

.modal-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.08);
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

.modal-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Project hide/show for filter */
.project.hidden {
  display: none !important;
}

.card-actions {
  margin-top: 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: flex-end;
}
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.15s ease, background 0.2s ease;
}

.link-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.8);
}

/* Contact */
.contact-wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.contact-card:nth-child(1) {
  grid-column: span 7;
}

.contact-card:nth-child(2) {
  grid-column: span 5;
}

.contact-form {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
}

.field span {
  color: #2b2b2b;
}

input,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: rgba(0, 0, 0, 0.32);
  background: rgba(255, 255, 255, 0.9);
}

.form-hint {
  font-size: 13px;
  color: var(--muted);
}

.contact-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.contact-item {
  text-decoration: none;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.6);
  transition: transform 0.15s ease, background 0.2s ease;
}

.contact-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.8);
}

.contact-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #2b2b2b;
}

.contact-value {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 700;
}

/* ─── Portfolio chatbot ──────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chatbot-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: 700 14px var(--font-body);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
}

.chatbot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245, 228, 78, 0.18);
}

.chatbot-launcher-icon {
  font-size: 18px;
  line-height: 0.7;
}

.chatbot {
  position: fixed;
  right: 24px;
  bottom: 84px;
  z-index: 901;
  width: min(380px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.chatbot.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chatbot-kicker {
  color: #777;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chatbot-head h2 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.1;
}

.chatbot-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #f0f0f0;
  color: #111;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 250px;
  margin: 16px 0 12px;
  padding: 3px 2px;
  overflow-y: auto;
}

.chat-message {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.45;
}

.assistant-message {
  align-self: flex-start;
  background: #f0f0f0;
}

.user-message {
  align-self: flex-end;
  background: #111;
  color: #fff;
}

.chatbot-suggestions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.chatbot-suggestions button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font: 600 12px var(--font-body);
  cursor: pointer;
}

.chatbot-suggestions button:hover {
  border-color: #111;
}

.chatbot-form {
  display: flex;
  gap: 8px;
}

.chatbot-form input {
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff;
}

.chatbot-form button {
  flex: 0 0 42px;
  border: 0;
  border-radius: 12px;
  background: var(--yellow);
  color: #111;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.chatbot-note {
  margin-top: 10px;
  color: #888;
  font-size: 11px;
  text-align: center;
}

.chatbot button:focus-visible,
.chatbot-launcher:focus-visible {
  outline: 3px solid rgba(245, 228, 78, 0.9);
  outline-offset: 3px;
}

/* Footer */
.footer {
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--muted);
  font-size: 13px;
}

/* Non-hero pages (blog, posts) need top padding since there's no
   full-height hero pushing content below the fixed/floating navbar */
.page-content {
  padding-top: 150px;
}

.page-content .section-head {
  padding-top: 0;
}

/* ─── Blog listing ───────────────────────────────────────────── */
.blog-grid {
  grid-template-columns: repeat(12, 1fr);
}

.blog-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
}

.blog-date {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* ─── Single post ────────────────────────────────────────────── */
.post {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: var(--card);
}

.back-link {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

.back-link-bottom {
  margin-top: 40px;
}

.post-header {
  margin: 18px 0 34px;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.post-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.post-meta time {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.post-tags {
  margin-top: 0;
}

.post-body {
  line-height: 1.75;
  font-size: 17px;
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  margin: 32px 0 12px;
}

.post-body p {
  margin: 16px 0;
  color: var(--text);
}

.post-body ul,
.post-body ol {
  margin: 16px 0 16px 22px;
}

.post-body li {
  margin: 6px 0;
}

.post-body a {
  color: #141414;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
  text-underline-offset: 3px;
}

.post-body a:hover {
  text-decoration-color: rgba(0, 0, 0, 0.8);
}

.post-body blockquote {
  margin: 20px 0;
  padding: 4px 20px;
  border-left: 3px solid var(--yellow);
  color: var(--muted);
  font-style: italic;
}

.post-body img {
  max-width: 100%;
  border-radius: 14px;
  margin: 20px 0;
}

.post-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
}

.post-body pre {
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: #171717;
  color: #eaeaea;
  overflow-x: auto;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.9em;
}

.post-body hr {
  margin: 32px 0;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ─── Responsive ─────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 900px) {
  .project {
    grid-column: span 6;
  }

  .contact-card:nth-child(1) {
    grid-column: span 12;
  }

  .contact-card:nth-child(2) {
    grid-column: span 12;
  }

  .blog-card {
    grid-column: span 12;
  }

  /* Always show carousel arrows on touch devices */
  .carousel-arrow {
    opacity: 1;
  }
}

/* ─── Mobile: hamburger activates ─────────────────────────────── */
@media (max-width: 768px) {

  /* Navbar becomes a fixed top bar */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    height: 60px;
    border-radius: 0;
    padding: 0 16px;
    justify-content: space-between;
    background: rgba(26, 26, 26, 0.6);
    /* semi-transparent so blur shows */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    /* Safari */
  }

  /* Show hamburger (left side) */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    order: -1;
  }

  /* Logo moves to the right */
  .logo {
    order: 2;
    margin-right: 0;
    margin-left: auto;
    width: 42px;
    height: 42px;
  }

  /* Nav pill becomes a dropdown panel */
  .nav-pill {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: auto;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: #1a1a1a;
    padding: 0 16px;
    transition: max-height 0.35s ease, padding 0.35s ease;
    z-index: 100;
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .navbar.open .nav-pill {
    max-height: 320px;
    padding: 12px 16px 20px;
  }

  .links {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 12px;
    justify-content: flex-start;
  }

  /* Push hero down to account for fixed navbar */
  .hero {
    padding-top: 120px;
  }

  .page-content {
    padding-top: 90px;
  }

  /* Status badge repositioned */
  .status {
    top: 74px;
  }

  /* Badge scaled down */
  .badge-top {
    font-size: 24px;
  }

  .badge-bottom {
    font-size: 16px;
  }

  .avatar-placeholder {
    width: 42px;
    height: 42px;
  }

  /* Skills cards stack */
  .skills-grid .card {
    grid-column: span 12;
  }

  .project {
    grid-column: span 12;
  }

  .section-head {
    padding: 40px 0 16px;
  }

  /* Modal arrows smaller */
  .modal-arrow {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .modal-prev {
    left: 10px;
  }

  .modal-next {
    right: 10px;
  }

  .modal-image {
    max-width: 95vw;
    max-height: 80vh;
    border-radius: 8px;
  }
}

/* ─── Small screens ───────────────────────────────────────────── */
@media (max-width: 480px) {

  .hero {
    padding: 100px 12px 50px;
  }

  .hero-title {
    font-size: clamp(32px, 9vw, 48px);
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .badge {
    display: none;
  }

  .content {
    width: calc(100% - 24px);
  }

  .card {
    padding: 14px;
  }

  .contact-form {
    gap: 10px;
  }

  .footer {
    text-align: center;
  }

  .chatbot-launcher {
    right: 12px;
    bottom: 12px;
  }

  .chatbot {
    right: 12px;
    bottom: 72px;
    width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chatbot,
  .chatbot-launcher {
    transition: none;
  }
}