/* ==========================================================================
   Sadin Rosa — Portfolio
   Implemented from the Claude Design component "Portfolio Sadin Rosa v4.dc.html".
   The design's inline styles and `style-hover` attributes are resolved here
   into real rules; the DC runtime is not used.
   ========================================================================== */

/* --------------------------------------------------------------- Tokens -- */

:root {
  --bg: #122932;
  --bg2: #173340;
  --fg: #FFFDED;
  --muted: rgba(255, 253, 237, 0.62);
  --line: rgba(255, 253, 237, 0.16);
  --hair: rgba(255, 253, 237, 0.09);
  --rose: #E9A2B9;
  --rose-soft: rgba(233, 162, 185, 0.14);
  --ink: #122932;
  --cream: #FFFDED;
  /* Tint laid over bright imagery so it settles into the dark palette. */
  --veil: linear-gradient(180deg, rgba(18, 41, 50, 0.34), rgba(18, 41, 50, 0.60));

  --gutter: clamp(20px, 4vw, 52px);
  --shell: 1180px;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

:root[data-theme="light"] {
  --bg: #FFFDED;
  --bg2: #F6F2DC;
  --fg: #122932;
  --muted: rgba(18, 41, 50, 0.66);
  --line: rgba(18, 41, 50, 0.16);
  --hair: rgba(18, 41, 50, 0.09);
  --rose: #C3728E;
  --rose-soft: rgba(195, 114, 142, 0.12);
  --ink: #FFFDED;
  --cream: #122932;
  /* A light board on a cream page barely needs settling. */
  --veil: linear-gradient(180deg, rgba(18, 41, 50, 0.04), rgba(18, 41, 50, 0.13));
}

/* ----------------------------------------------------------------- Base -- */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  /* `clip` rather than `hidden`: it contains the rotated decorations without
     creating a scroll container, which would break the sticky header. */
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background 700ms ease, color 700ms ease;
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--rose); }

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

::selection { background: var(--rose); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

/* The sticky header must not cover the top of an anchored section. */
section[id] { scroll-margin-top: 92px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--fg);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  font-size: 14px;
}
.skip-link:focus-visible {
  left: 0;
  color: var(--ink);
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
}

.dot { color: var(--rose); }

.eyebrow {
  margin: 0;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
}

/* ------------------------------------------------------------ Languages -- */
/* Both language variants ship in the markup; the active one is chosen by the
   `lang` attribute on <html>, which mirrors the design's <sc-if> branches. */

html[lang="en"] [data-lang="de"],
html[lang="de"] [data-lang="en"] { display: none; }

/* ---------------------------------------------------------- Reveal / FX -- */
/* Gated on `.js` so the page stays fully readable without JavaScript. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 950ms var(--ease), transform 950ms var(--ease);
}
.js [data-reveal][data-shown] {
  opacity: 1;
  transform: none;
}

@keyframes driftIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  mix-blend-mode: soft-light;
  opacity: .55;
  background-image: repeating-conic-gradient(from 16deg at 36% 42%,
    rgba(255, 255, 255, .06) 0deg 3deg, transparent 3deg 8deg);
  background-size: 6px 6px;
}

/* --------------------------------------------------------------- Header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: var(--bg);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  /* Without this the name breaks across two lines once the nav gets wide. */
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 30px);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  font-size: 14.5px;
  color: var(--muted);
  transition: color 350ms ease;
}
.nav-link:hover { color: var(--fg); }

.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: background 350ms ease, color 350ms ease;
}
.lang-btn[aria-pressed="true"] {
  background: var(--rose);
  color: var(--ink);
  font-weight: 600;
}

.theme-btn {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  transition: color 350ms ease, border-color 350ms ease;
}
.theme-btn:hover {
  color: var(--rose);
  border-color: var(--rose);
}

/* ----------------------------------------------------------------- Hero -- */

.hero {
  padding: clamp(40px, 7vw, 110px) var(--gutter) clamp(50px, 8vw, 120px);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(34px, 6vw, 88px);
  align-items: center;
}

.hero-copy { animation: driftIn 950ms var(--ease) both; }

