@import url('https://cdn.jsdelivr.net/gh/wanteddev/wanted-sans@v1.0.1/packages/wanted-sans/fonts/webfonts/variable/split/WantedSansVariable.min.css');

/* ===== NEXON Lv1 Gothic Font ===== */
@font-face {
  font-family: "NexonLv1Gothic";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv1 Gothic OTF Light.woff")
    format("woff");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "NexonLv1Gothic";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv1 Gothic OTF.woff")
    format("woff");
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: "NexonLv1Gothic";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv1 Gothic OTF Bold.woff")
    format("woff");
  font-weight: 700;
  font-display: swap;
}

/* ===== Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--site-nav-height) + var(--scroll-anchor-gap));
  scrollbar-gutter: stable;
}

:root {
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --site-nav-height: 73px;
  --project-filter-height: 0px;
  --scroll-anchor-gap: 1rem;
  --section-space: 5rem;
  --projects-mobile-block-padding: 1rem;
  --projects-mobile-inline-padding: 1rem;
  --page-hero-offset-y: 2.75rem;
  --page-hero-padding-bottom: 2.75rem;
  --page-hero-inline-padding: 1.25rem;
  --base-font: "Wanted Sans Variable", "Wanted Sans", -apple-system,
    BlinkMacSystemFont, system-ui, sans-serif;
  --card-font: var(--base-font);
}

body {
  font-family: var(--base-font);
  line-height: 1.7;
  color: var(--text-dark);
  overflow-x: hidden;
  background: var(--page-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.is-theme-switching body,
html.is-theme-switching .site-nav,
html.is-theme-switching main,
html.is-theme-switching section,
html.is-theme-switching article,
html.is-theme-switching footer {
  transition:
    background-color 0.36s ease,
    border-color 0.36s ease,
    color 0.28s ease,
    box-shadow 0.36s ease;
}

@supports (view-transition-name: root) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.38s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }

  ::view-transition-old(root) {
    animation-name: theme-page-out;
  }

  ::view-transition-new(root) {
    animation-name: theme-page-in;
  }

  /* The toggle gets its own live layer so its morph plays during the page crossfade */
  ::view-transition-old(theme-toggle) {
    display: none;
  }

  ::view-transition-new(theme-toggle) {
    animation: none;
  }
}

@keyframes theme-page-out {
  to {
    opacity: 0;
  }
}

@keyframes theme-page-in {
  from {
    opacity: 0;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

[hidden] {
  display: none !important;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(var(--secondary-rgb), 0.38);
  outline-offset: 4px;
}

.inline-link {
  color: var(--deep-blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(var(--primary-rgb), 0.4);
  text-underline-offset: 3px;
  transition: var(--transition);
}

.inline-link:hover {
  color: var(--vivid-blue);
  text-decoration-color: currentColor;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  z-index: 1200;
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  will-change: transform;
}

/* ===== Navigation ===== */
.site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--nav-background);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(var(--gray-900-rgb), 0.05);
  z-index: 1000;
  transition: var(--transition);
}

.site-nav.is-scrolled {
  background: var(--nav-background-scrolled);
}

.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 50%;
  background: var(--glass-soft);
  color: var(--primary-strong);
  box-shadow:
    0 6px 18px rgba(var(--shadow-rgb), 0.14),
    inset 0 0 0 1px rgba(var(--primary-rgb), 0.04);
  cursor: pointer;
  transition:
    color 0.2s ease,
    background-color 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(var(--secondary-rgb), 0.36);
  outline-offset: 3px;
}

/* Sun ⇄ moon morph: one SVG. Light mode shows a crescent (action: go dark); dark mode
   shrinks the disc into a sun core, slides the mask cut away and fans the rays out. */
.theme-toggle-icon {
  display: block;
  width: 1.3rem;
  height: 1.3rem;
  overflow: visible;
  transition:
    filter 0.24s ease,
    transform 0.15s ease;
  view-transition-name: theme-toggle;
}

.theme-toggle-core,
.theme-toggle-cut,
.theme-toggle-rays {
  transform-box: view-box;
  transform-origin: 12px 12px;
  transition: transform 0.5s var(--ease-out), opacity 0.3s ease;
}

.theme-toggle-rays {
  opacity: 0;
  transform: rotate(-45deg) scale(0.5);
}

html[data-theme="dark"] .theme-toggle-core {
  transform: scale(0.5);
}

html[data-theme="dark"] .theme-toggle-cut {
  transform: translate(8px, -8px);
}

html[data-theme="dark"] .theme-toggle-rays {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  transition-delay: 0.08s;
}

.theme-toggle:hover .theme-toggle-icon {
  filter: drop-shadow(0 0 6px rgba(var(--primary-rgb), 0.35));
}

.theme-toggle:active .theme-toggle-icon {
  transform: scale(0.92);
}

.site-logo a {
  display: inline-flex;
  position: relative;
  font-family: var(--base-font);
  font-size: 1.5rem;
  font-weight: 900 !important;
  color: var(--primary-strong);
  background: linear-gradient(
    100deg,
    var(--accent-color),
    var(--primary-color),
    var(--light-blue),
    var(--vivid-blue),
    var(--deep-blue)
  );
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 260% auto;
  -webkit-text-fill-color: transparent;
  filter: saturate(1.08);
  /* The gradient drifts on its own; hover/focus only speeds it up */
  animation: gradientShift 4s ease infinite;
  transition: filter 0.28s ease;
}

.site-logo a:hover,
.site-logo a:focus-visible {
  filter: saturate(1.12);
  animation-duration: 2.4s;
}

.site-logo a:focus-visible {
  outline: 2px solid rgba(33, 150, 243, 0.28);
  outline-offset: 5px;
  border-radius: 6px;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.site-nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.site-nav-menu a {
  font-family: var(--base-font);
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.site-nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.site-nav-menu a:hover::after,
.site-nav-menu a.is-active::after {
  width: 100%;
}

.site-nav-toggle {
  appearance: none;
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dark);
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.24s ease,
    box-shadow 0.24s ease;
}

.site-nav-toggle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, calc(-50% + var(--toggle-line-offset, 0px)));
  transition:
    opacity 0.16s ease,
    transform 0.22s var(--ease-out),
    background-color 0.2s ease;
}

.site-nav-toggle span:nth-child(1) {
  --toggle-line-offset: -7px;
}

.site-nav-toggle span:nth-child(3) {
  --toggle-line-offset: 7px;
}

.site-nav-toggle:hover,
.site-nav-toggle.is-active {
  color: var(--deep-blue);
  background: rgba(var(--alice-blue-rgb), 0.92);
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.14);
}

.site-nav-toggle:focus-visible {
  outline: 3px solid rgba(var(--secondary-rgb), 0.36);
  outline-offset: 3px;
}

.site-nav-toggle.is-active span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.site-nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: translate(-50%, -50%) scaleX(0.4);
}

.site-nav-toggle.is-active span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--page-background);
  color: var(--text-dark);
  text-align: center;
  padding: 6.25rem 1.25rem 3.25rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(var(--primary-rgb), 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(var(--secondary-rgb), 0.08) 0%,
      transparent 50%
    );
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--hero-scrim-start), var(--hero-scrim-end)),
    url("../img/hero-blue-interface-v2.webp") center center / cover no-repeat;
  filter: var(--hero-image-filter);
  pointer-events: none;
  z-index: 0;
  transition: filter 0.36s ease;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.hero-content {
  /* Spacing rhythm: tight inside a group, wide between groups */
  /* Gaps grow with viewport height so the hero fills tall screens instead of clustering mid-screen */
  --hero-group-gap: clamp(3rem, 7svh, 5rem);
  --hero-item-gap: clamp(1.25rem, 2.4svh, 1.75rem);
  max-width: 1040px;
  width: min(100%, 1040px);
  min-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  animation: fadeInUp 1s ease;
  position: relative;
  z-index: 2;
}

.hero-copy {
  width: 100%;
  margin-top: auto;
}

