:root {
  color-scheme: light;
  --color-primary: #1E1E2F;
  --color-secondary: #FF6B6B;
  --color-accent: #FFD93D;
  --color-background: #F5F5F5;
  --color-surface: #FFFFFF;
  --color-muted: rgba(30, 30, 47, 0.65);
  --color-text-light: rgba(245, 245, 245, 0.96);
  --color-text-light-soft: rgba(245, 245, 245, 0.86);
  --shadow-lg: 0 20px 45px rgba(30, 30, 47, 0.25);
  --shadow-md: 0 12px 30px rgba(30, 30, 47, 0.18);
  --shadow-sm: 0 6px 18px rgba(30, 30, 47, 0.14);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --max-width: 1200px;
  --font-heading: "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-gaming: "Oxanium", sans-serif;
  --font-finance: "IBM Plex Sans", sans-serif;
  --font-tech: "Fira Code", monospace;
  --font-extras: "Inter", sans-serif;
  --font-portfolio: "Roboto", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: #060b1f;
  color: var(--color-primary);
  line-height: 1.6;
}

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

a:hover,
a:focus {
  color: var(--color-secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

section {
  padding: 6rem 1.5rem;
  position: relative;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-secondary);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 999;
}

.skip-link:focus {
  left: 1rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  text-align: center;
  color: var(--color-background);
  background: #1E1E2F;
  overflow: hidden;
}

.hero__video,
.section-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero__video {
  z-index: 0;
  filter: brightness(0.85);
}

.section-video {
  z-index: -2;
  filter: brightness(0.5);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 30, 47, 0.88), rgba(30, 30, 47, 0.55));
  z-index: 1;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: min(960px, 100%);
  padding: 2.5rem;
  background: rgba(30, 30, 47, 0.55);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(6px);
  text-align: left;
}

.hero__inner {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 28vw, 320px);
  align-items: center;
}

.hero__copy {
  display: grid;
  gap: 1.1rem;
  align-content: start;
}

.hero__kicker {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--color-accent);
  margin: 0;
}

.hero__content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin: 0;
}

.hero__subheading {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 600;
  margin: 0;
  color: var(--color-accent);
}

.hero__body {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: rgba(245, 245, 245, 0.9);
}

.hero__cta {
  padding: 0.9rem 2.5rem;
  background: var(--color-secondary);
  color: var(--color-background);
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
  justify-self: start;
  margin-top: 0.5rem;
}

.hero__cta:hover,
.hero__cta:focus {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: #ff5b5b;
}

.hero__portrait {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.hero__portrait-frame {
  width: clamp(220px, 28vw, 320px);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  padding: 6px;
  background: linear-gradient(160deg, rgba(255, 107, 107, 0.8), rgba(255, 217, 61, 0.65));
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
}

.hero__portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 6px);
  filter: saturate(0.95);
  background: rgba(30, 30, 47, 0.85);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 1px, 1px);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* Chapters */
.chapter {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --chapter-image: none;
}

.chapter__inner {
  display: grid;
  align-items: center;
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chapter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  z-index: -1;
  background-image: linear-gradient(180deg, rgba(30, 30, 47, 0.72), rgba(30, 30, 47, 0.4)), var(--chapter-image);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat;
  opacity: 0.35;
  transition: opacity 320ms ease;
  pointer-events: none;
  transform: translateX(-50%);
}

.chapter.is-visible::before {
  opacity: 0.5;
}

.chapter--alt .chapter__media {
  order: 2;
}

.chapter__media {
  position: relative;
}

.chapter__gif {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.chapter__icon-wrapper {
  --icon-ring-size: clamp(4rem, 6vw, 5rem);
  position: absolute;
  bottom: calc(var(--icon-ring-size) * -0.5);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  flex-wrap: wrap;
}

.chapter__icon {
  width: var(--icon-ring-size);
  height: var(--icon-ring-size);
  padding: 0;
  border-radius: 50%;
  background: rgba(18, 18, 32, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
}

.chapter__icon img {
  width: clamp(2.5rem, 4vw, 3.25rem);
  height: clamp(2.5rem, 4vw, 3.25rem);
}

.chapter__content h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1.25rem;
  color: var(--color-text-light);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.chapter__content p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--color-text-light-soft);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.chapter__content strong {
  color: var(--color-text-light);
}

.chapter__content em {
  color: rgba(255, 217, 61, 0.9);
  font-style: normal;
}

@media (min-width: 1024px) {
  #chapter3 .chapter__content h2 {
    font-size: 2.6rem;
    white-space: nowrap;
  }
}

