:root {
  --color-marble-dark: #24140e;
  --color-brown: #3b251b;
  --color-brown-soft: #6b4a38;

  --color-cream: #eee2cf;
  --color-cream-light: #f6eddf;
  --color-paper: #e4d3bb;

  --color-gold: #b78a58;
  --color-border: rgba(73, 47, 34, 0.22);
  --color-shadow: rgba(46, 27, 18, 0.14);

  --color-text-main: #39251c;
  --color-text-muted: #6f5848;
  --color-text-light: #f3e7d5;

  --container-width: 1200px;
  --page-padding: 24px;
  --header-height: 72px;

}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Smooth scroll for nav links */
html {
  scroll-behavior: smooth;
}

/* Base */
body {
  min-height: 100vh;
  background-color: var(--color-marble-dark);
  color: var(--color-text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

p {
  color: var(--color-text-muted);
}

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

/* Header */
.site-header {
  min-height: var(--header-height);
  padding: 20px clamp(24px, 5vw, 72px);

  display: flex;
  align-items: center;
  justify-content: space-between;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  background: rgba(35, 20, 13, 0.78);
  border-bottom: 1px solid rgba(238, 220, 197, 0.18);
  backdrop-filter: blur(10px);
}

.site-header a {
  color: var(--color-text-light);
}

.site-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;

  font-size: 14px;
  color: rgba(243, 231, 213, 0.78);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-text-light);
}

.site-nav a.is-active {
  position: relative;
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: var(--color-gold);
}

/* Shared section */
.section {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: clamp(80px, 10vw, 140px);
}

.section-header {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-label {
  margin-bottom: 12px;
  color: var(--color-gold);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--color-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-header h2 {
  max-width: 760px;
  margin: 0;
  color: var(--color-brown);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.15;
}

/* Buttons and links */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.btn {
  min-height: 48px;
  padding: 12px 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid transparent;
  border-radius: 2px;
  font: inherit;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-cream);
  color: var(--color-brown);
  border-color: var(--color-cream);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-cream);
  border-color: rgba(242, 229, 211, 0.7);
}

.text-link {
  display: inline-flex;
  margin-top: 24px;

  color: var(--color-brown);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--color-text-muted);
}

.text-link:hover {
  color: var(--color-brown-soft);
  border-color: var(--color-brown-soft);
}

/* Hero */
.hero {
  min-height: 100svh;
  padding: 120px max(24px, calc((100vw - var(--container-width)) / 2)) 72px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);

  overflow: hidden;
  background-image:
    linear-gradient(rgba(28, 16, 10, 0.32),
      rgba(28, 16, 10, 0.5)),
    url("./images/brown-marble.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-text-light);
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.07em;
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}



.hero .eyebrow {
  color: var(--color-gold);
}

