/* ==========================================================================
   Landing Page Stylesheet
   ========================================================================== */

/* Navigation links (only on landing) */
.nav-links {
  display: flex;
  gap: 4px;
  background: white;
  padding: 4px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  padding: 6px 16px;
  border-radius: 8px;
  transition: all 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  background: #1a1a1a;
  color: white;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
  padding: 40px 0 64px;
}

.hero-right-wrapper {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-top: 8px;
}

.hero-left h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-left h1::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  animation: blink 0.6s step-end infinite;
  font-weight: 300;
  color: #aaa;
}

.hero-left h1.done::after {
  display: none;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-left .subtitle {
  font-size: 15px;
  color: #777;
  font-weight: 400;
}

.hero-left .tagline {
  font-size: 15px;
  color: #555;
  margin-top: 4px;
}

.hero-right {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  flex: 1;
}

@keyframes portrait-intro {
  0%   { transform: scale(1) rotate(0deg); }
  50%  { transform: scale(1.04) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.photo-frame {
  flex-shrink: 0;
  padding: 3px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fcd29f, #d9a8e0, #91d3f0);
  transition: transform 0.25s ease;
  cursor: default;
}

.photo-frame:hover {
  transform: scale(1.04) rotate(2deg);
}

.photo-frame.intro-play {
  animation: portrait-intro 0.7s ease-in-out;
}

.hero-photo-placeholder {
  width: 160px;
  height: 100%;
  min-height: 200px;
  border-radius: 13px;
  background: #e0d5ef;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-photo-portrait {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: bottom;
}

.hero-right p {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
}

.hero-right p strong {
  color: #1a1a1a;
}

.hero-socials {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.hero-socials a {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  background: #f0efec;
  padding: 7px 16px;
  border-radius: 8px;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.hero-socials a:hover {
  background: #e0dedd;
}

.hero-socials a[href^="mailto"]:hover {
  background: #1a1a1a;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-socials a[href^="mailto"] { --r: 8px; }

/* Section Label */
.section-label {
  font-size: 28px;
  font-weight: 400;
  color: #1a1a1a;
  margin-bottom: 24px;
}

/* Projects */
.projects-section {
  padding: 0 0 80px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 24px;
  row-gap: 64px;
}

.card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card-img {
  width: 100%;
  height: 200px;
  border-radius: 14px;
  position: relative;
  isolation: isolate;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 14px;
  background: #f5f5f5;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card-img::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 17px;
  background: conic-gradient(from var(--angle), #fcd29f, #d9a8e0, #91d3f0, #fcd29f);
  animation: spin-gradient 4s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card:hover .card-img {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.card:hover .card-img::before {
  opacity: 1;
}

.card-img-inner {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
}

.card-img img,
.card-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.card-img-centered {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef3e2;
  border-radius: 14px;
  overflow: hidden;
}

.card-img-centered img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* Flyer Flip Cards */
@keyframes flip-flyer {
  0%   { transform: rotateY(0deg); }
  19%  { transform: rotateY(0deg); }
  27%  { transform: rotateY(180deg); }
  46%  { transform: rotateY(180deg); }
  55%  { transform: rotateY(360deg); }
  100% { transform: rotateY(360deg); }
}

.card-flip-row {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fef3e2;
  border-radius: 14px;
  padding: 16px;
}

.card-flip-item {
  perspective: 600px;
  width: 62px;
  height: 130px;
  flex-shrink: 0;
}

.card-flip-item-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: flip-flyer 11s ease-in-out infinite;
}

.card-flip-item:nth-child(1) .card-flip-item-inner { animation-delay: 0s; }
.card-flip-item:nth-child(2) .card-flip-item-inner { animation-delay: 0.7s; }
.card-flip-item:nth-child(3) .card-flip-item-inner { animation-delay: 1.4s; }
.card-flip-item:nth-child(4) .card-flip-item-inner { animation-delay: 2.1s; }
.card-flip-item:nth-child(5) .card-flip-item-inner { animation-delay: 2.8s; }

.card-flip-front,
.card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.card-flip-back {
  transform: rotateY(180deg);
}

.card-flip-front img,
.card-flip-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Card Body */
.card-body {
  padding: 0 4px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  background:
    linear-gradient(#f0efec, #f0efec) padding-box,
    linear-gradient(90deg, #fcd29f, #d9a8e0, #91d3f0) border-box;
  border: 2.5px solid transparent;
}

.card-subtitle {
  font-size: 13px;
  color: #888;
  margin-bottom: 6px;
}

.card-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  flex: 1;
}

.card-meta {
  margin-top: 10px;
  font-size: 12px;
  color: #bbb;
  font-weight: 500;
}

/* Über Mich */
.about-section {
  padding: 0 0 80px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.about-card-wide {
  grid-column: 1 / -1;
}

.about-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.about-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.about-card p {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
}

.about-card p + p {
  margin-top: 12px;
}

.about-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #f0efec;
  align-items: center;
}

.meta-pill {
  font-size: 12px;
  font-weight: 500;
  color: #555;
  background: #f0efec;
  padding: 6px 14px;
  border-radius: 20px;
}

.meta-pill.green {
  background: #e8f5e9;
  color: #2e7d32;
}

.cv-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  background: #f0efec;
  padding: 9px 18px;
  border-radius: 10px;
  transition: background 0.15s, transform 0.15s, color 0.15s;
}

.cv-btn:hover {
  background: #1a1a1a;
  color: white;
  transform: translateY(-1px);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.skill-tag {
  font-size: 13px;
  font-weight: 500;
  background: #f0efec;
  color: #444;
  padding: 6px 14px;
  border-radius: 8px;
}

/* Kontakt */
.contact-section {
  padding: 0 0 100px;
}

.contact-card {
  background: #1a1a1a;
  color: white;
  border-radius: 20px;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-card h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 15px;
  color: #aaa;
}

.contact-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover {
  opacity: 0.85;
}

.btn[href^="mailto"]:hover {
  opacity: 1;
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn[href^="mailto"] { --r: 10px; }

.btn-white {
  background: white;
  color: #1a1a1a;
}

.btn-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

/* Scroll Fade-in */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tablet ≤ 768px */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 32px 0 48px;
    gap: 24px;
  }
  .hero-left h1 { font-size: 42px; }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 48px;
  }
  .about-grid { grid-template-columns: 1fr; }
  .about-card-wide { grid-column: 1; }
  .about-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .cv-btn { margin-left: 0; }
  .contact-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 36px;
  }
  .contact-card h2 { font-size: 26px; }
}

/* Mobile ≤ 480px */
@media (max-width: 480px) {
  .nav-links a {
    padding: 6px 10px;
    font-size: 13px;
  }
  .hero {
    padding: 24px 0 40px;
    gap: 20px;
  }
  .hero-left h1 { font-size: 32px; }
  .hero-right-wrapper { flex-direction: column; }
  .photo-frame { align-self: flex-start; }
  .hero-photo-placeholder {
    width: 80px;
    min-height: 80px;
  }
  .section-label {
    font-size: 22px;
    margin-bottom: 20px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
    row-gap: 36px;
  }
  .about-card { padding: 24px; }
  .contact-section { padding: 0 0 64px; }
  .contact-card {
    padding: 24px;
    gap: 24px;
  }
  .contact-card h2 { font-size: 22px; }
  .contact-buttons {
    flex-direction: column;
    width: 100%;
  }
  .btn { text-align: center; }
}
