:root {
  color-scheme: dark;
  --bg: #0f1115;
  --bg-soft: #171b22;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.76);
  --accent: #d67d42;
  --accent-soft: #7fd1ca;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
  font-family: "Manrope", sans-serif;
  line-height: 1.5;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(214, 125, 66, 0.18), transparent 24%),
    radial-gradient(circle at right 20%, rgba(127, 209, 202, 0.1), transparent 22%),
    linear-gradient(135deg, #16120f 0%, var(--bg) 42%, #10151c 100%);
}

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

button {
  font: inherit;
}

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

.page-shell {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 96px);
  opacity: 0.45;
}

.bg-orb {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  pointer-events: none;
}

.orb-left {
  top: -8rem;
  left: -8rem;
  background: #cb5f2d;
}

.orb-right {
  right: -10rem;
  bottom: 4rem;
  background: #256b71;
}

.topbar,
.content {
  width: min(1120px, calc(100% - 2rem));
}

.topbar {
  position: fixed;
  top: 0.8rem;
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  transform: translateX(-50%);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(17, 18, 21, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand,
.theme-toggle,
.menu-toggle {
  border-radius: 999px;
}

.brand {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav a,
.theme-toggle,
.menu-toggle,
.button,
.slider-button,
.to-top,
.contact-links a {
  transition:
    transform 0.24s ease,
    background 0.24s ease,
    border-color 0.24s ease,
    color 0.24s ease,
    box-shadow 0.24s ease;
}

.nav a {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  color: var(--muted);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.theme-toggle,
.menu-toggle,
.slider-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  padding: 0.72rem 1rem;
}

.menu-toggle {
  display: none;
  padding: 0.72rem 1rem;
}

.content {
  margin: 0 auto;
  padding: 7.4rem 0 4rem;
}

.hero,
.section,
.education-banner,
.contact-banner,
.stats-grid {
  animation: reveal 0.7s ease both;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 1.4rem;
  align-items: stretch;
  padding: 3rem 0 1.5rem;
}

.hero-copy,
.hero-card,
.author-copy,
.stack-panel,
.education-copy,
.education-side {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
}

h1,
h2,
h3,
.hero-card-value,
.stat-card strong {
  font-family: "Space Grotesk", sans-serif;
}

.hero h1,
.section h2,
.contact-banner h2,
.education-copy h2 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(2.4rem, 5.8vw, 4.7rem);
}

.hero h1 span {
  color: var(--accent-soft);
}

.lede,
.hero-card p,
.author-copy p,
.project-card p,
.service-card p,
.review-card p,
.about-copy p,
.contact-text,
.education-copy p,
.education-item span,
.stack-group p {
  color: var(--muted);
}

.lede {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button,
.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.button:hover,
.contact-links a:hover,
.theme-toggle:hover,
.menu-toggle:hover,
.slider-button:hover,
.to-top:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--text);
  color: #111318;
}

.button-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.hero-card,
.stat-card,
.author-card,
.project-card,
.service-card,
.review-card,
.stack-group,
.education-banner,
.education-item,
.contact-banner,
.skills-panel,
.skill-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card,
.author-card,
.contact-banner,
.education-banner {
  border-radius: 2rem;
}

.hero-card {
  overflow: hidden;
}

.hero-card-image img {
  min-height: 24rem;
  object-fit: cover;
}

.hero-card-caption {
  display: grid;
  gap: 0.5rem;
  padding: 1.35rem;
}

.hero-card-label,
.project-type,
.author-kicker {
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.hero-card-value {
  font-size: clamp(1.5rem, 2.7vw, 2.4rem);
  line-height: 1;
}

.stats-grid,
.projects-grid,
.services-grid {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2rem;
}

.stat-card {
  padding: 1.35rem 1.4rem;
  border-radius: 1.5rem;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
}

.section {
  padding-top: 3.3rem;
}

.section-heading {
  display: grid;
  gap: 0.75rem;
  max-width: 54rem;
}

.section h2,
.contact-banner h2,
.education-copy h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.author-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 1.4rem;
  margin-top: 2rem;
  padding: 1.4rem;
}

.author-photo,
.education-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.5rem;
}

.author-copy h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.author-facts {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.author-facts li,
.skill-chip {
  padding: 0.9rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.projects-grid,
.services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.project-card,
.service-card {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 1.2rem;
  border-radius: 1.5rem;
  overflow: hidden;
}

.project-card img,
.service-card img {
  width: 100%;
  height: 12.5rem;
  object-fit: cover;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.04);
}

.project-card-body,
.service-card-body {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding-top: 1rem;
}

.project-card h3,
.service-card h3,
.stack-group h3 {
  margin: 0;
  font-size: 1.25rem;
}

.project-card p,
.service-card p {
  margin: 0;
}

.reviews-slider {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: stretch;
  margin-top: 2rem;
}

.slider-button {
  width: 3.4rem;
  min-width: 3.4rem;
  border-radius: 50%;
}

.review-card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.6rem;
  min-height: 16rem;
}