[data-font="gaming"] {
  font-family: var(--font-gaming);
}

[data-font="finance"] {
  font-family: var(--font-finance);
}

[data-font="tech"] {
  font-family: var(--font-tech);
}

[data-font="extras"] {
  font-family: var(--font-extras);
}

/* Section headings */
.section-heading {
  max-width: 720px;
  margin: 0 auto 3rem auto;
  text-align: center;
}

.portfolio .section-heading {
  max-width: 920px; /* allow longer title to stay on one line */
}

.section-heading__title {
  margin: 0 0 1rem 0;
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1.1;
}

.section-heading__subtitle {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.15rem, 2.8vw, 1.5rem);
  font-weight: 500;
  color: var(--color-accent);
}

.section-heading h2:not(.section-heading__title) {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.section-heading p {
  color: var(--color-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.chapter .section-heading,
.portfolio .section-heading,
.extras .section-heading,
.contact .section-heading {
  color: var(--color-text-light-soft);
}

.chapter .section-heading h2,
.portfolio .section-heading h2,
.extras .section-heading h2,
.contact .section-heading h2,
.portfolio .section-heading__title {
  color: var(--color-text-light);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.chapter .section-heading p,
.portfolio .section-heading p,
.extras .section-heading p,
.contact .section-heading p {
  color: var(--color-text-light-soft);
}

.portfolio .section-heading__subtitle {
  color: rgba(255, 217, 61, 0.9);
}

.portfolio .section-heading p,
.extras .section-heading p,
.contact .section-heading p {
  color: var(--color-text-light-soft);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.chapter .section-heading p {
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

/* Portfolio */
.portfolio {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
  font-family: var(--font-portfolio);
  color: var(--color-text-light-soft);
}

.portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(30, 30, 47, 0.8), rgba(30, 30, 47, 0.55));
  pointer-events: none;
}

.portfolio__tags {
  max-width: var(--max-width);
  margin: 0 auto 3rem auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.portfolio__roadmap {
  max-width: min(1200px, 95vw);
  margin: 0 auto 2.75rem auto;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.portfolio__roadmap-header {
  text-align: center;
  display: grid;
  gap: 0.4rem;
}

.portfolio__roadmap-header h3 {
  margin: 0;
  font-size: clamp(1.4rem, 1vw + 1.2rem, 2rem);
  color: var(--color-text-light);
}

.roadmap {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: start;
}

.roadmap__month {
  background: rgba(12, 18, 32, 0.72);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  padding: 1.6rem 1.5rem;
  display: grid;
  gap: 1rem;
  text-align: center;
}

.roadmap__month h4 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 217, 61, 0.85);
}

.roadmap__bubbles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.roadmap__bubble {
  display: grid;
  gap: 0.35rem;
  align-items: flex-start;
  padding: 0.8rem 1rem;
  background: rgba(30, 30, 47, 0.65);
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 200px;
  flex: 1 1 210px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  text-align: left;
}

.roadmap__bubble:hover,
.roadmap__bubble:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
  border-color: rgba(255, 217, 61, 0.3);
  outline: none;
}

.roadmap__bubble:focus-visible {
  outline: 2px solid rgba(255, 217, 61, 0.6);
  outline-offset: 3px;
}

.roadmap__course {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.roadmap__provider {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(245, 245, 245, 0.6);
}

@media (max-width: 720px) {
  .portfolio__roadmap {
    margin-bottom: 2.2rem;
  }

  .roadmap {
    grid-template-columns: 1fr;
  }

  .roadmap__month {
    padding: 1.4rem;
  }

  .roadmap__bubble {
    min-width: auto;
    flex: 1 1 100%;
  }
}

.portfolio__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: rgba(30, 30, 47, 0.65);
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid rgba(255, 217, 61, 0.25);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  text-align: center;
  white-space: normal;
}

.portfolio__tag:hover,
.portfolio__tag:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  background: rgba(255, 107, 107, 0.7);
  border-color: rgba(255, 217, 61, 0.45);
  outline: none;
}

.portfolio__tag:not(a) {
  cursor: default;
}

.portfolio__tag:focus-visible {
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(255, 217, 61, 0.5);
}

.portfolio__grid {
  max-width: min(1500px, 95vw);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.portfolio__card {
  background: rgba(10, 18, 32, 0.9);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 240ms ease, box-shadow 240ms ease;
  color: var(--color-text-light);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio__card img {
  border-radius: 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.portfolio__body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: linear-gradient(180deg, rgba(13, 21, 36, 0.95), rgba(8, 14, 25, 0.92));
}

.portfolio__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.portfolio__header h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

.portfolio__cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 217, 61, 0.98), rgba(255, 173, 51, 0.92));
  color: var(--color-primary);
  box-shadow: 0 10px 22px rgba(255, 204, 77, 0.3);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.portfolio__cta:hover,
.portfolio__cta:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(255, 204, 77, 0.4);
  background: linear-gradient(135deg, rgba(255, 217, 61, 1), rgba(255, 173, 51, 1));
}

.portfolio__cta:focus-visible {
  outline: 2px solid rgba(255, 217, 61, 0.9);
  outline-offset: 3px;
}

.portfolio__status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.portfolio__status--progress {
  background: rgba(76, 201, 240, 0.18);
  color: #4cc9f0;
  border: 1px solid rgba(76, 201, 240, 0.45);
}

.portfolio__status--done {
  background: rgba(76, 240, 162, 0.18);
  color: #4cf0a6;
  border: 1px solid rgba(76, 240, 162, 0.45);
}

.portfolio__summary {
  margin: 0;
  color: rgba(245, 245, 245, 0.8);
  font-size: 1rem;
  line-height: 1.6;
}

.portfolio__highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  color: rgba(245, 245, 245, 0.78);
  font-size: 0.95rem;
  line-height: 1.6;
}

