:root {
  --bg: #1e1f2a;
  --card: #343543;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --text-soft: #d4d4dc;
  --text-muted: #a1a1aa;
  --text-dim: #7b7b87;
  --white: #ffffff;
  --black: #111111;
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 999;
  pointer-events: none;
  background: transparent;
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35));
  transition: transform 0.12s linear;
}

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

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

.site-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 64px;
}

/* HEADER */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(30, 31, 42, 0.88);
  backdrop-filter: blur(10px);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.eyebrow,
.section-label,
.card-label,
.section-kicker,
.section-note,
.lang-switcher span {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
}

.brand-title {
  margin: 6px 0 0;
  font-size: 1.1rem;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 34px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--white);
}

/* LANGUAGE SWITCHER */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 8px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.lang-btn.active {
  background: var(--white);
  color: var(--black);
}

/* HERO */

.hero {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 32px;
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.hero-title {
  font-size: clamp(2.9rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 16px 0 22px;
  max-width: 820px;
}

.hero-copy,
.text-stack p,
.section-intro,
.card-copy,
.repo-desc,
.featured-desc,
.link-value {
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 1.05rem;
}

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

.hero-sidecards {
  display: grid;
  gap: 18px;
  grid-auto-rows: min-content;
  align-self: center;
}

.hero-sidecards .soft-card {
  padding: 14px 16px;
  border-radius: 24px;
  background: var(--card);
}

.hero-sidecards .soft-card:first-child {
  padding: 24px 20px 28px;
}

.hero-sidecards .card-title {
  margin: 6px 0 8px;
  font-size: 1.22rem;
  line-height: 1.1;
}


.hero-sidecards .card-copy {
  font-size: 0.9rem;
  line-height: 1.48;
}

.card-label {
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  opacity: 0.75;
}

/* BUTTONS */

.btn {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.btn-primary {
  background: var(--white);
  color: var(--black);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  background: #f2f2f4;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  color: var(--white);
}

/* CARDS */

.card,
.repo-card,
.featured-card,
.link-card,
.panel-card,
.soft-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  transition: 0.2s ease;
}

.soft-card,
.panel-card,
.repo-card,
.featured-card,
.link-card {
  padding: 20px;
}

.card:hover,
.repo-card:hover,
.featured-card:hover,
.link-card:hover,
.panel-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.soft-card:hover,
.repo-card:hover,
.featured-card:hover,
.panel-card:hover,
.link-card:hover {
  background: var(--card);
}

/* MOTION */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.58s ease, transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

.card.reveal.in-view:hover,
.repo-card.reveal.in-view:hover,
.featured-card.reveal.in-view:hover,
.link-card.reveal.in-view:hover,
.panel-card.reveal.in-view:hover {
  transform: translateY(-3px);
}

/* SECTIONS */

.section {
  padding: 64px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skills-stack {
  display: grid;
  gap: 20px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
}

.section-title {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin: 12px 0 0;
  max-width: 560px;
}

.section-title.small {
  font-size: 1.45rem;
  margin-bottom: 0;
}

.two-col-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.two-col-head .section-intro {
  max-width: 640px;
}

.section-block + .section-block {
  margin-top: 42px;
}

/* ABOUT */

.about-refined {
  align-items: start;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.about-intro {
  display: grid;
  gap: 14px;

}

.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.meta-pill {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-soft);
  font-size: 0.84rem;
}

.about-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 0;
  padding: 0;
  width: auto;
  min-width: 0;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.profile-role {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--text-soft);
}

.profile-location {
  margin: 1px 0 0;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  color: var(--text-dim);
}

.profile-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  width: fit-content;
  letter-spacing: 0.01em;
}

.about-copy {
  max-width: 820px;
  padding-top: 64px;
}

#about .section-title {
  max-width: 500px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.08;
}


/* REPO THUMBNAIL */

.repo-thumb {
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  display: block;
  background: var(--bg);
}


/* FEATURED THUMBNAIL */

.featured-thumb {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  display: block;
  background: var(--bg);
}

/* PROJECTS */

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

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

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

.featured-title,
.repo-title,
.link-value {
  margin: 12px 0 10px;
  font-size: 1.35rem;
  color: var(--text);
}

.featured-actions,
.repo-actions {
  margin-top: 20px;
}

.mini-btn {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--text);
  background: transparent;
  transition: 0.2s ease;
}

.mini-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}

/* PILLS */

.repo-meta,
.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.pill,
.repo-pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.84rem;
  background: rgba(0, 0, 0, 0.18);
}

/* STACKS */

.stack-list,
.stack-links,
.text-stack {
  display: grid;
  gap: 12px;
}

.text-stack p,
.hero-copy {
  margin: 0;
}

.hero-copy + .hero-copy {
  margin-top: 12px;
}

#certifications-list,
#skills-list {
  margin-top: 16px;
}

.cert-item {
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-soft);
}

.link-card {
  display: block;
  padding: 16px 20px;
}

.link-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* FOOTER */

.footer {
  padding: 28px 0 0;
  display: flex;
  justify-content: center;
  text-align: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero,
  .split-section,
  .grid-2,
  .grid-3,
  .two-col-head,
  .footer,
  .topbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
    gap: 18px;
  }

  .about-profile {
    width: auto;
    max-width: 100%;
    margin-top: 0;
  }

  .about-refined {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-copy {
    padding-top: 0;
  }


  .footer {
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .footer p {
    width: 100%;
    text-align: center;
    margin: 0;
  }

}

@media (max-width: 640px) {
  .site-shell {
    padding: 18px 16px 48px;
  }

  .hero {
    padding: 42px 0;
  }

  .section {
    padding: 42px 0;
  }

  .hero-title {
    font-size: 2.9rem;
  }

  .about-profile {
    gap: 12px;
  }

  .profile-photo {
    width: 60px;
    height: 60px;
  }

  #about .section-title {
    font-size: 2.5rem;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    display: none;
  }

  .reveal,
  .reveal.in-view {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
