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

:root {
  /* Typo */
  --font-main: "Inter", system-ui, sans-serif;
  --font-titles: "Playfair Display", Georgia, serif;

  /* Background and fixed */
  --bg-color: #0B0B0C;
  --color-white: #FFFFFF;
  --color-gray-light: #9CA3AF; /* <p> */
  --color-gray-dark: #1A1A1C;  /* <footer> */
  --blue-light: 166, 183, 216;
  --gray-color: 255, 255, 255; /*line*/

  /* Red tech */
  --primary-red: 255, 59, 63; 
  --color-accent: rgb(var(--primary-red));
  --secondary-red: rgb(90, 12, 12);

  /* Glow shadow */
  --shadow-glow: 0 0 24px 6px rgba(var(--primary-red), 0.4), 0 0px 20px 8px rgba(0, 0, 0, 1);

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

}

body {
  color: var(--color-gray-light);
  background-color: var(--bg-color);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-titles);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
  /*Letter-spacing for titles*/
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3rem; /* 48px */
  margin-bottom: 1.5rem;
  font-weight: 900;
}

h2 {
  font-size: 3rem; /* 36px */
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.75rem; /* 28px */
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem; /* 20px */
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-main);
  font-weight: 600;
}

p {
  margin-bottom: 1.25rem;
  max-width: 70ch;
  color: var(--color-gray-light);
}

strong {
  font-weight: 600px;
}

/*ANIMATION ABOUT-ME*/
b {
    color: var(--blue-light);
    display: inline-block;
    position: relative;
    opacity: 0;
    /* We use 'ease-out' to make the fall quick at the beginning */
    animation: ballBounce 1.2s ease-out forwards;
}

/* The first b falls instantly (0s) */
p:nth-of-type(1) b {
    animation-delay: 0s;
}

/* The second b waits until the first one has almost finished its first impact */
p:nth-of-type(2) b {
    animation-delay: 0.4s;
}

/* The third b will have to wait a little longer */
p:nth-of-type(3) b {
    animation-delay: 0.8s;
}

@keyframes ballBounce {
    0% {
        transform: translateY(-200px); /* From the header */
        opacity: 0;
    }
    30% {
        transform: translateY(0);      /* First impact on the ground */
        opacity: 0.3;
    }
    50% {
        transform: translateY(-25px);  /* First bounce upwards */
        opacity: 0.5;
    }
    70% {
        transform: translateY(0);      /* Second Impact */
        opacity: 0.7;
    }
    85% {
        transform: translateY(-10px);  /* Second bounce (smaller) */
        opacity: 0.85;
    }
    100% {
        transform: translateY(0);      /* It stays still */
        opacity: 1;
    }
}



em {
  font-style: italic;
}

/*Larger introductory paragraphs*/
.welcome__description,
.about__text,
.skills__container,
.contact__description {
  font-size: 1.125rem; /* 18px */
  line-height: 1.8;
  color: var(--color-gray-light);
}

a {
  color: var(--color-white);
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}


ul {
  list-style: none;
}

/*HEADER*/

.header {
  position: sticky;
  background-color: var(--bg-color);
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 59, 63, 0.3);
  box-shadow: var(--shadow-glow);
  width: 100%;
  padding: 1.5rem 0 0.5rem; 
}

.header__container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 auto;
  margin-bottom: 0.75rem;
  flex-direction: column; /*Stacked on mobile*/
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  padding: 0 20px;
}

.header__brand {
  text-align: left;
  margin-bottom: 0;
}

.header__name {
  color: var(--color-white);
  margin-bottom: 4px;
  letter-spacing: -0.03em;
  font-size: 1.5rem; /* Reduced for mobile */
}


.header__tagline {
    font-size: 0.75rem; 
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--color-gray-light);
}

.nav {
  text-align: left;
  width: 100%; /* Use the full width to center the list */
}

.nav__list {
    align-items: center;
    display: flex;
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 0.5rem; 
    padding: 0;
    list-style: none;
}

.nav__item {
  display: block;
  margin: 0;
}

.nav__link {
  display: inline-block;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 10px;
  font-size: 0.85rem;
  color: var(--color-white);
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 50px;
}


.nav__link:hover {
  color: var(--secondary-red);
  text-decoration: none;
  transform: translateY(-5px);
}

