/* ==========================================================================
   Felix Kirchmann — portfolio styles
   All visual styling lives here. Page content lives in /content/site.json.
   ========================================================================== */

/* ----- Fonts (Inter, self-hosted) ----- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-regular-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-medium.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-medium-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-semibold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-semibold-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ----- Design tokens ----- */
:root {
  --content-width: 660px;
  --intro-width: 460px;
  --c-text: #000;
  --c-muted: #707070;
  --c-desc: #333;
  --c-link: #09f;
  --c-icon: #666;
  --c-icon-bg: #f3f3f3;

  /* tag palette (name matches "color" field in content/site.json) */
  --tag-blue:      #1199ee;
  --tag-turquoise: #22aa99;
  --tag-green:     #66bb66;
  --tag-purple:    #bb66cc;
  --tag-pink:      #ff88aa;
  --tag-orange:    #ff7744;
  --tag-red:       #ee4444;
  --tag-gray:      #777777;
}

/* ----- Base ----- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", "Inter Placeholder", sans-serif;
  color: var(--c-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }

/* ----- Hero ----- */
.hero { position: relative; text-align: center; overflow: hidden; }
.hero__banner {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; min-width: 1440px; height: 273px; z-index: 0;
  object-fit: cover; object-position: center; pointer-events: none;
  user-select: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__avatar {
  width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  border: 5px solid #fff; /* white ring around the avatar */
  margin: 23px auto 0; display: block;
}
.hero__social {
  display: flex; justify-content: center; align-items: center; gap: 14px;
  height: 40px; margin-top: 0;
}
.hero__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--c-icon); background: var(--c-icon-bg);
}
.hero__social svg { width: 22px; height: 22px; display: block; }
.hero__intro {
  max-width: var(--intro-width); margin: 30px auto 0; padding: 0 12px;
  font-size: 20px; font-weight: 600; line-height: 28px; letter-spacing: -0.4px;
  color: var(--c-text);
}

/* ----- Main content ----- */
.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px 64px;
}
/* Current role (top entry) */
.role { margin-top: 38px; }
.role__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.role__title {
  font-size: 20px; font-weight: 600; letter-spacing: -0.5px; line-height: 28px;
  color: var(--c-text); margin: 0;
}
.role__date {
  font-size: 16px; font-weight: 500; color: var(--c-muted);
  white-space: nowrap; flex-shrink: 0;
}
.role__meta { font-size: 14px; font-weight: 500; color: var(--c-muted); margin: 2px 0 0; }

.section { margin-top: 38px; }
.section__title {
  font-size: 22px; font-weight: 500; line-height: 1.4em;
  color: var(--c-muted); margin: 0 0 8px;
}

/* Collapsible section (native <details>, default collapsed) */
.section--collapsible > summary {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; list-style: none; user-select: none;
  transition: color .15s ease;
}
.section--collapsible > summary::-webkit-details-marker { display: none; }
.section--collapsible > summary::marker { content: ""; }
.section--collapsible > summary:hover { color: var(--c-text); }
.section--collapsible > summary:focus-visible { outline: 2px solid var(--c-muted); outline-offset: 4px; border-radius: 2px; }
.section__summary .chevron {
  width: 20px; height: 20px; flex: 0 0 20px; transition: transform .2s ease;
}
.section--collapsible[open] > summary .chevron { transform: rotate(180deg); }

/* ----- Project ----- */
.project { display: flex; gap: 20px; align-items: flex-start; padding: 16px 0; }
.project__icon {
  width: 52px; height: 52px; flex: 0 0 52px; object-fit: contain;
  display: block;
}
.project__body { flex: 1 1 auto; min-width: 0; }
.project__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.project__headleft { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.project__name {
  font-size: 20px; font-weight: 600; letter-spacing: -0.5px; line-height: 28px;
  color: var(--c-text); margin: 0;
}
.project__year {
  font-size: 16px; font-weight: 500; color: var(--c-muted);
  white-space: nowrap; flex-shrink: 0;
}
.project__links { display: inline-flex; align-items: center; gap: 6px; }
.project__links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c-icon-bg); color: var(--c-icon);
}
.project__links svg { width: 16px; height: 16px; display: block; }

