/* Personal one-pager — Philipp Herud
   Three inks (ink, green, paper) + one field tint. Light = letterhead, dark = back of the card. */

@font-face { font-display: swap; font-family: 'Gloock'; font-style: normal; font-weight: 400; src: url('../fonts/gloock-v6-latin-regular.woff2') format('woff2'); }
@font-face { font-display: swap; font-family: 'Titillium Web'; font-style: normal; font-weight: 400; src: url('../fonts/titillium-web-v17-latin-regular.woff2') format('woff2'); }
@font-face { font-display: swap; font-family: 'Titillium Web'; font-style: normal; font-weight: 600; src: url('../fonts/titillium-web-v17-latin-600.woff2') format('woff2'); }
@font-face { font-display: swap; font-family: 'Titillium Web'; font-style: normal; font-weight: 700; src: url('../fonts/titillium-web-v17-latin-700.woff2') format('woff2'); }

:root {
  --ground: #EEF1EC;
  --field: #DFE6DB;
  --ink: #1E2A2F;
  --ink-soft: #4B5B60;
  --green: #527550;
  --green-ink: #3F5E3D;          /* green used as text on ground */
  --rule: rgba(30, 42, 47, 0.16);
  --frame-a: #527550;
  --frame-b: #1E2A2F;
  --cta-bg: #527550;
  --cta-ink: #F2F5F0;
  --cta-soft: rgba(242, 245, 240, 0.78);
  --cta-rule: rgba(242, 245, 240, 0.38);
  --grain-opacity: 0.06;
  --shadow-float:
    0 1px 2px rgba(30, 42, 47, 0.06),
    0 8px 24px -6px rgba(39, 61, 38, 0.14),
    0 28px 60px -20px rgba(30, 42, 47, 0.22);

  --display: 'Gloock', 'Georgia', serif;
  --text: 'Titillium Web', system-ui, sans-serif;

  /* spacing tokens: 4 / 8 / 16 / 24 / 40 / 64 / 104 / 168 */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 1rem; --s4: 1.5rem;
  --s5: 2.5rem; --s6: 4rem; --s7: 6.5rem; --s8: 10.5rem;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 78rem;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ground: #172125;
  --field: #1F2C31;
  --ink: #E4EAE5;
  --ink-soft: #9DB0AA;
  --green: #8DB889;
  --green-ink: #9CC498;
  --rule: rgba(228, 234, 229, 0.13);
  --frame-a: #6E9A6A;
  --frame-b: #AEBFB7;
  --cta-bg: #2F4A31;
  --cta-ink: #EEF3EC;
  --cta-soft: rgba(238, 243, 236, 0.74);
  --cta-rule: rgba(238, 243, 236, 0.28);
  --grain-opacity: 0.08;
  --shadow-float:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 10px 30px -8px rgba(0, 0, 0, 0.45),
    0 30px 70px -24px rgba(10, 30, 12, 0.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #172125;
    --field: #1F2C31;
    --ink: #E4EAE5;
    --ink-soft: #9DB0AA;
    --green: #8DB889;
    --green-ink: #9CC498;
    --rule: rgba(228, 234, 229, 0.13);
    --frame-a: #6E9A6A;
    --frame-b: #AEBFB7;
    --cta-bg: #2F4A31;
    --cta-ink: #EEF3EC;
    --cta-soft: rgba(238, 243, 236, 0.74);
    --cta-rule: rgba(238, 243, 236, 0.28);
    --grain-opacity: 0.08;
    --shadow-float:
      0 1px 2px rgba(0, 0, 0, 0.3),
      0 10px 30px -8px rgba(0, 0, 0, 0.45),
      0 30px 70px -24px rgba(10, 30, 12, 0.6);
    color-scheme: dark;
  }
}

/* ---------- language switch ---------- */
html:not([data-lang="en"]) .l-en { display: none !important; }
html[data-lang="en"] .l-de { display: none !important; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(5rem + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.16 0 0 0 0 0.18 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] body::before { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; } }

::selection { background: var(--green); color: var(--ground); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }

html { scrollbar-color: color-mix(in srgb, var(--ink) 30%, transparent) var(--ground); }

.wrap {
  width: 100%; max-width: var(--max); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: var(--s3); top: -4rem; z-index: 200; background: var(--ink); color: var(--ground); padding: var(--s2) var(--s3); }
.skip:focus { top: calc(var(--s3) + env(safe-area-inset-top, 0px)); }