.hero-title {
  font-family: "NexonLv1Gothic", var(--base-font);
  font-size: 3.5rem;
  margin-bottom: 2rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-title-line {
  display: inline;
}

.hero-highlight {
  background: linear-gradient(110deg, var(--deep-blue), var(--primary-color), var(--light-blue), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 220% auto;
  position: relative;
  display: inline-block;
  animation: heroHighlightShift 4s ease-in-out infinite;
}

@keyframes heroHighlightShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  max-width: 100%;
  margin: 0 auto var(--hero-group-gap);
  opacity: 0.95;
  font-weight: 300;
  letter-spacing: 0;
  word-break: keep-all;
}

.hero-subtitle-line {
  display: block;
  white-space: nowrap;
}

/* Phrases that must not split across lines; wrapping happens only between them */
.text-chunk {
  display: inline-block;
}

.hero-subtitle-line + .hero-subtitle-line {
  margin-top: 0.25rem;
}

.hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 auto;
}

.hero-meta span {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  background: var(--glass-soft);
  color: var(--primary-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 640px);
  margin: var(--hero-item-gap) auto 0;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: 16px;
  background: var(--glass-soft);
  backdrop-filter: blur(14px);
}

.hero-stats div {
  padding: 1rem 0.75rem;
  text-align: center;
  animation: fadeInUp 0.7s var(--ease-out) both;
}

/* Arrive just after the hero copy (which fades in over 1s) */
.hero-stats div:nth-child(1) {
  animation-delay: 0.45s;
}

.hero-stats div:nth-child(2) {
  animation-delay: 0.55s;
}

.hero-stats div:nth-child(3) {
  animation-delay: 0.65s;
}

.hero-stats div + div {
  border-left: 1px solid rgba(var(--primary-rgb), 0.16);
}

.hero-stats dt {
  color: var(--primary-strong);
  font-family: "NexonLv1Gothic", var(--base-font);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-stats dd {
  margin: 0.3rem 0 0;
  word-break: keep-all;
  color: var(--gray-600);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

@media (max-width: 480px) {
  .hero-stats div {
    padding: 0.75rem 0.4rem;
  }

  .hero-stats dt {
    font-size: 1.05rem;
  }
}

.hero-actions {
  margin: var(--hero-group-gap) 0 auto;
}

.hero-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: "NexonLv1Gothic", var(--base-font);
  padding: 0.5rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.36), transparent);
  transform: translateX(-120%);
  transition: transform 0.65s var(--ease-out);
  z-index: -1;
}

.btn:hover::before {
  transform: translateX(120%);
}

.btn-download i {
  font-size: 0.92em;
}

.btn-download span {
  white-space: nowrap;
}

.btn-primary {
  background: var(--surface-raised);
  color: var(--primary-strong);
}

.btn-primary:hover {
  transform: translateY(-3px);
  background: var(--surface-raised);
}

.hero-buttons .btn {
  min-height: 46px;
  padding-inline: 0.75rem;
  background: var(--glass-soft);
  /* 1px like the chips and social links; hover only deepens the tint */
  border: 1px solid rgba(var(--primary-rgb), 0.32);
  color: var(--primary-strong);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.hero-buttons .btn:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.55);
  color: var(--primary-strong);
  box-shadow: 0 6px 16px rgba(var(--deep-blue-rgb), 0.12);
  transform: translateY(-2px);
}

/* One clear primary action: solid fill, the rest stay outlined */
.hero-buttons .btn-primary {
  padding-inline: 1.25rem;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  color: var(--on-primary);
  box-shadow: 0 8px 20px rgba(var(--deep-blue-rgb), 0.24);
}

.hero-buttons .btn-primary:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  color: var(--on-primary);
  box-shadow: 0 12px 26px rgba(var(--deep-blue-rgb), 0.3);
}

.hero-buttons .btn-download {
  padding-inline: 0.75rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: var(--hero-group-gap) 0 1.25rem;
  font-size: 1.5rem;
}

.social-links a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border-radius: 50%;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  color: var(--primary-strong);
}

.social-links a:hover {
  background: var(--primary-strong);
  color: var(--on-primary);
  transform: translateY(-5px) scale(1.1);
  border-color: var(--on-primary);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 20px;
  height: 30px;
  border: 2px solid rgba(var(--primary-rgb), 0.5);
  border-radius: 15px;
  position: relative;
}

.scroll-indicator span::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 2px;
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0%,
  100% {
    opacity: 0;
    top: 5px;
  }
  50% {
    opacity: 1;
    top: 15px;
  }
}

/* ===== Section Styles ===== */
.section-title {
  font-family: "NexonLv1Gothic", var(--base-font);
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color),
    var(--accent-color)
  );
  border-radius: 2px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* ===== Skills Section ===== */
.skills {
  display: flex;
  justify-content: center;
  padding: var(--section-space) 1.25rem;
  border-top: 1px solid var(--section-divider);
  background: var(--page-background);
}

.skills > .container {
  width: min(100%, 1040px);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
}

.skill-card {
  background: var(--surface);
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 158px;
  padding: 1rem 0.875rem;
  border-radius: 8px;
  text-align: center;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--primary-rgb), 0.08);
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.14),
    rgba(var(--secondary-rgb), 0.14),
    rgba(var(--soft-blue-rgb), 0.18)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.skill-card > * {
  position: relative;
  z-index: 1;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.01);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card i {
  font-size: 2rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.skill-card:hover i {
  transform: scale(1.1) rotate(5deg);
}

.skill-card h3 {
  font-family: "NexonLv1Gothic", var(--base-font);
  font-size: 0.98rem;
  line-height: 1.16;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

.skill-card p {
  max-width: 17em;
  color: var(--text-light);
  font-size: 0.84rem;
  line-height: 1.45;
  /* Break between Korean words, never inside one; balance the two lines */
  word-break: keep-all;
  text-wrap: balance;
}

.skills-group-title {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto 0.75rem;
  color: var(--gray-500);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.skills-grid + .skills-group-title {
  margin-top: 1.75rem;
}

/* Every tech card lists four tools: a 2×2 grid keeps all four cards the same shape */
.skill-tags {
  /* Equal columns sized to the widest chip; chips stretch to fill them, so every gap
     between badges is the same horizontally and vertically */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: max-content;
  max-width: 100%;
  gap: 0.35rem;
  margin: 0.15rem auto 0;
  padding: 0;
  list-style: none;
}

.skill-tags li {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary-strong);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

/* ===== External feature (AWS 기술 블로그) ===== */
.press-feature {
  --press-accent: #ff9900;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  max-width: 1040px;
  margin: 0 auto 1.75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(var(--shadow-rgb), 0.08);
  text-align: left;
}

.press-feature-logo {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #232f3e;
  color: var(--press-accent);
  font-size: 1.9rem;
}

.press-feature-kicker {
  margin: 0 0 0.3rem;
  color: #c45500;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.press-feature-title {
  margin: 0;
  color: var(--text-dark);
  font-family: "NexonLv1Gothic", var(--base-font);
  font-size: 1.08rem;
  line-height: 1.4;
  word-break: keep-all;
}

.press-feature-desc {
  margin: 0.35rem 0 0;
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: keep-all;
}

.press-feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.press-feature-tags li {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary-strong);
  font-size: 0.74rem;
  font-weight: 650;
}

.press-feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--primary-strong);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.press-feature-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--deep-blue-rgb), 0.2);
}

.press-feature-link i {
  font-size: 0.8em;
}

html[data-theme="dark"] .press-feature-logo {
  background: #0b1220;
  box-shadow: inset 0 0 0 1px rgba(255, 153, 0, 0.35);
}

html[data-theme="dark"] .press-feature-kicker {
  color: var(--press-accent);
}

/* On the home page it spans the same width as the project grid below */
.featured-projects .press-feature {
  max-width: none;
}

/* Inside a project card it lines up with the overview text above (same side padding) */
.project-info > .press-feature {
  max-width: none;
  margin: 1.75rem;
}

