/* =========================================================
   Tobias Franzl – Portfolio
   Design: reduzierter editorialer Stil, Helvetica-Grotesk
   ========================================================= */

:root {
  --bg:        #f1efe8;   /* warmes Creme */
  --bg-2:      #f6f4ee;   /* leichter Verlauf oben */
  --ink:       #111110;   /* Schwarz für Text/Headings */
  --gray-name: #837e74;   /* Grauton für Hero-Name (über Foto lesbar) */
  --muted:     #9a958b;   /* Sektionsnummern, Captions */
  --line:      #d8d3c7;   /* Haarlinie */
  --field:     #c7c1b4;   /* Formular-Rahmen */

  /* symmetrische Seitenränder (Abstand 1 = Abstand 2) */
  --pad-x: clamp(1.5rem, 6vw, 7.5rem);
  --header-h: 76px;

  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 45%);
  background-color: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

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

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 239, 232, 0.82);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
/* Logo: gleiche Schrift wie die Navigation, aber FETT, gleiche Größe */
.logo {
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 3rem);
}
.nav a {
  font-size: 1.0625rem;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s ease, opacity .2s ease;
}
.nav a:hover { border-color: var(--ink); }
.nav a.is-active { border-color: var(--ink); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  padding: clamp(1rem, 4vh, 3rem) var(--pad-x) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hero-name {
  position: relative;
  z-index: 2;                 /* Name liegt VOR dem Foto */
  color: var(--gray-name);    /* Grauton -> auch über dem Pullover lesbar */
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-size: clamp(3.5rem, 17vw, 17rem);
  pointer-events: none;
}
.hero-name span { display: block; }

.hero-photo {
  position: absolute;
  right: var(--pad-x);
  bottom: 0;
  z-index: 1;                 /* Foto liegt HINTER dem Namen */
  height: min(90vh, 86%);
  width: auto;
  object-fit: contain;
  object-position: bottom right;
}
.hero-tag {
  position: relative;
  z-index: 3;
  margin-top: clamp(1.5rem, 4vh, 2.75rem);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ SEKTIONEN ============ */
.section {
  padding: clamp(4.5rem, 12vh, 9rem) var(--pad-x);
  border-top: 1px solid var(--line);
}
.section-index {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.section-heading {
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-size: clamp(2.9rem, 11vw, 10.5rem);
}
.section-heading span { display: block; }

/* ---- 01 Über mich ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
  margin-top: 1.25rem;
}
.about-left { display: flex; flex-direction: column; }
.about-figure {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  max-width: 460px;
}
.about-figure img { width: 100%; }

/* Text oben rechts, Blocksatz bis zum Ende */
.about-text {
  padding-top: 0.4rem;
  max-width: 640px;
}
.about-text p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.6;
  margin-bottom: 1.4em;
}
.about-text p:last-child { margin-bottom: 0; }

/* ---- 02 Kontakt ---- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
  margin-top: clamp(2rem, 5vw, 3.25rem);
}
.contact-intro {
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
  line-height: 1.55;
  max-width: 34ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Formular (nach links in den Inhaltsbereich verschoben) */
.contact-form { max-width: 560px; }
.field { margin-bottom: 1.6rem; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.55rem;
}
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(255,255,255,0.55);
  border: 1.5px solid var(--field);
  border-radius: 0;
  padding: 0.85rem 0.95rem;
  transition: border-color .18s ease, background .18s ease;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}
.hp-field { position: absolute; left: -9999px; opacity: 0; }

.submit-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 1.05rem 2.4rem;
  transition: opacity .18s ease, transform .18s ease;
}
.submit-btn:hover { opacity: 0.85; }
.submit-btn:active { transform: translateY(1px); }

.form-status {
  margin-top: 1.1rem;
  font-size: 0.95rem;
  min-height: 1.2em;
}
.form-status.ok { color: #1c7a3e; }
.form-status.err { color: #b23; }

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 0.4rem;
}
.contact-block .contact-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.contact-block a { border-bottom: 1.5px solid var(--ink); padding-bottom: 1px; }
.contact-block a:hover { opacity: 0.7; }

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem var(--pad-x);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.footer-name { font-weight: 600; color: var(--ink); }
.footer-mail { border-bottom: 1px solid var(--line); }
.footer-mail:hover { color: var(--ink); border-color: var(--ink); }

/* ============ SCROLL-REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .about-figure { max-width: 380px; order: 2; margin-top: 2.25rem; }
  .about-text { max-width: none; order: 1; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.75rem; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .header-inner { gap: 1rem; }
  .nav { gap: 1.25rem; }
  .nav a { font-size: 0.95rem; }
  .logo { font-size: 1.1rem; }

  .hero {
    min-height: auto;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .hero-name {
    font-size: clamp(3rem, 20vw, 6rem);
    position: relative;
  }
  /* Foto unter den Namen setzen (kein Überlappen mehr) */
  .hero-photo {
    position: relative;
    right: auto;
    height: auto;
    width: min(85%, 340px);
    margin: 1.75rem auto 0;
    object-position: center;
  }
  .hero-tag { text-align: center; margin-top: 1.5rem; }
  .about-text p { text-align: left; hyphens: none; }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Sichtbarer Fokus (Barrierefreiheit) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
