/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

:root {
  --primary-color: #2b84a1;
  --secondary-color: #2d3436;
  --accent-color: #78bcc4;
  --text-color: #2d3436;
  --bg-color: #ffffff;
  --bg-alt: #f1f2f6;
  --header-height: 70px;
  --container-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-color);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--primary-color);
  margin: 10px auto;
}

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

/* Navigation */
header {
  background: rgba(255, 255, 255, 0.95);
  height: var(--header-height);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Hero */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: #000;
  color: white;
  text-align: center;
  padding-top: var(--header-height);
}

.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-carousel .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.hero-carousel .slide.active {
  opacity: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(45, 52, 54, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.hero h2 {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent-color);
  margin-bottom: 2rem;
}

.hero .location {
  margin-bottom: 3rem;
  font-weight: 300;
  opacity: 0.8;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  margin: 0.5rem;
}

.btn.primary {
  background-color: var(--primary-color);
  color: white;
}

.btn.primary:hover {
  background-color: #21667d;
}

.btn.secondary {
  border: 2px solid white;
  color: white;
}

.btn.secondary:hover {
  background-color: white;
  color: var(--secondary-color);
}

/* About */
.about-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.about-image {
  flex: 0 0 300px;
}

.about-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 1;
  font-size: 1.1rem;
}

.about-text p {
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .about-image {
    flex: 0 0 200px;
  }

  .about-image img {
    height: 200px;
    width: 200px;
  }

  .timeline-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .timeline-item .time {
    flex: none;
    margin-bottom: 0.2rem;
  }
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.skill-category h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.skill-category li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* Experience */
.timeline {
  max-width: 1000px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  margin-bottom: 3rem;
  gap: 2rem;
}

.timeline-item .time {
  flex: 0 0 160px;
  font-weight: 700;
  color: var(--primary-color);
}

.timeline-item .content {
  flex: 1;
}

.timeline-item .content h3 {
  margin-bottom: 0.5rem;
}

.timeline-item .company {
  font-weight: 600;
  font-style: italic;
  margin-bottom: 1rem;
}

.timeline-item ul {
  margin-top: 1rem;
  margin-left: 1.5rem;
  list-style-type: disc;
}

.timeline-item ul li {
  margin-bottom: 0.5rem;
}

.timeline-item .tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
}

.timeline-item .tags span {
  background-color: var(--bg-alt);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}


.project-card h3 {
  margin-bottom: 1rem;
}

.project-card .tags {
  margin-top: 1.5rem;
}

.project-card .tags span {
  display: inline-block;
  background: var(--bg-alt);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

/* Contact */
.contact-section {
  text-align: center;
}

.contact-links {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-item {
  margin-bottom: 1rem;
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.1rem;
}

.contact-item .label {
  font-weight: 700;
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.contact-item {
  cursor: pointer;
}

.contact-item.revealed {
  cursor: default;
  pointer-events: auto;
}

#phone-link.revealed, #email-link.revealed,
#impressum-phone-link.revealed, #impressum-email-link.revealed {
  color: var(--text-color);
  text-decoration: none;
}

.contact-item.revealed:hover, #email-link.revealed:hover,
#impressum-phone-link.revealed:hover, #impressum-email-link.revealed:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.social-links {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
}

.social-item {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 2rem;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-item:hover {
  color: var(--secondary-color);
  transform: scale(1.1);
}

.ecg-link {
  margin-top: 2rem;
  text-align: center;
}

.ecg-link img {
  max-width: 100%;
  height: auto;
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-nav a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* Modal styles for Impressum */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal:target {
  display: block;
}

.modal-content {
  background-color: var(--bg-color);
  margin: 5% auto;
  padding: 3rem 1rem;
  border-radius: 10px;
  max-width: 800px;
  position: relative;
  color: var(--text-color);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  text-decoration: none;
  color: var(--text-color);
  line-height: 1;
}

.close-modal:hover {
  color: var(--primary-color);
}

.impressum-details {
  margin-top: 2rem;
  text-align: left;
}

.impressum-details p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.impressum-details a {
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }
  .nav-links {
    display: none;
  }
  .timeline-item {
    flex-direction: column;
  }
  .timeline-item .time {
    margin-bottom: 0.5rem;
  }
}

.carousel-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.carousel-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.projects-carousel {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.projects-carousel .project-card {
  flex: 0 0 100%;
  margin: 0;
  box-shadow: none;
  border: 1px solid var(--bg-alt);
}

.carousel-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: #21667d;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background: var(--primary-color);
}

@media (max-width: 768px) {
  .carousel-wrapper {
    gap: 10px;
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