@media (max-width: 768px) {
  .press-feature {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.875rem 1rem;
    padding: 1rem;
  }

  .press-feature-logo {
    align-self: start;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }

  .press-feature-title {
    font-size: 0.98rem;
  }

  .press-feature-link {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .project-info > .press-feature {
    margin: 1.25rem 1rem;
  }
}

@media (max-width: 480px) {
  .project-info > .press-feature {
    margin-inline: 0.875rem;
  }
}

/* ===== Projects Section ===== */
.featured-projects {
  display: flex;
  padding: var(--section-space) 1.25rem;
  border-top: 1px solid var(--section-divider);
  background: var(--section-band);
}

.featured-projects > .container {
  width: 100%;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.featured-projects .projects-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.project-card {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  transition:
    opacity 0.32s ease,
    border-color 0.32s ease;
  border: 1px solid rgba(var(--primary-rgb), 0.08);
  /* html's scroll-padding-top already reserves the nav + gap; only add the sticky filter bar */
  scroll-margin-top: var(--project-filter-height);
  position: relative;
  display: flex;
  flex-direction: column;
}

.featured-projects .project-card {
  min-width: 0;
  width: 100%;
}

.featured-projects .project-tags {
  flex-wrap: nowrap;
  gap: 0.375rem;
}

.featured-projects .project-tag {
  flex: 0 1 auto;
  min-width: 0;
  padding: 0.25rem 0.625rem;
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
}

.project-card:hover {
  border-color: rgba(var(--primary-rgb), 0.52);
}

.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s ease,
    transform 0.65s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* .project-card declares its own transition later in the file; keep the reveal motion */
.project-card.reveal-item {
  transition:
    opacity 0.65s ease,
    transform 0.65s var(--ease-out),
    border-color 0.32s ease;
}

.skill-card.reveal-item.is-visible:hover {
  transform: translateY(-10px) scale(1.01);
}

.project-image {
  display: block;
  position: relative;
  overflow: hidden;
  height: 210px;
  background: var(--bg-gradient);
  color: inherit;
  text-decoration: none;
}

.project-image[href] {
  cursor: pointer;
}

.project-image:focus-visible {
  outline: 3px solid rgba(var(--primary-rgb), 0.35);
  outline-offset: 4px;
}

.project-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--project-image-overlay);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.32s ease;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-lighthouse .project-image {
  background: var(--alice-blue);
}

.project-card-lighthouse .project-image img {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  object-fit: contain;
}

.project-card:hover .project-image::after {
  opacity: 0.72;
}

.project-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 2rem), 520px);
  height: auto;
  min-height: 74px;
  max-height: calc(100% - 2rem);
  background: var(--glass-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 1;
  padding: 0.75rem 1rem;
  text-align: center;
  border: 1px solid rgba(var(--primary-rgb), 0.08);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(var(--shadow-rgb), 0.16);
  transform: translate(-50%, -50%);
  transition: var(--transition);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 3;
}

.project-overlay-copy {
  width: min(100%, 320px);
}

.project-overlay-copy .project-kicker {
  margin: 0 0 0.25rem;
  color: var(--secondary-color);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
  word-break: keep-all;
}

.project-overlay-copy h3 {
  margin: 0;
  color: var(--gray-900);
  font-size: 1.3rem;
  line-height: 1.25;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: normal;
}

.project-image .project-overlay-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 46px;
  padding: 0;
  background: transparent;
  opacity: 1;
  transform: translateY(0);
  transition: var(--transition);
}

.project-image .project-header-actions {
  display: none;
}

.projects-section .project-card-featured .project-overlay {
  width: min(calc(100% - 2rem), 560px);
  min-height: 118px;
  padding: 0.75rem 1rem;
  pointer-events: auto;
}

.projects-section .project-card-featured .project-overlay-copy {
  min-height: auto;
}

.projects-section .project-card-featured .project-header-actions {
  position: static;
  display: flex;
  width: 100%;
  max-width: 100%;
  margin-top: 0.25rem;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.project-info {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.project-info p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.project-summary {
  max-width: 980px;
  font-size: 1rem;
}

.project-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: max-content;
  max-width: min(100%, 340px);
}

.project-header-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(var(--blue-gray-rgb), 0.16);
  border-radius: 8px;
  background: var(--glass-strong);
  color: var(--blue-gray);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  transition: var(--transition);
}

.project-header-actions a:hover {
  border-color: rgba(var(--primary-rgb), 0.28);
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.project-header-actions i {
  font-size: 1rem;
}

:is(#dr-ag, #dr-ag-ax) .project-info {
  padding: 0;
}

.project-section-label {
  display: block;
  margin-bottom: 0.625rem;
  color: var(--primary-strong);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.2;
}

.project-overview {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 2rem;
  padding: 2rem 1.75rem;
  border-bottom: 1px solid var(--gray-100);
}

:is(#dr-ag, #dr-ag-ax) .project-summary {
  max-width: 62ch;
  margin: 0;
  color: var(--gray-600);
  font-size: 0.96rem;
  line-height: 1.7;
}

.project-impact {
  min-width: 0;
  margin: 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid rgba(var(--primary-rgb), 0.2);
}

.project-impact-copy {
  min-width: 0;
}

:is(#dr-ag, #dr-ag-ax) .project-impact p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.62;
}

:is(#dr-ag, #dr-ag-ax) .project-impact p + p {
  margin-top: 0.625rem;
}

.project-section-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--gray-100);
  background: var(--surface);
}

