:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-hover: #1c2330;
  --border: #21262d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --nav-height: 64px;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #0d1117;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.nav.scrolled {
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  gap: 28px;
}

.nav__link {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.nav__link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---- Sections ---- */
.section {
  padding: 96px 0;
  scroll-margin-top: var(--nav-height);
}

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  margin: 0 0 8px;
}

.section__subtitle {
  color: var(--text-muted);
  margin: 0 0 40px;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero__content {
  flex: 1 1 520px;
  min-width: 0;
}

.hero__photo {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.hero__photo img {
  width: clamp(180px, 22vw, 260px);
  height: clamp(180px, 22vw, 260px);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 8px var(--accent-soft), 0 20px 50px rgba(0, 0, 0, 0.4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 20px;
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.hero__eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.hero__name {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.1;
}

.hero__title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.hero__intro {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 36px;
}

.hero__intro strong {
  color: var(--text);
  font-weight: 600;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

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

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--disabled {
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
  font-family: inherit;
}

.btn--disabled:hover {
  transform: none;
}

/* ---- Professional Profile ---- */
.profile__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0 0 32px;
}

.quote-box {
  max-width: 720px;
  margin: 0;
  padding: 20px 28px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
  color: var(--text);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.5;
}

/* ---- Skills ---- */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.skill-category {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.skill-category:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.skill-category__icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 16px;
}

.skill-category__title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.skill-category__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- Projects ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

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

.filter-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.projects-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.project-card--placeholder {
  border-style: dashed;
  opacity: 0.75;
}

.project-card--placeholder:hover {
  transform: none;
  border-color: var(--border);
}

.project-card__title {
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.project-card__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 20px;
  flex-grow: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.project-card__links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.link--disabled {
  color: var(--text-muted);
  pointer-events: none;
  border-color: transparent;
}

/* ---- Certifications ---- */
.cert-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  max-width: 560px;
}

.cert-card__mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #f4f7f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
}

.cert-card__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cert-card__title {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.cert-card__org {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.cert-card__desc {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 0.25s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---- Contact ---- */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-link:hover {
  transform: translateX(4px);
  border-color: var(--accent);
  color: var(--accent);
}

.contact-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- Fade-in animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav__links.open {
    max-height: 420px;
  }

  .nav__link {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }

  .nav__toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

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

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

  .section {
    padding: 72px 0;
  }

  .hero__inner {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .hero__intro {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__photo img {
    width: 180px;
    height: 180px;
  }
}

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

  .fade-in {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
