@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Inter:ital,wght@0,400;0,500;1,400&display=swap");

@font-face {
  font-family: "Special Gothic Expanded One";
  src: url("fonts/SpecialGothicExpandedOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-400.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-600.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-700.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-400-italic.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/roboto-400.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/roboto-500.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/roboto-700.ttf") format("truetype");
}

:root {
  --navy: #0B182E;
  --navy-2: #0E1F3B;
  --navy-deep: #0B182E;
  --blue: #5FA8FF;
  --coral: #F95959;
  --white: #FFFFFF;
  --ink: #0b0b0b;
  --muted: rgba(255, 255, 255, 0.80);
  --panel: #f7f7f7;
  --line: rgba(0, 0, 0, 0.12);
  --home-line: rgba(255, 255, 255, 0.10);
  --content-width: min(1203px, calc(100vw - 48px));
  --blog-width: min(1303px, calc(100vw - 48px));
  --font-display: "Special Gothic Expanded One", "Poppins", "Inter", system-ui, sans-serif;
  --font-body: "Poppins", "Inter", system-ui, sans-serif;
  --glass-from: rgba(255,255,255,0.05);
  --glass-to: rgba(255,255,255,0.025);
  --shadow-card: 0 20px 40px rgba(0,0,0,0.10);
  --r-pill: 999px;
  --r-card: 40px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--navy-deep);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--white);
  background: var(--navy-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.page-shell {
  min-height: 100vh;
}

/* Fix #11: add a visible-on-focus skip link for keyboard users. */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.75rem 1.5rem;
  background: #4a9eff;
  color: #fff;
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transition: top 0.2s ease;
}

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

.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 90px;
}

.site-header-inner {
  width: var(--content-width);
  margin: 0 auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 50px);
}

.site-header--home {
  position: sticky;
  top: 0;
  color: var(--white);
}

.site-header--home .site-header-inner {
  padding-top: 0;
}

.theme-default .site-header {
  border-bottom: 1px solid #000;
  background: #fff;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.theme-home .logo-mark {
  transition: opacity 0.15s ease;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 42px;
}

.brand-stem,
.brand-top,
.brand-bottom,
.brand-accent {
  position: absolute;
  background: currentColor;
  border-radius: 1px;
}

.brand-stem {
  left: 0;
  top: 0;
  width: 8px;
  height: 42px;
}

.brand-top {
  left: 0;
  top: 0;
  width: 28px;
  height: 8px;
}

.brand-bottom {
  right: 0;
  top: 0;
  width: 8px;
  height: 42px;
}

.brand-accent {
  left: 11px;
  top: 19px;
  width: 17px;
  height: 8px;
  background: var(--blue);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 50px);
  letter-spacing: 0.02em;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  text-transform: lowercase;
  position: relative;
  padding-bottom: 4px;
  transition: opacity 150ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.cv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 41px;
  padding: 0 20px;
  border: 2px solid var(--coral);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--coral);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  transition: background 150ms ease, color 150ms ease;
}

.cv-button:hover {
  background: var(--coral);
  color: var(--navy);
}

.cv-button:active {
  transform: scale(0.97);
}

