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

:root {
  --primary-color: #09090b;
  --primary-subtle-accent: #18181b;
  --primary-accent: #3f3f46;
  --secondary-color: #71717a;
  --subtle: #a1a1aa;
  --background-color: #f4f4f5;
  --surface-color: #e4e4e7;
}

html {
  font-size: 62.5%;
}

body {
  font-family: Inter, sans-serif;
  font-feature-settings: 'liga' 1, 'calt' 1; /* fix for Chrome */
  color: var(--primary-color);
  background-color: var(--background-color);
  padding-top: calc(3vw + 5rem);
}

@supports (font-variation-settings: normal) {
  body { font-family: InterVariable, sans-serif; }
}


/* SITE HEADER */


.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5vw;
  background-color: var(--background-color);
  border-bottom: 1px solid var(--surface-color);
  gap: 2rem;
}

/* SITE NAVIGATION */


.site-nav {
  position: static;
  display: flex;
  align-items: center;
  height: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  font-size: 2rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--secondary-color);
  transition: transform 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.site-nav a[aria-current="page"] {
  color: var(--primary-color);
  background-color: var(--surface-color);
}

@media (hover: hover) {
  .site-nav a:hover {
    color: var(--primary-color);
    transform: skew(-12deg);
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 3vw;
    gap: 1rem;
  }

  .site-nav ul {
    gap: 0.6rem;
  }

  .site-nav a {
    font-size: 1.6rem;
    padding: 0.3rem 0.8rem;
  }
}

.nav-home span {
  display: inline-block;
  animation: footer-letter-float 2.4s ease-in-out infinite;
}

.nav-home span:nth-child(1) { animation-delay: 0s; }
.nav-home span:nth-child(2) { animation-delay: 0.1s; }
.nav-home span:nth-child(3) { animation-delay: 0.2s; }
.nav-home span:nth-child(4) { animation-delay: 0.3s; }
.nav-home span:nth-child(5) { animation-delay: 0.4s; }
.nav-home span:nth-child(6) { animation-delay: 0.5s; }


/* SITE SOCIAL ICONS */


.site-social {
  position: static;
  display: flex;
  align-items: center;
  height: auto;
}

.site-social ul {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  list-style: none;
}

.site-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
}

.site-social img {
  height: 2.4rem;
  width: auto;
  display: block;
}

@media (hover: hover) {
  .site-social a:hover {
    transform: scale(1.1);
  }
}

@media (max-width: 768px) {
  .site-social a {
    width: 3.4rem;
    height: 3.4rem;
  }

  .site-social img {
    height: 1.8rem;
  }
}


/* HOVER EFFECT FOR HEADINGS */

@media (hover: hover) {
  /* Add hover effects for individual letters */
  .text-italic-hover-effect span {
    display: inline-block;
    transition: transform 0.25s ease;
  }

  .text-italic-hover-effect span:nth-child(odd):hover {
    transform: skewX(-15deg);
  }

  .text-italic-hover-effect span:nth-child(even):hover {
    transform: skewX(15deg);
  }
}


/* HERO SECTION */


.intro {
  display: flex;
  flex-direction: column;
}

.greeting {
  cursor: pointer;
}

.greeting-face {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.greeting-front {
  flex-direction: column;
  gap: 0.6rem;
}

.greeting-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.greeting-back {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  color: var(--secondary-color);
  max-width: 60rem;
}

.greeting.is-flipped .greeting-front {
  display: none;
}

.greeting.is-flipped .greeting-back {
  display: flex;
}

.greeting-text {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 500;
}

.greeting-hint {
  text-decoration: underline dotted;
  text-underline-offset: 6px;
}

.greeting-caption {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--subtle);
}

/* The name and the illustrated builder sit side by side, his feet on the name's baseline */
.intro-build {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  margin-top: 1.6rem;
}

.intro-name {
  display: block;
  font-size: clamp(6.4rem, 20vw, 12rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.builder {
  display: block;
  flex-shrink: 0;
  height: clamp(7.2rem, 22vw, 13.2rem);
  width: auto;
  overflow: visible;
}

.greeting-icon {
  height: clamp(2.2rem, 5vw, 3.2rem);
  width: auto;
  flex-shrink: 0;
  margin-top: 0.5rem;
  transform-origin: 70% 70%;
  animation: wave 2.5s infinite;
}

@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.intro-role {
  margin-top: 2.4rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--secondary-color);
}

.role-cycle {
  display: inline-block;
  color: var(--primary-color);
  transition: opacity 0.3s ease;
}

.role-cycle.is-fading {
  opacity: 0;
}

@media (max-width: 768px) {
  .greeting-face {
    gap: 1rem;
  }

  .greeting-back {
    max-width: 100%;
  }
}


/* ABOUT SECTION */


.about-section {
  width: 95%;
  margin: 10vh auto 0 auto;
  padding-bottom: 16rem;
}

.about {
  display: grid;
  grid-template-columns: 1fr 3fr;
}

.about h2 {
  font-size: 4rem;
  font-weight: 400;
  color: var(--primary-accent);
}

.about-list:not(:last-child) {
  margin-bottom: 10rem;
}

.about-item:not(:last-child) {
  margin-bottom: 3rem;
}

.about-item h3 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.about-projects h3 {
  margin-bottom: 0;
}

.about-item-note {
  font-size: 2.5rem;
  font-weight: 200;
  color: var(--subtle);
}

.about-item p {
  font-size: 2.5rem;
  font-weight: 200;
}

.languages-tag {
  color: var(--secondary-color);
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-between;
}

.project-date {
  color: var(--subtle);
  font-weight: 200;
}

.location-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--subtle);
  transition: text-decoration-color 0.25s ease, color 0.25s ease;
}

