:root {
  --bg: #ece5d7;
  --surface: #fffdf8;
  --text: #1f2430;
  --muted: #5f6472;
  --accent: #b25b31;
  --accent-dark: #8e4623;
  --line: #e5dccb;
  --shadow: 0 8px 24px rgba(40, 28, 15, 0.08);
  --cloud-1: #f8fbff;
  --cloud-2: #fff8ef;
  --cloud-3: #eef6ff;
  --parallax-shift: 0px;
}

:root[data-theme="night"] {
  --bg: #242333;
  --surface: #312f40;
  --text: #f8f0ea;
  --muted: #d5c9d1;
  --accent: #f2a769;
  --accent-dark: #ffd3a1;
  --line: #5e5971;
  --shadow: 0 12px 34px rgba(10, 10, 24, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body,
body::before,
body::after,
.site-header,
.header-actions,
.mode-btn,
.project-card,
.small-project-card,
.insight-card,
.project-detail,
.not-found-card,
.tag-list li,
.filter-btn,
.project-detail-link,
.ghost-link,
.toolbox-group,
.hero-contact-icons a,
.primary-link,
.project-gallery-item,
.project-gallery-item figcaption,
.site-footer {
  transition:
    background-color 0.45s ease,
    color 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    opacity 0.45s ease,
    filter 0.45s ease;
}

:root.theme-switching * {
  transition-duration: 0.5s !important;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  position: relative;
  background:
    radial-gradient(circle at top right, #e8d0b5 0%, rgba(232, 208, 181, 0) 45%),
    radial-gradient(circle at 15% 80%, #dce8d0 0%, rgba(220, 232, 208, 0) 45%),
    radial-gradient(circle at 30% 12%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 38%),
    var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

body.not-found-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.not-found-page .not-found-main {
  flex: 1;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
  transition: transform 0.25s ease-out;
}

body::before {
  width: 320px;
  height: 140px;
  top: 110px;
  left: -40px;
  background: radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.68), rgba(248, 251, 255, 0.28) 70%, rgba(248, 251, 255, 0));
  box-shadow:
    210px 35px 0 -12px rgba(255, 255, 255, 0.52),
    460px -18px 0 -18px rgba(238, 246, 255, 0.46);
  animation: cloudDriftA 22s ease-in-out infinite;
  transform: translateY(calc(var(--parallax-shift) * 0.24));
}

body::after {
  width: 300px;
  height: 130px;
  top: 72%;
  right: -80px;
  background: radial-gradient(circle at 40% 45%, rgba(255, 255, 255, 0.62), rgba(255, 253, 248, 0.24) 70%, rgba(255, 253, 248, 0));
  box-shadow:
    -220px -45px 0 -16px rgba(255, 255, 255, 0.48),
    -440px -10px 0 -22px rgba(248, 251, 255, 0.42);
  animation: cloudDriftB 26s ease-in-out infinite;
  transform: translateY(calc(var(--parallax-shift) * -0.2));
}

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

a {
  color: inherit;
}

.header-actions {
  position: fixed;
  left: 1rem;
  top: 5.2rem;
  z-index: 30;
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.36rem;
  border: 1px solid var(--line);
  border-radius: 0.68rem;
  background: rgba(255, 253, 248, 0.58);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 18px rgba(40, 28, 15, 0.1);
}

.mode-btn {
  border: 1px solid #d8c5ad;
  background: rgba(255, 248, 239, 0.58);
  color: #6e3d20;
  border-radius: 0.48rem;
  padding: 0.32rem 0.58rem;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.mode-btn:hover,
.mode-btn:focus-visible {
  transform: translateY(-1px);
  background: #f8e8d8;
  border-color: #cfa682;
}

.mode-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  background: rgba(248, 251, 255, 0.58);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

:root[data-theme="night"] body {
  background:
    radial-gradient(circle at 82% 14%, rgba(255, 176, 110, 0.32) 0%, rgba(255, 176, 110, 0) 38%),
    radial-gradient(circle at 18% 20%, rgba(173, 136, 255, 0.24) 0%, rgba(173, 136, 255, 0) 42%),
    radial-gradient(circle at 20% 88%, rgba(96, 170, 210, 0.16) 0%, rgba(96, 170, 210, 0) 46%),
    linear-gradient(160deg, rgba(255, 196, 146, 0.08), rgba(154, 134, 246, 0.04) 34%, rgba(74, 124, 170, 0.08)),
    var(--bg);
}

:root[data-theme="night"] .site-header {
  background: rgba(39, 37, 54, 0.74);
}

:root[data-theme="night"] .site-footer {
  background: linear-gradient(180deg, rgba(41, 38, 59, 0.92), rgba(35, 33, 50, 0.95));
  border-top-color: #746c8b;
}

:root[data-theme="night"] .site-footer p {
  color: #fff1e6;
}

:root[data-theme="night"] .contact-list a {
  color: #f6e2d5;
}

:root[data-theme="night"] .contact-list a:hover,
:root[data-theme="night"] .contact-list a:focus-visible {
  color: #ffd3a1;
}

:root[data-theme="night"] .mode-btn {
  border-color: #766b87;
  background: rgba(62, 57, 82, 0.82);
  color: #ffeede;
}

:root[data-theme="night"] .header-actions {
  background: rgba(45, 42, 63, 0.78);
}

:root[data-theme="night"] .mode-btn:hover,
:root[data-theme="night"] .mode-btn:focus-visible {
  background: rgba(79, 72, 105, 0.92);
}

:root[data-theme="night"] .tag-list li,
:root[data-theme="night"] .filter-btn,
:root[data-theme="night"] .project-detail-link,
:root[data-theme="night"] .ghost-link,
:root[data-theme="night"] .toolbox-group {
  border-color: #786f90;
  background: rgba(65, 60, 89, 0.72);
  color: #ffeade;
}

:root[data-theme="night"] .project-card,
:root[data-theme="night"] .small-project-card,
:root[data-theme="night"] .insight-card,
:root[data-theme="night"] .project-detail,
:root[data-theme="night"] .not-found-card {
  background: rgba(49, 46, 68, 0.88);
}

:root[data-theme="night"] .insight-copy,
:root[data-theme="night"] .radar-legend {
  color: #f0dfd5;
}

:root[data-theme="night"] .radar-label {
  fill: #f0dfd5;
}

:root[data-theme="night"] .radar-axis {
  stroke: #9d93b4;
}

:root[data-theme="night"] .radar-ring {
  stroke: #9d93b4;
  fill: rgba(90, 84, 120, 0.42);
}

:root[data-theme="night"] .radar-legend strong {
  color: #ffd3a1;
}

:root[data-theme="night"] .project-gallery-item {
  background: rgba(58, 54, 80, 0.88);
  border-color: #746e8b;
}

:root[data-theme="night"] .project-gallery-image-frame {
  border-bottom-color: #746e8b;
}

:root[data-theme="night"] .project-gallery-item figcaption {
  color: #f8e7dc;
  background: rgba(46, 42, 66, 0.86);
}

:root[data-theme="night"] .hero-contact-icons a {
  color: #ffe5d2;
  border-color: #8b7b95;
  background: linear-gradient(180deg, rgba(89, 81, 116, 0.88), rgba(64, 58, 89, 0.88));
  box-shadow: 0 6px 14px rgba(11, 8, 26, 0.25);
}

:root[data-theme="night"] .hero-contact-icons a:hover,
:root[data-theme="night"] .hero-contact-icons a:focus-visible {
  background: linear-gradient(180deg, rgba(107, 96, 138, 0.95), rgba(72, 64, 99, 0.95));
  border-color: #b49cad;
}

:root[data-theme="night"] .primary-link {
  background: linear-gradient(135deg, #f2b77d, #ec8a63);
  color: #2a1d1f;
  box-shadow: 0 10px 22px rgba(12, 8, 20, 0.34);
}

:root[data-theme="night"] .primary-link:hover,
:root[data-theme="night"] .primary-link:focus-visible {
  background: linear-gradient(135deg, #ffd1a0, #f09a78);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 0.4rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent-dark);
}

main {
  width: min(1050px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2rem, 6vw, 5rem) 0;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  width: min(520px, 70vw);
  height: 220px;
  top: 8%;
  right: -40px;
  border-radius: 999px;
  background: linear-gradient(160deg, rgba(248, 251, 255, 0.7), rgba(255, 255, 255, 0.2));
  z-index: -1;
  animation: glowPulse 10s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  top: 4%;
  right: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  z-index: -1;
  animation: glowPulse 8s ease-in-out infinite alternate;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  font-weight: 800;
}

.bio {
  margin: 1rem 0 1.8rem;
  color: var(--muted);
  max-width: 52ch;
}

.hero-contact-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.hero-contact-icons a {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  color: var(--accent-dark);
  border: 1px solid #d8c5ad;
  background: rgba(255, 248, 239, 0.78);
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.hero-contact-icons a:hover,
.hero-contact-icons a:focus-visible {
  transform: translateY(-1px);
  background: #f8e8d8;
  border-color: #cfa682;
}

.hero-contact-icons svg {
  width: 1.08rem;
  height: 1.08rem;
  fill: currentColor;
}

.primary-link {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 0.6rem;
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.primary-link:hover,
.primary-link:focus-visible {
  transform: translateY(-2px);
  background: var(--accent-dark);
}

.hero-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.personality-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid #d8c5ad;
  background: rgba(255, 248, 239, 0.78);
  color: #6e3d20;
  border-radius: 0.6rem;
  padding: 0.72rem 1rem;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.personality-link:hover,
.personality-link:focus-visible {
  transform: translateY(-2px);
  border-color: #cfa682;
  background: #f8e8d8;
}

.hero-image {
  display: block;
  justify-self: end;
  width: min(360px, 100%);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 45%);
}

.hero-image-link {
  text-decoration: none;
}

.hero-image-badge {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  z-index: 1;
  border: 1px solid #d8c5ad;
  background: rgba(255, 248, 239, 0.92);
  color: #6e3d20;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.32rem 0.52rem;
  border-radius: 0.45rem;
}

.hero-image-link:hover,
.hero-image-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(40, 28, 15, 0.16);
}

.hero-image-link:hover .hero-image-badge,
.hero-image-link:focus-visible .hero-image-badge {
  background: #f8e8d8;
  border-color: #cfa682;
}

.about-main {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) 0 4rem;
  position: relative;
  z-index: 1;
}

.about-hero,
.about-section {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  padding: clamp(1.1rem, 3vw, 1.7rem);
}

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

.about-hero h1 {
  margin-top: 0.25rem;
}

.about-lead {
  margin: 0.9rem 0 0;
  color: var(--muted);
  max-width: 66ch;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.95rem;
}

.about-card {
  border: 1px solid #e8dac6;
  background: rgba(255, 248, 239, 0.7);
  border-radius: 0.7rem;
  padding: 0.8rem 0.85rem;
}

.about-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.about-section + .about-section {
  margin-top: 1rem;
}

.about-quick-facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0;
  margin: 0.85rem 0 0;
}

.about-quick-facts li {
  border: 1px dashed #d8c5ad;
  border-radius: 0.6rem;
  padding: 0.55rem 0.65rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
}

.about-quick-facts strong {
  color: #6e3d20;
}

.about-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.95rem;
}

:root[data-theme="night"] .personality-link,
:root[data-theme="night"] .hero-image-badge,
:root[data-theme="night"] .about-card,
:root[data-theme="night"] .about-quick-facts li {
  border-color: #786f90;
  background: rgba(65, 60, 89, 0.78);
  color: #ffeade;
}

:root[data-theme="night"] .about-hero,
:root[data-theme="night"] .about-section {
  background: rgba(49, 46, 68, 0.88);
}

:root[data-theme="night"] .about-quick-facts strong,
:root[data-theme="night"] .about-card h3,
:root[data-theme="night"] .personality-link,
:root[data-theme="night"] .hero-image-badge {
  color: #ffeade;
}

.projects {
  padding: clamp(2rem, 6vw, 5rem) 0 4rem;
  position: relative;
}

.insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.2rem;
  position: relative;
}

.insights::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -26px;
  width: min(900px, 95%);
  height: 52px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.insight-card {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  padding: 1rem 1rem 1.1rem;
}

.insight-copy {
  margin: 0.5rem 0 0.85rem;
  color: var(--muted);
}

.project-radar {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0.2rem auto 0;
}

.project-radar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.radar-ring {
  fill: rgba(255, 248, 239, 0.48);
  stroke: #d8c5ad;
  stroke-width: 1.2;
}

.radar-axis {
  stroke: #d8c5ad;
  stroke-width: 1;
}

.radar-area {
  fill: rgba(178, 91, 49, 0.34);
  stroke: rgba(142, 70, 35, 0.85);
  stroke-width: 1.4;
  transform-origin: center;
  animation: radarBloom 1.2s ease both;
}

.radar-dot {
  fill: #8e4623;
  animation: radarDotPulse 2.5s ease-in-out infinite;
}

.radar-label {
  fill: #5f6472;
  font-size: 7.2px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 700;
}

.radar-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.85rem;
  padding: 0;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.radar-legend li {
  text-align: center;
}

.radar-legend strong {
  color: #6e3d20;
}

.toolbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.toolbox-group {
  border: 1px solid #e8dac6;
  background: rgba(255, 248, 239, 0.62);
  border-radius: 0.6rem;
  padding: 0.65rem 0.75rem;
}

.toolbox-group h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.toolbox-group ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
}

.toolbox-group li + li {
  margin-top: 0.2rem;
}

.small-projects {
  padding: 0 0 4rem;
  position: relative;
}

.section-heading {
  margin-bottom: 1.6rem;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.filter-btn {
  border: 1px solid #d8c5ad;
  background: rgba(255, 248, 239, 0.78);
  color: #6e3d20;
  border-radius: 0.55rem;
  padding: 0.36rem 0.7rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  background: #f8e8d8;
  border-color: #cfa682;
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.project-hook {
  --card-image-zoom-base: 1;
  --card-image-zoom-hover: 1.04;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  transform-origin: center center;
  transform: scale(var(--card-image-zoom-base));
  transition: transform 0.42s ease;
}

.project-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.1rem 1.1rem;
}

.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.project-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0;
}

.tag-list li {
  padding: 0.24rem 0.56rem;
  border-radius: 0.5rem;
  border: 1px solid #d8c5ad;
  background: #fbf3e9;
  color: #6e3d20;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
}

.project-card a {
  text-decoration: none;
  color: var(--accent-dark);
  font-weight: 600;
  margin-top: auto;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(40, 28, 15, 0.16);
  border-color: #dbc3a9;
}

.project-card:hover .project-hook,
.project-card:focus-within .project-hook {
  transform: scale(var(--card-image-zoom-hover));
}

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

.small-project-card {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.small-project-images {
  display: grid;
  gap: 0.45rem;
  padding: 0.45rem 0.45rem 0;
}

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

.small-project-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  transform-origin: center center;
}

.small-project-image-frame {
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  overflow: hidden;
}

.small-project-content {
  padding: 0.85rem 1rem 1rem;
}

.small-project-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.small-project-content p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.small-project-card:hover,
.small-project-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(40, 28, 15, 0.14);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem clamp(1rem, 4vw, 4rem) 2rem;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.45), rgba(248, 251, 255, 0.75));
}

