:root {
  --ink: #3d281c;
  --ink-soft: #765943;
  --paper: #e8d3ba;
  --surface: #f7e9d8;
  --line: #cba982;
  --brown: #805032;
  --brown-deep: #583620;
  --accent: #bd7d47;
  --accent-soft: #f1d8b8;
  --sand: #e5c7a3;
  --container: min(1240px, calc(100% - 3rem));
  --sans: "Manrope", sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-y: scroll; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.65; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.link-underline,
.project-link,
.back-link,
.detail-file,
.contact-list .cv-link,
.detail-card a[href] {
  position: relative;
  display: inline-block;
}

.link-underline::before,
.project-link::before,
.back-link::before,
.detail-file::before,
.contact-list .cv-link::before,
.detail-card a[href]::before {
  position: absolute;
  right: 0;
  bottom: calc(100% - 0.08rem);
  left: 0;
  height: 2px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.link-underline:hover::before,
.link-underline:focus-visible::before,
.project-link:hover::before,
.project-link:focus-visible::before,
.back-link:hover::before,
.back-link:focus-visible::before,
.detail-file:hover::before,
.detail-file:focus-visible::before,
.contact-list .cv-link:hover::before,
.contact-list .cv-link:focus-visible::before,
.detail-card a[href]:hover::before,
.detail-card a[href]:focus-visible::before {
  transform: scaleX(1);
}
.container { width: var(--container); margin: 0 auto; }
.section { padding: 7.5rem 0; }

h3.eyebrow {
  margin: 0;
  color: var(--brown);
  font: 500 1.5rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-number, .skill-index, .timeline-date, .interest-label {
  margin: 0;
  color: var(--brown);
  font: 500 0.76rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading { max-width: 780px; margin-bottom: 3rem; }
.section-heading h2, .about-copy h2, .site-footer h2 {
  margin: 0.55rem 0 0;
  color: var(--ink);
  font-size: clamp(2.3rem, 4vw, 4.6rem);
  letter-spacing: 0;
  line-height: 1.06;
}

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(239, 219, 196, 0.94);
  border-bottom: 1px solid rgba(88, 54, 32, 0.2);
  backdrop-filter: blur(12px);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 5.25rem; gap: 1rem; }
.brand { color: var(--ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
.main-nav, .main-nav ul { display: flex; align-items: center; gap: 1.75rem; }
.main-nav ul { margin: 0; padding: 0; list-style: none; flex-wrap: nowrap; }
.main-nav a { color: var(--ink-soft); font-size: 0.88rem; font-weight: 700; white-space: nowrap; }
.main-nav a:hover, .main-nav a.is-active { color: var(--brown); }
.main-nav .nav-contact {
  padding: 0.55rem 0.9rem;
  color: #f7efe6;
  background: var(--brown-deep);
  border: 1px solid var(--brown-deep);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.main-nav .nav-contact:hover, .main-nav .nav-contact:focus-visible { background: var(--brown); border-color: var(--brown); color: #fffaf3; }
.nav-toggle { display: none; border: 0; background: transparent; padding: 0.45rem; cursor: pointer; }
.nav-toggle span { display: block; width: 1.55rem; height: 2px; margin: 0.28rem; background: var(--ink); }

.hero {
  position: relative; display: grid; min-height: min(790px, calc(100vh - 5.25rem)); overflow: hidden; align-items: center;
  background: radial-gradient(ellipse 52% 74% at 84% 18%, rgba(224, 174, 124, 0.24), transparent 68%), radial-gradient(ellipse 46% 55% at 20% 100%, rgba(32, 16, 8, 0.35), transparent 72%), linear-gradient(125deg, #4a2919 0%, #6c3d25 52%, #8a5534 100%);
}
.hero::after { display: none; }
.hero-contour {
  position: absolute;
  inset: -10% -12% -18% -12%;
  z-index: 0;
  width: 124%;
  height: 128%;
  opacity: 0.6;
  pointer-events: none;
  transform: rotate(0deg);
  filter: drop-shadow(0 18px 28px rgba(23, 12, 9, 0.18));
}
.hero-contour path {
  stroke: rgba(255, 235, 212, 0.42);
  stroke-opacity: 0.7;
}
svg .svg-elem-1{stroke-dashoffset:168405.640625px;stroke-dasharray:168405.640625px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0s}svg.active .svg-elem-1{stroke-dashoffset:0}svg .svg-elem-2{stroke-dashoffset:22812.1875px;stroke-dasharray:22812.1875px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.12s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.12s}svg.active .svg-elem-2{stroke-dashoffset:0}svg .svg-elem-3{stroke-dashoffset:16292.0537109375px;stroke-dasharray:16292.0537109375px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.24s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.24s}svg.active .svg-elem-3{stroke-dashoffset:0}svg .svg-elem-4{stroke-dashoffset:9400.4677734375px;stroke-dasharray:9400.4677734375px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.36s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.36s}svg.active .svg-elem-4{stroke-dashoffset:0}svg .svg-elem-5{stroke-dashoffset:72146.9453125px;stroke-dasharray:72146.9453125px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.48s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.48s}svg.active .svg-elem-5{stroke-dashoffset:0}svg .svg-elem-6{stroke-dashoffset:38365.1640625px;stroke-dasharray:38365.1640625px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.6s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.6s}svg.active .svg-elem-6{stroke-dashoffset:0}svg .svg-elem-7{stroke-dashoffset:12972.82421875px;stroke-dasharray:12972.82421875px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.72s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.72s}svg.active .svg-elem-7{stroke-dashoffset:0}svg .svg-elem-8{stroke-dashoffset:79859.6015625px;stroke-dasharray:79859.6015625px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.84s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.84s}svg.active .svg-elem-8{stroke-dashoffset:0}svg .svg-elem-9{stroke-dashoffset:53203.27734375px;stroke-dasharray:53203.27734375px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.96s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 0.96s}svg.active .svg-elem-9{stroke-dashoffset:0}svg .svg-elem-10{stroke-dashoffset:19530.46875px;stroke-dasharray:19530.46875px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.08s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.08s}svg.active .svg-elem-10{stroke-dashoffset:0}svg .svg-elem-11{stroke-dashoffset:44835.5859375px;stroke-dasharray:44835.5859375px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.2s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.2s}svg.active .svg-elem-11{stroke-dashoffset:0}svg .svg-elem-12{stroke-dashoffset:42770.69140625px;stroke-dasharray:42770.69140625px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.3199999999999998s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.3199999999999998s}svg.active .svg-elem-12{stroke-dashoffset:0}svg .svg-elem-13{stroke-dashoffset:32469.0859375px;stroke-dasharray:32469.0859375px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.44s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.44s}svg.active .svg-elem-13{stroke-dashoffset:0}svg .svg-elem-14{stroke-dashoffset:7150.681640625px;stroke-dasharray:7150.681640625px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.56s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.56s}svg.active .svg-elem-14{stroke-dashoffset:0}svg .svg-elem-15{stroke-dashoffset:64215.33984375px;stroke-dasharray:64215.33984375px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.68s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.68s}svg.active .svg-elem-15{stroke-dashoffset:0}svg .svg-elem-16{stroke-dashoffset:50824.34375px;stroke-dasharray:50824.34375px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.7999999999999998s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.7999999999999998s}svg.active .svg-elem-16{stroke-dashoffset:0}svg .svg-elem-17{stroke-dashoffset:16291.927734375px;stroke-dasharray:16291.927734375px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.92s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 1.92s}svg.active .svg-elem-17{stroke-dashoffset:0}svg .svg-elem-18{stroke-dashoffset:47694.5703125px;stroke-dasharray:47694.5703125px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.04s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.04s}svg.active .svg-elem-18{stroke-dashoffset:0}svg .svg-elem-19{stroke-dashoffset:46955.3515625px;stroke-dasharray:46955.3515625px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.16s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.16s}svg.active .svg-elem-19{stroke-dashoffset:0}svg .svg-elem-20{stroke-dashoffset:12602.6962890625px;stroke-dasharray:12602.6962890625px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.28s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.28s}svg.active .svg-elem-20{stroke-dashoffset:0}svg .svg-elem-21{stroke-dashoffset:51095.94140625px;stroke-dasharray:51095.94140625px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.4s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.4s}svg.active .svg-elem-21{stroke-dashoffset:0}svg .svg-elem-22{stroke-dashoffset:26756.8828125px;stroke-dasharray:26756.8828125px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.52s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.52s}svg.active .svg-elem-22{stroke-dashoffset:0}svg .svg-elem-23{stroke-dashoffset:5482.54443359375px;stroke-dasharray:5482.54443359375px;-webkit-transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.6399999999999997s;transition:stroke-dashoffset 5s cubic-bezier(0.47,0,0.745,0.715) 2.6399999999999997s}svg.active .svg-elem-23{stroke-dashoffset:0}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: center; gap: 5rem; padding: 2.5rem 0; }
.hero-copy { max-width: 880px; }
.hero-copy .eyebrow { color: #e6b987; }
.hero-copy h1 { margin: 0.75rem 0 1.4rem; color: #fff1dd; font-size: clamp(4.7rem, 10vw, 10.5rem); letter-spacing: -0.08em; line-height: 0.8; }
.hero-last-name { display: inline-block; margin-left: 0.16em; }
.hero-lead { max-width: 64ch; margin: 0; color: rgba(255, 241, 221, 0.78); font-size: 1.22rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.25rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 1rem 1.4rem; font-size: 0.94rem; font-weight: 800; transition: transform 0.2s ease; }
.button-primary { color: #412313; background: #e1b17b; }
.button-secondary { color: #fff1dd; border: 1px solid rgba(255, 241, 221, 0.72); background: rgba(255, 241, 221, 0.08); }
.button:hover { transform: translateY(-2px); }
.hero-profile { overflow: hidden; background: rgba(255, 242, 223, 0.18); border: 1px solid rgba(255, 239, 216, 0.45); }
.hero-profile > img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 60% center; }
.hero-profile > div { padding: 1.3rem; }
.hero-profile .eyebrow { color: #f4c99e; }
.hero-profile p:not(.eyebrow) { margin: 0.45rem 0 0; color: #fff0df; font-size: 0.91rem; line-height: 1.55; }
.about-content { margin-top: 0.85rem; }
.hero-profile .about-content p { margin: 0; }
.about-facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
.about-facts span { padding: 0.46rem 0.7rem; color: var(--brown-deep); background: var(--accent-soft); font: 500 0.73rem var(--mono); }
.hero-profile .about-facts { margin-top: 1rem; }
.hero-profile .about-facts span { color: #fff0df; background: rgba(255, 240, 216, 0.15); border: 1px solid rgba(255, 240, 216, 0.25); }
.about-download {
  position: relative;
  display: inline-block;
  width: max-content;
  margin-top: 1rem;
  padding-bottom: 0.18rem;
  color: #e1ae75;
  font: 500 0.72rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.about-download::before {
  position: absolute;
  right: 0;
  bottom: 0.06rem;
  left: 0;
  height: 2px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}
.about-download:hover::before,
.about-download:focus-visible::before {
  transform: scaleX(1);
}

.projects { background: #dcb995; }
.project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.project-card { overflow: hidden; background: var(--surface); }
.project-image { display: grid; height: 330px; overflow: hidden; place-items: center; background: var(--brown-deep); }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.project-image:hover img { transform: scale(1.04); }
.project-image-wide img { object-position: left top; }
.project-body { display: flex; flex-direction: column; min-height: 300px; padding: 1.35rem; border: 1px solid var(--line); border-top: 0; }
.project-card h3 { margin: 0.65rem 0 0.85rem; font-size: 1.4rem; line-height: 1.16; }
.project-title { display: block; width: fit-content; }
.project-title:hover h3, .project-title:focus-visible h3 { color: var(--brown); }
.project-body > p:not(.project-number) { margin: 0; color: var(--ink-soft); font-size: 0.91rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.2rem; }
.tag-list span { padding: 0.38rem 0.55rem; color: var(--brown-deep); background: var(--sand); font: 500 0.7rem var(--mono); }


.skills { background: #f1dfca; }
.skills .section-heading { margin-bottom: 2rem; }
.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
.skill-block { position: relative; min-height: 175px; padding: 1.55rem; overflow: hidden; background: rgba(255, 250, 242, 0.58); border: 1px solid rgba(128, 80, 50, 0.2); box-shadow: 0 10px 25px rgba(88, 54, 32, 0.08); }
.skill-block::before { position: absolute; top: 0; left: 0; width: 4.5rem; height: 4px; content: ""; background: var(--brown); transition: width 0.35s ease; }
.skill-block:hover::before, .skill-block:focus-within::before { width: 100%; }
.skill-block:hover, .skill-block:focus-within { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(88, 54, 32, 0.14); }
.skill-block { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.skill-block:nth-child(1) { background: #f7e9d8; }
.skill-block:nth-child(1)::before { background: #8a5b3c; }
.skill-block:nth-child(2) { background: #efd0aa; }
.skill-block:nth-child(2)::before { background: #a26437; }
.skill-block:nth-child(3) { background: #dfb892; }
.skill-block:nth-child(3)::before { background: #75472e; }
.certificate-block { color: #fff8ef; background: var(--brown-deep); border-color: var(--brown-deep); }
.certificate-block::before { background: #e1ae75; }
.skill-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0.65rem 0 0.75rem; }
.skill-block h3 { margin: 0; font-size: 1.28rem; letter-spacing: 0.02em; }
.skill-icons { display: flex; flex: 0 0 auto; gap: 0.35rem; }
.skill-icons img { width: 2rem; height: 2rem; object-fit: contain; }
.skill-block:nth-child(1) .skill-icons img { filter: brightness(0) saturate(100%) invert(19%) sepia(15%) saturate(1988%) hue-rotate(344deg) brightness(92%) contrast(91%); }
.skill-block:nth-child(2) .skill-icons img { filter: brightness(0) saturate(100%) invert(36%) sepia(16%) saturate(2075%) hue-rotate(342deg) brightness(93%) contrast(89%); }
.skill-block:nth-child(3) .skill-icons img { filter: brightness(0) saturate(100%) invert(63%) sepia(31%) saturate(826%) hue-rotate(341deg) brightness(91%) contrast(85%); }
.skill-block p:not(.skill-index) { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.certificate-block h3, .certificate-block p:not(.skill-index) { color: #fff1dd; }
.certificate-block .skill-icons img { filter: brightness(0) saturate(100%) invert(85%) sepia(24%) saturate(531%) hue-rotate(333deg) brightness(102%) contrast(94%); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.skill-tags span { padding: 0.32rem 0.52rem; color: var(--ink); background: rgba(255, 253, 248, 0.58); border: 1px solid rgba(88, 54, 32, 0.16); font-size: 0.78rem; font-weight: 700; line-height: 1.25; }
.certificate-block .skill-tags span { color: #fff1dd; background: rgba(255, 241, 221, 0.1); border-color: rgba(255, 241, 221, 0.24); }

.experience { background: #fff; color: var(--ink); }
.experience .eyebrow, .experience .timeline-date { color: var(--brown); }
.experience .section-heading h2 { color: var(--ink); }
.timeline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); }
.timeline-column > h3 { margin: 0 0 1.25rem; font-size: 1.2rem; }
.timeline-item { position: relative; margin-left: 0.45rem; padding: 0 0 2.2rem 1.7rem; border-left: 1px solid var(--line); }
.timeline-item::before { position: absolute; top: 0.2rem; left: -0.38rem; width: 0.7rem; height: 0.7rem; background: var(--accent); content: ""; }
.timeline-item h4 { margin: 0.35rem 0 0; font-size: 1.18rem; }
.timeline-item p:not(.timeline-date), .timeline-item small { color: var(--ink-soft); }
.timeline-item p:not(.timeline-date) { margin: 0.25rem 0 0; }
.timeline-item small { display: block; margin-top: 0.55rem; }
.timeline-item a { color: inherit; text-decoration: underline; text-decoration-color: rgba(128, 80, 50, 0.45); text-underline-offset: 0.18em; }
.timeline-item a:hover, .timeline-item a:focus-visible { color: var(--brown); text-decoration-color: currentColor; }
.school-item { display: grid; grid-template-columns: 76px 1fr; gap: 0.85rem; }
.school-item > a, .school-item > img { display: grid; width: 68px; height: 68px; align-self: start; place-items: center; background: #fff; }
.school-item img { width: 68px; height: 68px; padding: 3px; object-fit: contain; background: #fff; }
.school-item > a img { width: 100%; height: 100%; }

.interests { background: #e2c3a2; }
.interest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.interest-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.interest-card:first-child { background: var(--sand); }
.interest-card:nth-child(2) { background: var(--accent-soft); }
.interest-card-content { flex: 1; min-height: 335px; padding: 1.7rem; }
.interest-card .interest-icon { width: 40px; height: 40px; margin-bottom: 2.35rem; object-fit: contain; filter: brightness(0) saturate(100%) invert(21%) sepia(20%) saturate(1356%) hue-rotate(342deg) brightness(89%) contrast(88%); }
.interest-card h3 { margin: 0.65rem 0 0.7rem; font-size: 1.48rem; line-height: 1.16; }
.interest-card-content > p:last-child { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }
.interest-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; border-top: 1px solid var(--line); }

.site-footer { padding: 5.5rem 0 1.5rem; color: #fff; background: var(--brown-deep); }
.site-footer .eyebrow, .contact-list .cv-link { color: #e1ae75; }
.site-footer h2 { max-width: 13ch; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-list { display: grid; align-content: start; gap: 0.9rem; font-style: normal; }
.contact-list a, .contact-list span { display: flex; align-items: center; gap: 0.8rem; color: rgba(255, 255, 255, 0.85); font-size: 1.08rem; }
.contact-list a:hover { color: #e1ae75; }
.contact-list img { width: 23px; height: 23px; filter: brightness(0) invert(1); }
.contact-list .cv-link { width: max-content; margin-top: 0.7rem; padding-bottom: 0.2rem; color: #e1ae75; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1.25rem; color: rgba(255, 255, 255, 0.55); border-top: 1px solid rgba(255, 255, 255, 0.2); font: 0.7rem var(--mono); }

.detail-main { padding: 0 0 7rem; background: var(--paper); }
.detail-banner { position: relative; overflow: hidden; padding: 4.75rem 0 4rem; background: radial-gradient(ellipse 55% 90% at 90% 0%, rgba(224, 174, 124, 0.22), transparent 68%), linear-gradient(125deg, #4a2919 0%, #6c3d25 52%, #8a5534 100%); }
.detail-banner .hero-contour { inset: -28% -12%; width: 124%; height: 156%; opacity: 0.5; }
.detail-banner--weby .hero-contour { transform: rotate(-4deg) scale(1.08); transform-origin: 58% 48%; }
.detail-banner--mapy .hero-contour { inset: -34% -23% -22% 1%; width: 132%; height: 162%; transform: rotate(7deg); transform-origin: 42% 55%; }
.detail-banner--design .hero-contour { inset: -18% 1% -38% -25%; width: 132%; height: 150%; transform: rotate(-9deg) scale(1.04); transform-origin: 70% 45%; }
.detail-banner--thesis .hero-contour { inset: -39% -4% -15% -27%; width: 138%; height: 166%; transform: rotate(4deg) scale(1.12); transform-origin: 36% 62%; }
.detail-banner .container { position: relative; z-index: 1; }
.back-link { display: inline-block; margin-bottom: 3rem; color: #e6b987; font-size: 0.88rem; font-weight: 800; }
.detail-hero { display: grid; grid-template-columns: 1fr 0.9fr; align-items: end; gap: 3rem; }
.detail-hero .eyebrow { color: #e6b987; }
.detail-hero h1 { max-width: 12ch; margin: 0.65rem 0 0; color: #fff1dd; font-size: clamp(2.5rem, 4vw, 4.5rem); letter-spacing: -0.06em; line-height: 0.96; }
.detail-intro { max-width: 55ch; margin: 0; color: rgba(255, 241, 221, 0.8); font-size: 1.12rem; }
.detail-main > .container { padding-top: 4rem; }
.detail-subhead { max-width: 68ch; margin-top: 4rem; }
.detail-subhead--with-preview { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr); align-items: start; max-width: none; gap: 3rem; }
.detail-subhead--with-preview > img { width: 100%; max-height: 22rem; object-fit: contain; object-position: center; }
.detail-subhead h2 { margin: 0.5rem 0 0.75rem; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; }
.detail-subhead p { margin: 0; color: var(--ink-soft); }
.detail-subhead-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem; margin-top: 3rem; }
.detail-card--wide { grid-column: 1 / -1; }
.detail-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 248, 240, 0.46);
  border: 1px solid rgba(120, 78, 49, 0.16);
  box-shadow: 0 12px 24px rgba(88, 54, 32, 0.08);
}
.detail-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.detail-card-content {
  order: 1;
  padding: 1.4rem 1.15rem 1rem;
  background: rgba(255, 248, 240, 0.38);
  border-bottom: 1px solid rgba(120, 78, 49, 0.14);
}
.detail-card h2 { margin: 0 0 0.55rem; font-size: 1.4rem; line-height: 1.2; }
.detail-card p, .detail-feature p { color: var(--ink-soft); }
.detail-card p { margin: 0; }
.detail-card-title { display: inline-block; color: var(--ink); text-decoration: none; }
.detail-card-title:hover h2, .detail-card-title:focus-visible h2 { color: var(--brown); }
.detail-card-title h2 { margin: 0; transition: color 0.2s ease; }
.detail-card-media {
  order: 2;
  display: block;
  position: relative;
  overflow: hidden;
  background: transparent;
  text-decoration: none;
}
.detail-card-media img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; transition: transform 0.3s ease, filter 0.3s ease;
}
.detail-card-media:hover img, .detail-card-media:focus-visible img { transform: scale(1.02); filter: saturate(1.04); }
.detail-card-media--full { background: var(--surface); }
.detail-card-media--full img { aspect-ratio: auto; object-fit: contain; object-position: center; }

.carousel { aspect-ratio: 3 / 4; }
.carousel-track { display: flex; width: 100%; height: 100%; transition: transform 0.6s ease; }
.carousel-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; }
.detail-card-media.carousel:hover img, .detail-card-media.carousel:focus-visible img { transform: none; filter: none; }
.carousel-dots { position: absolute; left: 50%; bottom: 0.85rem; z-index: 2; display: flex; gap: 0.45rem; transform: translateX(-50%); }
.carousel-dot { width: 0.55rem; height: 0.55rem; padding: 0; background: rgba(61, 40, 28, 0.28); border: 0; border-radius: 50%; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; }
.carousel-dot.is-active { background: var(--brown); transform: scale(1.3); }
.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  color: var(--ink);
  background: rgba(247, 233, 216, 0.85);
  border: 1px solid rgba(88, 54, 32, 0.2);
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, background 0.2s ease;
  pointer-events: none;
}
.carousel:hover .carousel-arrow, .carousel:focus-within .carousel-arrow { opacity: 1; pointer-events: auto; }
.carousel-arrow:hover, .carousel-arrow:focus-visible { background: var(--accent-soft); }
.carousel-arrow--prev { left: 0.6rem; }
.carousel-arrow--next { right: 0.6rem; }
.detail-feature { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: start; gap: 2rem; margin-top: 3rem; padding: 2rem; background: #e2c3a2; }
.detail-feature img {
  width: 100%;
  max-height: 680px;
  object-fit: contain;
  background: var(--surface);
  transition: transform 0.3s ease, filter 0.3s ease;
}
.detail-feature a:hover img, .detail-feature a:focus-visible img { transform: scale(1.02); filter: saturate(1.04); }
.detail-feature h2 { margin-top: 0; font-size: 1.75rem; line-height: 1.18; }
.detail-file { display: inline-block; margin-top: 1rem; padding: 0.7rem 0.9rem; color: #fff; background: var(--brown); font-size: 0.85rem; font-weight: 800; }

@media (max-width: 1050px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-body { min-height: 0; }
}

@media (max-width: 850px) {
  .hero-grid, .timeline-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 2rem; }
  .hero-profile { max-width: 490px; }
  .project-grid { grid-template-columns: 1fr; max-width: 680px; }
  .interest-grid { grid-template-columns: 1fr; }
  .interest-card { min-height: 0; }
  .interest-card img { margin-bottom: 1.5rem; }
  .footer-grid { gap: 2rem; }
}

@media (max-width: 700px) {
  :root { --container: min(100% - 2rem, 1240px); }
  .section { padding: 5rem 0; }
  .detail-subhead--with-preview { grid-template-columns: 1fr; gap: 1.5rem; }
  .detail-subhead--with-preview > img { max-width: 22rem; max-height: none; }
  .skill-grid { grid-template-columns: 1fr; }
  .main-nav { position: absolute; top: 5.25rem; right: 1rem; left: 1rem; display: none; flex-direction: column; align-items: stretch; padding: 1rem; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 15px 30px rgba(78, 50, 31, 0.16); }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .main-nav .nav-contact {
    color: var(--brown-deep);
    background: #fffaf3;
    border-color: var(--brown-deep);
    text-align: center;
  }
  .main-nav .nav-contact:hover, .main-nav .nav-contact:focus-visible {
    color: #fffaf3;
    background: var(--brown-deep);
  }
  .nav-toggle { display: block; }
  .hero { min-height: auto; }
  .hero-grid { padding: 2.5rem 0; }
  .project-image { height: 230px; }
  .footer-bottom { flex-direction: column; }
  .section-heading h2, .about-copy h2, .site-footer h2 { font-size: 2.4rem; }
  .detail-main { padding: 3rem 0 5rem; }
  .detail-hero, .detail-grid, .detail-feature { grid-template-columns: 1fr; }
  .detail-hero { gap: 1.5rem; }
  .detail-feature { padding: 1.2rem; }
}

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