:root {
  --bg: #ffffff;
  --text: #333;
  --title: #f1f1f1;
  --card: #ffffff;
  --primary: #275abf;
  --secondary: #fdb927;
  --secondary-grad: #eaea59;
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.dark-mode {
  --bg: #121212;
  --text: #f1f1f1;
  --title: #f1f1f1;
  --card: #1e1e1e;
  --primary: #1d428a;
  --secondary: #6765c7;
  --secondary-grad: #a2baeb;
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.8);
}

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

html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 50px;
}

body {
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", sans-serif;
  margin: 0;
}

header {
  background: var(--primary);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

h2 {
  color: var(--text);
  font-size: clamp(1.5rem, 4vw, 2rem);
}


/* //////////////////////////////// NAVBAR ///////// */

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

nav h1 {
  font-size: 1.5rem;
  font-weight: bold;
}

nav a {
  position: relative;
  color: white;
  text-decoration: none;
  margin-left: 2rem;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background-color: white;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #ccc;
}

nav a:hover::after {
  width: 100%;
}

.nav-icons {
  display: none;
}

@media screen and (max-width: 600px) {
  nav {
    gap: 1rem;
    justify-content: space-between;
  }

  nav h1 {
    font-size: 1.2rem;
  }
  
  nav a {
    margin-left: 0;
  }

  .nav-links {
    display: none;
  }

  .nav-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
  }

  .nav-icons svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
  }
  
}

/* //////////////////////////////// THEME SWITCH ///////// */

.theme-switch {
  display: flex;
  align-items: center;
}

.toggle-checkbox {
  display: none;
}

.toggle-label {
  position: relative;
  width: 60px;
  height: 30px;
  background: #ccc;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  transition: background 0.3s ease;
}

.toggle-ball {
  position: absolute;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 2;
}

.icon {
  font-size: 14px;
  z-index: 1;
}

.toggle-checkbox:checked + .toggle-label {
  background: #222;
  box-shadow: 0 0 10px rgba(29, 66, 138, 0.6);
}

.toggle-checkbox:checked + .toggle-label .toggle-ball {
  transform: translateX(30px);
}

.toggle-label:hover {
  box-shadow: var(--shadow-sm);
}

/* ///////////////////////////////// PROFILE IMAGE ///////// */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 0.6s ease;
}

.profile-img {
  width: 150px;
  border-radius: 50%;
  margin-bottom: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: solid 2px #222;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.profile-img:hover {
  transform: scale(1.05);
}

/* ///////////////////////////////// HERO AND CONTAINER ///////// */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10rem 1rem;
  text-align: center;
}

.hero {
  background: linear-gradient(
    225deg,
    var(--secondary-grad) 0%,
    var(--secondary) 100%
  );
  color: var(--title);
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  padding: 15rem 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

@media screen and (max-width: 600px) {
  .hero {
    padding: 10rem 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }
}


/* ///////////////////////////////// ABOUT HEADER ///////// */

.about-header {
  padding: 2rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-header-card {
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  text-align: justify;
  text-decoration: solid;
  padding: 1rem 3rem;
  margin-bottom: 3rem;
  max-width: 100rem;
  font-size: 1.2rem;
}

.about-header-btns {
  display: flex;
  padding: 2rem 0;
  gap: 1rem;
  justify-content: center;
  text-align: center;
}

@media screen and (max-width: 800px) {
  .about-header-card {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  .about-header-btns {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ///////////////////////////////// PROJECTS ///////// */

.projects-grid {
  display: grid;
  align-content: center;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding-top: 2rem;
}

.Project {
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 1rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.Project h3 {
  font-size: 1.5rem;
  color: var(--text);
}

.Project:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.Project img {
  width: 100%;
  border-radius: 8px 8px 0 0;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.8rem 2rem;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn:hover {
  background: #2980b9;
}

/* ////////////////////////// SKILLS ART ///////// */

.skills-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill {
  background: var(--card);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.skill:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.skill-header img {
  width: 24px;
  height: 24px;
}

.skill-header span {
  font-weight: bold;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: #ddd;
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* ///////////////////////////////// FORM CONTAINER ///////// */

.form-container {
  background: var(--card);
  padding: 2rem 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  max-width: 600px;
  margin: 0 auto;

  gap: 1.5rem;
  margin-top: 2rem;
}

.form-container form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-container label {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-container textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  min-height: 8rem;
  color: #333;
}

.form-input {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  color: #333;
}

.form-input--error {
  border: 2px solid #ff0000;
}

.form-input--error:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.2);
}

/* ///////////////////////////////// FORM PHOTO AND CAMERA ///////// */

.form-photo-container {
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  
  display: flex;
  align-items: center;
  flex-direction: column;

  gap: 1rem;
  margin: 0 auto;
  padding: 2rem;
  max-width: 600px;

  border: 1px #ccc solid;
  border-radius: 10px;
}

.form-photo-container h2 {
  font-size: 2rem;
  /* font-style: bold; */
  font-weight: bolder;
}

.form-photo-container p {
  font-size: 1rem;
  font-style: bold;
}

.form-photo--image_display {
  display: block;
  border: 1px #121212;
}

.form-photo--image {
  cursor: pointer;
  transition: 0.2s;
  padding: 1rem;
}

.form-photo--image:hover {
  opacity: 0.8;
}

.form-photo--camera {
  display: none;
}

.form-photo--message{
  display: none;
}

.form-photo--camera {
  display: none;
  flex-direction: column;
  align-items: center; /* centraliza horizontal */
  justify-content: center;
  gap: 1.5rem;

  width: 100%;
}

/* VIDEO */
.form-photo--camera video {
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  border: 2px solid #ccc;
}

/* MESSAGE CONTAINER */
.form-photo--message {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;

  width: 100%;
}

/* CANVAS (ESSENCIAL) */
.form-photo--message canvas {
  width: 100%;          /* responsivo */
  max-width: 400px;     /* limite */
  height: auto;         /* mantém proporção */

  border-radius: 8px;
  border: 2px solid #ccc;
}

/* TEXT */
.form-photo--message p {
  font-size: 1rem;
  color: --text;
  text-align: center;
}
/* ///////////////////////////////// FOOTER AND SOCIALS ///////// */

footer {
  background: #26282a;
  color: white;
  text-align: center;
  padding: 2.5rem;
  margin-top: 3rem;
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.socials img {
  width: 32px;
  height: 32px;
  margin: 0 10px;
  transition: transform 0.3s ease;
}

.socials img:hover {
  transform: scale(1.2);
}