.portfolio__highlights li {
  position: relative;
  padding-left: 1.5rem;
}

.portfolio__highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--color-accent);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(255, 217, 61, 0.45);
}

.portfolio__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.portfolio__skill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  background: rgba(76, 201, 240, 0.12);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(193, 236, 255, 0.92);
  border: 1px solid rgba(76, 201, 240, 0.35);
}

.portfolio__skill--alt {
  background: rgba(255, 121, 198, 0.12);
  color: rgba(255, 189, 244, 0.92);
  border-color: rgba(255, 121, 198, 0.35);
}

.portfolio__skill--accent {
  background: rgba(255, 217, 61, 0.12);
  color: rgba(255, 237, 140, 0.92);
  border-color: rgba(255, 217, 61, 0.35);
}

/* Extras carousel */
.extras {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
  color: var(--color-text-light-soft);
}

.extras::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(30, 30, 47, 0.75), rgba(30, 30, 47, 0.45));
  pointer-events: none;
}

.extras__carousel {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.carousel__control {
  background: var(--color-primary);
  color: var(--color-background);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.carousel__control:hover,
.carousel__control:focus {
  background: var(--color-secondary);
  transform: translateY(-2px);
}

.carousel__control[disabled] {
  opacity: 0.4;
  pointer-events: none;
  transform: none;
}

.carousel__viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  padding: 1rem;
  transition: transform 400ms ease;
  align-items: stretch;
  will-change: transform;
}

.carousel__item {
  background: rgba(30, 30, 47, 0.82);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  text-align: center;
  color: var(--color-text-light);
  flex: 0 0 100%;
}

.carousel__item img,
.carousel__item video {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
  display: block;
  width: 100%;
}

.carousel__copy {
  padding: 1.5rem;
}

.carousel__copy h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-light);
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.carousel__channel-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.18);
  color: var(--color-text-light);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: none;
  text-align: center;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.carousel__channel-link:hover,
.carousel__channel-link:focus {
  background: rgba(255, 107, 107, 0.28);
  border-color: rgba(255, 107, 107, 0.75);
  box-shadow: 0 10px 24px rgba(255, 107, 107, 0.35);
  transform: translateY(-1px);
}

.carousel__channel-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.carousel__channel-icon {
  width: 42px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 107, 107, 0.95);
  background: rgba(6, 11, 31, 0.4);
  border-radius: 12px;
  transition: transform 150ms ease, color 150ms ease, background-color 150ms ease;
}

.carousel__channel-link:hover .carousel__channel-icon,
.carousel__channel-link:focus .carousel__channel-icon {
  transform: translateY(-2px);
  color: rgba(255, 217, 61, 0.95);
  background: rgba(6, 11, 31, 0.7);
}

