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

/* ── VARIABILI ── */
:root {
  --grid-gap: 5px;
  --side-padding: 20px;
  --bg-color: #f4f3f2;
  --text-color: #150919;
  --highlight-color: #f46b02;
}

[data-theme="dark"] {
  --bg-color: #150919;
  --text-color: #f4f3f2;
}

/* ── BASE ── */
body {
  font-family: 'Cabin', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  max-width: 1600px;
  margin: 0 auto;
  transition: background-color 0.8s ease, color 0.8s ease;
}

p { margin-bottom: 10px; font-size: 0.8rem; line-height: 1.8; }

a { font-size: inherit; color: inherit; text-decoration: none; }

.link-style {
  position: relative;
  color: inherit;
}

.link-style::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--highlight-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.8s ease;
  z-index: -1;
  text-decoration: underline;
}


.link-style:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

/* ── HEADER ── */
.header-wrapper {
  position: sticky;
  top: 10px;
  margin: auto;
  max-width: 98%;
  border: 1px solid #eaeaea;
  border-radius: 32px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(6px) saturate(180%);
  backdrop-filter: blur(6px) saturate(180%);
}

header {
  padding: 0 2%;
  display: flex;
  justify-content: space-between;
  align-items: center;

}

#main-logo {
	width: 110px;
	margin: 5px 0 0 0; 
}

.row { border-top: .5px var(--text-color) solid; }

.bio-row, .exp-row, .skills-row {
  gap: 1rem;
  padding: 0 var(--side-padding);
}

/* ── HELLO ── */
#hello {
  height:75vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#hello p {font-size: 6rem; font-weight: 550;}

.hello-name::before {
  content: '';
  display: inline-block;
  position: relative;
  z-index: 10;
  width: 12rem;
  height: 12rem;
  margin-right: -4.5rem;
  vertical-align: -7.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 770.65 340.36'%3E%3Cpath fill='%23f46b02' d='M534.42,80c-3.9,84.32-55.56,182.46-93.74,257.16l-51.59-28.35c28.78-56.09,103.6-230.2,85-240.46-27-14.9-92.4,97.82-135,245.61L283.48,294.8c16.21-55.74,75.43-219,33.94-226.32-55.23-9.79-56.68,167.86-63.87,225.73L195,288.91c16.84-67.91,21.65-221.59-14.37-227-49.69-7.47,32.21,255.28-85.76,239.5-42.5-5.69-72.94-43-87.67-81.66L54,200.43c6.89,23.24,47.34,74.43,58.61,31.1,13.83-53.17-5.08-112.84,3.6-168,10.39-75.21,105-81.46,129.83-10.89C280.57-11.27,365.52-3.85,383.72,67.58c18.07-24.36,40.49-48.29,71.61-56.11C501.36-.24,536.62,34.29,534.42,80Z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ── BIO ── */
#bio {
  height:75vh;
  display: flex;
  align-items: center;
}

.bio-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

/* ── CURRICULUM ── */
#curriculum {
  min-height: 55vh;
}

.cv-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 1fr;
}

.job-title {
  font-size: 1.4rem;	
  line-height: 1.8rem;
}

.job-year {
  text-transform: uppercase;
}

/* ── SKILLS ── */
#skills { min-height: 55vh; }

.skills-row {
	display: grid;
	grid-template-columns: .6fr 4.4fr;
}

.skills-row div {
	display: flex;
    flex-wrap: wrap;
    gap: 10px;
	padding-top: 5px;
}

.skills-row div p {
    line-height: 3rem; 
}

.st-style {
	border: .5px var(--text-color) solid;
	border-radius: 20px;
	padding: 5px 10px;
	
	display: inline-block;
    overflow: hidden;
    position: relative;
}

.move-up {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
}

/* ── EXPERIENCE ── */
#experience { min-height: 55vh; }

.exp-row {
	display: flex;
	flex-direction: column;
}

.exp-single-row {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

/* ── GRIGLIA PROGETTI ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
  padding-top: var(--grid-gap);
}

.project-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  display: block;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: all .8s ease-in-out;
}

.project-thumb:hover img {
  transform: scale(1.2, 1.2);
}

/* ── PAGINA PROGETTO ── */
#project-page { display: none; min-height: 100vh; }

.back-arrow {
  display: block;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 var(--side-padding) 2rem;
}

.project-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 3rem var(--side-padding);
}

.project-intro h1 { font-size: 1.8rem; font-weight: 700; }
.project-intro .meta { font-size: 0.75rem; text-transform: uppercase; margin-top: 0.5rem; }
.project-intro .desc { font-size: 0.9rem; line-height: 1.7; }

/* ── MASONRY ── */
.masonry {
  columns: 2;
  column-gap: var(--grid-gap);
  padding: var(--grid-gap);
}

.masonry img {
  display: block;
  width: 100%;
  margin-bottom: var(--grid-gap);
}

/* ── BARRA FISSA IN BASSO ── */
#fixed-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0 5px;
  z-index: 1000;
  mix-blend-mode: exclusion;
}

.fixed-bar-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.fixed-bar-text:first-child { justify-self: start; }
.fixed-bar-text:last-child { justify-self: end; }
.fixed-bar-text:nth-child(2) { justify-self: center; }

.fixed-bar-text {
  font-size: .6rem;
  color: #fff;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
   #hello p { text-align: left; font-size: 2rem; }
  .bio-row, .cv-row, .skills-row { grid-template-columns: 1fr; gap: 10px; }
   { grid-template-columns: 1fr; gap: 0.5rem; }
  .cv-title p { font-size: 2.8rem; }
  .project-intro { grid-template-columns: 1fr; }
  .masonry { columns: 2; }
  .projects-grid { grid-template-columns: 1fr; }

  .hello-name::before { 
  width: 4rem;
  height: 4rem;
  margin-right: -1.5rem;
  vertical-align: -2.4rem;
  }
}