/* ==========================================================================
   Roxanne König — Portfolio & CV (v2 Editorial)
   Clean, structured, bilingual (DE/EN), Light & Dark Mode
   ========================================================================== */

:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --bg: #fafaf9;
  --bg-alt: #f4f4f2;
  --surface: #ffffff;
  --surface-muted: #f5f5f4;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;

  --text: #18181b;
  --text-soft: #3f3f46;
  --text-mute: #71717a;

  --accent: #0f4c5c;
  --accent-hover: #0b3945;
  --accent-soft: #eef5f6;
  --accent-border: #c6dce0;

  --wa: #1f8a4c;
  --danger: #dc2626;
  --header-bg: rgba(250, 250, 249, 0.92);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-md: 0 8px 24px rgba(24, 24, 27, 0.08);
  --header-h: 4rem;
}

html.dark {
  --bg: #0d0f12;
  --bg-alt: #111419;
  --surface: #151920;
  --surface-muted: #1b2029;
  --border: #262b36;
  --border-strong: #363d4d;

  --text: #f4f4f5;
  --text-soft: #d4d4d8;
  --text-mute: #9ca3af;

  --accent: #4fd1c5;
  --accent-hover: #81e6d9;
  --accent-soft: rgba(79, 209, 197, 0.1);
  --accent-border: rgba(79, 209, 197, 0.25);

  --wa: #25d366;
  --danger: #f87171;
  --header-bg: rgba(13, 15, 18, 0.92);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  color-scheme: light;
}
html.dark { color-scheme: dark; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-soft);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }

h1, h2, h3, h4 {
  color: var(--text);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; }

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden { display: none !important; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: 5rem;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 660px;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  margin-top: 0.6rem;
  font-weight: 700;
}

.section-lead {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  color: var(--text-mute);
}

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

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .section { padding-block: 3.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.brand .accent {
  color: var(--accent);
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mute);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-switch button.active {
  background: var(--text);
  color: var(--bg);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.icon-btn svg { width: 1.1rem; height: 1.1rem; }

html.dark #iconMoon { display: none; }
html:not(.dark) #iconSun { display: none; }

.menu-btn { display: none; }

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--accent);
}

.mobile-menu {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: 0.75rem 1.25rem;
}

.mobile-menu.open { display: block; }

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
}

/* ---------- Chips & Tags ---------- */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.period-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-mute);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.65rem;
}

.skill-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-soft);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.925rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn svg { width: 1.05rem; height: 1.05rem; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
html.dark .btn-primary {
  color: #0d0f12;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-muted);
  border-color: var(--text-mute);
}

.btn-submit { width: 100%; margin-top: 0.5rem; }

/* ---------- Hero ---------- */
.hero {
  padding-block: 4.5rem 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.75fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-bio {
  margin-top: 1.25rem;
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 58ch;
}

.hero-ctas {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-meta {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.hero-meta dt {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-meta dd {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--text-mute);
  line-height: 1.4;
}

.portrait-frame {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-muted);
  aspect-ratio: 4 / 5;
  max-width: 340px;
  margin-left: auto;
  box-shadow: var(--shadow-sm);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

@media (max-width: 860px) {
  .hero { padding-block: 3rem 3.5rem; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .hero-portrait { order: -1; }
  .portrait-frame {
    margin-left: 0;
    max-width: 240px;
  }
  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.card-pad { padding: 1.5rem; }

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  flex-shrink: 0;
}

.icon-box svg { width: 1.15rem; height: 1.15rem; }

/* ---------- About Facts ---------- */
.fact-card .icon-box { margin-bottom: 0.85rem; }
.fact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-mute);
}
.fact-value {
  margin-top: 0.25rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

/* ---------- Experience Timeline ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  position: relative;
}

.timeline-item .dot { display: none; }

.timeline-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.check-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.check-item svg {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.3rem;
}

/* ---------- Projects ---------- */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-strong);
}

.project-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.project-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  flex-shrink: 0;
}

.project-icon svg { width: 1.2rem; height: 1.2rem; }
.project-head h3 { font-size: 1.075rem; }

.project-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.925rem;
  color: var(--text-soft);
  margin-bottom: 1.25rem;
}

.project-bullets li {
  padding-left: 1rem;
  position: relative;
}

.project-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.project-tags {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ---------- Skills ---------- */
.skill-cat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.skill-cat-head h3 { font-size: 1.025rem; }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* ---------- Education & Certificates ---------- */
.level-row { margin-top: 1rem; }

.level-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-weight: 500;
}

.level-head .lvl {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-mute);
}

.level-track {
  height: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.level-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ---------- Contact & Form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

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

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

a.contact-row:hover {
  background: var(--surface-muted);
  border-color: var(--border);
}

.row-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-mute);
}

.row-value {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
}

.contact-note {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-mute);
}

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

@media (max-width: 560px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.field.has-error .form-input { border-color: var(--danger); }

.error-msg {
  display: none;
  font-size: 0.8rem;
  color: var(--danger);
}

.field.has-error .error-msg,
.error-msg.show {
  display: block;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-mute);
  cursor: pointer;
}

.consent-row input {
  margin-top: 0.22rem;
  accent-color: var(--accent);
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 3rem 2.5rem;
  background: var(--bg);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-tagline {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-mute);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-mute);
}

.footer-nav a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.825rem;
  color: var(--text-mute);
}

.footer-legal {
  display: flex;
  gap: 1.25rem;
}

.legal-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-mute);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-btn:hover { color: var(--text); }

.legal-btn-inline { color: var(--text); }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--wa);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease;
}

.wa-float:hover { transform: scale(1.05); }
.wa-float svg { width: 1.45rem; height: 1.45rem; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 { font-size: 1.2rem; }

.modal-close {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mute);
  cursor: pointer;
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }
.modal-close svg { width: 1.1rem; height: 1.1rem; }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.legal-content .modal-intro {
  font-size: 0.875rem;
  color: var(--text-mute);
  margin-bottom: 1.25rem;
}

.legal-content h3 {
  font-size: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.legal-content p {
  font-size: 0.925rem;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  z-index: 250;
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast svg { width: 1.05rem; height: 1.05rem; flex-shrink: 0; }

/* ---------- Subtle Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}