.carousel__channel-icon svg {
  width: 24px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.carousel__channel-label {
  font-size: 1.05rem;
}

.carousel__copy p {
  font-size: 1.1rem;
  color: var(--color-text-light-soft);
}

/* Blog */
.hero--blog {
  min-height: 60vh;
  background: radial-gradient(120% 140% at 50% 0%, rgba(255, 107, 107, 0.18), rgba(6, 11, 31, 0.96));
}

.hero--blog .hero__overlay {
  background: linear-gradient(160deg, rgba(30, 30, 47, 0.9), rgba(12, 18, 32, 0.75));
}

.hero--post {
  min-height: clamp(260px, 45vh, 420px);
}

.hero--post .hero__content {
  max-width: min(760px, 92vw);
  background: rgba(30, 30, 47, 0.6);
}

.hero__inner--single {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.hero__inner--single .hero__copy {
  justify-items: center;
  text-align: center;
  display: grid;
  gap: 1.1rem;
}

.blog-search {
  width: min(520px, 90vw);
  display: block;
}

.blog-search input {
  width: 100%;
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 245, 245, 0.16);
  background: rgba(12, 18, 32, 0.7);
  color: var(--color-text-light);
  font-size: 1rem;
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.blog-search input::placeholder {
  color: rgba(245, 245, 245, 0.62);
}

.blog-search input:focus {
  outline: none;
  border-color: rgba(255, 217, 61, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 217, 61, 0.22);
  background: rgba(12, 18, 32, 0.9);
}

.blog-article-section .portfolio__grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.blog-article__wrapper {
  max-width: min(900px, 92vw);
  margin: 0 auto;
}

.blog-article__card {
  border-radius: var(--radius-lg);
}

.blog-card__cover {
  display: block;
  position: relative;
  overflow: hidden;
}

.blog-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 11, 31, 0) 55%, rgba(6, 11, 31, 0.55) 100%);
  opacity: 0;
  transition: opacity 240ms ease;
}

.blog-card__cover:hover::after,
.blog-card__cover:focus-visible::after {
  opacity: 1;
}

.blog-card__cover:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 217, 61, 0.35);
}

.blog-card__title {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 200ms ease, text-shadow 200ms ease;
}

.blog-card__title:hover,
.blog-card__title:focus-visible {
  color: rgba(255, 217, 61, 0.95);
  text-shadow: 0 10px 24px rgba(255, 217, 61, 0.25);
}

.blog-card__title:focus-visible {
  outline: none;
  text-decoration: underline;
}

.blog-footer {
  display: grid;
  gap: 0.6rem;
  text-align: center;
  color: rgba(245, 245, 245, 0.75);
}

.blog-footer__home {
  margin: 0;
}

.blog-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 217, 61, 0.95), rgba(255, 173, 51, 0.9));
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 24px rgba(255, 204, 77, 0.3);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.blog-home-link:hover,
.blog-home-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(255, 204, 77, 0.4);
}

.blog-home-link:focus-visible {
  outline: 2px solid rgba(255, 217, 61, 0.85);
  outline-offset: 3px;
}

.blog-footer__quip {
  margin: 0;
  font-size: 0.95rem;
}

.blog-article__card .portfolio__body {
  gap: 2rem;
}

.blog-article {
  display: grid;
  gap: 1.45rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(245, 245, 245, 0.88);
}

.blog-article h1,
.blog-article h2,
.blog-article h3 {
  font-family: var(--font-heading);
  line-height: 1.25;
  margin: 0;
  color: var(--color-text-light);
}

.blog-article h1 {
  font-size: clamp(2.1rem, 4vw, 2.65rem);
}

.blog-article h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.2rem);
  margin-top: 1.6rem;
}

.blog-article h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  margin-top: 1.2rem;
}

.blog-article p {
  margin: 0;
}

.blog-article ul,
.blog-article ol {
  margin: 0;
  padding-left: 1.5rem;
  display: grid;
  gap: 0.5rem;
}

.blog-article blockquote {
  margin: 0;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid rgba(255, 217, 61, 0.6);
  border-radius: var(--radius-md);
  background: rgba(12, 18, 32, 0.65);
  color: rgba(245, 245, 245, 0.85);
  box-shadow: var(--shadow-sm);
}

.blog-article pre {
  margin: 0;
  padding: 1.15rem 1.25rem;
  background: rgba(6, 11, 31, 0.92);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

.blog-article code {
  background: rgba(12, 18, 32, 0.7);
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-tech);
  font-size: 0.92em;
}

.blog-article pre code {
  background: transparent;
  padding: 0;
}

.blog-article a {
  color: rgba(255, 217, 61, 0.95);
  text-decoration: underline;
}

.blog-article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.blog-card__meta {
  margin: 0 0 0.75rem 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 245, 245, 0.62);
}

.blog-card__meta time {
  color: inherit;
}