/* ---------- type scale (1.25 ratio on 17px) ---------- */
.display {
  font-family: var(--display);
  font-size: clamp(3.4rem, 8.2vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.h2 {
  font-family: var(--display);
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.h3 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.lead { font-size: clamp(1.15rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--ink); max-width: 34ch; }
.soft { color: var(--ink-soft); }
.measure { max-width: 62ch; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  /* reach under the notch / status bar so no page content shows above the header */
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--rule); }
/* iOS 26 Safari paints scrolled content behind the status bar, above the viewport
   (where safe-area insets are 0). Extend the header's surface up into that strip. */
.nav::before {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 100%;
  height: 120px;
  background: var(--ground);
  pointer-events: none;
}
.nav__in { display: flex; align-items: center; gap: var(--s4); height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 600; letter-spacing: 0.005em; white-space: nowrap; }
.brand svg { width: 1.6rem; height: 1.6rem; }
.nav__links { display: flex; gap: var(--s4); margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav__links a { text-decoration: none; color: var(--ink-soft); font-size: 0.975rem; padding-block: var(--s2); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color 160ms ease, background-size 260ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--ink); background-size: 100% 1px; } }
.nav__links a:active { color: var(--green-ink); }

.lang {
  display: inline-flex; position: relative;
  border: 1px solid var(--rule); border-radius: 999px; padding: 3px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
}
.lang button {
  position: relative; z-index: 1;
  appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--ink-soft);
  min-width: 2.4rem; height: 1.9rem; border-radius: 999px;
  transition: color 180ms ease, transform 140ms var(--ease-out);
}
.lang button[aria-pressed="true"] { color: var(--ground); }
.lang button:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .lang button[aria-pressed="false"]:hover { color: var(--ink); } }
.lang__pill {
  position: absolute; z-index: 0; top: 3px; left: 3px;
  width: 2.4rem; height: 1.9rem; border-radius: 999px; background: var(--ink);
  transition: transform 260ms var(--ease-out);
}
html[data-lang="en"] .lang__pill { transform: translateX(2.4rem); }

.menu-btn { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.theme-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 2.5rem; height: 2.5rem; margin-left: calc(var(--s2) * -1);
  appearance: none; background: none; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink-soft);
  transition: color 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}
.theme-btn svg {
  grid-area: 1 / 1; width: 1.1rem; height: 1.1rem;
  transition: opacity 200ms ease, transform 320ms var(--ease-out);
}
.theme-btn__sun { opacity: 0; transform: rotate(-60deg) scale(0.7); }
.theme-btn[aria-pressed="true"] .theme-btn__moon { opacity: 0; transform: rotate(60deg) scale(0.7); }
.theme-btn[aria-pressed="true"] .theme-btn__sun { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) { .theme-btn:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); } }
.theme-btn:active { transform: scale(0.94); }

/* ---------- hero ---------- */
.hero { min-height: calc(100svh - 4.25rem - env(safe-area-inset-top, 0px)); display: grid; align-items: center; padding-block: var(--s5) var(--s6); }
.hero__grid {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(var(--s5), 5vw, var(--s7));
}
.hero__name { margin-bottom: var(--s5); }
.hero__name span.row { display: block; }
.hero__lead { margin-bottom: var(--s4); }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s5); font-size: 0.975rem; }
.hero__meta .soft { display: inline-flex; align-items: center; gap: var(--s2); }
.hero__meta svg { width: 1rem; height: 1rem; flex: none; }

.textlink {
  display: inline-flex; align-items: center; gap: 0.45rem;
  color: var(--ink); text-decoration: none; font-weight: 600;
  padding-block: var(--s1);
  background: linear-gradient(var(--green), var(--green)) 0 100% / 100% 1.5px no-repeat;
  transition: background-size 260ms var(--ease-out), color 160ms ease;
}
.textlink svg { width: 0.95rem; height: 0.95rem; transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .textlink:hover { color: var(--green-ink); }
  .textlink:hover svg { transform: translate(2px, -2px); }
  .textlink--down:hover svg { transform: translateY(3px); }
}
.textlink:active { transform: scale(0.98); }

