/* Custom properties/variables  */
:root {
  --main-white: #ffffff;
  /* Stark, pure white for high contrast */
  --main-light-gray: #b3b3b3;
  /* Soft gray for readable body text */
  --main-dark-gray: #1a1a1a;
  /* Very subtle dark gray for subtle card backgrounds */
  --main-black: #050505;
  /* Pitch black (or just off-black) for the cinematic void */
  --accent-color: #666666;
  /* Muted gray for hovers and borders */
}

/*Fonts
font-family: 'Gentium Plus', serif;
font-family: 'Inter', sans-serif;
font-family: 'Merriweather', serif;
*/

/* Base reset */
* {
  margin: 0;
  padding: 0;
}

/* box-sizing and font sizing */
*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;

  /* Set font size for easy rem calculations
   * default document font size = 16px, 1rem = 16px, 100% = 16px
   * (100% / 16px) * 10 = 62.5%, 1rem = 10px, 62.5% = 10px
  */
  font-size: 62.5%;
  scroll-behavior: smooth;
}

/* A few media query to set some font sizes at different screen sizes.
 * This helps automate a bit of responsiveness.
 * The trick is to use the rem unit for size values, margin and padding.
 * Because rem is relative to the document font size
 * when we scale up or down the font size on the document
 * it will affect all properties using rem units for the values.
*/

/* I am using the em unit for breakpoints
 * The calculation is the following
 * screen size divided by browser base font size
 * As an example: a breakpoint at 980px
 * 980px / 16px = 61.25em
*/

/* 1200px / 16px = 75em */
@media (max-width: 75em) {
  html {
    font-size: 60%;
  }
}

/* 980px / 16px = 61.25em */
@media (max-width: 61.25em) {
  html {
    font-size: 58%;
  }
}

/* 460px / 16px = 28.75em */
@media (max-width: 28.75em) {
  html {
    font-size: 55%;
  }
}

@media (max-height: 800px) {
  p {
    font-size: 20px;
  }
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

li {
  display: inline;
}

li a {
  display: block;
  color: var(--main-white);
  /* Updated for dark theme */
  text-align: center;
  padding: 10px 12px;
  text-decoration: none;
}

li a:hover {
  background-color: var(--main-dark-gray);
  /* Updated for dark theme */
}


hr {
  display: block;
  unicode-bidi: isolate;
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
  margin-inline-start: auto;
  margin-inline-end: auto;
  overflow: hidden;
  border-style: inset;
  border-width: 1px;
  border-color: #111;
  /* Subtle divider */
  background-color: var(--main-black);
  /* Removed gradient */
}

body {
  background-color: var(--main-black);
  /* Removed gradient */
  color: var(--main-light-gray);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  /*18px*/
  font-weight: 300;
  /* Cinematic lighter weight */
  line-height: 1.4;
}

.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 5px;
  background-color: transparent;
  padding: 10px;
}

h1,
h2 {
  background-color: transparent;
  color: var(--main-white);
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  /* Cinematic sans-serif font */
  font-weight: 300;
  font-size: 5rem;
  letter-spacing: 4px;
  /* Space out the letters like a movie poster */
  text-transform: uppercase;
}

p {
  background-color: transparent;
  color: var(--main-light-gray);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}

a {
  text-decoration: none;
  color: var(--main-white);
}

/* The Menu Button (Hidden on Desktop) */
.menu-toggle {
  display: none;
  background: transparent;
  color: var(--main-light-gray);
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 2px;
  cursor: pointer;
  padding: 2rem;
  transition: color 0.3s ease;
}

.menu-toggle:hover {
  color: var(--main-white);
}

/*Navigation bar*/

.nav {
  display: flex;
  justify-content: flex-end;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  padding-right: 2rem;
  /*qué tan lejos del margen derecho*/
  background-color: rgba(5, 5, 5, 0.95);
  /* Mostly opaque black */
  border-bottom: 1px solid #111;
  /* Very subtle bottom line */
  color: var(--main-light-gray);
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  z-index: 10;
}

.nav-list {
  display: flex;
}

@media (max-width: 28.75em) {
  .nav {
    justify-content: center;
  }

  .nav-list {
    margin: 0 1rem;
  }
}

.nav-list a {
  display: block;
  font-size: 1.4rem;
  padding: 2rem;
  color: var(--main-light-gray);
  /* Muted text */
  text-transform: uppercase;
  /* Cinematic all-caps */
  letter-spacing: 2px;
  /* Spread out the letters */
  transition: color 0.3s ease;
  /* Smooth fade on hover */
}

.nav-list a:hover {
  background: transparent;
  /* Remove the gray box hover */
  color: var(--main-white);
  /* Text simply brightens to pure white */
}

/*Welcome section*/

.welcome-section,
.blog-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  background-color: var(--main-black);
  /* Removed gradient */
}

.welcome-section>p,
.blog-header>p {
  font-size: 3rem;
  font-weight: 200;
  font-style: italic;
  color: var(--main-white);
}

details {
  padding: 4px;
  max-width: 200px;
  width: 100%;
  /* Allows it to shrink if the screen is somehow smaller */
  font-size: 2rem;
  cursor: pointer;
}