#blog-posts .portfolio__grid[data-empty="true"] {
  display: grid;
}

#blog-posts .portfolio__grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  justify-content: flex-start;
  justify-items: start;
  gap: 2rem;
  max-width: min(95vw, calc(420px * 3 + 2rem * 2));
  margin: 0 auto;
}

.blog-card {
  width: min(100%, 420px);
  justify-self: start;
}

.blog-empty {
  grid-column: 1 / -1;
  padding: 2.25rem 1.75rem;
  border-radius: var(--radius-lg);
  background: rgba(12, 18, 32, 0.68);
  border: 1px solid rgba(245, 245, 245, 0.08);
  color: var(--color-text-light-soft);
  text-align: center;
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 900px) {
  .carousel__item {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

@media (min-width: 1280px) {
  .carousel__item {
    flex: 0 0 calc(33.333% - 1rem);
  }
}

/* Contact */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
  color: var(--color-text-light-soft);
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(30, 30, 47, 0.8), rgba(30, 30, 47, 0.5));
  pointer-events: none;
}

.contact__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact__card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--color-primary);
}

.contact__card h3 {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin: 0;
}

.contact__card a {
  color: var(--color-secondary);
  font-weight: 600;
  word-break: break-word;
}

.contact__card--social img {
  width: 36px;
  height: 36px;
  margin-right: 0.75rem;
}

.contact__icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--color-primary);
  color: rgba(245, 245, 245, 0.85);
  position: relative;
  font-family: var(--font-heading);
}

.site-footer p {
  margin: 0;
  font-size: 1rem;
}

/* Hover cards */
.hover-card {
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.hover-card:hover,
.hover-card:focus-within {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

/* Tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(10px);
  background: var(--color-primary);
  color: var(--color-background);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, transform 220ms ease;
  white-space: nowrap;
  pointer-events: none;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive tweaks */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .hero__copy {
    text-align: center;
  }

  .hero__cta {
    justify-self: center;
  }

  .section-heading__title {
    font-size: clamp(2rem, 6vw, 2.8rem);
  }

  .portfolio__certs {
    text-align: left;
  }

  .chapter__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .chapter__content {
    text-align: center;
  }

  .chapter__media {
    justify-self: center;
  }

  .chapter--alt .chapter__media {
    order: initial;
  }

  section {
    padding: 5rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 1.5rem;
  }

  .hero__content {
    padding: 1.8rem;
  }

  .hero__portrait-frame {
    width: clamp(200px, 60vw, 260px);
  }

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

  .portfolio__tags {
    gap: 0.6rem;
  }

  .portfolio__roadmap {
    padding: 0 0.5rem;
  }

  .blog-article__card .portfolio__body {
    padding: 1.5rem;
    gap: 1.6rem;
  }

  .blog-article {
    gap: 1.25rem;
    font-size: 1rem;
  }

  #blog-posts .portfolio__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    gap: 1.75rem;
  }

  .blog-card {
    width: 100%;
  }

  .portfolio__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
  }

  .portfolio__card {
    margin: 0 auto;
  }

  .portfolio__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .portfolio__cta {
    margin-left: 0;
  }

  .portfolio__certs {
    padding: 1.75rem;
  }

  section {
    padding: 4rem 1.25rem;
  }

  .carousel__control {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.5rem;
  }

  .carousel__track {
    gap: 1rem;
  }

  .chapter__icon-wrapper {
    bottom: calc(var(--icon-ring-size) * -0.45);
  }
}

@media (max-width: 540px) {
  .hero__content {
    padding: 1.5rem;
  }

  .hero__kicker {
    letter-spacing: 0.1em;
    font-size: 0.75rem;
  }

  .carousel__viewport {
    border-radius: var(--radius-md);
  }

  .blog-search input {
    font-size: 0.95rem;
  }

  .blog-article__card .portfolio__body {
    padding: 1.4rem;
  }

  .carousel__item {
    border-radius: var(--radius-md);
  }

  .portfolio__certs {
    padding: 1.5rem;
  }

  .contact__grid {
    gap: 1.25rem;
  }

  .chapter__icon-wrapper {
    gap: 0.75rem;
    --icon-ring-size: 3.5rem;
    bottom: calc(var(--icon-ring-size) * -0.45);
  }

  .chapter__icon {
    /* inherits size from wrapper */
  }

  .chapter__icon img {
    width: 2.25rem;
    height: 2.25rem;
  }

  [data-tooltip]::after {
    white-space: normal;
    max-width: 220px;
  }
}