.nav-toggle,
.nav-close,
.nav-backdrop,
.back-to-top,
.home-scroll {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-toggle,
.nav-close,
.nav-backdrop {
  display: none;
}

.nav-toggle {
  width: 48px;
  height: 48px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(252, 251, 249, 0.2);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.nav-close {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-home {
  color: var(--white);
  background: var(--navy);
  position: relative;
}

.home-page {
  position: relative;
  overflow: hidden;
  margin-top: -90px;
}

.home-hero,
.home-about,
.portfolio-section--home {
  position: relative;
  overflow: hidden;
}

.home-hero {
  min-height: max(600px, 85vh);
  padding-top: 110px;
}

.starfield,
.starfield-soft {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 4% 15%, rgba(255,255,255,0.9) 0 1px, transparent 1.4px),
    radial-gradient(circle at 22% 7%, rgba(255,255,255,0.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 39% 18%, rgba(255,255,255,0.55) 0 1px, transparent 1.6px),
    radial-gradient(circle at 63% 14%, rgba(255,255,255,0.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 86% 15%, rgba(255,255,255,0.75) 0 1px, transparent 1.5px),
    radial-gradient(circle at 11% 43%, rgba(255,255,255,0.6) 0 1px, transparent 1.7px),
    radial-gradient(circle at 38% 34%, rgba(255,255,255,0.7) 0 1px, transparent 1.4px),
    radial-gradient(circle at 68% 38%, rgba(255,255,255,0.8) 0 1px, transparent 1.6px),
    radial-gradient(circle at 92% 58%, rgba(255,255,255,0.9) 0 1px, transparent 1.5px),
    radial-gradient(circle at 17% 78%, rgba(255,255,255,0.8) 0 1px, transparent 1.4px),
    radial-gradient(circle at 52% 76%, rgba(255,255,255,0.85) 0 1px, transparent 1.5px),
    radial-gradient(circle at 79% 80%, rgba(255,255,255,0.7) 0 1px, transparent 1.4px);
  opacity: 0.95;
}

.starfield-soft {
  opacity: 0.55;
}

.star-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
}

.star-glow-left {
  width: 420px;
  height: 420px;
  left: -90px;
  top: 320px;
  background: rgba(147, 118, 168, 0.18);
}

.star-glow-center {
  width: 360px;
  height: 360px;
  top: 120px;
  left: calc(50% - 180px);
  background: rgba(196, 174, 210, 0.11);
}

.star-glow-bottom {
  width: 420px;
  height: 240px;
  right: 260px;
  bottom: 40px;
  background: rgba(118, 95, 156, 0.16);
}

.home-hero-inner {
  width: var(--content-width);
  margin: 0 auto;
  min-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.home-center-logo {
  color: var(--white);
  margin-bottom: clamp(20px, 3vw, 28px);
}

.home-center-logo svg {
  width: clamp(120px, 18vw, 194px);
  height: auto;
}

.home-name {
  display: none;
}

.home-role {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-summary {
  max-width: 680px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.75;
  display: none;
}

.hero-socials {
  display: none;
}

.hero-social-link {
  display: none;
}

.home-scroll {
  width: auto;
  height: auto;
  margin-top: 60px;
  padding: 0;
  border: 0;
  color: var(--white);
  animation: fmBounce 2.4s ease-in-out infinite;
}

.home-scroll svg {
  width: 30px;
  height: 15px;
}

@keyframes fmBounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* Fix #4: tighten the transition between the hero and the about section. */
.home-about {
  padding: 56px 0 80px;
}

.home-about-inner {
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 489px) minmax(0, 1fr);
  gap: clamp(40px, 8vw, 118px);
  align-items: center;
  position: relative;
  z-index: 1;
}

.home-portrait {
  width: 100%;
  max-width: 489px;
  aspect-ratio: 489 / 588;
  border-radius: clamp(24px, 4vw, 47px);
  overflow: hidden;
  background: linear-gradient(135deg, #16294A 0%, #1251B5 60%, #C13D0A 130%);
}

.home-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-about-copy {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.about-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: none;
  color: var(--white);
}

.about-tag::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 3px;
  background: var(--blue);
}

.about-display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.18;
  letter-spacing: 0.005em;
}

.about-display-accent {
  color: var(--blue);
}

.about-heading {
  margin: 0;
  max-width: 560px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.4;
}

.about-body {
  max-width: 560px;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(15px, 1.6vw, 22px);
  line-height: 1.55;
}

.portfolio-section {
  width: var(--content-width);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 150px) clamp(20px, 4vw, 50px);
  padding-top: 0;
}

.theme-home .portfolio-section {
  color: var(--white);
}

.home-projects-layout {
  display: grid;
  grid-template-columns: minmax(220px, 381px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
}

.home-projects-copy {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-projects-title {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.3;
}

.section-heading {
  margin-bottom: 36px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 3.6rem);
  line-height: 1.05;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 380px));
  gap: 30px;
  justify-content: center;
}

.projects-grid > :nth-child(even) {
  margin-top: 90px;
}

.project-card {
  position: relative;
  border-radius: var(--r-card);
  padding: 30px;
  background: linear-gradient(var(--glass-from), var(--glass-to));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  border: none;
  transition: background 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  will-change: transform;
}

.theme-default .project-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  backdrop-filter: none;
}