/* the interlocking frames — the logo, drawn at page scale */
.mark {
  --side: min(100%, 40rem, 76svh);
  --bar: clamp(7px, 0.8vw, 11px);
  position: relative;
  width: var(--side);
  aspect-ratio: 1;
  margin-inline: auto 0;
}
.mark__frame {
  position: absolute;
  width: 66.667%; aspect-ratio: 1;
  border: var(--bar) solid;
}
.mark__frame--b { top: 0; right: 0; border-color: var(--frame-b); z-index: 2; }
.mark__frame--a { bottom: 0; left: 0; border-color: var(--frame-a); }
/* back half of frame A: filled, sits behind the person */
.mark__frame--a-back { z-index: 1; background: var(--field); }
/* front half of frame A: only its lower part, laid over the person */
.mark__frame--a-front {
  z-index: 4;
  clip-path: inset(62% 0 0 0);
}
.mark__person {
  position: absolute; z-index: 3;
  /* spans the whole mark so the figure (and its shadow) can cross frame A's bars */
  left: 0; width: 100%;
  top: -14%; bottom: calc(var(--bar) / 2);
  overflow: hidden;
  pointer-events: none;
}
.mark__person img {
  position: absolute; bottom: 0; left: 36%;
  width: 64%; height: auto; max-width: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 28px rgba(17, 26, 29, 0.22)) drop-shadow(0 2px 4px rgba(17, 26, 29, 0.12));
}
:root[data-theme="dark"] .mark__person img { filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.5)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mark__person img { filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.5)); } }

.mark__caption {
  position: absolute; z-index: 4;
  right: calc(var(--bar) + var(--s3)); top: calc(var(--bar) + var(--s3));
  max-width: 12rem; text-align: right;
  font-size: 0.85rem; line-height: 1.45; color: var(--ink-soft);
}