.project-section-nav a {
  --nav-accent: var(--primary-color);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  padding: 1rem 1.75rem;
  box-shadow: inset 0 2px 0 var(--nav-accent);
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.project-section-nav a + a {
  border-left: 1px solid var(--gray-100);
}

.project-section-nav a:hover {
  background: var(--gray-50);
}

.project-section-nav a:hover .project-nav-copy strong {
  color: var(--nav-accent);
}

.project-section-nav a:focus-visible {
  outline-offset: -4px;
}

.project-nav-index {
  color: var(--nav-accent);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.project-nav-copy {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.project-nav-copy strong {
  overflow-wrap: anywhere;
  color: var(--gray-900);
  font-size: 0.84rem;
}

.project-nav-copy small {
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
  color: var(--gray-500);
  font-size: 0.68rem;
  font-weight: 650;
}

.project-platform-parts {
  display: flex;
  flex-direction: column;
  order: initial;
  margin: 0;
}

.project-platform-part {
  --part-accent: var(--primary-color);
  --part-accent-rgb: var(--primary-rgb);
  min-width: 0;
  padding: 2.25rem 1.75rem;
  /* html's scroll-padding-top already reserves the nav + gap; only add the sticky filter bar */
  scroll-margin-top: var(--project-filter-height);
  border-bottom: 1px solid var(--gray-100);
  background: var(--surface);
}

.project-platform-part-smartfarm {
  --part-accent: #16845f;
  --part-accent-rgb: 22, 132, 95;
  background: rgba(var(--part-accent-rgb), 0.035);
}

.project-platform-part-inhouse {
  --part-accent: #246bce;
  --part-accent-rgb: 36, 107, 206;
  background: rgba(var(--part-accent-rgb), 0.035);
}

.project-platform-part-dashboard {
  --part-accent: #b85f24;
  --part-accent-rgb: 184, 95, 36;
  background: rgba(var(--part-accent-rgb), 0.035);
}

html[data-theme="dark"] .project-platform-part-smartfarm {
  --part-accent: #5fd5ab;
  --part-accent-rgb: 95, 213, 171;
}

html[data-theme="dark"] .project-platform-part-inhouse {
  --part-accent: #78b3ff;
  --part-accent-rgb: 120, 179, 255;
}

html[data-theme="dark"] .project-platform-part-dashboard {
  --part-accent: #f2ab73;
  --part-accent-rgb: 242, 171, 115;
}

html[data-theme="dark"] .project-platform-part-smartfarm,
html[data-theme="dark"] .project-platform-part-inhouse,
html[data-theme="dark"] .project-platform-part-dashboard {
  background: rgba(var(--part-accent-rgb), 0.055);
}

/* Section nav accents follow the part, not the position */
.project-section-nav a[href="#dr-ag-smartfarm"] {
  --nav-accent: #16845f;
}

.project-section-nav a[href="#dr-ag-inhouse"] {
  --nav-accent: #246bce;
}

.project-section-nav a[href="#dr-ag-dashboard"] {
  --nav-accent: #b85f24;
}

html[data-theme="dark"] .project-section-nav a[href="#dr-ag-smartfarm"] {
  --nav-accent: #5fd5ab;
}

html[data-theme="dark"] .project-section-nav a[href="#dr-ag-inhouse"] {
  --nav-accent: #78b3ff;
}

html[data-theme="dark"] .project-section-nav a[href="#dr-ag-dashboard"] {
  --nav-accent: #f2ab73;
}

.project-platform-part-ax {
  --part-accent: #4f46e5;
  --part-accent-rgb: 79, 70, 229;
  background: rgba(var(--part-accent-rgb), 0.035);
}

html[data-theme="dark"] .project-platform-part-ax {
  --part-accent: #a5b4fc;
  --part-accent-rgb: 165, 180, 252;
  background: rgba(var(--part-accent-rgb), 0.055);
}

/* AX part: AS-IS → To-Be flow and lead scope */
.ax-flow,
.ax-scope {
  display: grid;
  gap: 0.625rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  background: var(--surface);
}

.ax-scope {
  margin-top: 0.875rem;
}

.ax-flow-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.ax-flow-tag {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.ax-flow-tobe .ax-flow-tag {
  background: rgba(var(--part-accent-rgb), 0.12);
  color: var(--part-accent);
}

.ax-flow-row ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ax-step;
}

.ax-flow-row li {
  position: relative;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--gray-100);
  border-radius: 6px;
  color: var(--gray-600);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  counter-increment: ax-step;
}

.ax-flow-row li::before {
  content: counter(ax-step);
  display: block;
  margin-bottom: 0.2rem;
  color: var(--gray-500);
  font-size: 0.62rem;
  font-weight: 900;
}

.ax-flow-asis li {
  border-style: dashed;
  color: var(--gray-500);
}

.ax-flow-tobe li {
  border-color: rgba(var(--part-accent-rgb), 0.35);
  background: rgba(var(--part-accent-rgb), 0.05);
  color: var(--gray-900);
}

.ax-flow-tobe li::before {
  color: var(--part-accent);
}

/* Only when JS is running: To-Be steps start muted and light up one by one */
.ax-flow-animate .ax-flow-tobe li {
  opacity: 0.35;
  transform: translateY(6px);
  transition:
    opacity 0.45s ease,
    transform 0.45s var(--ease-out);
}

.ax-flow-animate.is-visible .ax-flow-tobe li {
  opacity: 1;
  transform: none;
}

.ax-flow-animate.is-visible .ax-flow-tobe li:nth-child(1) {
  transition-delay: 0.25s;
}

.ax-flow-animate.is-visible .ax-flow-tobe li:nth-child(2) {
  transition-delay: 0.4s;
}

.ax-flow-animate.is-visible .ax-flow-tobe li:nth-child(3) {
  transition-delay: 0.55s;
}

.ax-flow-animate.is-visible .ax-flow-tobe li:nth-child(4) {
  transition-delay: 0.7s;
}

.ax-scope ul {
  display: grid;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ax-scope li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  border-radius: 6px;
  background: var(--gray-50);
  font-size: 0.76rem;
  line-height: 1.35;
}

.ax-scope li span {
  color: var(--gray-900);
  font-weight: 750;
}

.ax-scope li em {
  color: var(--part-accent);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

@media (max-width: 768px) {
  .ax-flow-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .ax-flow-tag {
    justify-self: start;
  }

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

.project-part-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.project-part-number {
  flex: 0 0 48px;
  padding-right: 1rem;
  border-right: 2px solid rgba(var(--part-accent-rgb), 0.38);
  color: var(--part-accent);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.project-part-heading {
  min-width: 0;
}

.project-part-kicker {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--part-accent);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.25;
}

.project-platform-part h4 {
  margin: 0;
  color: var(--gray-900);
  font-size: 1.2rem;
  line-height: 1.35;
  text-wrap: balance;
}

.project-part-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.48fr);
  gap: 2rem;
  align-items: start;
}

.project-part-copy,
.project-part-media,
.project-gallery-group {
  min-width: 0;
}

:is(#dr-ag, #dr-ag-ax) .project-part-copy > p,
:is(#dr-ag, #dr-ag-ax) .project-subproject p {
  margin: 0 0 0.875rem;
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.62;
}

.project-part-copy > ul,
.project-subproject ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--gray-500);
  font-size: 0.82rem;
  line-height: 1.5;
}

.project-part-copy li,
.project-subproject li {
  position: relative;
  padding-left: 0.875rem;
}

.project-part-copy li::before,
.project-subproject li::before {
  content: "";
  position: absolute;
  top: 0.64em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--part-accent);
}

.project-subproject {
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(var(--part-accent-rgb), 0.32);
}

.project-subproject-kicker {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--part-accent);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.25;
}

.project-subproject h5 {
  margin: 0 0 0.5rem;
  color: var(--gray-900);
  font-family: var(--card-font);
  font-size: 0.94rem;
  line-height: 1.35;
}

.project-part-media {
  display: grid;
  gap: 1.25rem;
}

.project-gallery-group + .project-gallery-group {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(var(--part-accent-rgb), 0.14);
}

.project-platform-part .project-gallery-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  color: var(--gray-900);
  line-height: 1.35;
}

.project-gallery-label strong {
  font-size: 0.8rem;
  font-weight: 850;
}

.project-gallery-label span {
  flex: 0 0 auto;
  color: var(--gray-500);
  font-size: 0.68rem;
  font-weight: 700;
}

.project-stack {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1.65fr);
  gap: 1.5rem;
  padding: 1.75rem;
  background: var(--gray-50);
}

.project-stack-heading h4 {
  margin: 0;
  color: var(--gray-900);
  font-size: 1rem;
  line-height: 1.35;
}

.project-stack-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
}

.project-stack-groups > div {
  min-width: 0;
  padding: 0 1rem;
  border-left: 1px solid var(--gray-200);
}

.project-stack-groups dt {
  margin-bottom: 0.35rem;
  color: var(--gray-600);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.25;
}

.project-stack-groups dd {
  margin: 0;
  color: var(--gray-500);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  order: 20;
  margin-top: auto;
  margin-bottom: 0.75rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  order: 22;
  margin: 0.25rem 0 0;
}

.project-platform-part .project-gallery {
  order: initial;
  margin: 0.875rem 0 0;
}

.project-shot {
  display: grid;
  grid-template-rows: auto minmax(2.2em, auto);
  min-width: 0;
  margin: 0;
}

.project-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  cursor: zoom-in;
  border-radius: 8px;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  background: var(--surface-blue);
  transition: transform 0.32s var(--ease-out);
}

/* For screens whose content sits mid-page: frame the middle instead of the empty top */
.project-gallery img.shot-focus-middle {
  object-position: center 51%;
}

.project-gallery img:hover {
  transform: translateY(-4px);
}

.project-gallery img:focus-visible {
  outline: 3px solid rgba(var(--secondary-rgb), 0.42);
  outline-offset: 4px;
}

.project-shot figcaption {
  padding: 0.5rem 0.125rem 0;
  color: var(--gray-500);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: keep-all;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  order: 21;
}

.project-link {
  color: var(--primary-strong);
  font-weight: 600;
  order: 21;
  margin-top: 0;
  transition: var(--transition);
}

.project-link:hover {
  text-decoration: underline;
}

.project-actions a {
  color: var(--primary-strong);
  font-weight: 700;
  transition: var(--transition);
}

.project-actions a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.project-status {
  color: var(--text-light);
  font-weight: 800;
}

body.lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: var(--lightbox-backdrop);
  background-image: none;
  backdrop-filter: blur(14px) saturate(112%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox.is-open {
  opacity: 1;
}

.lightbox-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.lightbox-title {
  color: var(--gray-900);
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.lightbox-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  max-height: calc(100vh - 168px);
  overflow: hidden;
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.76);
  border: 1px solid rgba(var(--primary-rgb), 0.14);
}

.lightbox-frame img {
  max-width: 100%;
  max-height: calc(100vh - 168px);
  object-fit: contain;
}

.lightbox-caption {
  color: var(--gray-800);
  text-align: center;
  font-weight: 700;
  margin: 0;
}