.project-image {
  display: none;
}

.project-meta {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 250px;
  align-items: center;
  text-align: center;
  gap: 22px;
  padding: 0;
}

.project-stack {
  display: none;
}

.project-meta h3 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 25px;
  line-height: 35px;
  color: var(--white);
}

.project-meta p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 22px;
  color: var(--white);
  max-width: 312px;
}

.theme-default .project-meta p {
  color: rgba(0, 0, 0, 0.78);
}

.text-link,
.outline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 999px;
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--blue);
  font-weight: 600;
}

.project-card--home {
  cursor: pointer;
}

.project-card:hover,
.project-card:focus-visible {
  background: linear-gradient(rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow: 0 28px 56px rgba(0,0,0,0.18);
  transform: translateY(-4px);
}

.project-card--home .project-meta {
  padding: 0;
}

.project-card-home-footer {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.project-card-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.project-tech {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--r-pill);
  color: #D5D5D5;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  background: transparent;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.project-tech:hover,
.project-tech:focus-visible {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}

.project-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--coral);
  border-radius: var(--r-pill);
  color: var(--coral);
  align-self: flex-end;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.project-arrow::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.project-arrow::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 14px;
  width: 10px;
  height: 2px;
  background: currentColor;
}

.project-arrow:hover {
  background: var(--coral);
  color: var(--navy);
}

.project-card:hover .project-arrow {
  transform: translateX(4px);
}

.outline-pill {
  margin-top: 32px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
}

.theme-default .outline-pill {
  border-color: #000;
  color: #000;
}

.home-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 41px;
  padding: 10px 20px;
  border: 2px solid var(--coral);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.home-contact-button:hover {
  background: var(--coral);
  color: var(--navy);
}

.home-contact-button:active {
  transform: scale(0.97);
}

.theme-default {
  background: #fff;
  color: #000;
}

.article-shell,
.site-footer-inner {
  width: var(--blog-width);
  margin-left: auto;
  margin-right: auto;
}

.blog-page {
  position: relative;
  overflow: hidden;
  margin-top: -90px;
  padding-top: 0;
}
.blog-page > .starfield,
.blog-page > .star-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.blog-hero {
  position: relative;
  z-index: 1;
  padding: clamp(72px, 10vw, 150px) clamp(20px, 4vw, 50px) 60px;
  padding-top: calc(90px + clamp(72px, 10vw, 150px));
  text-align: center;
}

.blog-hero-inner {
  max-width: 994px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.hero-eyebrow {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
}

.blog-title,
.article-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 64px);
  line-height: 78px;
  letter-spacing: 0.005em;
}

.blog-intro,
.article-excerpt,
.rich-html p,
.rich-html li {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

.blog-intro {
  max-width: 800px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 28px;
  color: rgba(255, 255, 255, 0.88);
}

.blog-scroll-link {
  display: inline-block;
  margin-top: 30px;
  color: var(--white);
  animation: fmBounce 2.4s ease-in-out infinite;
}

.blog-tags-section {
  position: relative;
  z-index: 1;
  padding: 20px clamp(20px, 4vw, 50px) 30px;
  text-align: center;
}

.blog-tags-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.blog-tags-intro {
  margin: 0;
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 32px;
  color: var(--white);
}

.blog-tags-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 900px;
}

.blog-list-section {
  position: relative;
  z-index: 1;
  padding: 60px clamp(20px, 4vw, 50px) 80px;
}

.blog-list {
  max-width: 997px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 50px;
  align-items: center;
}

