/* ===========================================
   Portfolio Website - Emilia Anselmi
   =========================================== */

/* Custom Fonts */
@font-face {
  font-family: "Military Scribe";
  src: url("../assets/fonts/Military Scribe/Military Scribe.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Apercu Mono";
  src: url("../assets/fonts/apercu-mono-pro/ApercuMonoProRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Apercu Mono";
  src: url("../assets/fonts/apercu-mono-pro/ApercuMonoProBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Apercu Mono";
  src: url("../assets/fonts/apercu-mono-pro/ApercuMonoProLight.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

/* CSS Variables */
:root {
  --burgunder: #651122;
  --rosa: #d69ba5;
  --buttergelb: #faecee;
  --dunkelrot: #4A1C23;
  --weiss: #FFFEF9;

  --font-headline: "Military Scribe", Georgia, cursive;
  --font-body: "Apercu Mono", monospace;

  --transition: all 0.3s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--buttergelb);
  color: var(--burgunder);
  font-size: 0.85rem;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--burgunder);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--rosa);
}

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

/* ===========================================
   Header & Navigation
   =========================================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  background-color: rgba(250, 236, 238, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  position: relative;
  margin-top: 0.5rem;
}

.logo img.logo-default {
  height: 2.8rem;
  width: auto;
  display: block;
}

.logo img.logo-hover {
  height: 2.8rem;
  width: auto;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.logo:hover img.logo-default {
  opacity: 0;
}

.logo:hover img.logo-hover {
  opacity: 1;
}

nav {
  display: flex;
  gap: 2.5rem;
}

nav a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'%3E%3Cpath d='M0 4 Q12.5 0, 25 4 T50 4 T75 4 T100 4' stroke='%23d69ba5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 40px 8px;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
  animation: wave-underline 2s linear infinite;
}

@keyframes wave-underline {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 40px 0;
  }
}

/* ===========================================
   Hero Section - Positioned Higher
   =========================================== */

.hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 14rem 2rem 2rem;
  position: relative;
}

.hero h1 {
  font-family: var(--font-headline);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: normal;
  color: var(--burgunder);
  margin-bottom: 1rem;
  letter-spacing: 0em;
  line-height: 1;
}

.hero .subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  max-width: 800px;
  opacity: 1;
  line-height: 1.7;
  text-align: center;
  text-transform: uppercase;
}


/* ===========================================
   Projects Section - 3 Column Grid with Hover Overlay
   =========================================== */

#projekte {
  padding: 2rem 5vw 6rem;
  max-width: 1400px;
  margin: 0 auto;
}

#projekte h2 {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: -0.025em;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

/* Each row: all items same height via fixed row height */
.projects-row {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

/* Alignment helpers */
.projects-row--left {
  justify-content: flex-start;
}

.projects-row--right {
  justify-content: flex-end;
}

.projects-row--center {
  justify-content: center;
}

/* Project Card - base */
.projekt-card {
  position: relative;
  overflow: visible;
  transition: var(--transition);
  display: block;
  background: transparent;
  padding: 15px;
  flex-shrink: 0;
}

/* Width variants — all cards share row height of 300px */
.projekt-card--wide {
  width: 42%;
  height: 300px;
}

.projekt-card--mid {
  width: 32%;
  height: 300px;
}

.projekt-card--narrow {
  width: 22%;
  height: 300px;
}

/* Quote block — overlay version, ragt links aus dem Bild raus */
.projects-quote--overlay {
  position: absolute;
  left: -90%;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  z-index: 20;
  padding: 0 1rem;
  pointer-events: none;
}

.projects-quote--overlay blockquote {
  font-family: var(--font-headline);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: #f0d8dc;
  line-height: 1;
  font-weight: normal;
  text-align: center;
}

/* Wavy border container - animated wavy line */
.projekt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'%3E%3Cpath d='M0 4 Q12.5 0, 25 4 T50 4 T75 4 T100 4' stroke='%23d69ba5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") repeat-x top,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'%3E%3Cpath d='M0 4 Q12.5 0, 25 4 T50 4 T75 4 T100 4' stroke='%23d69ba5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") repeat-x bottom,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 100'%3E%3Cpath d='M4 0 Q0 12.5, 4 25 T4 50 T4 75 T4 100' stroke='%23d69ba5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") repeat-y left,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 100'%3E%3Cpath d='M4 0 Q0 12.5, 4 25 T4 50 T4 75 T4 100' stroke='%23d69ba5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") repeat-y right;
  background-size: 40px 8px, 40px 8px, 8px 40px, 8px 40px;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Show wavy border on hover with animation */