.site-footer p {
  margin: 0 0 0.8rem;
  font-weight: 700;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin: 0;
  padding: 0;
}

.contact-list a {
  text-decoration: none;
  color: var(--muted);
}

.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--accent-dark);
}

.reveal,
.reveal-delay,
.reveal-delay-2 {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-delay {
  transition-delay: 0.12s;
}

.reveal-delay-2 {
  transition-delay: 0.22s;
}

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

.project-page-main {
  width: min(900px, 92vw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.project-detail {
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(4px);
  position: relative;
}

.project-detail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 24%);
}

.project-detail-header {
  padding: clamp(1.2rem, 3.6vw, 2rem) clamp(1.2rem, 3.6vw, 2.2rem) 1rem;
}

.project-back-link {
  display: inline-block;
  margin-bottom: 0.9rem;
  text-decoration: none;
  color: var(--accent-dark);
  font-weight: 600;
}

.project-subtitle {
  margin: 0.8rem 0 1rem;
  color: var(--muted);
  max-width: 64ch;
}

.project-detail-hero-frame {
  width: calc(100% - 2.4rem);
  margin: 0 auto;
  border-radius: 0.7rem;
  overflow: hidden;
  border: 1px solid var(--line);
}

.project-detail-hero {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  transform-origin: center center;
}

.project-detail-section {
  padding: 1.3rem clamp(1.2rem, 3.6vw, 2.2rem);
}

.project-detail-section h2 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.project-detail-section p {
  margin: 0;
  color: var(--muted);
}

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

.project-gallery-item {
  margin: 0;
  background: #fdf8ef;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.project-gallery-item:hover {
  transform: translateY(-3px);
}

.project-gallery-image-frame {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.project-gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  transform-origin: center center;
  display: block;
}

.project-gallery-item figcaption {
  padding: 0.65rem 0.75rem 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.project-impact-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
}

.project-impact-list li + li {
  margin-top: 0.35rem;
}

.project-link-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.project-detail-link {
  display: inline-block;
  text-decoration: none;
  border: 1px solid #d8c5ad;
  background: #fbf3e9;
  color: #6e3d20;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.project-empty {
  padding: clamp(1.2rem, 3.6vw, 2.2rem);
}

.not-found-main {
  width: min(860px, 92vw);
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 6rem) 0 clamp(2rem, 8vw, 4.5rem);
}