.lightbox-control,
.lightbox-close {
  appearance: none;
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  background: var(--glass-strong);
  color: var(--primary-strong);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lightbox-control:hover,
.lightbox-close:hover {
  border-color: var(--primary-color);
  background: var(--primary-strong);
  color: var(--on-primary);
  transform: translateY(-1px);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  z-index: 1;
}

.lightbox-control {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 56px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.lightbox-control:hover {
  transform: translateY(-50%) scale(1.04);
}

.lightbox-prev {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

.scroll-top-button {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  color: var(--on-primary);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.2s ease;
}

.scroll-top-button.is-visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-button:hover {
  transform: translateY(-2px);
}

.scroll-top-button:hover .scroll-top-icon {
  animation: scrollTopIconBounce 0.6s ease-in-out infinite;
}

.scroll-top-icon {
  font-size: 1.5rem;
}

@keyframes scrollTopIconBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.project-tag {
  padding: 0.25rem 1rem;
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.1),
    rgba(var(--secondary-rgb), 0.1)
  );
  color: var(--primary-strong);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  transition: var(--transition);
}

.project-tag:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--on-primary);
  transform: translateY(-2px);
}

.featured-projects-action {
  text-align: center;
}

/* ===== Page Hero ===== */
.page-hero {
  padding:
    calc(var(--site-nav-height) + var(--page-hero-offset-y))
    var(--page-hero-inline-padding)
    var(--page-hero-padding-bottom);
  background:
    var(--page-hero-background),
    linear-gradient(90deg, transparent 24px, var(--page-hero-grid-line) 25px),
    linear-gradient(0deg, transparent 24px, var(--page-hero-grid-line) 25px);
  background-size: auto, 50px 50px, 50px 50px;
  color: var(--on-accent);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero > .container {
  width: min(100%, 760px);
  max-width: 760px;
  padding: 0;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.35rem, 5vw, 3rem);
  line-height: 1.06;
}

.page-hero p {
  max-width: min(100%, 620px);
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.55;
  opacity: 0.92;
}

/* ===== 404 Page ===== */
.not-found-page {
  min-height: 100svh;
}

.page-hero.not-found-hero {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(5rem, 11vh, 7rem) 1.25rem clamp(2.25rem, 6vh, 3.5rem);
}

.not-found-content {
  display: grid;
  justify-items: center;
  gap: clamp(1rem, 2.4vw, 1.75rem);
  width: min(100%, 640px);
  max-width: 640px;
  padding: 0;
}

.page-hero.not-found-hero h1 {
  font-size: clamp(6.5rem, 18vw, 11rem);
  line-height: 0.82;
  margin: 0;
  text-shadow: 0 18px 42px rgba(var(--accent-rgb), 0.2);
}

.page-hero.not-found-hero p {
  max-width: 420px;
  margin: 0;
  font-size: clamp(0.98rem, 2.2vw, 1.12rem);
  line-height: 1.65;
}

.not-found-action {
  margin-top: clamp(0.75rem, 1.8vw, 1.25rem);
  opacity: 1;
}

.not-found-action .btn {
  min-width: 174px;
  min-height: 48px;
  padding: 0 1.75rem;
}

@media (max-height: 620px) {
  .page-hero.not-found-hero {
    padding: 4.75rem 1rem 1.75rem;
  }

  .not-found-content {
    gap: 0.75rem;
  }

  .page-hero.not-found-hero h1 {
    font-size: clamp(4.5rem, 18vw, 7rem);
  }

  .not-found-action {
    margin-top: 0.5rem;
  }
}

/* ===== About Page ===== */
.about-content {
  padding: 5rem 1.25rem;
  background:
    linear-gradient(180deg, var(--page-background) 0%, var(--gray-50) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.about-image {
  position: sticky;
  top: 110px;
  perspective: 1000px;
}

.about-image img {
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  width: min(100%, 420px);
  margin: 0 auto;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s var(--ease-out);
}

.about-image:hover img {
  transform: rotateX(4deg) rotateY(-6deg) translateY(-8px);
}

.profile-stack {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.profile-stack span {
  min-width: 54px;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  background: var(--glass);
  color: var(--primary-strong);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.about-lead strong {
  color: var(--text-dark);
}

.about-more {
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
}

.about-more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: 999px;
  background: rgba(var(--alice-blue-rgb), 0.7);
  color: var(--primary-strong);
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  transition:
    background 0.24s ease,
    border-color 0.24s ease,
    color 0.24s ease;
}

.about-more summary::-webkit-details-marker {
  display: none;
}

.about-more summary:hover {
  border-color: rgba(var(--primary-rgb), 0.32);
  background: rgba(var(--primary-rgb), 0.1);
}

.about-more summary:focus {
  outline: 2px solid rgba(var(--primary-rgb), 0.24);
  outline-offset: 3px;
}

.about-more summary i {
  font-size: 0.76rem;
  transition: transform 0.24s var(--ease-out);
}

.about-more[open] summary i {
  transform: rotate(180deg);
}

.about-more-close {
  display: none;
}

.about-more[open] .about-more-open {
  display: none;
}

.about-more[open] .about-more-close {
  display: inline;
}

.about-more-body {
  margin-top: 1rem;
  padding: 1rem 1rem;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.82);
}

.about-more-body p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.68;
}

.about-more-body p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.about-stat {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  min-height: 148px;
  padding: 1rem;
  text-align: left;
  background: var(--glass-strong);
  border-radius: 8px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  transition: border-color 0.24s ease;
}

.about-stat:hover {
  border-color: rgba(var(--primary-rgb), 0.28);
}

.about-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--primary-strong);
  font-size: 1rem;
}

.about-stat-body {
  min-width: 0;
}

.about-stat-kicker {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--secondary-color);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.about-stat h3 {
  margin-bottom: 0.25rem;
  color: var(--gray-900);
  font-size: 1.02rem;
  line-height: 1.35;
}

.about-stat p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.52;
}

/* ===== Strengths ===== */
.strengths {
  padding: 5rem 1.25rem;
  background:
    linear-gradient(180deg, var(--page-background) 0%, var(--surface-blue) 100%);
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.strength-card {
  min-height: 280px;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  background: rgba(var(--surface-rgb), 0.88);
  transition: transform 0.35s var(--ease-out);
}

.strength-card:hover {
  transform: translateY(-8px);
}

.strength-index {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  font-weight: 900;
  font-size: 0.9rem;
}

.strength-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.strength-card p {
  color: var(--text-light);
  line-height: 1.65;
}

/* ===== Experience Section ===== */
.experience {
  padding: 5rem 1.25rem;
  background:
    linear-gradient(180deg, var(--surface-blue) 0%, var(--page-background) 100%);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.timeline-item {
  position: relative;
  padding-left: 3.75rem;
  margin-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 4px solid var(--surface);
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.timeline-content {
  padding: 1.25rem 1.25rem;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.88);
}

.timeline-date {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.timeline-list {
  margin-top: 0.75rem;
  padding-left: 1rem;
  color: var(--text-light);
}

.timeline-list li + li {
  margin-top: 0.25rem;
}

.evidence-chip-list,
.timeline-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.evidence-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 32px;
  max-width: 100%;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: 999px;
  background: rgba(var(--alice-blue-rgb), 0.74);
  color: var(--gray-600);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.evidence-chip-button {
  appearance: none;
  color: var(--primary-strong);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: var(--transition);
}

.evidence-chip-button:hover {
  border-color: var(--primary-color);
  background: var(--primary-strong);
  color: var(--on-primary);
}

.evidence-chip i {
  flex: 0 0 auto;
  font-size: 0.85em;
}

.evidence-chip span {
  min-width: 0;
}

.career-proof {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  max-width: 800px;
  margin: 0.25rem auto 0;
  padding: 1.25rem 1.25rem;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.88);
}

.career-proof-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--primary-strong);
  background: rgba(var(--alice-blue-rgb), 0.9);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
}

.career-proof-icon i {
  font-size: 1.2rem;
}

.career-proof-kicker {
  margin-bottom: 0.25rem;
  color: var(--secondary-color);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.career-proof h3 {
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
}

.career-proof-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--primary-strong);
  cursor: pointer;
  font-weight: 800;
  transition: var(--transition);
}

.career-proof-link:hover {
  border-color: var(--primary-color);
  background: var(--primary-strong);
  color: var(--on-primary);
}