.hero-text {
  max-width: 560px;
  margin-top: 32px;
  color: #d8c6af;
  font-size: 18px;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero .btn-primary {
  background: var(--color-cream);
  color: var(--color-marble-dark);
}

.hero .btn-secondary {
  border-color: rgba(242, 229, 211, 0.7);
  color: var(--color-cream);
}

.hero-portrait-area {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.hero-paper {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 4 / 5;
  padding: clamp(24px, 4vw, 46px);

  display: flex;
  justify-content: center;
  align-items: flex-end;

  background-color: var(--color-paper);
  box-shadow: 0 24px 60px rgba(18, 9, 5, 0.32);
  clip-path: polygon(4% 3%,
      17% 1%,
      31% 3%,
      46% 1%,
      62% 4%,
      78% 1%,
      95% 4%,
      99% 18%,
      97% 35%,
      100% 52%,
      96% 70%,
      99% 89%,
      84% 97%,
      67% 95%,
      51% 100%,
      34% 96%,
      17% 99%,
      3% 94%,
      1% 77%,
      4% 58%,
      1% 39%,
      3% 20%);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

/* =========================
   About Section
========================= */

.about {
  position: relative;
  padding: 120px 0 150px;
  overflow: clip;

  background-color: var(--color-marble-dark);
  color: var(--color-text-light);
}

.about-container {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.about-clouds {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.about-cloud-group {
  position: absolute;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  will-change: transform;
}

.about-cloud {
  position: absolute;
  display: block;
  height: auto;
  object-fit: contain;
  opacity: 0.96;
  filter: saturate(0.95) contrast(1.02);
}

.about-cloud-group--top-left {
  top: clamp(430px, 44vw, 560px);
  left: clamp(-26px, 0.8vw, 28px);
  width: clamp(320px, 34vw, 520px);
  height: clamp(180px, 20vw, 300px);
  animation-name: about-cloud-drift-a;
  animation-duration: 18s;
  animation-delay: -2s;
}

.about-cloud--top-left-main {
  top: 0;
  left: 0;
  width: clamp(280px, 29vw, 470px);
  z-index: 1;
}

.about-cloud--top-left-secondary {
  top: clamp(96px, 11vw, 146px);
  left: clamp(170px, 18vw, 280px);
  width: clamp(170px, 18vw, 280px);
  z-index: 2;
}

.about-cloud-group--top-right {
  top: clamp(46px, 6vw, 92px);
  right: clamp(-50px, -1.2vw, 18px);
  width: clamp(320px, 34vw, 520px);
  height: clamp(180px, 20vw, 300px);
  animation-name: about-cloud-drift-b;
  animation-duration: 20s;
  animation-delay: -4s;
}

.about-cloud--top-right-main {
  top: 0;
  right: 0;
  width: clamp(280px, 29vw, 470px);
  z-index: 1;
}

.about-cloud--top-right-secondary {
  top: clamp(96px, 11vw, 146px);
  right: clamp(170px, 18vw, 280px);
  width: clamp(170px, 18vw, 280px);
  z-index: 2;
}

.about-cloud-group--middle-left {
  top: clamp(38px, 5vw, 82px);
  left: clamp(-60px, -2vw, 18px);
  width: clamp(240px, 24vw, 340px);
  height: clamp(140px, 15vw, 220px);
  animation-name: about-cloud-drift-c;
  animation-duration: 17s;
  animation-delay: -6s;
}

.about-cloud--middle-left-main {
  top: 0;
  left: 0;
  width: clamp(220px, 22vw, 320px);
}

.about-cloud-group--middle-right {
  top: clamp(440px, 46vw, 575px);
  right: clamp(-24px, 0.8vw, 24px);
  width: clamp(240px, 24vw, 340px);
  height: clamp(140px, 15vw, 220px);
  animation-name: about-cloud-drift-d;
  animation-duration: 19s;
  animation-delay: -8s;
}

.about-cloud--middle-right-main {
  top: 0;
  right: 0;
  width: clamp(220px, 22vw, 320px);
}

.about-cloud-group--bottom-left {
  left: clamp(-20px, 1vw, 24px);
  bottom: clamp(34px, 4vw, 72px);
  width: clamp(220px, 22vw, 300px);
  height: clamp(120px, 13vw, 185px);
  animation-name: about-cloud-drift-e;
  animation-duration: 16s;
  animation-delay: -3s;
}

.about-cloud--bottom-left-main {
  top: 0;
  left: 0;
  width: clamp(200px, 20vw, 280px);
}

.about-cloud-group--bottom-right {
  right: clamp(-18px, 1vw, 24px);
  bottom: clamp(34px, 4vw, 72px);
  width: clamp(220px, 22vw, 300px);
  height: clamp(120px, 13vw, 185px);
  animation-name: about-cloud-drift-f;
  animation-duration: 18s;
  animation-delay: -5s;
}

.about-cloud--bottom-right-main {
  top: 0;
  right: 0;
  width: clamp(200px, 20vw, 280px);
}

@keyframes about-cloud-drift-a {
  0%,
  100% {
    transform: translate3d(-34px, 8px, 0);
  }

  50% {
    transform: translate3d(30px, -12px, 0);
  }
}

@keyframes about-cloud-drift-b {
  0%,
  100% {
    transform: translate3d(32px, 6px, 0);
  }

  50% {
    transform: translate3d(-28px, -10px, 0);
  }
}

@keyframes about-cloud-drift-c {
  0%,
  100% {
    transform: translate3d(-24px, 6px, 0);
  }

  50% {
    transform: translate3d(22px, -8px, 0);
  }
}

@keyframes about-cloud-drift-d {
  0%,
  100% {
    transform: translate3d(24px, -6px, 0);
  }

  50% {
    transform: translate3d(-20px, 8px, 0);
  }
}

@keyframes about-cloud-drift-e {
  0%,
  100% {
    transform: translate3d(-20px, 4px, 0);
  }

  50% {
    transform: translate3d(18px, -6px, 0);
  }
}

@keyframes about-cloud-drift-f {
  0%,
  100% {
    transform: translate3d(20px, -4px, 0);
  }

  50% {
    transform: translate3d(-18px, 6px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-cloud-group {
    animation: none;
  }
}

/* =========================
   About 標題
========================= */

.about-header {
  position: relative;
  z-index: 2;
  margin-bottom: 72px;
}

.about .section-label {
  margin: 0 0 14px;

  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  color: var(--color-gold);
}

.about .about-title {
  margin: 0;

  font-size: clamp(52px, 7vw, 94px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.06em;

  color: var(--color-cream);
}

/* =========================
   拼貼版面
========================= */

.about-collage {
  position: relative;
  z-index: 2;

  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: 34px;
  row-gap: 100px;

  min-height: 820px;
  padding: 36px 0 80px;
}

/* =========================
   共用紙張樣式
========================= */

.about-paper {
  position: relative;

  padding: clamp(30px, 4vw, 52px);

  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.24),
      transparent 38%),
    #f1e4cb;

  color: var(--color-text-main);

  border: 1px solid rgba(74, 47, 35, 0.18);
  box-shadow:
    0 22px 40px rgba(20, 11, 7, 0.2),
    0 5px 12px rgba(20, 11, 7, 0.12);

  transform-origin: center;
  transition:
    transform 250ms ease,
    box-shadow 250ms ease;
}

/* 紙張細微紋理 */
.about-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background-image:
    repeating-linear-gradient(0deg,
      transparent,
      transparent 4px,
      rgba(83, 55, 40, 0.018) 5px);

  opacity: 0.55;
}

/* =========================
   第一張：主要介紹
========================= */

.about-paper--profile {
  grid-column: 2 / span 8;
  grid-row: 1;

  z-index: 3;

  min-height: 390px;

  transform: rotate(-1.2deg);
}

.about-portrait {
  position: absolute;
  top: 335px;
  right: clamp(30px, 4vw, 70px);
  z-index: 4;

  width: clamp(325px, 26.25vw, 438px);
  max-width: 100%;

  pointer-events: none;
}

.about-portrait-frame {
  width: 100%;
}

.about-portrait-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* 上方紙膠帶 */
.about-paper--profile::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;

  width: 150px;
  height: 40px;

  background-color: rgba(185, 150, 101, 0.72);
  box-shadow: 0 3px 7px rgba(28, 16, 10, 0.1);

  transform: translateX(-50%) rotate(1.5deg);
}

/* =========================
   第二張：日文與教學
========================= */

.about-paper--language {
  grid-column: 1 / span 6;
  grid-row: 2;

  z-index: 2;

  margin-top: -8px;

  transform: rotate(1.4deg);
}

/* 左上角小膠帶 */
.about-paper--language::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 34px;

  width: 96px;
  height: 32px;

  background-color: rgba(204, 177, 130, 0.7);

  transform: rotate(-5deg);
}

/* =========================
   第三張：合作與學習
========================= */

.about-paper--values {
  grid-column: 7 / span 6;
  grid-row: 2;

  z-index: 1;

  margin-top: 72px;

  transform: rotate(-1.5deg);
}

/* 右上角小膠帶 */
.about-paper--values::before {
  content: "";
  position: absolute;
  top: -14px;
  right: 30px;

  width: 90px;
  height: 31px;

  background-color: rgba(173, 137, 93, 0.68);

  transform: rotate(5deg);
}

/* =========================
   紙張內文字
========================= */

.about-paper-number {
  position: absolute;
  top: 26px;
  right: 30px;

  font-size: 12px;
  letter-spacing: 0.15em;

  color: rgba(63, 43, 34, 0.45);
}

.about-paper-label {
  position: relative;
  z-index: 1;

  display: inline-block;
  margin: 0 0 30px;
  padding-bottom: 8px;

  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.13em;

  color: var(--color-brown);
  border-bottom: 1px solid rgba(63, 43, 34, 0.42);
}

.about-paper p {
  position: relative;
  z-index: 1;

  margin: 0;

  color: var(--color-text-main);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.035em;
}

.about-paper p+p {
  margin-top: 18px;
}

/* 第一張的主要介紹文字稍微放大 */
.about-profile-text {
  max-width: 720px;

  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.95;
}

/* 職涯方向 */
.about-career-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;

  margin-top: 38px;
  padding-top: 20px;

  color: var(--color-brown);
  border-top: 1px solid rgba(63, 43, 34, 0.2);

  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-career-path span {
  opacity: 0.55;
}

/* =========================
   關鍵字
========================= */

.about-keywords {
  position: relative;
  z-index: 1;

  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin: 28px 0 0;
  padding: 0;

  list-style: none;
}

.about-keywords li {
  padding: 8px 13px;

  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.05em;

  color: #4b3328;
  background-color: rgba(255, 250, 237, 0.52);
  border: 1px solid rgba(74, 47, 35, 0.25);
  border-radius: 999px;
}

/* =========================
   小筆記紙條
========================= */

.about-note {
  position: absolute;
  right: 7%;
  bottom: 2px;

  z-index: 4;

  margin: 0;
  padding: 15px 24px;

  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.06em;

  color: #4b3328;
  background-color: #e3cda6;

  box-shadow: 0 8px 18px rgba(20, 11, 7, 0.16);

  transform: rotate(2.5deg);
}

.about-paper--profile:hover {
  transform: rotate(-0.4deg) translateY(-5px) translateX(18px);
}

.about-paper--language:hover {
  transform: rotate(0.5deg) translateY(-5px);
}

.about-paper--values:hover {
  transform: rotate(-0.5deg) translateY(-5px);
}

.about-paper:hover {
  box-shadow:
    0 28px 48px rgba(20, 11, 7, 0.24),
    0 8px 16px rgba(20, 11, 7, 0.14);
}

/* Skills */
.skills {
  position: relative;
  isolation: isolate;
  min-height: 400px;
  padding-bottom: clamp(380px, 20vw, 400px);
  background-color: var(--color-marble-dark);
}

@media (min-width: 769px) {
  .skills .project-grid {
    margin-bottom: 0;
  }
}

.skills-clouds {
  position: absolute;
  inset-block: 0;
  left: calc(50% - 50vw);
  z-index: 1;
  width: 100vw;
  overflow: clip;
  pointer-events: none;
  user-select: none;
}

.skills > :not(.skills-clouds) {
  position: relative;
  z-index: 2;
}

.skills-cloud {
  position: absolute;
  display: block;
  max-width: none;
  height: auto;
  opacity: 0.96;
  filter: saturate(0.95) contrast(1.02);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.skills-cloud-stack {
  position: absolute;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.skills-cloud--upper-right {
  top: 84px;
  left: calc(73% - 4px);
  width: 327px;
  animation: about-cloud-drift-b 20s ease-in-out -4s infinite alternate;
}

.skills-cloud-stack--middle-left {
  top: 392px;
  left: calc((100vw - 1120px) / 2 - 387px);
  width: 350px;
  height: 160px;
  animation: about-cloud-drift-c 17s ease-in-out -6s infinite alternate;
}

.skills-cloud--middle-left-main {
  top: 0;
  left: 0;
  z-index: 1;
  width: 350px;
}

.skills-cloud--middle-left-secondary {
  top: 90px;
  left: -76px;
  z-index: 2;
  width: 230px;
}

.skills-cloud--middle-right {
  top: 503px;
  right: min(-214px, calc((100vw - 1120px) / 2 - 434px));
  width: 400px;
  animation: about-cloud-drift-d 19s ease-in-out -8s infinite alternate;
}

.skills-cloud--lower-center {
  top: 832px;
  left: calc(48% - 1px);
  width: 500px;
  animation: about-cloud-drift-e 16s ease-in-out -3s infinite alternate;
}

@media (min-width: 769px) and (max-width: 1439px) {
  .skills {
    padding-bottom: 380px;
  }

  .skills-cloud--upper-right {
    top: 84px;
    right: -140px;
    left: auto;
    width: 260px;
  }

  .skills-cloud-stack--middle-left,
  .skills-cloud--middle-right {
    display: none;
  }

  .skills-cloud--lower-center {
    top: auto;
    right: auto;
    bottom: 50px;
    left: 48%;
    width: 430px;
  }
}

@media (min-width: 769px) and (max-width: 959px) {
  .skills-cloud--upper-right {
    display: none;
  }
}

@media (max-width: 768px) {
  .skills {
    padding-bottom: 72px;
  }

  .skills-clouds {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skills-cloud,
  .skills-cloud-stack {
    animation: none;
  }
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.skill-card {
  min-height: 140px;
  padding: 28px;

  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: rgba(249, 241, 229, 0.9);
  box-shadow: 0 12px 30px var(--color-shadow);
}

.skill-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

/* Approach */
.approach {
  min-height: 320px;
  display: grid;
  align-content: center;
}

.approach-content {
  max-width: 720px;
}

.approach-content p {
  font-size: 18px;
}

/* Projects */
.projects {
  min-height: 660px;
  background-color: var(--color-marble-dark);
}

#projects {
  position: relative;
  isolation: isolate;
}

#projects > .projects-content {
  padding-bottom: 340px;
}

.projects-cloud-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: clip;
  pointer-events: none;
  user-select: none;
}

.projects > .projects-content {
  position: relative;
  z-index: 2;
}

.projects-content > .project-grid {
  margin-bottom: 0;
}

.projects-cloud-group,
.projects-cloud {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.projects-cloud-group {
  will-change: transform;
}

.projects-cloud {
  display: block;
  max-width: none;
  height: auto;
  opacity: 0.96;
  filter: saturate(0.95) contrast(1.02);
  -webkit-user-drag: none;
  will-change: transform;
}

.projects-cloud-group--upper-right {
  top: 70px;
  left: 68.5%;
  width: 580px;
  height: 210px;
  animation: about-cloud-drift-b 20s ease-in-out -4s infinite alternate;
}

.projects-cloud--upper-back {
  top: 0;
  left: 0;
  z-index: 1;
  width: 460px;
}

.projects-cloud--upper-front {
  top: 120px;
  left: 270px;
  z-index: 2;
  width: 310px;
}

.projects-cloud--middle-left {
  top: 760px;
  left: calc((100vw - 1120px) / 2 - 332px);
  width: 290px;
  animation: about-cloud-drift-c 17s ease-in-out -6s infinite alternate;
}

.projects-cloud--middle-right {
  top: 1325px;
  left: calc(50% + 330px);
  width: 590px;
  animation: about-cloud-drift-d 19s ease-in-out -8s infinite alternate;
}

.projects-cloud--lower-left {
  top: 1640px;
  left: calc((100vw - 1120px) / 2 - 368px);
  width: 328px;
  animation: about-cloud-drift-e 16s ease-in-out -3s infinite alternate;
}

.projects-cloud--lower-center {
  right: auto;
  bottom: 90px;
  left: calc(53% - 5px);
  width: 525px;
  animation: about-cloud-drift-f 18s ease-in-out -5s infinite alternate;
}

@media (max-width: 1439px) {
  .projects-cloud--middle-left,
  .projects-cloud--middle-right,
  .projects-cloud--lower-left {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  #projects > .projects-content {
    padding-bottom: 310px;
  }

  .projects-cloud--lower-center {
    bottom: 85px;
    width: 460px;
  }
}

@media (max-width: 1199px) {
  .projects-cloud-group--upper-right {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  #projects > .projects-content {
    padding-bottom: 300px;
  }

  .projects-cloud--lower-center {
    bottom: 90px;
    left: calc(50% - 215px);
    width: 430px;
  }
}

@media (max-width: 768px) {
  #projects > .projects-content {
    padding-bottom: 260px;
  }

  .projects-cloud--lower-center {
    bottom: 80px;
    left: calc(50% - 180px);
    width: 360px;
  }
}

@media (max-width: 480px) {
  #projects > .projects-content {
    padding-bottom: 72px;
  }

  .projects-content > .project-grid {
    margin-bottom: 40px;
  }

  .projects-cloud-layer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .projects-cloud,
  .projects-cloud-group {
    animation: none;
  }
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 40px;
}

.project-card {
  overflow: hidden;

  border: 1px solid var(--color-border);
  border-radius: 4px;
  background-color: rgba(249, 241, 229, 0.9);
  box-shadow: 0 12px 30px var(--color-shadow);
}

.project-image {
  height: 160px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-paper);

  color: var(--color-text-muted);
  font-size: 14px;
}

.project-content {
  min-height: 140px;
  padding: 28px;
}

.project-content h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.project-status {
  margin-top: 16px;
  color: var(--color-brown-soft);
  font-size: 14px;
}

/* Credentials */
.credentials {
  position: relative;
  isolation: isolate;
  background-color: var(--color-marble-dark);
  scroll-margin-top: calc(var(--header-height) + 16px);
}

@media (min-width: 769px) {
  .credentials {
    padding-top: 60px;
  }
}

@media (min-width: 1440px) {
  .credentials {
    padding-bottom: 230px;
  }
}

.certifications-cloud-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.credentials > :not(.certifications-cloud-layer) {
  position: relative;
  z-index: 2;
}

.certifications-cloud-viewport,
.certifications-cloud-group,
.certifications-cloud {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.certifications-cloud-viewport {
  overflow-x: clip;
  overflow-y: visible;
}

.certifications-cloud-viewport--upper-left,
.certifications-cloud-viewport--lower-left {
  overflow: visible;
}

.certifications-cloud-group,
.certifications-cloud {
  will-change: transform;
}

.certifications-cloud {
  display: block;
  max-width: none;
  height: auto;
  -webkit-user-drag: none;
}

.certifications-cloud-viewport--upper-left {
  top: 5px;
  left: calc((1120px - 100vw) / 2 + 8px);
  width: clamp(125px, calc((100vw - 1120px) / 2 - 28px), 245px);
  height: 100px;
}

.certifications-cloud--upper-left {
  top: 0;
  left: 20px;
  width: 330px;
  animation: certifications-cloud-drift-upper-left 17s ease-in-out -2s infinite alternate;
}

.certifications-cloud-group--upper-right {
  top: 25px;
  left: calc(50% + 74px);
  width: 657px;
  height: 210px;
  animation: certifications-cloud-drift-upper-group 20s ease-in-out -4s infinite alternate;
}

.certifications-cloud--upper-back {
  top: 0;
  left: 0;
  z-index: 1;
  width: 430px;
}

.certifications-cloud--upper-front {
  top: 52px;
  left: 307px;
  z-index: 2;
  width: 350px;
}

.certifications-cloud-viewport--lower-left {
  top: 673px;
  left: calc((1120px - 100vw) / 2 + 8px);
  width: 430px;
  height: 225px;
}

.certifications-cloud--lower-left {
  top: 0;
  left: 20px;
  width: 600px;
  animation: certifications-cloud-drift-left 16s ease-in-out -3s infinite alternate;
}

.certifications-cloud-viewport--lower-right {
  top: 498px;
  right: calc((1120px - 100vw) / 2 + 8px);
  width: 350px;
  height: 220px;
}

.certifications-cloud--lower-right {
  top: 0;
  left: 0;
  width: 585px;
  animation: certifications-cloud-drift-right 18s ease-in-out -5s infinite alternate;
}

@keyframes certifications-cloud-drift-upper-left {
  0%,
  100% {
    transform: translate3d(-24px, 4px, 0);
  }

  50% {
    transform: translate3d(22px, 0, 0);
  }
}

@keyframes certifications-cloud-drift-upper-group {
  0%,
  100% {
    transform: translate3d(32px, 6px, 0);
  }

  50% {
    transform: translate3d(-28px, -10px, 0);
  }
}

@keyframes certifications-cloud-drift-left {
  0%,
  100% {
    transform: translate3d(-20px, 4px, 0);
  }

  50% {
    transform: translate3d(18px, -6px, 0);
  }
}

@keyframes certifications-cloud-drift-right {
  0%,
  100% {
    transform: translate3d(0, -4px, 0);
  }

  50% {
    transform: translate3d(32px, 6px, 0);
  }
}

@media (min-width: 1440px) and (max-width: 1899px) {
  .certifications-cloud-group--upper-right {
    left: calc(50% + 50px);
    width: 590px;
  }

  .certifications-cloud--upper-back {
    width: 400px;
  }

  .certifications-cloud--upper-front {
    left: 270px;
    width: 320px;
  }

  .certifications-cloud-viewport--lower-right {
    top: 670px;
  }
}

@media (max-width: 1439px) {
  .certifications-cloud-layer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .certifications-cloud,
  .certifications-cloud-group {
    animation: none;
  }
}

.credentials .section-label {
  text-transform: none;
}

.credentials-description {
  margin-top: 18px;
  color: rgba(243, 231, 213, 0.76);
  font-size: clamp(16px, 1.8vw, 19px);
  letter-spacing: 0.04em;
}

.certification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(40px, 5vw, 68px);
  padding: 18px 10px 12px;
}

.certification-paper {
  position: relative;
  min-width: 0;
  min-height: 360px;
  padding: clamp(58px, 6vw, 76px) clamp(32px, 4.5vw, 54px) clamp(36px, 4.5vw, 52px);

  display: flex;
  flex-direction: column;

  color: var(--color-text-main);
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.24),
      transparent 38%),
    #f1e4cb;
  border: 1px solid rgba(74, 47, 35, 0.18);
  box-shadow:
    0 22px 40px rgba(20, 11, 7, 0.2),
    0 5px 12px rgba(20, 11, 7, 0.12);
  clip-path: polygon(
    1.5% 2%,
    18% 0.8%,
    36% 2%,
    54% 0.7%,
    72% 1.8%,
    98.5% 0.9%,
    99.2% 18%,
    98.3% 38%,
    99.4% 58%,
    98.4% 78%,
    99% 98.5%,
    78% 99.2%,
    58% 98.2%,
    38% 99.4%,
    18% 98.3%,
    1% 99%,
    1.8% 80%,
    0.7% 60%,
    1.7% 40%,
    0.8% 20%
  );
  transform-origin: center;
}