.not-found-card {
  position: relative;
  background: rgba(255, 253, 248, 0.93);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
  padding: clamp(1.2rem, 4vw, 2.2rem);
}

.not-found-copy {
  margin: 0.9rem 0 1.2rem;
  color: var(--muted);
  max-width: 58ch;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.not-found-cloud {
  width: 82px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.46));
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  filter: blur(0.3px);
  box-shadow:
    -18px 8px 0 -8px rgba(255, 255, 255, 0.76),
    22px 6px 0 -10px rgba(245, 251, 255, 0.72);
  animation: tinyCloudFloat 4.4s ease-in-out infinite;
}

.not-found-cloud::before,
.not-found-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

.not-found-cloud::before {
  width: 20px;
  height: 20px;
  top: -9px;
  left: 17px;
}

.not-found-cloud::after {
  width: 16px;
  height: 16px;
  top: -7px;
  right: 18px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid #d8c5ad;
  background: rgba(255, 248, 239, 0.78);
  color: #6e3d20;
  border-radius: 0.6rem;
  padding: 0.75rem 1.1rem;
  font-weight: 600;
}

.not-found-shortcuts {
  margin-top: 1.2rem;
  border-top: 1px dashed #dccdb8;
  padding-top: 0.9rem;
}

.not-found-shortcuts p {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: #6e3d20;
}