/* ===== Contact Section ===== */
.contact {
  padding: 5rem 1.25rem;
  background:
    linear-gradient(180deg, var(--page-background) 0%, var(--gray-50) 100%);
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
}

.contact-item {
  text-align: center;
  padding: 1.25rem 1rem;
  background: rgba(var(--alice-blue-rgb), 0.78);
  border-radius: 8px;
  transition: var(--transition);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.contact-item:hover {
  transform: translateY(-5px);
}

.contact-item i {
  font-size: 2rem;
  color: var(--primary-strong);
  margin-bottom: 0.75rem;
}

.contact-item h3 {
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: var(--text-light);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.contact-item a {
  color: var(--gray-500);
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--primary-strong);
  text-decoration: underline;
}

.skill-card,
.project-card,
.about-stat,
.strength-card,
.career-proof,
.timeline-content,
.contact-item,
.skill-card :is(h1, h2, h3, h4, p, a, span, button),
.project-card :is(h1, h2, h3, h4, p, a, span, button),
.about-stat :is(h1, h2, h3, h4, p, a, span, button),
.strength-card :is(h1, h2, h3, h4, p, a, span, button),
.career-proof :is(h1, h2, h3, h4, p, a, span, button),
.timeline-content :is(h1, h2, h3, h4, p, a, span, button),
.contact-item :is(h1, h2, h3, h4, p, a, span, button) {
  font-family: var(--card-font);
}

/* ===== Project Filters ===== */
.project-filters {
  padding: 0.5rem 0.75rem;
  background: var(--filter-background);
  position: sticky;
  top: var(--site-nav-height);
  z-index: 20;
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.08);
}

.project-filters::before {
  content: "";
  position: absolute;
  inset: -90% -28%;
  z-index: 0;
  background: var(--filter-paint);
  background-size: 170% 150%, 210% 190%;
  opacity: 0.92;
  pointer-events: none;
  transform-origin: center;
  animation: projectFiltersPaintFlow 8.5s ease-in-out infinite;
}

.project-filters .container {
  max-width: 100%;
  padding: 0 0.75rem;
  position: relative;
  z-index: 1;
}

.project-filter-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.25rem 1rem;
  background: var(--glass-strong);
  border: 1px solid rgba(var(--primary-rgb), 0.62);
  color: var(--primary-strong);
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.08;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.project-filter-button:hover,
.project-filter-button.is-active {
  background: var(--primary-strong);
  border-color: var(--primary-color);
  color: var(--on-primary);
}

.project-filter-button:focus-visible {
  outline: 3px solid rgba(var(--secondary-rgb), 0.38);
  outline-offset: 4px;
}

@keyframes projectFiltersPaintFlow {
  0%,
  100% {
    background-position: 0% 44%, 100% 56%;
    transform: translate3d(-3%, -1%, 0) scale(1.04) rotate(-1.2deg);
  }
  35% {
    background-position: 70% 54%, 34% 45%;
    transform: translate3d(2%, 1.5%, 0) scale(1.07) rotate(1deg);
  }
  70% {
    background-position: 100% 46%, 0% 60%;
    transform: translate3d(4%, -1%, 0) scale(1.05) rotate(-0.4deg);
  }
}

/* ===== Projects Section (Projects Page) ===== */
.projects-section {
  padding: 5rem 1.25rem;
  /* html's scroll-padding-top already reserves the nav + gap; only add the sticky filter bar */
  scroll-margin-top: var(--project-filter-height);
  background:
    linear-gradient(180deg, var(--page-background) 0%, var(--gray-50) 100%);
}

.projects-section .projects-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.projects-section .project-card {
  grid-column: span 4;
}

.projects-section .project-card.project-card-featured {
  grid-column: span 12;
  display: block;
}

.projects-section .project-card.project-card-featured .project-image {
  height: clamp(190px, 20vw, 230px);
  min-height: 0;
}