.certification-paper::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 50%;
  z-index: 2;
  width: 104px;
  height: 30px;
  background-color: rgba(190, 155, 105, 0.72);
  box-shadow: 0 3px 7px rgba(28, 16, 10, 0.1);
  transform: translateX(-50%) rotate(-1.5deg);
  pointer-events: none;
}

.certification-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 4px,
      rgba(83, 55, 40, 0.018) 5px
    );
  opacity: 0.55;
  pointer-events: none;
}

.certification-paper--information {
  transform: rotate(-0.9deg);
}

.certification-paper--language {
  transform: rotate(0.9deg);
}

.certification-paper--language::before {
  background-color: rgba(204, 177, 130, 0.7);
  transform: translateX(-50%) rotate(1.8deg);
}

.certification-paper h3,
.certification-list {
  position: relative;
  z-index: 1;
}

.certification-paper h3 {
  margin: 0;
  padding-bottom: 18px;
  color: var(--color-brown);
  border-bottom: 1px solid rgba(63, 43, 34, 0.25);
  font-size: clamp(21px, 2.2vw, 27px);
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.certification-list {
  min-width: 0;
  margin: 0;
  padding: 24px 0 0;

  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;

  list-style: none;
}

.certification-list li {
  padding: 17px 0;
  color: var(--color-text-main);
  border-bottom: 1px solid rgba(63, 43, 34, 0.16);
  font-size: clamp(17px, 1.7vw, 20px);
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.certification-list li:first-child {
  padding-top: 0;
}

.certification-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.certifications-note {
  max-width: 720px;
  margin: 42px auto 0;
  color: rgba(243, 231, 213, 0.68);
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
  letter-spacing: 0.035em;
}

/* Contact */
.contact {
  position: relative;
  isolation: isolate;
  min-height: 240px;
  padding-bottom: 396px;
  background-color: var(--color-marble-dark);
  color: var(--color-text-light);
}

.contact-cloud-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 50vw + 8px);
  z-index: 1;
  width: calc(100vw - 16px);
  pointer-events: none;
  user-select: none;
}