.not-found-shortcuts ul {
  margin: 0;
  padding-left: 1rem;
}

.not-found-shortcuts a {
  color: var(--accent-dark);
  text-decoration: none;
}


@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-image {
    justify-self: start;
    width: min(300px, 100%);
  }

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

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

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

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

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

@media (max-width: 680px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .about-quick-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body::before,
  body::after {
    opacity: 0.35;
  }

  .site-header {
    flex-direction: column;
    gap: 0.7rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

  .header-actions {
    left: 0.7rem;
    top: auto;
    bottom: 0.7rem;
    transform: none;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .project-detail-hero {
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .project-detail-hero-frame {
    width: calc(100% - 1.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .hero::before,
  .hero::after,
  .radar-area,
  .radar-dot {
    animation: none;
  }

  .project-card,
  .project-hook,
  .small-project-card,
  .project-gallery-item {
    transition: none;
  }

}

@keyframes cloudDriftA {
  0%,
  100% { transform: translateY(calc(var(--parallax-shift) * 0.24)) translateX(0px); }
  50% { transform: translateY(calc(var(--parallax-shift) * 0.24)) translateX(16px) translateY(-5px); }
}

@keyframes cloudDriftB {
  0%,
  100% { transform: translateY(calc(var(--parallax-shift) * -0.2)) translateX(0px); }
  50% { transform: translateY(calc(var(--parallax-shift) * -0.2)) translateX(-14px) translateY(6px); }
}

@keyframes glowPulse {
  0%,
  100% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes radarBloom {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes radarDotPulse {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes tinyCloudFloat {
  0%,
  100% { transform: translateY(0px) translateX(0px); opacity: 0.9; }
  50% { transform: translateY(-6px) translateX(2px); opacity: 1; }
}