.nav__link--active {
  font-weight: 600;
  
  /* Capsule background (Subtle bright red) */
  background-color: rgba(var(--primary-red), 0.25); 

  /* Circular shadow (Intense Glow) */
  box-shadow: 
    0 0 15px 2px rgba(var(--primary-red), 0.6), /* Core brightness */
    0 0 30px 5px rgba(var(--primary-red), 0.2); /* Expanded glow */

  /* Add brightness to the letters to make them appear lit */
  text-shadow: 0 0 8px rgba(var(--primary-red), 0.8);
}

.header__container,
.welcome__container,
.about__container,
.projects__container,
.skills__container,
.footer__container,
.blog__container,
.contact,
.find-me {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.main {
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 20px 100px;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}


/*FOOTER */
.footer {
  color: var(--color-gray-light);
  text-align: center;
  background: var(--color-gray-dark, #111);
  padding: 3rem 0 1.5rem; 
  margin-top: 4rem;
}

.footer__container {
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  gap: 1.2rem;
  list-style: none;
  padding: 0;
}

.footer__link {
  color: var(--color-white);
  margin: 0;
  display: inline-block;
  font-weight: 400;
  color: var(--color-white);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer__link:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.footer__copyright {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.footer__credits {
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: -1.25rem;
}


/*WELCOME */

.welcome {
text-align: left;
  position: relative;
  min-height: 100vh;    
  display: flex;
  flex-direction: column; 
  justify-content: center;
  margin-bottom: 0;
  padding: 60px 0;
}

.welcome::before {
  content: "";
  position: absolute;
  top: 10px; 
  left: -150px;
  
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle, 
    rgba(var(--primary-red), 0.2) 0%, 
    rgba(var(--primary-red), 0) 70%
  );
  filter: blur(50px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;

  /* Animation: name | duration | curve | final-mode */
  animation: slideInLight 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Definition of movement */
@keyframes slideInLight {
  0% {
    transform: translateX(-100%) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

/* --- GRAPHIC CONTAINER --- */
.welcome__image-wrapper {
    height: auto;
    overflow: visible;
    border: none;
    position: relative;
    width: 100%;
    max-width: 500px; 
    margin: 0 auto;
    aspect-ratio: 5 / 4; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.blueprint-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
    linear-gradient(rgba(var(--gray-color), 0.03) 1px, transparent 1px);
    background-size: 100% 40px; 
}

.line-path {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 3s ease-out forwards;
}

/* NEON COLORS */
.dedication-path { stroke: #39ff14; filter: drop-shadow(0 0 8px #39ff14); }
.practicing-path { stroke: #ffcc00; filter: drop-shadow(0 0 8px #ffcc00); animation-delay: 0.1s; }
.learning-path { stroke: #00d2ff; filter: drop-shadow(0 0 8px #00d2ff); animation-delay: 0.2s; }

.intersection-point {
    fill: #ffffff;
    opacity: 0;
    filter: drop-shadow(0 0 15px #ffffff);
    animation: fadeInPoint 0.4s forwards 1.7s; /* It appears right at the crash */
}

.success-path {
    fill: none;
    stroke: #ffffff;
    stroke-width: 3;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    filter: drop-shadow(0 0 10px #ffffff);
    animation: drawPath 1.2s ease-out forwards 2.1s;
}

.line-label {
    font-size: 13px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInText 0.8s forwards 0.5s;
}

.glow-green { fill: #39ff14; text-shadow: 0 0 8px #39ff14; }
.glow-yellow { fill: #ffcc00; text-shadow: 0 0 8px #ffcc00; }
.glow-blue { fill: #00d2ff; text-shadow: 0 0 8px #00d2ff; }
.glow-white { fill: #ffffff; text-shadow: 0 0 12px #ffffff; }

.success-text {
    animation: fadeInText 0.8s forwards; /* We use this name in the script */
    animation-delay: 3s; /* The time we defined earlier */
}

/* Animations*/
@keyframes drawPath { to { stroke-dashoffset: 0; } }
@keyframes fadeInText { to { opacity: 1; } }
@keyframes fadeInPoint { 
    from { opacity: 0; transform: scale(0); transform-origin: center; } 
    to { opacity: 1; transform: scale(1); transform-origin: center; } 
}

.welcome__container{
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 20px;
  align-items: center;
  text-align: center;
}

.welcome__text-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome__title {
  margin-bottom: 0.5rem; 
}

.welcome__subtitle {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  color: var(--color-white);
}

.welcome__description {
  margin-bottom: 2rem;
}

.welcome__actions {
  margin-bottom: 3rem;
  display: flex;
  gap: 4rem;
  justify-content: center;
  flex-wrap: wrap;
  text-underline-offset: 2px;
}

.welcome__actions .button {
  position: relative; 
  color: var(--color-white);
  text-decoration: none; 
  font-weight: 600;
  padding: 4px 0;
  transition: color 0.3s ease;
  display: inline-block;
}

/* We create the "invisible" line below */
.welcome__actions .button::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px; /* Line thickness */
  bottom: 0;
  left: 0;
  background-color: var(--secondary-red); 
  
  
  /*Magic */
  transform: scaleX(0); /* The line starts with size 0 */
  transform-origin: bottom left; /* Drawn from the left */
  transition: transform 0.3s ease-out; /* Animation speed */
}

.welcome__actions .button:hover {
  color: var(--secondary-red);  
}

.welcome__actions .button:hover::after {
  transform: scaleX(1); /* The line grows to 100% */
}

.welcome__stats {
  grid-column: 1 / span 2; /* Cross from side to side */
  display: flex;
  justify-content: space-between; /* Separates them equally */
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(var(--gray-color), 0.1); /* Subtle dividing line */
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

.stat {
  flex: 1;
  text-align: center;
}

.stat__number {
  font-size: 1.8rem;
  font-weight: 650;
  color: var(--color-white);
  text-shadow: 0 0 15px rgba(var(--primary-red), 0.9); 
  margin-bottom: 0.5rem;
  animation: pulse 1s ease-in-out infinite;
  will-change: transform, text-shadow; /* Browser optimization */
}

@keyframes pulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 15px rgba(var(--primary-red), 0.9);
  }
  50% {
    transform: scale(1.5); 
    text-shadow: 0 0 25px rgba(var(--primary-red), 1), 
                 0 0 10px rgba(var(--primary-red), 0.6); 
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 15px rgba(var(--primary-red), 0.9);
  }
}

.stat__label {
  font-size: 0.875rem; /* 14px */
  color: rgba(var(--gray-color), 0.9);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.skills-chart {
    width: 100%;
    height: auto; /* Allows the SVG to scale with the container */
    display: block;
}


/*BLOG SECTION*/
.blog__post {
    align-items: flex-start;
    display: flex;
    flex-direction: column; 
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 15px;
    border-radius: var(--radius-lg);
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(255, 59, 63, 0.1); 
}

.post__image-container {
    flex: 0 0 300px; 
    width: 100%; 
    height: 220px; 
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid rgba(var(--primary-red), 0.2);
    background-color: rgba(var(--primary-red), 0.05); 
}

.post__img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.post__content {
    justify-content: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post__title {
    margin-top: 0; 
    margin-bottom: 0.5rem;
}

/* Hover effects */
.blog__post:hover {
    background: rgba(255, 255, 255, 0.03);
}

.blog__post:hover .post__img {
    transform: scale(1.05);
}

.post__link {
    transition: color 0.3s ease;
    font-weight: 500;
}

.post__link:hover {
    color: var(--color-accent);
}

.post__date {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-gray-light);
    opacity: 0.8;
}


/*ABOUT ME */
.about {   
  margin-bottom: 0;
    text-align: left;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.about__container {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    gap: 3rem;
    padding: 0 20px;
}

.about__image-container {
  flex: 0.25 0 300px; 
    width: 100%;
    max-width: 300px; 
    height: 300px; 
    position: relative;
}

.about__image {
  width: 100%;
  height: 100%;
  object-fit:cover;
  border-radius: var(--radius-full);
  /* BORDER: A subtle border that helps define the shape before the highlight */
  border: 2px solid rgba(var(--secondary-red), 0.5);
  
  /* SHADOW: We use your glow variable to make it shine outwards */
  box-shadow: var(--shadow-glow);
  
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about__content {
    flex: 1;
    width: 100%;
}

.about__image:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px 10px rgba(var(--primary-red), 0.6);
}

.about__quote {
    background-color: var(--color-gray-dark);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    border-left: 4px solid var(--secondary-red);
}

.about__quote-text {
  font-style: italic;
  color: rgba(var(--blue-light), 0.85); 
  
}

.about__quote-author {
  font-size: 0.875rem;
  display: block;
  text-align: right;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: 1rem; 
  color: var(--color-white); 
}

.about__principles {
  width: 100%;
  padding-top: 2rem;
  border-top: 1px solid rgba(var(--gray-color), 0.1); 
  margin-top: 3rem;
}

.principles__title {
  text-align: center;
  margin-bottom: 2rem;
}

.principles__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  padding: 0;
}

.principles__item {
  padding: 1.5rem;
  background-color: rgba(var(--gray-color), 0.03); 
  border: 1px solid rgba(var(--primary-red), 0.2); 
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.principles__item:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--primary-red), 0.6);
  color: var(--color-white);
  background-color: var(--color-gray-dark);
}

.principles__item strong {
  margin-right: 0.5rem;
  font-weight: 600;
  font-size: 1.0625rem;
}
.principles__item span {
  color: var(--color-gray-light); 
  font-size: 0.9375rem;
}

.principles__icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  display: inline-block;
  animation: tilt 2s ease-in-out infinite;
  transform-origin: bottom center; 
}

@keyframes tilt {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  75% { transform: rotate(-10deg); }
}


/*SKILLS*/
.skills {
    padding: 40px 20px; 
}

.skills__container {
  max-width: 900px;
  margin: 0 auto;
}

.skills__title {
  text-align: center;
  margin-bottom: -1rem;
}

.skills__subtitle {
  text-align: center;
  color: var(--color-gray-light, #666666);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
  font-weight: 400;
}

/* --- skills list --- */
.skills__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; 
    margin-bottom: 3rem;
}

.skill {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.skill__name {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
  color: var(--color-white, #ffffff);
}

.skill__percentage {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
  color: var(--color-gray-light, #666666);
  font-size: 0.875rem;
  font-weight: 500;
}

.skill__bar {
  grid-column: 1 / -1; /* Occupies both columns */
  grid-row: 2;
  height: 12px; 
  background-color: rgba(var(--gray-color), 0.1);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

/* --- Color and Width Modifiers --- */
.skill__progress--html {
  --index: 0;
  width: 100%;
  background: linear-gradient(90deg, #f97316 0%, #fb923c 100%);
}

.skill__progress--css {
  --index: 1;
  width: 98%;
  background: linear-gradient(90deg, #06b6d4 0%, #22d3ee 100%);
}

.skill__progress--js {
  --index: 2;
  width: 98%;
  background: linear-gradient(90deg, #fbbf24 0%, #fde047 100%);
  animation-duration: 0.8s;
}

.skill__progress--git{
  --index: 3;
  width: 90%;
  background: linear-gradient(90deg, #f05032 0%, #fb7185 100%);
}

.skill__progress--cwc{
  --index: 4;
  width: 85%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.skill__progress--typescript{
  --index: 5;
  width: 70%;
  background: linear-gradient(90deg, #3178c6 0%, #60a5fa 100%);
}

.skill__progress--python{
  --index: 5;
  width: 70%;
  background: linear-gradient(90deg, #3776ab 0%, #ffd43b 100%);
}

.skill__progress--react{
  --index: 6;
  width: 60%;
  background: linear-gradient(90deg, #61dafb 0%, #a5f3fc 100%);
}

/* --- Animations --- */

/* 1. Filling the bar */
@keyframes fillProgress {
  from { width: 0; }
}

/* 2. Shimmer Effect */
.skill__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 12px;
  animation: fillProgress 1.5s ease-out forwards;
  animation-delay: calc(var(--index, 0) * 0.2s); 
  overflow: hidden; 
}

/* --- (Shimmer) --- */
.skill__progress::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  /* The flash will now only travel the width of .skill__progress */
  animation: shimmer 2.5s infinite;
  animation-delay: 1.5s; 
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

@media (min-width: 992px) {
  .skills__list {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    column-gap: 4rem; 
    row-gap: 1rem;
  }
}

.learning {
  /* Base background with the two glows in the corners */
  background: 
        radial-gradient(circle at top left, rgba(128, 0, 32, 0.25) 0%, transparent 55%),
        radial-gradient(circle at bottom right, rgba(128, 0, 32, 0.15) 0%, transparent 55%),
        #000000;

  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 2rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transition: all 0.5s ease;
}


.learning:hover {
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
  transform: translateY(-5px); 
}

.learning__container {
      margin-top: 0.5rem;
}

.learning__title {
    margin-bottom: 2rem;
    margin-top: 0.25rem;
}

.learning__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    list-style-type: disc; 
    gap: 1rem;
    padding-left: 1.2rem; 
}

.learning__item {
    color: var(--color-gray-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}


/*CONTACT*/
.contact {
    padding: 40px 20px;
    position: relative;
    background: radial-gradient(circle at center, rgba(128, 0, 32, 0.08) 0%, transparent 70%);
}

.contact__container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact__title {
  text-align: center;
}

.contact__description {
    text-align: center;
    color: var(--color-gray-light, #a1a1a1);
    line-height: 1.6;
    margin: 0 auto 2rem auto;
    max-width: 600px; 
}

/* --- Form Container --- */
.contact__message {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(128, 0, 32, 0.2);
    padding: 1.5rem; 
    border-radius: 20px;
    backdrop-filter: blur(10px);/* Cristal effect */
}

/* --- Form --- */
.contact__form {
    display: flex;
    flex-direction: column; 
    gap: 1.2rem;
}

.contact__label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-white);
}

/* --- Ilumination (:focus) --- */
.contact__input {
    resize: vertical;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact__input:focus {
    outline: none;
    border-color: #e11d48; 
    background: rgba(128, 0, 32, 0.1); 
    box-shadow: 0 0 15px rgba(225, 29, 72, 0.3); 
}

.contact__button {
    justify-self: center; 
    padding: 1rem 3rem;
    background: #800020;
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.contact__button:hover {
    background: #e11d48;
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.4);
}

.find-me {
    padding: 3rem 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.find-me__container {
  margin-top: 1rem;
}

.find-me__title {
    margin-top: 1rem;
    text-align: center;
    font-size: 2rem; 
    margin-bottom: 2rem;
}

.find-me__list {
    justify-content: center;
    flex-wrap: wrap; 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 0;
    list-style: none;
}

.find-me__link {
    min-width: 220px;
    display: block;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.find-me__link:hover {
    transform: translateY(-10px); 
    background: rgba(128, 0, 32, 0.1); 
    border-color: #e11d48; 
    box-shadow: 0 15px 30px rgba(225, 29, 72, 0.2); 
}

.find-me__content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.find-me__icon {
    width: 35px; 
    height: 35px;
    object-fit: contain;
}

.find-me__text {
    display: flex;
    flex-direction: column; 
}

.find-me__name {
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1rem;
}

.find-me__user {
    color: var(--color-gray-light);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.contact__footer {
    text-align: center;         
    max-width: 500px;           
    margin: 2rem auto 0 auto;   
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
}

.contact__footer a {
    color: #e11d48; 
    text-decoration: none;
    transition: color 0.3s;
}

.contact__footer a:hover {
    text-decoration: underline;
    color: #fb7185; 
}


/*PROJECTS*/
.projects {
  padding: 20px 0;
}

.project__container {
  max-width: 1200px;
  margin: 0 auto;
}

.book__system {
    min-height: 650px;
    background: radial-gradient(circle at center, rgba(128, 0, 32, 0.25) 0%, transparent 70%);
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 40px; 
    perspective: 2000px;
    width: 100%;
    margin-top: 30px;
}

/* The container that pushes the buttons when opened */
.book-container {
    width: 400px; /* One page  */
    height: 550px;
    position: relative;
    transition: width 1s ease, transform 1s ease; 
    margin: 0 auto; 
}

.book-container.open {
    width: 800px; /* Two pages */
}

.book {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s;
}

/* --- 2. PAGES AND FACES --- */
.paper {
    top: 0;
    right: 0;
    transform-style: preserve-3d;
    transform-origin: left;
    transition: transform 1s, z-index 0.5s;
    position: absolute;
    width: 100%;
    height: 100%;
    display: none; /* Hidden byb default*/
}

.paper.active-paper {
    display: block; /* Only the current sheet is visible */
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    padding: 40px 30px;
    background: linear-gradient(135deg, #0a0a0a 0%, #121212 100%);
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-left: 1px solid rgba(128, 0, 32, 0.3); 
    box-shadow: 15px 0 35px rgba(0,0,0,0.5); 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Depth effect on the spine (book style) */
.front::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 15px; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.5), transparent);
}

.back::before {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 15px; height: 100%;
    background: linear-gradient(to left, rgba(0,0,0,0.5), transparent);
}

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

.flipped { transform: rotateY(-180deg); }

/* --- 3. COVER STYLES (GLOW EFFECT) --- */
.cover-design .cover-border {
    border: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.book__cover-title {
    font-family: var(--font-family-serif); 
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(128, 0, 32, 0.8);
    animation: titleGlow 1s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 15px rgba(128, 0, 32, 0.6); }
    to { text-shadow: 0 0 30px rgba(225, 29, 72, 0.8), 0 0 10px #fff; }
}

.open-btn {
    background: linear-gradient(135deg, #e11d48 0%, #800020 100%);
    padding: 12px 35px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.4);
    color: #fff;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    animation: bounceInfinite 1s linear infinite;
}

@keyframes bounceInfinite {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); } /* Up */
    100% { transform: translateY(0); }    /* Down */
}

.open-btn:hover {
    background: var(--secondary-red);
    box-shadow: 0 0 15px var(--secondary-red);
    transform: scale(1.05);
    animation-play-state: paused; 
    background: #e11d48;
    transform: scale(1.1);
}

/* --- 4. INDEX (HOVER EFFECT) --- */
.book__index-list { list-style: none; margin-top: 20px; }

.book__index-list li {
    padding: 12px 0;
    color: #ccc;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.book__index-list li:hover { color: var(--color-accent); }

.book__index-list li::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 5px;
    left: 0;
    background: var(--color-accent);
    transition: width 0.4s ease;
}

.book__index-list li:hover::after { width: 100%; }

/* --- 5. PROJECT CONTENT AND JUMP BUTTON --- */
.project-node h4 {
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.2);
    font-size: 1.8rem;
    background: linear-gradient(to right, #ffffff, #e11d48);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 2px solid rgba(128, 0, 32, 0.3);
    padding-bottom: 5px;
    display: inline-block;
}

/* The container so nothing moves */
.project-description {
    color: var(--color-gray-light);
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    margin: 0;
    display: block;
    margin-bottom: 15px;
    opacity: 0; 
    transition: opacity 0.3s ease;
    white-space: pre-wrap;
    min-height: 1.2em; 
}

/* The blinking cursor (typewriter feel) */
.typing-cursor::after {
    margin-left: 2px;
    content: "|";
    animation: blink 0.8s infinite;
    color: #e11d48;
}


.project-info-container {
    width: 100%;
    display: block; /* Block is more secure for text than flex */
    position: relative;
    padding-top: 10px;
}

.p-media {
    width: 80%;           
    height: 150px;
    margin: 0 auto 15px auto;
    border-radius: 6px;
    overflow: hidden;
}

.p-media img { width: 100%; height: 100%; object-fit: cover; }

.p-link {
    position: absolute;
    bottom: 30px;      
    left: 50%;         
    transform: translateX(-50%); 
    padding: 12px 25px;
    background: rgba(128, 0, 32, 0.2);
    border: 1px solid rgba(225, 29, 72, 0.5);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
  }

.p-link:hover {
    /* The jump is relative to its fixed position */
    transform: translateX(-50%) translateY(-10px); 
    background: rgba(128, 0, 32, 0.4);
    box-shadow: 0 10px 25px rgba(225, 29, 72, 0.5);
    border-color: #e11d48;
}


/* --- 6. NAVIGATION BUTTONS --- */
.book-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(5px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(128, 0, 32, 0.4); 
    border: 1px solid rgba(225, 29, 72, 0.8); 
    color: white;
    box-shadow: 0 0 15px rgba(128, 0, 32, 0.3);
}

.book-nav-btn.visible { opacity: 1; pointer-events: all; }

.book-nav-btn:hover {
    background: rgba(128, 0, 32, 0.2);
    border-color: #e11d48;
    transform: scale(1.1) rotate(10deg); 
    box-shadow: 0 0 25px rgba(225, 29, 72, 0.4);
}

.control-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    width: 100%;
    z-index: 100;
    padding-bottom: 20px;
}

/* added by the JS only when it starts writing */
.project-description.is-writing {
    opacity: 1 !important;
}

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




/*-------------MEDIA QUERIES------------*/

/* --- MOBILE (Specific settings for small screens) --- */
@media (max-width: 768px) {
    .principles__list {
        grid-template-columns: 1fr;
    }
}

/* --- TABLET / SMALL DESKTOP (From 768px) --- */
@media (min-width: 768px) {
    /* Header & Nav */
    .header__container {
        flex-direction: row; 
        justify-content: space-between;
        text-align: left;
    }
    .header__name { font-size: 2rem; }
    .nav { width: auto; }
    .nav__list { gap: 1rem; }
    .nav__link { font-size: 0.9375rem; padding: 8px 12px; }

    /* Contact */
    .contact__message { padding: 2.5rem; }
    .find-me__title { font-size: 2.85rem; }
}

/* --- LARGE SCREENS (Standardized from 1024px) --- */
@media (min-width: 1024px) {
    /* Welcome */
    .welcome__container {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        text-align: left;
        align-items: center;
        min-height: 70vh;
        gap: 2rem;
    }
    .welcome__text-content { align-items: flex-start; }
    .welcome__image-wrapper { margin: 0; }
    .welcome__stats {
        grid-column: 1 / span 2; 
        flex-direction: row; 
        justify-content: space-between;
        margin-top: 4rem;
    }

    /* About */
    .about__container {
        flex-direction: row-reverse; 
        align-items: flex-start;
        gap: 4rem;
    }
    .about__image-container {
        flex: 0 0 350px; 
        height: 450px;
        position: sticky; 
        top: 120px;
    }
    .about__image { border-radius: var(--radius-full); }

    /* Blog (Unified from 992px to 1024px for consistency) */
    .blog__post {
        flex-direction: row-reverse; 
        align-items: center;
        gap: 3rem;
        padding: 25px;
        border-bottom: none;
    }
    .post__image-container { flex: 0 0 350px; height: 240px; }
    .post__img { object-fit: contain; }

    /* Skills & Learning */
    .skills__list {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        column-gap: 4rem;
        row-gap: 1rem;
    }
    .learning { padding: 3rem; }
    .learning__list { grid-template-columns: repeat(3, 1fr); }

    /* Contact */
    .contact { padding: 60px 0; }

    /* --- BOOK SYSTEM (PC) --- */
   .book__system {
        display: flex;
        flex-direction: column;
        align-items: center;    
        perspective: 2000px;
        overflow: hidden; 
        gap: 10px;          /* Minimum space between book and buttons */
        min-height: 700px;  
        justify-content: center;
    }

    .book-container {
        width: 400px; 
        height: 550px;
        position: relative;
        transition: transform 1s ease-in-out; 
        transform: translateX(0); 
    }

    /*perfectly centered*/
    .book-container.open {
        width: 400px !important; 
        transform: translateX(200px); 
    }

    .control-buttons {
        margin-top: 10px; 
        gap: 3rem;          /*horizontal*/
        display: flex;
        justify-content: center;
        width: 100%;
        position: relative;
        z-index: 100;
    }

    /* Pages */
    .paper {
        display: block !important;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        right: 0;
        transform-origin: left;
        transition: transform 1s, z-index 0.5s;
    }

    .front, .back { backface-visibility: hidden; }
    .back { transform: rotateY(180deg); }
}

/* --- MOBILE BOOK LOGIC (Settings for touchscreens/small screens) --- */
@media (max-width: 1023px) {
    .book-container {
        transform: translateX(0) !important;
        width: 90vw;
    }
    .front, .back {
        position: absolute !important;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        display: none; 
        transform: none !important; 
    }
    .face-active {
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
    }
}


.video-container {
    position: relative;
    padding-bottom: 56.25%; 
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-bottom: 20px;

    width: 80%;           
    height: 150px;
    margin: 0 auto 15px auto;
    border-radius: 6px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}