.hero-portrait {
  display: flex;
  justify-content: center;
  animation: driftIn 1200ms var(--ease) both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 clamp(22px, 3vw, 34px);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  display: block;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7.6vw, 102px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: clamp(20px, 3vw, 32px) 0 0;
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.72;
  color: var(--muted);
  max-width: 27em;
  text-wrap: pretty;
}
.hero-lead strong {
  color: var(--fg);
  font-weight: inherit;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 44px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border-radius: 999px;
  padding: 15px 26px;
  font-size: 15px;
}

.btn-icon { opacity: .55; }

.btn-solid {
  background: var(--fg);
  color: var(--ink);
  font-weight: 500;
  /* Transparent border keeps solid and ghost buttons the same height. */
  border: 1px solid transparent;
  transition: transform 400ms var(--ease), background 400ms ease;
}
.btn-solid:hover {
  background: var(--rose);
  color: var(--ink);
  transform: translateY(-3px);
}

.btn-ghost {
  border: 1px solid var(--line);
  transition: border-color 400ms ease, transform 400ms var(--ease);
}
.btn-ghost:hover {
  border-color: var(--rose);
  transform: translateY(-3px);
}

/* -------------------------------------------------------------- Portrait -- */

.portrait {
  position: relative;
  width: 100%;
  max-width: min(100%, 272px);
}

.portrait-outline {
  position: absolute;
  inset: -16px -14px 14px -18px;
  border: 1px solid var(--rose);
  border-radius: 200px 200px 24px 24px;
  opacity: .5;
  transform: rotate(-2.5deg);
  pointer-events: none;
}

.portrait-frame {
  overflow: hidden;
  border-radius: 180px 180px 20px 20px;
  background: var(--bg2);
  transform: rotate(1.2deg);
  transition: transform 900ms var(--ease);
}
.portrait-frame:hover { transform: rotate(-1deg); }

.portrait-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 3.7;
  object-fit: cover;
  object-position: 52% 16%;
  filter: contrast(1.05) saturate(.95);
}

.portrait-tag {
  position: absolute;
  bottom: -14px;
  left: -22px;
  margin: 0;
  background: var(--rose);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 15px;
  font-family: var(--serif);
  font-size: 16px;
  transform: rotate(-6deg);
}

/* --------------------------------------------------------------- Profil -- */

.profile {
  padding: 0 var(--gutter) clamp(50px, 8vw, 120px);
}

.profile-body { max-width: 900px; }

.profile .eyebrow { margin-bottom: clamp(18px, 2.5vw, 28px); }

.profile-lead {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.7vw, 46px);
  line-height: 1.24;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.profile-text {
  margin: clamp(20px, 2.5vw, 30px) 0 0 clamp(0px, 4vw, 110px);
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 36em;
  text-wrap: pretty;
}

/* ----------------------------------------------------------- Leistungen -- */

.services { background: var(--bg2); }

.services-inner {
  padding: clamp(50px, 8vw, 116px) var(--gutter);
}

.services-head { margin-bottom: clamp(28px, 4vw, 54px); }

.services-head-pair {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 4vw, 60px);
  align-items: baseline;
  justify-content: space-between;
}

.services-claim {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(21px, 2.9vw, 36px);
  line-height: 1.3;
  max-width: 22em;
  text-wrap: pretty;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: clamp(22px, 2.6vw, 30px);
  transition: transform 480ms var(--ease), border-color 480ms ease, background 480ms ease;
}
.card:hover {
  transform: translateY(-5px) rotate(-.5deg);
  border-color: var(--rose);
  background: var(--rose-soft);
}

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(21px, 2.2vw, 27px);
  line-height: 1.15;
}