.projekt-card:hover::before {
  opacity: 1;
  animation: wave-move 2s linear infinite;
}

@keyframes wave-move {
  0% {
    background-position: 0 0, 40px 100%, 0 0, 100% 40px;
  }

  100% {
    background-position: 40px 0, 0 100%, 0 40px, 100% 0;
  }
}

.projekt-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.8s cubic-bezier(0.19, 1, 0.22, 1);
  border-radius: 6px;
  position: relative;
  z-index: 5;
}

.projekt-card:hover img {
  transform: scale(1.03);
}

/* Info appears below the image on hover */
.projekt-card .projekt-info {
  position: absolute;
  bottom: 0;
  left: 15px;
  right: 15px;
  background-color: var(--buttergelb);
  padding: 1rem;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.3s ease;
  text-align: center;
  z-index: 1;
}

.projekt-card:hover .projekt-info {
  opacity: 1;
}

.projekt-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--rosa);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.projekt-card p {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--rosa);
  opacity: 0.9;
}

/* ===========================================
   About Page
   =========================================== */

.about-section {
  min-height: 100vh;
  padding: 10rem 3rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.about-content {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.about-images {
  display: flex;
  gap: 1rem;
  flex: 1;
  min-width: 300px;
  max-width: 400px;
}

.about-images img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 6px;
  max-height: 500px;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text h1 {
  font-family: var(--font-headline);
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 1.5rem;
  font-weight: normal;
  letter-spacing: 0em;
  line-height: 1.2;
}

.about-text p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border: none;
  background-color: transparent;
  color: var(--burgunder);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: var(--transition);
  position: relative;
}

.contact-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'%3E%3Cpath d='M0 4 Q12.5 0, 25 4 T50 4 T75 4 T100 4' stroke='%23d69ba5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 40px 8px;
  transition: width 0.3s ease;
}

.contact-links a:hover {
  color: var(--rosa);
}

.contact-links a:hover::after {
  width: 100%;
  animation: wave-underline 2s linear infinite;
}

.kontakt-section .contact-links a:hover {
  color: var(--weiss);
}

.kontakt-section .contact-links a:hover::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'%3E%3Cpath d='M0 4 Q12.5 0, 25 4 T50 4 T75 4 T100 4' stroke='%23FFFEF9' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}

/* ===========================================
   Kontakt Section (Index Page)
   =========================================== */

.kontakt-section {
  padding: 3rem;
  max-width: fit-content;
  margin: 0 auto;
  text-align: center;
  background-color: #f0d8dc;
  border-radius: 6px;
}

.kontakt-section h2 {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: normal;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

.kontakt-section p {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.85;
  line-height: 1.6;
}

.kontakt-section .contact-links {
  justify-content: center;
}

/* ===========================================
   Project Detail Page
   =========================================== */

.projekt-detail {
  padding: 12rem 3rem 6rem;
  max-width: 100%;
  margin: 0 auto;
}

.projekt-detail h1 {
  font-family: var(--font-headline);
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 2rem;
  font-weight: normal;
  text-align: center;
}

.projekt-detail .beschreibung {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.projekt-galerie {
  -webkit-column-count: 2;
  column-count: 2;
  -webkit-column-gap: 1.5rem;
  column-gap: 1.5rem;
  -webkit-column-fill: balance;
  column-fill: balance;
  width: 70%;
  margin: 0 auto;
}

.projekt-galerie img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  -webkit-column-break-inside: avoid;
  break-inside: avoid;
  transition: var(--transition);
}

.projekt-galerie img:hover {
  box-shadow: 0 20px 50px rgba(114, 47, 55, 0.2);
}

/* ===========================================
   Per-Card Image Slideshow
   =========================================== */

.projekt-card .slideshow-images {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.projekt-card .slideshow-images img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 1;
}

.projekt-card .slideshow-images img.active {
  opacity: 1;
  z-index: 2;
}

/* Slideshow Nav Arrows */
.slide-prev,
.slide-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(250, 236, 238, 0.8);
  border: none;
  font-size: 1.4rem;
  color: var(--burgunder);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 15;
  opacity: 0;
  font-family: var(--font-headline);
  line-height: 1;
}