/* icon buttons (project link badges + hero social) — hover colors */
.icon-btn { transition: background-color .2s ease, color .2s ease; }
.icon-btn:hover { color: #fff; }
.icon-btn--github:hover   { background-color: #5462be; }
.icon-btn--git:hover      { background-color: #f05e45; }
.icon-btn--document:hover { background-color: #41ae9f; }
.icon-btn--web:hover      { background-color: #3a9fee; }
.icon-btn--mail:hover     { background-color: #4455bb; }
.icon-btn--linkedin:hover { background-color: #0055ff; }
.project__desc {
  font-size: 14px; font-weight: 500; line-height: 21px; color: var(--c-desc);
  margin: 6px 0 0;
}
.project__desc a { color: var(--c-link); transition: color .15s ease; }
.project__desc a:hover { color: #08f; text-decoration: underline; text-underline-offset: 2px; }

/* ----- Tags ----- */
.tags { display: flex; flex-wrap: wrap; gap: 5px 5px; margin-top: 10px; }
.tag {
  font-size: 12px; font-weight: 400; line-height: 14px;
  padding: 3px 5px; border-radius: 6px; color: #fff; white-space: nowrap;
}
.tag--blue      { background: var(--tag-blue); }
.tag--turquoise { background: var(--tag-turquoise); }
.tag--green     { background: var(--tag-green); }
.tag--purple    { background: var(--tag-purple); }
.tag--pink      { background: var(--tag-pink); }
.tag--orange    { background: var(--tag-orange); }
.tag--red       { background: var(--tag-red); }
.tag--gray      { background: var(--tag-gray); }

/* ----- Footer ----- */
.footer {
  max-width: var(--content-width); margin: 0 auto; padding: 24px 20px 48px;
  text-align: center; border-top: 1px solid #e6e6e6;
}
.footer p { margin: 6px 0; font-size: 14px; line-height: 1.5em; }
.footer a { color: var(--c-link); transition: color .15s ease; }
.footer a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ----- Sub-page top nav (legal + contact) ----- */
.topnav {
  max-width: var(--content-width); margin: 0 auto; padding: 28px 20px 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
}
.topnav__brand { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; color: var(--c-text); }
.topnav__brand:hover { opacity: .65; }
.topnav__links { display: flex; gap: 22px; }
.topnav__links a { font-size: 15px; color: var(--c-muted); }
.topnav__links a:hover { color: var(--c-text); }

/* ----- Legal pages (impressum / privacy) ----- */
.legal { padding-top: 24px; padding-bottom: 72px; }
.legal > * { margin: 0; }
.legal > :first-child { margin-top: 0 !important; }
.legal__h1 {
  font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.2;
  color: #111;
}
.legal p { font-size: 16px; line-height: 1.6; color: #000; }
.legal ul { padding-left: 22px; }
.legal li { font-size: 16px; line-height: 1.6; color: #000; margin: 2px 0; }
.legal a { color: var(--c-link); transition: color .15s ease; word-break: break-word; }
.legal a:hover { text-decoration: underline; text-underline-offset: 2px; }
.legal .gap-sm { margin-top: 20px; }
.legal .gap-md { margin-top: 36px; }
.legal .gap-lg { margin-top: 52px; }

/* ----- Contact page ----- */
.contact { padding-top: 24px; padding-bottom: 72px; }
.contact .legal__h1 { margin: 0; }
.contact__intro {
  font-size: 16px; line-height: 32px; color: var(--c-muted);
  margin: 20px 0 28px; max-width: 560px;
}
.cform { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.cform__input {
  font: inherit; font-size: 16px; color: var(--c-text);
  background: #fafafa; border: 0; border-radius: 10px; padding: 12px; width: 100%;
}
.cform__input::placeholder { color: #9b9b9b; }
.cform__input:focus { outline: 2px solid #d8d8d8; outline-offset: 0; }
.cform__textarea { min-height: 130px; resize: vertical; }
.cform__submit {
  font: inherit; font-size: 16px; font-weight: 600; color: #fff;
  background: #111; border: 0; border-radius: 10px; padding: 12px; width: 100%;
  cursor: pointer; transition: background-color .18s ease;
}
.cform__submit:hover { background: #2a2a2a; }

/* ----- Article / project detail page ----- */
.page-wide .topnav,
.page-wide .content,
.page-wide .footer { max-width: 700px; }

.article { padding-top: 24px; padding-bottom: 72px; }
.article p,
.article li { line-height: 2em; }
.article .article__sub {
  font-size: 24px; font-weight: 600; line-height: 1.4; letter-spacing: -0.3px;
  margin-top: 36px;
}
.article ul { padding-left: 24px; margin-top: 32px; }
.article ul ul { padding-left: 24px; margin: 0; }
.article li { margin: 0; }
.article__img {
  display: block; width: 100%; height: auto; border-radius: 0; margin: 36px 0 0;
}
.article__img--rounded { border-radius: 10px; }

/* ----- Responsive ----- */
@media (max-width: 700px) {
  .content, .footer { padding-left: 20px; padding-right: 20px; }
  .project__head { flex-wrap: wrap; }
  .legal__h1 { font-size: 32px; }
}

/* ----- Respect reduced-motion preferences ----- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
