/* ═══════════════════════════════════════════
   Reset & Custom Properties
   ═══════════════════════════════════════════ */

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

:root {
  --color-black: #111;
  --color-dark: #1a1a1a;
  --color-gray: #666;
  --color-light-gray: #ddd;
  --color-bg: #fafafa;
  --color-white: #fff;
  --color-highlight: #ffe066;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 780px;
  --section-gap: 6rem;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-dark);
  background-color: var(--color-bg);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-black);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-black);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-gray);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

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

/* ═══════════════════════════════════════════
   Main Container
   ═══════════════════════════════════════════ */

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

/* ═══════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════ */

.hero {
  padding-top: 8rem;
  padding-bottom: var(--section-gap);
  border-bottom: 1px solid var(--color-light-gray);
}

.hero-dateline {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gray);
  margin-bottom: 2rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--color-black);
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-gray);
  margin-bottom: 1.5rem;
}

/* Hero Contact Row — email & CV link */
.hero-contact {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-email {
  color: var(--color-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--color-light-gray);
  transition: border-color 0.3s ease;
}

.hero-email:hover {
  border-bottom-color: var(--color-black);
}

.hero-divider {
  color: var(--color-light-gray);
  user-select: none;
}

.hero-cv {
  color: var(--color-dark);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1.5px solid var(--color-black);
  padding-bottom: 1px;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.hero-cv:hover {
  color: var(--color-black);
}

.hero-rule {
  width: 60px;
  height: 2px;
  background-color: var(--color-black);
  margin-bottom: 2rem;
}

.hero-bio {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--color-dark);
  max-width: 600px;
}

/* ═══════════════════════════════════════════
   Sections (shared)
   ═══════════════════════════════════════════ */

.section {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--color-light-gray);
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: 3rem;
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════
   Subtitle Hover — Yellow Highlighter
   Only applied to elements with .subtitle-hover.
   Creates an organic "stabilo" mark behind text.
   ═══════════════════════════════════════════ */

.subtitle-hover {
  width: fit-content;
  background-image: linear-gradient(
    to right,
    var(--color-highlight),
    var(--color-highlight)
  );
  background-size: 0% 40%;
  background-repeat: no-repeat;
  background-position: 0 88%;
  transition: background-size 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: default;
}

.subtitle-hover:hover {
  background-size: 100% 40%;
}

/* ═══════════════════════════════════════════
   Education
   ═══════════════════════════════════════════ */

.education-degree {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--color-black);
  margin-bottom: 0.3rem;
}

.education-school {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--color-gray);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════
   Skills
   ═══════════════════════════════════════════ */

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.skill-category-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: 1.2rem;
}

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

.skill-list li {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-dark);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-light-gray);
}

.skill-list li:last-child {
  border-bottom: none;
}

/* ═══════════════════════════════════════════
   Projects
   ═══════════════════════════════════════════ */

.project {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-light-gray);
}

.project:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: 1rem;
  line-height: 1.35;
}

.project-desc {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-dark);
  max-width: 620px;
}

/* ═══════════════════════════════════════════
   Certifications
   ═══════════════════════════════════════════ */

.cert-item {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-light-gray);
}

.cert-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.cert-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.cert-issuer {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--color-gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.8rem;
}

.cert-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-dark);
}

/* ═══════════════════════════════════════════
   Languages
   ═══════════════════════════════════════════ */

.languages-list {
  display: flex;
  flex-direction: column;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-light-gray);
}

.lang-item:last-child {
  border-bottom: none;
}

.lang-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-black);
}

.lang-level {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--color-gray);
  letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════ */

.footer {
  border-top: 2px solid var(--color-black);
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-black);
}

.footer-copy {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-gray);
}

/* ═══════════════════════════════════════════
   Scroll Animations
   Elements start invisible and slide up into
   view when they enter the viewport.
   ═══════════════════════════════════════════ */

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════
   Responsive — Tablet
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
  :root {
    --section-gap: 4rem;
  }

  .nav-inner {
    padding: 0.8rem 1.5rem;
  }

  .nav-links {
    gap: 1.2rem;
  }

  .nav-links a {
    font-size: 0.72rem;
  }

  main {
    padding: 0 1.5rem;
  }

  .hero {
    padding-top: 6rem;
  }

  .hero-name {
    font-size: clamp(2.4rem, 10vw, 3.5rem);
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-inner {
    padding: 2rem 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════
   Responsive — Mobile
   ═══════════════════════════════════════════ */

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

  .hero-name {
    font-size: 2.4rem;
  }

  .hero-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .hero-divider {
    display: none;
  }

  .section-title {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .cert-title {
    font-size: 1.15rem;
  }

  .hero-bio,
  .project-desc {
    font-size: 1rem;
  }
}