.projekt-card:hover .slide-prev,
.projekt-card:hover .slide-next {
  opacity: 1;
}

.slide-prev {
  left: 0.5rem;
}

.slide-next {
  right: 0.5rem;
}

.slide-prev:hover,
.slide-next:hover {
  background: rgba(250, 236, 238, 1);
  color: var(--rosa);
}

/* Slideshow Dots */
.slide-dots {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  z-index: 15;
  opacity: 0;
  transition: var(--transition);
}

.projekt-card:hover .slide-dots {
  opacity: 1;
}

.slide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--rosa);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.slide-dot.active {
  background: var(--rosa);
}

.back-button-wrapper {
  width: 70%;
  margin: 0 auto;
  background: transparent;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 0.5rem 0;
  background-color: transparent;
  color: var(--burgunder);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: var(--transition);
  position: relative;
}

.back-button::before {
  content: '←';
  font-size: 1rem;
  transition: var(--transition);
}

.back-button::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'%3E%3Cpath d='M0 4 Q12.5 0, 25 4 T50 4 T75 4 T100 4' stroke='%23d69ba5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 40px 8px;
  transition: width 0.3s ease;
}

.back-button:hover {
  color: var(--rosa);
}

.back-button:hover::before {
  transform: translateX(-5px);
}

.back-button:hover::after {
  width: 100%;
  animation: wave-underline 2s linear infinite;
}

/* ===========================================
   Footer
   =========================================== */

footer {
  text-align: center;
  padding: 3rem;
  border-top: 1px solid rgba(114, 47, 55, 0.1);
  margin-top: 4rem;
}

footer p {
  font-family: var(--font-body);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ===========================================
   Responsive Design
   =========================================== */

@media (max-width: 1024px) {
  .projekt-card--wide {
    width: 50%;
  }

  .projekt-card--mid {
    width: 40%;
  }

  .projekt-card--narrow {
    width: 30%;
  }

  .projekt-card--wide,
  .projekt-card--mid,
  .projekt-card--narrow {
    height: 240px;
  }

  .projects-quote--overlay {
    left: -90%;
    width: 250px;
  }

  .projects-grid {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem 1.5rem;
  }

  nav {
    gap: 1.5rem;
  }

  nav a {
    font-size: 0.75rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .hero {
    padding: 8rem 1.5rem 1rem;
  }

  #projekte {
    padding: 2rem 1.5rem 4rem;
  }

  .projekt-card--wide,
  .projekt-card--mid,
  .projekt-card--narrow {
    width: 100%;
    height: 250px;
  }

  .projects-row {
    flex-direction: column;
    align-items: center;
  }

  .projects-row--left,
  .projects-row--right {
    padding: 0;
  }

  .projects-quote--overlay {
    position: relative;
    left: 0;
    top: 0;
    transform: none;
    width: 100%;
    margin-bottom: 1rem;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .contact-links {
    justify-content: center;
  }


  .projekt-detail {
    padding: 8rem 1.5rem 4rem;
  }

  .projekt-galerie {
    width: 100%;
  }
}

@media (max-width: 480px) {
  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  .hero h1 {
    font-size: 3rem;
  }
}

/* ===========================================
   Lightbox Gallery
   =========================================== */

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(250, 236, 238, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 1.5rem;
  color: var(--burgunder);
  cursor: pointer;
  transition: var(--transition);
  z-index: 1002;
  background: none;
  border: none;
  font-family: var(--font-headline);
}

.lightbox-close:hover {
  color: var(--rosa);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
  color: var(--burgunder);
  cursor: pointer;
  transition: var(--transition);
  z-index: 1002;
  background: none;
  border: none;
  padding: 0.5rem;
  font-family: var(--font-headline);
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--rosa);
}

.projekt-galerie img {
  cursor: pointer;
}