/* load sequence: the one authored moment */
@media (prefers-reduced-motion: no-preference) {
  .mark__frame--b { animation: wipe-b 900ms var(--ease-in-out) 120ms both; }
  .mark__frame--a-back  { animation: wipe-a 900ms var(--ease-in-out) 260ms both; }
  .mark__frame--a-front { animation: wipe-a-front 900ms var(--ease-in-out) 260ms both; }
  .mark__person img { animation: emerge 1100ms var(--ease-out) 560ms both; }
  .mark__caption { animation: fade 700ms ease 1100ms both; }
  .hero__name .row { animation: lift 900ms var(--ease-out) both; }
  .hero__name .row:nth-child(2) { animation-delay: 70ms; }
  .hero__copy > :not(.hero__name) { animation: fade 800ms ease 380ms both; }
}
@keyframes wipe-b { from { clip-path: inset(0 0 100% 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes wipe-a { from { clip-path: inset(100% 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes wipe-a-front { from { clip-path: inset(100% 100% 0 0); } to { clip-path: inset(62% 0 0 0); } }
@keyframes emerge { from { opacity: 0; transform: translate(-50%, 14%); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes lift { from { opacity: 0; transform: translateY(0.35em); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(var(--s6), 11vw, var(--s8)); }
.section + .section { border-top: 1px solid var(--rule); }
.section__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5); align-items: end; margin-bottom: clamp(var(--s5), 6vw, var(--s6)); }
.section__head p { max-width: 46ch; }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(var(--s5), 6vw, var(--s7)); align-items: start; }
.about__body { display: grid; gap: var(--s4); }
.about__body .h2 { margin-bottom: var(--s3); }
.about__statement { font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.3; letter-spacing: -0.015em; max-width: 30ch; margin-bottom: var(--s3); }

.photo { position: relative; overflow: hidden; background: var(--field); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo::before { content: ''; position: absolute; inset: 0; z-index: 1; background: var(--green); mix-blend-mode: multiply; opacity: 0.1; pointer-events: none; }
.photo::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(17, 26, 29, 0.45), transparent 38%); pointer-events: none; }
.photo figcaption { position: absolute; z-index: 2; left: var(--s4); right: var(--s4); bottom: var(--s3); color: #F2F5F0; font-size: 0.875rem; line-height: 1.45; }
.about__photo { aspect-ratio: 4 / 5; }
/* offset frame echoes the mark, small */
.framed { position: relative; }
.framed::before { content: ''; position: absolute; inset: calc(var(--s4) * -1) var(--s4) var(--s4) calc(var(--s4) * -1); border: 1.5px solid var(--frame-a); z-index: 0; }
.framed > * { position: relative; z-index: 1; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--s4) var(--s5);
  padding-block: var(--s4) var(--s5);
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.timeline li:last-child { border-bottom: 1px solid var(--rule); }
.timeline__when { font-weight: 600; color: var(--green-ink); font-size: 0.975rem; font-variant-numeric: lining-nums; }
.timeline p { max-width: 48ch; color: var(--ink-soft); }
.timeline .textlink { margin-top: var(--s2); font-size: 0.95rem; }
.timeline li.is-now .h3::after { content: ''; display: inline-block; width: 0.42em; height: 0.42em; margin-left: 0.45em; background: var(--green); vertical-align: 0.12em; }

/* away from the screen */
.life { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(var(--s5), 6vw, var(--s7)); align-items: center; }
.life__photo { aspect-ratio: 4 / 5; }
.life__list { list-style: none; margin: var(--s5) 0 0; padding: 0; }
.life__list li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--s3); padding-block: var(--s4); border-top: 1px solid var(--rule); }
.life__list li:last-child { border-bottom: 1px solid var(--rule); }
.life__list svg { width: 1.5rem; height: 1.5rem; color: var(--green-ink); margin-top: 0.2rem; }
.life__list strong { display: block; font-weight: 600; }
.life__list span.soft { font-size: 0.975rem; }

/* work index */
.work { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(var(--s5), 5vw, var(--s7)); align-items: start; }
.work__list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.work__item a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s4);
  padding: var(--s4) var(--s3) var(--s4) 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  position: relative;
}
.work__item:last-child a { border-bottom: 1px solid var(--rule); }
.work__name { font-family: var(--display); font-size: clamp(1.45rem, 2.3vw, 1.85rem); line-height: 1.15; letter-spacing: -0.015em; transition: transform 260ms var(--ease-out), color 160ms ease; }
.work__type { font-size: 0.85rem; font-weight: 600; color: var(--green-ink); align-self: center; white-space: nowrap; }
.work__desc { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.975rem; max-width: 52ch; transition: transform 260ms var(--ease-out); }
.work__thumb { display: none; }
.work__item a::after {
  content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: 100%;
  background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 380ms var(--ease-out);
}
.work__item a:hover::after, .work__item a:focus-visible::after, .work__item.is-active a::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .work__item a:hover .work__name, .work__item.is-active a .work__name { transform: translateX(0.4rem); }
  .work__item a:hover .work__desc, .work__item.is-active a .work__desc { transform: translateX(0.4rem); }
}
.work__item a:active .work__name { transform: translateX(0.4rem) scale(0.99); }
.work__item a:focus-visible { outline-offset: -2px; }

.work__preview { position: sticky; top: 7rem; }
.work__screen {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--field);
  box-shadow: var(--shadow-float);
}
.work__screen img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  opacity: 0; transform: scale(1.025); filter: blur(3px);
  transition: opacity 320ms ease, transform 520ms var(--ease-out), filter 320ms ease;
}
.work__screen img.is-shown { opacity: 1; transform: none; filter: none; }
.work__preview .framed::before { inset: var(--s4) calc(var(--s4) * -1) calc(var(--s4) * -1) var(--s4); border-color: var(--frame-b); }
.work__caption { margin-top: var(--s5); display: flex; justify-content: space-between; gap: var(--s3); font-size: 0.9rem; color: var(--ink-soft); }