.projects-section .project-card.project-card-featured .project-info {
  padding: 1.75rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--footer-background);
  color: var(--on-accent);
  padding: 2rem 1.25rem;
  text-align: center;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--on-accent);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-strong);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  :root {
    --section-space: 3.5rem;
  }

  .section-eyebrow {
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
  }

  .container {
    padding: 0 1rem;
  }

  .site-nav .container {
    padding: 0.75rem 1rem;
  }

  .site-logo a {
    font-size: 1.25rem;
  }

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

  .site-nav-menu {
    position: fixed;
    left: -100%;
    top: var(--site-nav-height);
    flex-direction: column;
    background: var(--surface);
    width: 100%;
    text-align: center;
    transition: var(--transition);
    padding: 2rem 0;
    border-bottom: 1px solid rgba(var(--gray-900-rgb), 0.1);
  }

  .site-nav-menu.is-open {
    left: 0;
  }

  .project-filters {
    padding: 0.5rem 0;
  }

  .project-filters .container {
    padding: 0 0.5rem;
  }

  .project-filter-list {
    flex-wrap: nowrap;
    justify-content: center;
    justify-content: safe center;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0 0.25rem 0.25rem;
    scrollbar-width: none;
  }

  .project-filter-list::-webkit-scrollbar {
    display: none;
  }

  .project-filter-button {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0.25rem 0.75rem;
    border-width: 1px;
    font-size: 0.78rem;
  }

  .hero {
    min-height: 100svh;
    padding: 4.75rem 1.25rem 2.25rem;
    background-position: 58% center;
  }

  .hero-content {
    --hero-group-gap: clamp(2.5rem, 6.5svh, 4.5rem);
    --hero-item-gap: clamp(1rem, 2.2svh, 1.5rem);
    min-height: calc(100svh - 110px);
    max-width: 560px;
  }

  .hero-title {
    max-width: 520px;
    margin: 0 auto clamp(1.5rem, 3.5svh, 2.25rem);
    font-size: clamp(2.15rem, 9vw, 3rem);
    line-height: 1.12;
    word-break: keep-all;
  }

  .hero-title-line {
    display: block;
  }

  .hero-title-line + .hero-title-line {
    margin-top: 0.25rem;
  }

  .hero-subtitle {
    max-width: 430px;
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-subtitle-line {
    white-space: normal;
  }

  .hero-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    width: min(100%, 390px);
    margin: 0 auto;
  }

  .hero-buttons .btn {
    flex: 0 0 auto;
    padding: 0 0.75rem;
    font-size: 0.92rem;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: min(100%, 400px);
  }

  .hero-meta span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.5rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .social-links {
    gap: 0.75rem;
    margin-bottom: 2.25rem;
    font-size: 1.1rem;
  }

  .social-links a {
    width: 44px;
    height: 44px;
  }

  .social-links a:hover {
    transform: none;
  }

  .scroll-indicator {
    bottom: 28px;
  }

  .scroll-indicator span {
    width: 18px;
    height: 28px;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
  }

  .page-hero {
    --page-hero-offset-y: 1.75rem;
    --page-hero-padding-bottom: 1.75rem;
    --page-hero-inline-padding: var(--projects-mobile-inline-padding);
    background-size: auto, 38px 38px, 38px 38px;
  }

  .page-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .page-hero p {
    max-width: 100%;
    margin: 0 auto;
    font-size: clamp(0.76rem, 2.75vw, 0.9rem);
    line-height: 1.48;
    white-space: nowrap;
  }

  .about-content,
  .strengths,
  .experience,
  .contact {
    padding: 3rem 0;
  }

  .scroll-top-button {
    right: 16px;
    bottom: 18px;
    width: 46px;
    height: 46px;
  }

  .scroll-top-icon {
    font-size: 1.18rem;
  }

  .skills {
    padding-inline: 1rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 560px;
  }

  .skill-card {
    min-height: 104px;
    padding: 1rem 0.75rem;
  }

  .skill-card:hover,
  .skill-card.reveal-item.is-visible:hover {
    transform: none;
  }

  .skill-card i {
    font-size: 1.85rem;
  }

  .skill-card:hover i {
    transform: none;
  }

  .skill-card h3 {
    margin-bottom: 0;
    font-size: 0.98rem;
    line-height: 1.14;
    overflow-wrap: anywhere;
  }

  .skill-card p {
    display: none;
  }

  .skills-grid + .skills-group-title {
    margin-top: 1.25rem;
  }

  /* Narrow cards: the 2×2 tag grid needs the full card width */
  .skill-card:has(.skill-tags) {
    padding-inline: 0.375rem;
  }

  .skill-tags {
    gap: 0.25rem;
    margin-top: 0.4rem;
  }

  .skill-tags li {
    padding: 0.15rem 0.4rem;
    font-size: 0.64rem;
  }

  .featured-projects {
    padding-inline: var(--projects-mobile-inline-padding);
  }

  .featured-projects > .container {
    padding: 0;
  }

  .projects-section {
    padding: var(--projects-mobile-block-padding) var(--projects-mobile-inline-padding);
  }

  .projects-section > .container {
    padding: 0;
  }

  .projects-grid {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .projects-section .projects-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: row;
  }

  .featured-projects .projects-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: row;
  }

  .featured-projects .project-card,
  .projects-section .project-card,
  .projects-section .project-card.project-card-featured {
    grid-column: 1 / -1;
    display: block;
    min-width: 0;
    width: 100%;
  }

  .project-image {
    height: 154px;
  }

  .project-image .project-overlay {
    width: min(calc(100% - 1.25rem), 320px);
    min-height: 74px;
    max-height: calc(100% - 1.25rem);
    padding: 0.75rem 0.75rem;
    background: var(--glass-soft);
    backdrop-filter: blur(4px);
  }

  .projects-section .project-card-featured .project-overlay {
    width: min(calc(100% - 1.25rem), 340px);
    min-height: 116px;
  }

  .projects-section .project-card-featured .project-header-actions {
    position: static;
    display: flex;
    width: 100%;
    max-width: 100%;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .project-overlay-copy {
    width: min(100%, 260px);
  }

  .project-overlay-copy .project-kicker {
    margin-bottom: 0.25rem;
    font-size: 0.68rem;
  }

  .project-overlay-copy h3 {
    font-size: 1rem;
    line-height: 1.24;
  }

  .project-info {
    padding: var(--projects-mobile-block-padding) var(--projects-mobile-inline-padding);
  }

  .projects-section .project-card.project-card-featured .project-info {
    padding: var(--projects-mobile-block-padding) var(--projects-mobile-inline-padding);
  }

  .project-info p {
    font-size: 0.92rem;
    line-height: 1.58;
    margin-bottom: 0.75rem;
  }

  .project-header-actions {
    justify-content: center;
    gap: 0.5rem;
  }

  .project-header-actions a {
    min-height: 36px;
    padding: 0.5rem 0.5rem;
    font-size: 0.76rem;
  }

  .project-header-actions i {
    font-size: 0.9rem;
  }

  .project-tags {
    gap: 0.25rem;
  }

  .project-tag {
    padding: 0.25rem 0.75rem;
    font-size: 0.76rem;
  }

  .featured-projects .project-tag {
    padding: 0.25rem 0.5rem;
    font-size: 0.74rem;
  }

  .project-gallery {
    margin-bottom: 0.75rem;
  }

  .project-platform-part .project-gallery {
    margin-top: 0.75rem;
  }

  :is(#dr-ag, #dr-ag-ax) .project-info {
    padding: 0;
  }

  .project-overview {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem 1rem;
  }

  .project-impact {
    margin: 0;
    padding: 1rem 0 0;
    border-top: 1px solid var(--gray-100);
    border-left: 0;
  }

  .project-section-nav {
    grid-template-columns: 1fr;
  }

  .project-section-nav a {
    padding: 0.75rem 1rem;
  }

  .project-section-nav a + a {
    border-top: 1px solid var(--gray-100);
    border-left: 0;
  }

  .project-platform-part {
    padding: 1.5rem 1rem;
  }

  .project-part-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .project-part-number {
    flex-basis: 40px;
    padding-right: 0.75rem;
  }

  .project-platform-part h4 {
    font-size: 1.05rem;
  }

  .project-part-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  :is(#dr-ag, #dr-ag-ax) .project-part-copy > p,
  :is(#dr-ag, #dr-ag-ax) .project-subproject p {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .project-part-copy > ul,
  .project-subproject ul {
    font-size: 0.78rem;
    line-height: 1.48;
  }

  .project-subproject {
    margin-top: 1rem;
  }

  .project-stack {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem 1rem;
  }

  .project-stack-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1rem;
  }

  .project-stack-groups > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .project-shot figcaption {
    font-size: 0.62rem;
  }

  .project-gallery img:hover {
    transform: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about-image {
    position: relative;
    top: auto;
    max-width: min(68vw, 240px);
    margin: 0 auto;
  }

  .about-image img {
    width: 100%;
  }

  .about-image:hover img {
    transform: none;
  }

  .profile-stack {
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  .profile-stack span {
    min-width: 44px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .about-text h2 {
    margin-bottom: 0.75rem;
    font-size: 1.55rem;
    line-height: 1.28;
    text-align: center;
  }

  .about-text p {
    margin-bottom: 0.75rem;
    font-size: 0.94rem;
    line-height: 1.62;
  }

  .about-more {
    margin-bottom: 1rem;
  }

  .about-more summary {
    font-size: 0.86rem;
  }

  .about-more-body {
    margin-top: 0.75rem;
    padding: 1rem;
  }

  .about-more-body p {
    font-size: 0.88rem;
    line-height: 1.58;
  }

  .about-stats {
    margin-top: 1.5rem;
  }

  .about-stat {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 132px;
  }

  .about-stat:hover {
    transform: none;
  }

  .about-stat-icon {
    width: 38px;
    height: 38px;
    font-size: 0.92rem;
  }

  .about-stat-kicker {
    font-size: 0.68rem;
  }

  .about-stat h3 {
    font-size: 0.96rem;
    line-height: 1.32;
    overflow-wrap: anywhere;
  }

  .about-stat p {
    font-size: 0.78rem;
    line-height: 1.42;
  }

  .strengths-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .strength-card {
    min-height: 0;
    padding: 1rem 1rem 1.25rem;
  }

  .strength-card:hover {
    transform: none;
  }

  .strength-index {
    margin-bottom: 0.5rem;
  }

  .strength-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.35;
  }

  .strength-card p {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .experience .section-title,
  .contact .section-title {
    margin-bottom: 1.5rem;
  }

  .timeline {
    max-width: 100%;
  }

  .timeline::before {
    left: 7px;
    top: 8px;
    bottom: 8px;
    background: rgba(var(--primary-rgb), 0.28);
  }

  .timeline-item {
    padding-left: 1.75rem;
    margin-bottom: 1rem;
  }

  .timeline-item:last-child {
    margin-bottom: 0;
  }

  .timeline-dot {
    left: 1px;
    top: 0.45rem;
    width: 14px;
    height: 14px;
    border-width: 3px;
  }

  .timeline-content {
    padding: 1rem;
  }

  .timeline-content h3 {
    font-size: 1.08rem;
    line-height: 1.35;
    margin-bottom: 0.25rem;
  }

  .timeline-date {
    margin-bottom: 0.25rem;
    font-size: 0.82rem;
  }

  .timeline-content > p:not(.timeline-date) {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .timeline-list {
    margin-top: 0.5rem;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .career-proof {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
  }

  .career-proof-icon {
    width: 42px;
    height: 42px;
  }

  .career-proof h3 {
    font-size: 1.02rem;
    line-height: 1.35;
  }

  .career-proof p {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .evidence-chip-list,
  .timeline-chip-list {
    margin-top: 0.5rem;
  }

  .evidence-chip {
    min-height: 30px;
    padding: 0.25rem 1rem;
    font-size: 0.72rem;
  }

  .career-proof-link {
    grid-column: 2;
    justify-self: start;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }

  .contact-info {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    max-width: 560px;
  }

  .contact-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-areas:
      "icon title"
      "icon body";
    align-items: center;
    column-gap: 0.75rem;
    min-height: 72px;
    padding: 0.75rem 0.75rem;
    text-align: left;
  }

  .contact-item:hover {
    transform: none;
  }

  .contact-item i {
    grid-area: icon;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 50%;
    background: var(--glass);
    font-size: 1rem;
  }

  .contact-item h3 {
    grid-area: title;
    margin: 0 0 0.25rem;
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .contact-item p {
    grid-area: body;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .gallery-lightbox {
    padding: 1rem;
  }

  .lightbox-dialog {
    width: calc(100vw - 20px);
  }

  .lightbox-control {
    width: 40px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  :root {
    --section-space: 3rem;
  }

  .site-nav .container {
    padding: 0.5rem 1rem;
  }

  .site-logo a {
    font-size: 1.18rem;
  }

  .skills {
    padding-inline: 0.75rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: 1.25rem;
  }

  .about-stat {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.5rem;
    min-height: 0;
    padding: 0.75rem;
  }

  .about-stat-icon {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
  }

  .about-stat-kicker {
    font-size: 0.62rem;
  }

  .about-stat h3 {
    font-size: 0.88rem;
  }

  .about-stat p {
    font-size: 0.74rem;
    line-height: 1.38;
  }

  .experience .section-title {
    margin-bottom: 1.25rem;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline-item {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .timeline-dot {
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .timeline-content {
    padding: 0.75rem;
  }

  .timeline-content h3 {
    font-size: 0.98rem;
  }

  .timeline-date {
    font-size: 0.76rem;
  }

  .timeline-content > p:not(.timeline-date),
  .timeline-list {
    font-size: 0.8rem;
  }

  .career-proof {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 0.75rem;
  }

  .career-proof-icon {
    width: 36px;
    height: 36px;
  }

  .career-proof-icon i {
    font-size: 1rem;
  }

  .career-proof-kicker {
    font-size: 0.7rem;
  }

  .career-proof h3 {
    font-size: 0.94rem;
  }

  .career-proof p {
    font-size: 0.78rem;
  }

  .evidence-chip-list,
  .timeline-chip-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .evidence-chip {
    width: 100%;
    min-height: 34px;
    justify-content: flex-start;
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
  }

  .evidence-chip-button {
    text-align: left;
  }

  .career-proof-link {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .contact-info {
    gap: 0.5rem;
  }

  .contact-item {
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 0.5rem;
    min-height: 62px;
    padding: 0.5rem 0.75rem;
  }

  .contact-item i {
    width: 32px;
    height: 32px;
    font-size: 0.86rem;
  }

  .contact-item h3 {
    font-size: 0.84rem;
  }

  .contact-item p {
    font-size: 0.72rem;
  }

  .section-title {
    font-size: 1.65rem;
    margin-bottom: 1.25rem;
  }

  .hero {
    /* Clear the fixed nav by a fixed gap even when the hero content is taller than the screen */
    padding: calc(var(--site-nav-height) + 1.5rem) 1rem 1.75rem;
  }

  .hero-content {
    --hero-group-gap: clamp(1.75rem, 4.5svh, 3rem);
    --hero-item-gap: clamp(0.75rem, 1.8svh, 1.25rem);
    min-height: calc(100svh - var(--site-nav-height) - 3.25rem);
  }

  .hero-title {
    max-width: 350px;
    font-size: clamp(2.02rem, 10.4vw, 2.55rem);
    line-height: 1.1;
  }

  .hero-subtitle {
    max-width: 340px;
    font-size: 0.92rem;
    line-height: 1.62;
  }

  .hero-meta span {
    min-height: 36px;
    padding: 0.5rem 0.5rem;
    font-size: 0.72rem;
  }

  .social-links {
    font-size: 1rem;
  }

  .social-links a {
    width: 44px;
    height: 44px;
  }

  .scroll-indicator {
    bottom: 24px;
  }

  .page-hero {
    --page-hero-offset-y: 1.25rem;
    --page-hero-padding-bottom: 1.5rem;
  }

  .page-hero h1 {
    font-size: 1.72rem;
    margin-bottom: 0.5rem;
  }

  .page-hero p {
    font-size: clamp(0.68rem, 3vw, 0.78rem);
    line-height: 1.46;
  }

  .about-content,
  .strengths,
  .experience,
  .contact {
    padding: 2.25rem 0;
  }

  .scroll-top-button {
    right: 12px;
    bottom: 14px;
    width: 38px;
    height: 38px;
  }

  .scroll-top-icon {
    font-size: 0.95rem;
  }

  .about-grid {
    gap: 1rem;
  }

  .about-image {
    max-width: min(62vw, 220px);
  }

  .profile-stack {
    margin-top: 0.5rem;
  }

  .profile-stack span {
    min-width: 40px;
    padding: 0.25rem 0.5rem;
    font-size: 0.68rem;
  }

  .about-text h2 {
    font-size: 1.36rem;
  }

  .about-text p {
    margin-bottom: 0.5rem;
    font-size: 0.86rem;
    line-height: 1.58;
  }

  .about-more summary {
    width: 100%;
    justify-content: center;
    font-size: 0.82rem;
  }

  .about-more-body {
    padding: 0.75rem;
  }

  .about-more-body p {
    font-size: 0.8rem;
    line-height: 1.52;
  }

  .strengths-grid {
    gap: 0.5rem;
  }

  .strength-card {
    padding: 0.75rem 0.75rem 1rem;
  }

  .strength-index {
    margin-bottom: 0.25rem;
    font-size: 0.76rem;
  }

  .strength-card h3 {
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
  }

  .strength-card p {
    font-size: 0.82rem;
    line-height: 1.48;
  }

  .featured-projects .project-tags {
    gap: 0.125rem;
  }

  .featured-projects .project-tag {
    padding: 0.25rem 0.375rem;
    font-size: 0.72rem;
  }

  .project-image {
    height: 144px;
  }

  .project-info p {
    font-size: 0.88rem;
    line-height: 1.52;
  }

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

  .project-overview {
    padding: 1rem 0.875rem;
  }

  .project-section-nav a {
    padding: 0.75rem 0.875rem;
  }

  .project-platform-part {
    padding: 1.25rem 0.875rem;
  }

  .project-stack {
    padding: 1rem 0.875rem;
  }

  .project-stack-groups {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .project-stack-groups > div {
    padding: 0.75rem 0;
    border-top: 1px solid var(--gray-200);
    border-left: 0;
  }

  .project-stack-groups > div:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .project-actions {
    gap: 0.5rem;
  }

  .project-actions a,
  .project-status {
    font-size: 0.86rem;
  }
}

/* ===== Phone layout ===== */
@media (max-width: 560px) {
  /* Hero: chips, stats and buttons share one column width */
  .hero-meta,
  .hero-stats,
  .hero-buttons {
    width: min(100%, 360px);
  }

  .hero-stats dd {
    font-size: 0.74rem;
  }

  /* Stat labels always break at the same point, so all three read as two lines */
  .hero-stats dd span {
    display: block;
  }

  .hero-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .hero-buttons .btn {
    font-size: 0.9rem;
  }

  .hero-buttons .btn-primary {
    grid-column: 1 / -1;
  }

  /* Skills: one row per card (icon left, text right) so descriptions fit and chips stay legible */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .skill-card,
  .skill-card:has(.skill-tags) {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    grid-template-areas:
      "icon title"
      "icon body";
    column-gap: 0.875rem;
    row-gap: 0.3rem;
    align-items: center;
    justify-items: start;
    min-height: 0;
    padding: 0.875rem 1rem;
    text-align: left;
  }

  .skill-card i {
    grid-area: icon;
    justify-self: center;
    margin: 0;
    font-size: 1.5rem;
  }

  .skill-card h3 {
    grid-area: title;
    margin: 0;
    font-size: 0.95rem;
  }

  .skill-card p {
    grid-area: body;
    display: block;
    max-width: none;
    font-size: 0.8rem;
    text-wrap: balance;
  }

  .skill-tags {
    grid-area: body;
    display: flex;
    flex-wrap: wrap;
    width: auto;
    gap: 0.3rem;
    margin: 0.1rem 0 0;
  }

  .skill-tags li {
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
  }
}

/* Short phones (e.g. iPhone SE): keep the whole hero clear of the fixed nav */
@media (max-width: 480px) and (max-height: 700px) {
  .hero-content {
    --hero-group-gap: 1.25rem;
    --hero-item-gap: 0.625rem;
  }

  .hero-title {
    margin-bottom: 1rem;
    font-size: 2rem;
  }

  .hero-meta span {
    min-height: 32px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
}