.post-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: none;
  border-radius: var(--r-card);
  padding: 46px 52px;
  background: linear-gradient(var(--glass-from), var(--glass-to));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  color: var(--white);
  transition: background 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.post-card:hover {
  background: linear-gradient(rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow: 0 28px 56px rgba(0,0,0,0.18);
}

.post-card-content {
  max-width: 740px;
}

.post-card-meta {
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.post-card h3 {
  margin: 0 0 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 25px;
  line-height: 35px;
  text-transform: uppercase;
}

.post-card-excerpt {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 22px;
  color: rgba(255, 255, 255, 0.88);
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 22px;
}

.blog-pagination {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 54px;
  font-size: 0.9rem;
  color: rgba(252, 251, 249, 0.84);
}

.article-page {
  position: relative;
  overflow: clip;
  margin-top: -90px;
}

.article-hero-section {
  position: relative;
  min-height: 500px;
  padding-top: calc(90px + 120px);
  overflow: hidden;
}

.article-hero-inner {
  width: min(980px, calc(100vw - 48px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.article-back {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.article-back:hover { color: var(--white); }

.article-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 12px 3px 14px;
  height: 19px;
  background: var(--blue);
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.5em;
  text-transform: lowercase;
  white-space: nowrap;
  border-radius: 0;
  margin-bottom: 20px;
}

.article-title {
  max-width: 994px;
  margin: 20px auto 28px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 74px;
  letter-spacing: 0.005em;
}

.article-excerpt {
  max-width: 800px;
  margin: 0 auto 34px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 28px;
  color: rgba(255, 255, 255, 0.88);
}

.article-meta-row {
  display: flex;
  justify-content: center;
  gap: 100px;
  margin-bottom: 34px;
  font-family: var(--font-body);
  color: var(--white);
}

.article-meta-row span:first-child {
  font-weight: 500;
  font-size: 14px;
}

.article-meta-row span:last-child {
  font-style: italic;
  font-size: 12px;
}

.article-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.article-content-section {
  position: relative;
  padding: 24px 0 90px;
  overflow: clip;
  background: transparent;
}

.article-layout {
  width: min(1203px, calc(100vw - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  gap: 60px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.article-toc {
  position: sticky;
  top: 120px;
  padding-top: 56px;
  min-height: 220px;
}

.article-toc-item {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}

.article-toc-number {
  flex-shrink: 0;
  width: 28px;
  color: var(--white);
  transition: color 0.2s;
}

.article-toc-title {
  color: var(--white);
  text-transform: uppercase;
  transition: color 0.2s;
}

.article-toc-item.active .article-toc-number,
.article-toc-item.active .article-toc-title {
  color: var(--blue);
}

.article-toc-item:hover .article-toc-number,
.article-toc-item:hover .article-toc-title {
  color: var(--white);
}

.article-main {
  padding-top: 56px;
  max-width: 895px;
}

.rich-html p,
.rich-html li {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.9);
}

.rich-html p.lead {
  font-size: 18px;
  line-height: 28px;
}

.rich-html h2 {
  margin: 38px 0 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2.3rem;
  color: var(--white);
}

.rich-html h3 {
  margin: 28px 0 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--white);
}

.rich-html ul,
.rich-html ol {
  padding-left: 22px;
}

.rich-html blockquote {
  margin: 28px 0;
  padding-left: 24px;
  border-left: 2px solid var(--blue);
  font-family: "Inter", sans-serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--white);
}

.article-image-placeholder {
  width: 100%;
  height: 252px;
  margin: 34px 0 40px;
  border-radius: 32px;
  background: #d9d9d9;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.article-bottom-row {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-top: 40px;
}

.article-related-card {
  width: 100%;
  max-width: 380px;
  padding: 30px;
  border-radius: var(--r-card);
  background: linear-gradient(var(--glass-from), var(--glass-to));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
}

.article-related-card h3 {
  margin: 0 0 18px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 25px;
  line-height: 35px;
  color: var(--white);
}

.article-related-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-related-card a {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 35px;
  color: var(--white);
  text-decoration: underline;
}

.site-footer {
  border-top: none;
  background: transparent;
  color: var(--white);
}

.site-footer--home {
  background: transparent;
  color: var(--white);
}

.site-footer-inner {
  width: min(822px, 100%);
  margin: 0 auto;
  padding: 50px 50px 60px;
}

.site-footer--home .site-footer-inner {
  width: min(822px, 100%);
  padding: 50px 50px 60px;
}

.site-footer-inner::before {
  content: "";
  display: block;
  height: 1px;
  background: rgba(255,255,255,1);
  margin-bottom: 50px;
}

.footer-kicker,
.footer-tagline {
  margin: 0;
}

.footer-kicker {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 25px;
  line-height: 35px;
}

.footer-tagline {
  display: none;
}

.footer-top,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.footer-top {
  flex-direction: column;
  align-items: center;
  gap: 25px;
  margin-bottom: 34px;
  text-align: center;
}

.footer-top::after {
  content: "";
  width: 39px;
  height: 14px;
  background: var(--blue);
  display: block;
  order: 1;
}

.footer-kicker {
  order: 0;
}

.footer-contact {
  order: 2;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
}

.footer-socials {
  order: 3;
  display: flex;
  gap: 28px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  overflow: hidden;
  transition: transform 150ms ease, opacity 150ms ease;
}

.social-link:hover {
  transform: scale(1.08);
  opacity: 1;
}

.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid var(--home-line);
}

.site-footer--home .footer-bottom {
  border-top-color: var(--home-line);
  justify-content: center;
  text-align: center;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.back-to-top {
  padding: 0;
  color: var(--blue);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.site-footer--home .locale-switch {
  color: var(--blue);
}

.site-footer--home .footer-top::after {
  content: "";
  width: 39px;
  height: 14px;
  background: var(--blue);
  display: block;
}

@media (max-width: 1100px) {
  .projects-grid > :nth-child(even) {
    margin-top: 48px;
  }

  .top-nav {
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .home-about-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .home-portrait {
    max-width: 420px;
    margin: 0 auto;
  }

  .home-projects-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .projects-grid > :nth-child(even) {
    margin-top: 0;
  }
}

@media (max-width: 800px) {
  :root {
    --content-width: calc(100vw - 24px);
    --blog-width: calc(100vw - 24px);
  }

  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-header-inner,
  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Fix #7: collapse the desktop nav into an accessible mobile drawer. */
  .site-header-inner {
    position: relative;
    flex-direction: row;
    align-items: center;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header-actions {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, calc(100vw - 32px));
    padding: 112px 28px 32px;
    background: rgba(11, 17, 32, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.24s ease;
    z-index: 7;
  }

  .site-header[data-nav-open="true"] .site-header-actions,
  .site-header-actions[data-open="true"] {
    transform: translateX(0);
  }

  .nav-close {
    display: inline-flex;
    padding: 0;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 6;
  }

  .nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .top-nav {
    margin-left: 0;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .cv-button {
    margin-left: 0;
  }

  .home-hero {
    min-height: auto;
    padding-top: 140px;
    padding-bottom: 80px;
  }

  .home-hero-inner {
    min-height: auto;
  }

  .home-about,
  .portfolio-section,
  .blog-hero,
  .article-shell {
    padding-top: 48px;
  }

  .footer-socials {
    align-items: flex-start;
  }

  .home-about-inner,
  .portfolio-section {
    width: calc(100vw - 24px);
  }

  .article-hero {
    padding: 32px 22px;
  }

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

  .project-card-home-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .blog-tags-grid {
    width: calc(100vw - 32px);
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .article-toc {
    display: none;
  }

  .article-bottom-row {
    flex-direction: column;
  }

  .article-related-card {
    max-width: 100%;
  }

  .article-meta-row {
    gap: 24px;
    flex-direction: column;
  }

  .site-footer-inner,
  .site-footer--home .site-footer-inner {
    padding: 40px 24px 48px;
  }

  .nav-link {
    font-size: 16px;
    padding: 8px 0;
  }

  .nav-close {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .home-scroll {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .blog-scroll-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .article-back {
    padding: 10px 0;
    margin-bottom: 18px;
  }

  .back-to-top {
    padding: 10px 0;
  }

  .locale-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .footer-contact {
    padding: 8px 0;
  }

  .footer-top {
    align-items: center;
  }

  .footer-bottom {
    align-items: center;
  }

  .starfield {
    opacity: 0.3;
  }

  .starfield-soft {
    opacity: 0.15;
  }

  .blog-title,
  .article-title {
    line-height: 1.2;
  }

  .blog-hero {
    padding-bottom: 40px;
  }

  .blog-tags-section {
    padding: 16px 16px 24px;
  }

  .blog-list-section {
    padding: 40px 16px 60px;
  }
}

.not-found-page {
  min-height: 70vh;
}

.not-found-hero {
  position: relative;
  padding: 140px 0 120px;
}

.not-found-inner {
  width: var(--content-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

.not-found-title {
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
}