/*Blog section*/

.blog-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: left;
  /* Wait, flexbox uses flex-start for alignment, keeping your logic */
  width: 100%;
  height: 100vh;
  background-color: var(--main-black);
  /* Removed gradient */
}

.blog-header details {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  padding: 1px;
  width: 100%;
  font-size: 2rem;
  cursor: pointer;
}

.rec-list {
  display: inline;
  margin: auto;
  width: auto;
  text-align: left;
  direction: rtl;
}

.rec-list a {
  display: list-item;
  margin: auto;
  color: var(--main-white);
  text-align: left;
  text-decoration: none;
}

/* Projects section */

.projects-section {
  text-align: center;
  padding: 10rem 2rem;
  background-color: var(--main-black);
  /* Removed gradient */
  width: 100%;
}

/* "Automagic" image grid using no media queries */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 1px;
  gap: 50px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  margin-bottom: 6rem;
  padding: 10px;
}

.project-title {
  background: transparent;
}

/* New: Project Card Wrapper Styles */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  /* Spacing inside the card */
  width: 100%;
  padding: 20px;
  background-color: var(--main-black);
  border: 1px solid #1a1a1a;
  /* Extremely subtle dark outline */
  transition: border-color 0.4s ease;
  /* Smooth fade when hovered */
}

.project-card:hover {
  border-color: #333333;
  /* Border slightly brightens when hovered */
}

/* Make all images and iframes responsive by default */
img,
iframe {
  max-width: 100%;
  height: auto;
}

/* Force YouTube embeds to keep 16:9 ratio */
.responsive-video {
  width: 100%;
  aspect-ratio: 16 / 9;
}

/*Contact Section*/

.contact-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 80vh;
  padding: 0 2rem;
  background: var(--main-black);
  /* Removed gradient */
}

.contact-section-header>h2 {
  font-size: 6rem;
}

.contact-section-header>p {
  font-style: italic;
}

.contact-links {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-details {
  font-size: 2rem;
  text-shadow: 2px 2px 1px #000000;
  transition: transform 0.3s ease-out;
  box-sizing: border-box;
  padding: 20px;
  justify-content: center;
}

.contact-details:hover {
  transform: translateY(8px);
}

.fa-linkedin {
  color: #0A66C2;
}

.fa-github {
  color: var(--main-light-gray);
}

.fa-soundcloud {
  background: linear-gradient(120deg, #ff8800, #ff3300);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* This makes the gradient visible inside the icon */
}

.fa-twitter {
  color: #1DA1F2;
}

.fa-youtube {
  color: #FF0000;
}

.fa-itch-io {
  color: #fa5c5c;
}

.one {
  color: green;
}

.textarea {
  resize: none;
  width: 100%;
}

.textarea input {
  width: 100%;
  height: 100%;
  padding: 10px 15px;
  box-sizing: border-box;
  border: 2px solid #333;
  /* Darker border for the inputs */
  border-radius: 4px;
  background-color: var(--main-dark-gray);
  /* Dark input backgrounds */
  color: var(--main-white);
  font-size: 16px;
}

.button {
  transition-duration: 0.4s;
  border: 1px solid var(--main-light-gray);
  /* Cinematic thin border */
  border-radius: 2px;
  /* Sharper corners */
  color: var(--main-white);
  background-color: transparent;
  /* Transparent button */
  padding: 10px 20px;
  /* Slightly larger hit area */
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1.2rem;
  margin: 4px 2px;
  cursor: pointer;
}

.button:hover {
  background-color: var(--main-white);
  color: var(--main-black);
  /* Inverts colors on hover */
}

footer {
  display: flex;
  justify-content: space-evenly;
  background-color: var(--main-black);
  /* Removed gradient */
}

/* --- Responsive Layout Media Queries --- */

@media (max-width: 30.625em) {
  .projects-section {
    padding: 6rem 1rem;
  }
}

@media (max-width: 28.75em) {
  .contact-section-header>h2 {
    font-size: 4rem;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }
}

/* Breakpoint for Tablets & Mobile (around 800px) */
@media screen and (max-width: 50em) {
  .projects-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 50px;
  }

  .iframe,
  .a {
    width: 100%;
    height: auto;
  }

  /* --- NEW MOBILE MENU STYLES --- */
  .menu-toggle {
    display: block;
    /* Show the MENU button on small screens */
  }

  .nav {
    justify-content: flex-end;
    /* Push button to the right */
  }

  /* Using the ID (#) forces this rule to win over the desktop class */
  #nav-list {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 58px;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(5, 5, 5, 0.98);
    align-items: center;
    padding-top: 5rem;
  }

  /* This is what the JavaScript triggers! */
  #nav-list.active {
    display: flex;
  }

  #nav-list a {
    font-size: 2.5rem;
    padding: 2rem;
  }
}

/* Breakpoint for Small Mobile Phones (around 480px) */
@media screen and (max-width: 30em) {
  .container {
    width: 100%;
  }

  .img {
    width: 100%;
    height: auto;
  }

  .projects-grid {
    gap: 60px;
  }
}