/* contact — the business-card front: drenched green */
.contact { background: var(--cta-bg); color: var(--cta-ink); position: relative; overflow: hidden; }
.contact ::selection { background: var(--cta-ink); color: var(--cta-bg); }
.contact .soft { color: var(--cta-soft); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(var(--s5), 7vw, var(--s8)); }
.contact__intro { display: grid; gap: var(--s4); align-content: start; }
.contact__intro .h2 { margin-bottom: var(--s2); }
.offer { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.offer li { padding-block: var(--s3); border-top: 1px solid var(--cta-rule); display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: var(--s3); }
.offer li:last-child { border-bottom: 1px solid var(--cta-rule); }
.offer strong { font-weight: 600; }
.direct { display: grid; gap: var(--s2); margin-top: var(--s4); font-size: 0.975rem; }
.direct a { text-decoration: none; display: inline-flex; gap: var(--s3); align-items: center; width: fit-content; padding-block: 2px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 260ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .direct a:hover { background-size: 100% 1px; } }
.direct svg { width: 1rem; height: 1rem; opacity: 0.8; }
.contact :focus-visible { outline-color: var(--cta-ink); }
.contact__deco { position: absolute; right: -6rem; bottom: -6rem; width: 26rem; height: 26rem; pointer-events: none; opacity: 0.12; }

.form { display: grid; gap: var(--s4); align-content: start; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.field label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: var(--s1); }
.field label .opt { font-weight: 400; color: var(--cta-soft); }
.field input, .field textarea {
  width: 100%; appearance: none;
  background: transparent; color: var(--cta-ink);
  border: 0; border-bottom: 1.5px solid var(--cta-rule); border-radius: 0;
  padding: 0.55rem 0 0.6rem;
  font: inherit; font-size: 1.0625rem;
  transition: border-color 180ms ease;
}
.field textarea { resize: vertical; min-height: 7.5rem; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--cta-soft); opacity: 0.75; }
@media (hover: hover) and (pointer: fine) { .field input:hover, .field textarea:hover { border-bottom-color: var(--cta-soft); } }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--cta-ink); }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: 0 2px 0 0 var(--cta-ink); }
.field.has-error input, .field.has-error textarea { border-bottom-color: #F6C9B8; }
.form__alert { margin: 0; padding: var(--s3) var(--s4); border: 1.5px solid #FBE1D6; color: #FFF3EE; font-size: 0.95rem; line-height: 1.55; }
.field__error { display: none; margin-top: var(--s1); font-size: 0.85rem; color: #FBE1D6; }
.field.has-error .field__error { display: block; }
.hp-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); margin-top: var(--s2); }
.form__note { font-size: 0.85rem; max-width: 34ch; }
.form__note a { color: inherit; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.6rem;
  height: 3.1rem; padding-inline: 1.5rem;
  background: var(--cta-ink); color: var(--cta-bg);
  font: inherit; font-weight: 700; font-size: 1rem; letter-spacing: 0.005em;
  box-shadow: 0 1px 2px rgba(10, 20, 10, 0.14), 0 8px 20px -10px rgba(10, 24, 12, 0.5);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, background-color 160ms ease;
}
.btn svg { width: 1rem; height: 1rem; transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: 0 1px 2px rgba(10, 20, 10, 0.14), 0 14px 28px -12px rgba(10, 24, 12, 0.6); }
  .btn:hover svg { transform: translateX(3px); }
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--cta-ink); outline-offset: 3px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.sent { display: grid; gap: var(--s3); align-content: start; padding-top: var(--s2); }
.sent svg { width: 2.5rem; height: 2.5rem; }

/* ---------- footer ---------- */
.foot { padding-block: var(--s5) calc(var(--s5) + env(safe-area-inset-bottom, 0px)); font-size: 0.9rem; color: var(--ink-soft); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.foot nav { display: flex; gap: var(--s4); margin-left: auto; }
.foot a { text-decoration: none; transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--ink); text-decoration: underline; } }
.foot a:active { color: var(--green-ink); }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .section__head, .about, .life, .work, .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .about .framed { max-width: 28rem; }
  .work__preview { display: none; }
  .work__thumb { display: block; grid-column: 1 / -1; margin-top: var(--s3); aspect-ratio: 16 / 9; overflow: hidden; background: var(--field); box-shadow: var(--shadow-float); }
  .work__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
  .timeline li { grid-template-columns: 7rem minmax(0, 1fr); }
  .timeline li > div:last-child { grid-column: 2; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__links.is-open {
    display: grid; position: absolute; top: 100%; left: 0; right: 0;
    padding: var(--s3) var(--gutter) var(--s4); gap: 0;
    background: var(--ground); border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-float);
  }
  .nav__links.is-open a { display: block; padding-block: var(--s3); font-size: 1.1rem; color: var(--ink); border-top: 1px solid var(--rule); background: none; }
  .nav__links.is-open li:first-child a { border-top: 0; }
  .nav { background: var(--ground); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav__in { gap: var(--s3); }
  .lang { margin-left: auto; }
  .theme-btn { margin-left: 0; }
  .menu-btn {
    display: inline-grid; place-items: center;
    width: 2.75rem; height: 2.75rem; margin-right: calc(var(--s2) * -1);
    appearance: none; background: none; border: 0; color: var(--ink); cursor: pointer;
    transition: transform 140ms var(--ease-out);
  }
  .menu-btn:active { transform: scale(0.92); }
  .menu-btn svg { width: 1.5rem; height: 1.5rem; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .mark { --side: min(100%, 26rem); margin-inline: auto; }
}
@media (max-width: 600px) {
  .brand { gap: 0.5rem; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .timeline li > div:last-child { grid-column: 1; }
  .offer li { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .work__type { grid-column: 1 / -1; grid-row: 1; }
  .foot nav { margin-left: 0; }
  .framed::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .work__screen img { transform: none; filter: none; }
}