.contact > :not(.contact-cloud-layer) {
  position: relative;
  z-index: 2;
}

.contact-cloud-group,
.contact-cloud {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.contact-cloud-group--upper-right {
  top: -51px;
  left: calc(50% + 216px);
  width: 640px;
  height: 322px;
}

.contact-cloud--upper-left {
  top: -84px;
  left: 20px;
  width: 500px;
  animation: contact-cloud-drift-left 17s ease-in-out -2s infinite alternate;
}

.contact-cloud--upper-back {
  top: 0;
  left: 0;
  z-index: 1;
  width: 410px;
  animation: contact-cloud-drift-a 20s ease-in-out -4s infinite alternate;
}

.contact-cloud--upper-middle {
  top: 87px;
  left: 240px;
  z-index: 2;
  width: 365px;
  animation: contact-cloud-drift-b 18s ease-in-out -9s infinite alternate;
}

.contact-cloud--upper-front {
  top: 151px;
  left: 235px;
  z-index: 3;
  width: 250px;
  animation: contact-cloud-drift-c 16s ease-in-out -6s infinite alternate;
}

.contact-cloud--lower-left {
  top: 506px;
  left: 20px;
  width: 560px;
  animation: contact-cloud-drift-left 16s ease-in-out -3s infinite alternate;
}

.contact-cloud--lower-right {
  top: 517px;
  right: 20px;
  width: 430px;
  animation: contact-cloud-drift-right 18s ease-in-out -5s infinite alternate;
}

@media (min-width: 1440px) and (max-width: 1600px) {
  .contact-cloud-group--upper-right {
    left: calc(100% - 560px);
    transform: scale(0.85);
    transform-origin: top left;
  }
}

@keyframes contact-cloud-drift-a {
  0%, 100% { transform: translate3d(-4px, 2px, 0); }
  50% { transform: translate3d(4px, -2px, 0); }
}

@keyframes contact-cloud-drift-b {
  0%, 100% { transform: translate3d(4px, 2px, 0); }
  50% { transform: translate3d(-4px, -2px, 0); }
}

@keyframes contact-cloud-drift-c {
  0%, 100% { transform: translate3d(-3px, 2px, 0); }
  50% { transform: translate3d(3px, -2px, 0); }
}

@keyframes contact-cloud-drift-left {
  0%, 100% { transform: translate3d(-4px, 2px, 0); }
  50% { transform: translate3d(4px, -2px, 0); }
}

@keyframes contact-cloud-drift-right {
  0%, 100% { transform: translate3d(4px, -2px, 0); }
  50% { transform: translate3d(-4px, 2px, 0); }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .contact {
    padding-bottom: 300px;
  }

  .contact-cloud-group--upper-right {
    top: -65px;
    left: calc(100% - 480px);
    transform: scale(0.78);
    transform-origin: top left;
  }

  .contact-cloud--upper-front,
  .contact-cloud--lower-left,
  .contact-cloud--lower-right {
    display: none;
  }

  .contact-cloud--upper-left {
    top: -90px;
    left: 20px;
    width: 360px;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .contact {
    padding-bottom: 180px;
  }

  .contact-cloud-group--upper-right,
  .contact-cloud--lower-left,
  .contact-cloud--lower-right {
    display: none;
  }

  .contact-cloud--upper-left {
    top: -34px;
    left: 20px;
    width: 250px;
  }
}

@media (max-width: 768px) {
  .contact {
    padding-bottom: 72px;
  }

  .contact-cloud-layer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-cloud,
  .contact-cloud-group {
    animation: none;
  }
}

.skills .section-header h2,
.projects .section-header h2,
.credentials .section-header h2 {
  color: var(--color-text-light);
}

.contact p {
  color: var(--color-cream);
}

.contact .section-header h2 {
  color: var(--color-text-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.contact-card {
  min-height: 80px;
  padding: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--color-cream-light);
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(242, 229, 211, 0.24);
  text-decoration: none;

  font-size: 15px;
  font-weight: 700;
}

/* Footer */
.site-footer {
  min-height: 80px;
  padding: 0 max(24px, calc((100vw - var(--container-width)) / 2));

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  border-top: 1px solid rgba(238, 220, 197, 0.18);
  background-color: var(--color-marble-dark);
  color: var(--color-cream);
  font-size: 14px;
}

.site-footer p,
.site-footer a {
  color: var(--color-cream);
}

/* Responsive */
@media (min-width: 901px) {
  .about-paper--profile {
    transform: rotate(-1.2deg) translateX(88px);
  }

  .about-paper--profile:hover {
    transform: rotate(-0.4deg) translateY(-5px) translateX(88px);
  }
}

@media (max-width: 900px) {
  .credentials {
    scroll-margin-top: 120px;
  }

  .about {
    padding: 96px 0 120px;
  }

  .about-header {
    margin-bottom: 56px;
  }

  .about-collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    column-gap: 28px;
    row-gap: 76px;

    min-height: auto;
  }

  .about-paper--profile {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .about-portrait {
    top: 330px;
    right: clamp(5px, 2vw, 20px);
    width: clamp(264px, 34vw, 336px);
    max-width: 38%;
  }

  .about-paper--language,
  .about-paper--values {
    grid-column: auto;
    grid-row: auto;

    margin-top: 0;
  }

  .about-note {
    position: relative;
    right: auto;
    bottom: auto;

    justify-self: end;
    grid-column: 1 / -1;

    margin-top: 16px;
  }

  .about-cloud-group--top-left {
    top: clamp(38px, 6vw, 72px);
    left: clamp(-36px, -1vw, 16px);
    width: clamp(240px, 28vw, 360px);
    height: clamp(150px, 18vw, 240px);
  }

  .about-cloud--top-left-main {
    width: clamp(220px, 24vw, 320px);
  }

  .about-cloud--top-left-secondary {
    top: clamp(78px, 9vw, 112px);
    left: clamp(132px, 15vw, 220px);
    width: clamp(130px, 14vw, 210px);
  }

  .about-cloud-group--top-right {
    top: clamp(40px, 6vw, 74px);
    right: clamp(-36px, -1vw, 16px);
    width: clamp(240px, 28vw, 360px);
    height: clamp(150px, 18vw, 240px);
  }

  .about-cloud--top-right-main {
    width: clamp(220px, 24vw, 320px);
  }

  .about-cloud--top-right-secondary {
    top: clamp(78px, 9vw, 112px);
    right: clamp(132px, 15vw, 220px);
    width: clamp(130px, 14vw, 210px);
  }

  .about-cloud-group--middle-left,
  .about-cloud-group--middle-right {
    opacity: 0.94;
  }

  .about-cloud-group--middle-left {
    top: clamp(360px, 40vw, 480px);
    left: clamp(-18px, 0.8vw, 22px);
    width: clamp(190px, 22vw, 280px);
  }

  .about-cloud-group--middle-right {
    top: clamp(372px, 42vw, 495px);
    right: clamp(-18px, 0.8vw, 22px);
    width: clamp(190px, 22vw, 280px);
  }

  .about-cloud-group--bottom-left,
  .about-cloud-group--bottom-right {
    width: clamp(180px, 20vw, 250px);
    bottom: clamp(24px, 3vw, 44px);
  }

  .about-cloud-group--bottom-left {
    left: clamp(-18px, 0.8vw, 20px);
  }

  .about-cloud-group--bottom-right {
    right: clamp(-18px, 0.8vw, 20px);
  }

  .site-header {
    height: auto;
    min-height: var(--header-height);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .site-nav {
    width: 100%;
    gap: 16px;
    flex-wrap: wrap;
  }

  .skill-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding-top: 24px;
    padding-bottom: 24px;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 112px;
    padding-bottom: 56px;
  }

  .section {
    width: min(calc(100% - 32px), 1120px);
    padding-block: 72px;
  }

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

  .certification-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-inline: 6px;
  }

  .certification-paper {
    min-height: auto;
  }

  .certification-paper--information,
  .certification-paper--language {
    transform: none;
  }

  .site-header {
    padding-inline: 20px;
  }

  .site-nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero-portrait-area {
    width: 100%;
  }

  .hero-paper {
    width: min(100%, 420px);
  }
}

@media (max-width: 640px) {
  .about {
    padding: 80px 0 96px;
  }

  .about-container {
    width: min(calc(100% - 32px), 1120px);
  }

  .about-header {
    margin-bottom: 44px;
  }

  .about-cloud-group--top-left {
    top: clamp(24px, 7vw, 44px);
    left: clamp(-20px, 1vw, 10px);
    width: clamp(150px, 30vw, 200px);
    height: clamp(90px, 18vw, 120px);
  }

  .about-cloud--top-left-main {
    width: clamp(128px, 26vw, 172px);
  }

  .about-cloud--top-left-secondary {
    display: none;
  }

  .about-cloud-group--top-right {
    top: clamp(24px, 7vw, 44px);
    right: clamp(-20px, 1vw, 10px);
    width: clamp(150px, 30vw, 200px);
    height: clamp(90px, 18vw, 120px);
  }

  .about-cloud--top-right-main {
    width: clamp(128px, 26vw, 172px);
  }

  .about-cloud--top-right-secondary,
  .about-cloud-group--middle-left,
  .about-cloud-group--middle-right {
    display: none;
  }

  .about-cloud-group--bottom-left,
  .about-cloud-group--bottom-right {
    width: clamp(126px, 24vw, 160px);
    bottom: 8px;
  }

  .about-cloud-group--bottom-left {
    left: clamp(-12px, 1vw, 10px);
  }

  .about-cloud-group--bottom-right {
    right: clamp(-12px, 1vw, 10px);
  }

  .about-cloud--bottom-left-main,
  .about-cloud--bottom-right-main {
    width: clamp(112px, 22vw, 144px);
  }

  .about .about-title {
    font-size: clamp(44px, 15vw, 64px);
    line-height: 1;
  }

  .about-collage {
    display: flex;
    flex-direction: column;
    gap: 34px;
    min-height: auto;
    padding: 20px 0 40px;
  }

  .about-portrait {
    position: relative;
    top: auto;
    right: auto;
    z-index: 4;

    width: clamp(150px, 48vw, 200px);
    max-width: 100%;
    margin: -20px auto 0;

    flex: 0 0 auto;
  }

  .about-paper {
    width: 100%;
    min-height: auto;
    padding: 34px 25px;
  }

  .about-paper--profile {
    transform: rotate(-0.6deg);
  }

  .about-paper--language {
    margin-top: 0;
    transform: rotate(0.7deg);
  }

  .about-paper--values {
    margin-top: 0;
    transform: rotate(-0.5deg);
  }

  .about-paper-number {
    top: 21px;
    right: 22px;
  }

  .about-paper-label {
    margin-bottom: 24px;
  }

  .about-profile-text {
    font-size: 17px;
    line-height: 1.9;
  }

  .about-paper p {
    font-size: 14px;
    line-height: 1.9;
  }

  .about-career-path {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .about-career-path span {
    transform: rotate(90deg);
  }

  .about-note {
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-end;
    max-width: 90%;
    margin-top: 0;
  }

  .about-paper--profile:hover {
    transform: rotate(-0.6deg);
  }

  .about-paper--language:hover {
    transform: rotate(0.7deg);
  }

  .about-paper--values:hover {
    transform: rotate(-0.5deg);
  }
}

@media (max-width: 600px) {
  :root {
    --page-padding: 20px;
  }

  .site-nav {
    font-size: 13px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-text,
  .approach-content p {
    font-size: 16px;
  }

  .section:not(.about) h2 {
    font-size: 34px;
  }

  .certification-grid {
    padding-inline: 0;
  }

  .certification-paper {
    width: 100%;
    padding: 58px 24px 32px;
  }

  .certification-list li {
    font-size: 17px;
  }

  .certifications-note {
    margin-top: 34px;
  }

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

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-cloud {
    animation: none;
  }
}