.card-text {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ------------------------------------------------------------- Projekte -- */

.projects {
  padding: clamp(50px, 8vw, 120px) var(--gutter);
}

.project {
  margin-top: clamp(28px, 4vw, 58px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(26px, 4vw, 66px);
  align-items: center;
}
.project + .project { margin-top: clamp(46px, 7vw, 110px); }

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

.project-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.9vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.project-text {
  margin: 16px 0 0;
  font-size: 16.5px;
  line-height: 1.82;
  color: var(--muted);
  max-width: 32em;
  text-wrap: pretty;
}
.project-reverse .project-text { max-width: 33em; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.tag {
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--muted);
}
.tag-live {
  border-color: var(--rose);
  color: var(--rose);
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 24px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  transition: gap 420ms ease, color 420ms ease, border-color 420ms ease;
}
.inline-link:hover {
  gap: 19px;
  color: var(--rose);
  border-color: var(--rose);
}
.inline-link-rose { border-bottom-color: var(--rose); }

/* Project imagery. Keeps the frame the placeholders had: same 5:4 box, same
   24px radius, same idle tilt and hover counter-tilt. */
.shot {
  margin: 0;
  aspect-ratio: 5 / 4;
  border-radius: 24px;
  overflow: hidden;
  background-color: var(--bg2);
  transition: transform 700ms var(--ease);
}

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

.shot-a { transform: rotate(-1.2deg); }
.shot-a:hover { transform: rotate(.8deg); }

.shot-b { transform: rotate(1.4deg); }
.shot-b:hover { transform: rotate(-.7deg); }

/* The FigJam board is a bright, wide canvas sitting in a dark page. A tinted
   veil, a hairline and a soft shadow make it read as a deliberate window into
   the work rather than a pasted screenshot. Hover lifts the veil and pushes in. */
.shot-board {
  position: relative;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .30);
}

.shot-board img {
  /* The board is far wider than a 5:4 frame. Hold the dense left half, where
     the note columns sit, and let the emptier right side run out of view. */
  object-position: 8% 50%;
  /* Slightly overfilled at rest, so the tilt never exposes an edge and the
     hover has somewhere to travel. */
  transform: scale(1.03);
  transition: transform 700ms var(--ease);
}

.shot-board::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--veil);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: opacity 700ms var(--ease);
}

.shot-board:hover img { transform: scale(1.07); }
.shot-board:hover::after { opacity: .5; }

/* -------------------------------------------------------------- CV band -- */

.cv-section {
  padding: 0 var(--gutter) clamp(50px, 8vw, 120px);
}

.cv-band {
  border: 1px solid var(--hair);
  border-radius: 28px;
  padding: clamp(28px, 4.5vw, 58px);
  background: var(--rose-soft);
}

.cv-band-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: clamp(22px, 3vw, 48px);
  align-items: center;
}

.cv-band .eyebrow { margin-bottom: 14px; }

.cv-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.3vw, 42px);
  line-height: 1.16;
}

.cv-actions {
  display: flex;
  flex-direction: column;
  gap: 13px;
  align-items: flex-start;
}

.quiet-link {
  font-size: 14.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--hair);
  padding-bottom: 4px;
  transition: color 380ms ease, border-color 380ms ease;
}
.quiet-link:hover {
  color: var(--rose);
  border-color: var(--rose);
}

/* -------------------------------------------------------------- Kontakt -- */

.contact {
  padding: 0 var(--gutter) clamp(50px, 8vw, 110px);
}

.contact .eyebrow { margin-bottom: clamp(18px, 2.5vw, 28px); }

.contact-claim {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.contact-mail {
  display: inline-block;
  font-size: clamp(17px, 2.2vw, 26px);
  font-weight: 500;
  border-bottom: 1px solid var(--rose);
  padding-bottom: 6px;
  word-break: break-word;
  transition: color 400ms ease;
}
.contact-mail:hover { color: var(--rose); }

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(13px, 2vw, 20px);
  margin-top: clamp(30px, 4.5vw, 60px);
}

.contact-card {
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: clamp(20px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 460ms var(--ease), border-color 460ms ease;
}
.contact-card:hover {
  transform: translateY(-4px) rotate(.4deg);
  border-color: var(--rose);
}
.contact-card-alt:hover { transform: translateY(-4px) rotate(-.4deg); }

.contact-card-title {
  font-family: var(--serif);
  font-size: 24px;
}

.contact-card-arrow {
  color: var(--muted);
  font-size: 16px;
}

.contact-card-meta {
  font-size: 13.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------- Footer -- */

.site-footer { border-top: 1px solid var(--hair); }

.footer-inner {
  padding: 24px var(--gutter) 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-mark {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--fg);
}

/* ------------------------------------------------------- Reduced motion -- */

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

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