.review-card blockquote,
.review-card p {
  margin: 0;
}

.review-card blockquote {
  font-size: 1.1rem;
  line-height: 1.7;
}

.review-meta {
  display: grid;
  gap: 0.2rem;
}

.review-meta strong {
  font-size: 1rem;
}

.review-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pagination-dot {
  width: 0.8rem;
  height: 0.8rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.pagination-dot.is-active {
  background: var(--accent-soft);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 1.2rem;
  margin-top: 2rem;
}

.skills-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
  padding: 1rem;
  border-radius: 1.6rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
}

.skill-chip img {
  width: 1.25rem;
  height: 1.25rem;
}

.stack-panel {
  display: grid;
  gap: 1rem;
}

.stack-group {
  padding: 1.2rem;
  border-radius: 1.4rem;
}

.education-banner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 3.3rem;
  padding: 1.4rem;
  align-items: start;
}

.education-points {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.education-item {
  display: grid;
  gap: 0.4rem;
  padding: 1rem 1.1rem;
  border-radius: 1.2rem;
}

.education-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.education-visual {
  position: relative;
}

.education-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 1.5rem;
}

.education-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 241, 234, 0.16);
  background: rgba(17, 19, 24, 0.82);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.contact-banner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  align-items: start;
  margin-top: 3.3rem;
  padding: 1.6rem;
}

.contact-links {
  display: grid;
  gap: 0.7rem;
}

.contact-links a {
  justify-content: flex-start;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-soft);
}

.contact-links a:hover {
  color: var(--text);
}

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(15, 16, 19, 0.78);
  box-shadow: var(--shadow);
}

body.theme-light {
  color-scheme: light;
  --bg: #f3efe7;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(26, 35, 46, 0.12);
  --text: #18202a;
  --muted: rgba(24, 32, 42, 0.74);
  --accent: #b76028;
  --accent-soft: #256b71;
  --shadow: 0 20px 55px rgba(35, 42, 52, 0.1);
  background:
    radial-gradient(circle at top left, rgba(214, 125, 66, 0.12), transparent 24%),
    radial-gradient(circle at right 20%, rgba(37, 107, 113, 0.09), transparent 22%),
    linear-gradient(135deg, #fffdf8 0%, #f5efe5 44%, #edf3f4 100%);
}

body.theme-light .page-shell::before {
  background:
    linear-gradient(120deg, rgba(24, 32, 42, 0.02), transparent 28%, transparent 72%, rgba(24, 32, 42, 0.02)),
    repeating-linear-gradient(90deg, rgba(24, 32, 42, 0.03) 0, rgba(24, 32, 42, 0.03) 1px, transparent 1px, transparent 96px);
}

body.theme-light .topbar {
  background: rgba(255, 252, 247, 0.88);
}

body.theme-light .button-primary {
  background: linear-gradient(135deg, #cb5f2d, #a74e22);
  color: #fffdf8;
}

body.theme-light .button-secondary,
body.theme-light .contact-links a,
body.theme-light .theme-toggle,
body.theme-light .menu-toggle,
body.theme-light .slider-button,
body.theme-light .to-top {
  background: rgba(255, 255, 255, 0.84);
}

body.theme-light .contact-links a {
  color: #256b71;
}

.nav.is-open {
  display: flex;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

@media (max-width: 960px) {
  .hero,
  .author-card,
  .about-grid,
  .projects-grid,
  .services-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .education-points {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    border-radius: 1.5rem;
  }

  .menu-toggle {
    display: inline-flex;
    justify-content: center;
  }

  .nav {
    position: absolute;
    top: calc(100% + 0.7rem);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 1.4rem;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
  }

  .nav a {
    display: flex;
    justify-content: center;
  }

  .theme-toggle {
    justify-self: end;
  }

  .content {
    padding-top: 8.9rem;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.15rem, 10.5vw, 3.8rem);
  }

  .reviews-slider {
    grid-template-columns: 1fr;
  }

  .slider-button {
    width: 100%;
    border-radius: 999px;
  }

  .hero-card-image img,
  .author-photo,
  .project-card img,
  .service-card img {
    min-height: 14rem;
  }

  .education-photo {
    aspect-ratio: 16 / 10;
  }

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

@media (max-width: 480px) {
  .topbar,
  .content {
    width: min(1120px, calc(100% - 1rem));
  }

  .topbar {
    gap: 0.6rem;
    padding: 0.85rem;
  }

  .brand {
    width: 2.7rem;
    height: 2.7rem;
  }

  .menu-toggle,
  .theme-toggle {
    padding: 0.65rem 0.8rem;
    font-size: 0.92rem;
  }

  .hero-actions,
  .skills-panel {
    grid-template-columns: 1fr;
  }

  .button,
  .contact-links a {
    width: 100%;
  }
}