@media (hover: hover) {
  .location-link:hover {
    color: var(--primary-accent);
    text-decoration-color: var(--primary-accent);
  }
}

@media (max-width: 768px) {
  .about-section {
    padding-bottom: 10rem;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .about h2:not(:last-child) {
    margin-bottom: 2rem;
  }

  .about-list:not(:last-child) {
    margin-bottom: 5rem;
  }
}


/* SHARED ANIMATION */


@keyframes footer-letter-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.6rem);
  }
}


/* HOMEPAGE: single centered column */


.home {
  padding-top: 0;
}

.home-column {
  max-width: 60rem;
  margin: 0 auto;
  padding: max(6rem, 12vh) 1.6rem 6rem;
}

.home .site-social {
  margin-top: 2.4rem;
}

.home-divider {
  border: 0;
  border-top: 1px solid var(--surface-color);
  margin-top: 2rem;
}

.home .site-nav {
  margin-top: 2rem;
}

.home .site-nav ul {
  flex-wrap: wrap;
  gap: 2.4rem;
}

.home .site-nav a {
  padding: 0;
  border-radius: 0;
}

.home .site-nav a[aria-current="page"] {
  background-color: transparent;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.6rem;
}

.home .site-social ul {
  gap: 1.6rem;
}

.home .site-social a {
  width: auto;
  height: auto;
  background-color: transparent;
  border-radius: 0;
}

.home-panel {
  margin-top: 3.2rem;
}

.home-panel.is-active {
  animation: home-panel-in 0.35s ease-out;
}

@keyframes home-panel-in {
  from { opacity: 0; transform: translateY(0.8rem); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-panel.is-active {
    animation: none;
  }
}

@media (max-width: 600px) {
  .home-column {
    padding-top: 3rem;
  }
}


/* INNER PAGES (writings) */


.section-label {
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--subtle);
  margin-bottom: 1.2rem;
}

.page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 6rem 1.6rem 8rem;
}

.page-header h1 {
  font-size: clamp(3.6rem, 7vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.page-header p {
  margin-top: 1rem;
  font-size: 1.6rem;
  color: var(--secondary-color);
}

.page-section {
  margin-top: 4.8rem;
}

@media (max-width: 600px) {
  .page {
    padding-top: 3.2rem;
  }

  .page-section {
    margin-top: 3.6rem;
  }
}


/* HOME INTRO + TEASER GRID: plain text, no boxes */


.home-intro p {
  font-size: 1.7rem;
  line-height: 1.65;
  color: var(--primary-accent);
}

.home-intro p + p {
  margin-top: 1.2rem;
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.4rem 3.2rem;
  margin-top: 4rem;
}

.teaser {
  display: block;
  text-decoration: none;
  color: inherit;
}

.teaser-label {
  font-size: 1.3rem;
  color: var(--subtle);
}

.teaser-title {
  margin-top: 0.4rem;
  font-size: 1.7rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.teaser-text {
  margin-top: 0.4rem;
  font-size: 1.5rem;
  line-height: 1.55;
  color: var(--secondary-color);
}

@media (hover: hover) {
  .teaser:hover .teaser-title {
    text-decoration-color: currentColor;
  }
}

@media (max-width: 600px) {
  .teaser-grid {
    grid-template-columns: 1fr;
  }
}


/* PROJECT & WRITING FEEDS: plain text list */


.entry-feed {
  list-style: none;
}

.entry-item + .entry-item {
  margin-top: 3.6rem;
}

.entry-date {
  font-size: 1.3rem;
  color: var(--subtle);
}

.entry-heading {
  margin-top: 0.4rem;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.3;
}

.entry-heading a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

@media (hover: hover) {
  .entry-heading a:hover {
    text-decoration-color: currentColor;
  }
}

.entry-subtitle {
  margin-top: 0.2rem;
  font-size: 1.4rem;
  color: var(--secondary-color);
}

.entry-subtitle:empty {
  display: none;
}

.entry-teaser {
  margin-top: 0.8rem;
  font-size: 1.6rem;
  line-height: 1.65;
  color: var(--primary-accent);
  max-width: 60ch;
}

.feed-empty {
  font-size: 1.6rem;
  line-height: 1.65;
  color: var(--secondary-color);
}


/* HOME FACTS: education + skills as plain text rows */


.home-facts {
  margin-top: 3.2rem;
  display: grid;
  gap: 1.6rem;
}

.fact {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 0.4rem 2.4rem;
  font-size: 1.5rem;
  line-height: 1.6;
}

.fact dt {
  color: var(--subtle);
}

.fact dd {
  color: var(--primary-accent);
}

@media (max-width: 600px) {
  .fact {
    grid-template-columns: 1fr;
  }
}
