@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');

/* --- VARIABLES --- */
:root {
  --bg-btn-text: hsl(0, 0%, 100%);
  --primary-color: #000000;
  --primary-color-50: #0000007d;
  --grey: #686868;
  --secondary-color: #B4B4B4;
  --input-bg: rgb(234, 234, 234);
  --font-large: 48px;
  --font-medium: 20px;
  --font-small: 16px;
}

.dark-mode {
  --bg-btn-text: hsl(0, 0%, 14%);
  --primary-color: #ffffff;
  --primary-color-50: #ffffff7d;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }

/* --- BASE --- */
body {
  max-width: 1440px;
  width: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
  font-family: "Manrope", sans-serif;
  background-color: var(--bg-btn-text);
  color: var(--primary-color);
  justify-self: center;
}

input {
  color: black;
  font-size: small;
}

/* --- HEADER --- */
header {
  padding: 20px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideInFromAbove 1s ease;
}
.header-name-logo, footer p {
  font-size: var(--font-medium);
  font-weight: bold;
  flex-shrink: 0;
}
.nav-bar ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
  font-size: var(--font-small);
  width: 350px;
}
.nav-bar a, .my-projects-cta {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.3s ease;
}


.nav-bar a:hover,
.my-projects-cta:hover {
  border-bottom: 1px solid var(--primary-color);
}
header label {
  font-size: var(--font-small);
  cursor: pointer;
  transition: all 0.3s ease;
}
.mode-switch-container {
  display: flex;
  gap: 10px;
  align-items: center;
}
.mode-switch-container label{
  width: 50px;
  height: 25px;
  border-radius: 50px;
  padding: 2px 3px;
  background-color: var(--secondary-color);
  cursor: pointer;
}
.toggle {
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--bg-btn-text);
  box-shadow: 2px 0px 4px var(--primary-color);
  transition: all 0.3s ease;
}

.toggle-icon {
  width: 16px;
}


/* --- DARK MODE --- */
body.dark-mode .skill-container img,
body.dark-mode .some-links-section img {
  filter: invert(1);
}
body.dark-mode .toggle {
  box-shadow: -2px 0px 4px var(--primary-color);
}

/* --- MAIN SECTIONS --- */
#home, #about, #contact {
  display: flex;
  justify-content: space-between;
  justify-content: center;
  gap: 30px;
  margin: 200px 0;
  padding: 0 80px;
}

.img {
  width: 630px;
  height: 500px;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0);
}
.img.main { animation: slideInFromRight 1s ease; }
.img.about { object-position: center 70%; }
.my-projects-cta { transition: all 0.3s ease; }

/* --- ABOUT --- */
.intro-text-container { animation: slideInFromLeft 1s ease; }
.intro-text-container,
.about-text-container,
.contact-text-container {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 0;
}

h1 { font-size: var(--font-large); }
.rolle-description,
.about-text,
.project-description,
.cta-text {
  font-size: var(--font-medium);
  min-width: 620px;
  max-width: 620px;
}
.cta-buttons-container { margin-top: 30px; }
.cta {
  background-color: var(--primary-color);
  color: var(--bg-btn-text);
  padding: 10px 20px;
  text-decoration: none;
  margin-right: 30px;
  transition: all 0.3s ease;
}
.cta:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* --- SKILLS --- */
#skills {
  gap: 30px;
  margin: 200px 0;
  padding: 0 80px;
}
#skills h1 { justify-self: center; }
.skill-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.skills-main-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 100px;
  margin: 100px 0;
}
.skill-container img {
  min-width: 180px;
  max-width: 180px;
}

/* --- PROJECTS --- */
#projects {
  margin: 200px 0;
  padding: 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}
.projects-container { width: 100%; }
.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}
.project-screenshot {
  width: 550px;
  height: 320px;
  flex-shrink: 0;
  object-fit: cover;
  overflow: hidden;
}
.project-description-container {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 30px;
  padding: 20px 0;
}
.project-description-container a {
  background-color: var(--primary-color);
  color: var(--bg-btn-text);
  padding: 10px 20px;
  text-decoration: none;
  margin-right: 30px;
  transition: all 0.3s ease;
}
.project-description-container a:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}
a { flex-shrink: 0; }

/* --- CONTACT --- */
.some-links-section {
  display: flex;
  gap: 20px;
}
.some-links-section img {
  width: 30px;
  border-radius: 8px;
}
.some-links-section a:hover {
  border-radius: 8px;
  box-shadow: 0 0 6px var(--primary-color);
}
#contact form {
  width: 630px;
  height: 500px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--secondary-color);
  padding: 0;
}
.contact-text-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.message-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.name-and-email {
  display: flex;
  gap: 20px;
}
.input-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
#contact label { font-size: 12px; }
#name, #email {
  width: 200px;
  height: 30px;
  padding: 10px 10px 12px 10px;
  background-color: var(--input-bg);
  border: none;
}
#message {
  display: flex;
  flex-direction: column;
  max-width: 420px;
  min-width: 420px;
  min-height: 200px;
  max-height: 200px;
  background-color: var(--input-bg);
  border: none;
  padding: 10px;
}
#name:hover, #email:hover, #message:hover {
  box-shadow: 0 0 6px var(--primary-color-50);
}
#name::placeholder, #email::placeholder, #message::placeholder {
  font-size: 10px;
}
#submit {
  align-self: flex-end;
  margin-top: 15px;
  font-size: var(--font-small);
  color: var(--bg-btn-text);
  background-color: var(--primary-color);
  border: none;
  padding: 5px 20px;
  transition: all 0.3s ease;
}
#submit:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 50px 100px;
  border-top: 1px solid var(--secondary-color);
}
footer span {
  font-weight: 400;
  font-size: var(--font-small);
}

/* --- ANIMATIONS --- */
@keyframes slideInFromRight {
  0% { transform: translateX(50px); opacity: 0; }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideInFromLeft {
  0% { transform: translateX(-50px); opacity: 0; }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideInFromAbove {
  0% { transform: translateY(-20px); opacity: 0; }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- ACCESSIBILITY --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.3s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.3s !important;
    scroll-behavior: auto !important;
  }
}

