@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

/* === 0. Reset + Global Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: "Press Start 2P", cursive;
  background-color: var(--bg-color, #faf7f2);
  color: var(--text-color, #3b2e2a);
  line-height: 1.6;
  image-rendering: pixelated;
  transition: background-color 0.5s ease, color 0.5s ease;
  cursor: url("ASSETS/images/cursor.png") 4 4, auto;
}

main {
  max-width: 1000px;
  margin: auto;
  padding: 20px 20px 60px;
  z-index: 20;
  opacity: 1;
}

#textParticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* === 1. Header === */

header {
  height: 150px;
  overflow: hidden;
}

header.title {
  background: linear-gradient(135deg, #bfa27a, #8b5e3c);
  color: white;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  image-rendering: pixelated;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 9999;
}

.title-text {
  min-height: 50px;
}

.logo {
  height: 100px;
  width: auto;
  border: 5px solid #a6690e;
  image-rendering: pixelated;
  transition: transform 0.6s ease;
}

.logo:hover {
  transform: scale(1.2);
  cursor: url("ASSETS/images/cursorhover.png") 4 4, auto;
}

header.title h1 {
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: white;
}

#typed-subtitle {
  position: relative;
  white-space: normal;
  word-break: break-word;
  display: inline-block;
  min-height: 1em;
  min-width: 150px;
}

#typed-subtitle::after {
  content: "|";
  position: absolute;
  animation: blink 1.2s ease-in-out infinite;
  color: inherit;
  overflow: hidden;
}

@keyframes blink {
  0%,
  50%,
  100% {
    opacity: 1;
  }
  25%,
  75% {
    opacity: 0;
  }
}

/* === 2. Section Base Styling === */

.section-hidden-opacity {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

section {
  background-color: var(--section-bg, #fff);
  padding: 25px;
  margin: 20px 0;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  image-rendering: pixelated;
  transition: opacity 0.8s ease, transform 0.8s ease;
  width: 100%;
  overflow-x: hidden;
  z-index: 50;
  position: relative;
}

@media (max-width: 768px) {
  section {
    padding: 20px 15px;
  }
}

@media (max-width: 480px) {
  section {
    padding: 15px 10px;
  }
}

section:hover {
  transform: scale(1.02);
}

.section-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-child {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-child-visible {
  opacity: 1;
  transform: scale(1);
}

section h2 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: #8b5e3c;
}

/* === 3. About Me === */

.about {
  text-align: left;
}

/* === 4. Interests + Skills + Slider === */

.interests-slider-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.interests,
.skills-section {
  flex: 1;
}

.interests ul,
.skills-section ul {
  list-style: none;
  font-size: 0.9rem;
  padding-left: 0;
}

.interest-item,
.skill-item {
  margin-bottom: 15px;
}

/* Progress Bars */

.progress-bar {
  background: #e0e0e0;
  height: 20px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, #9f693f, #cdb088);
  width: 0;
  transition: width 2.5s ease;
  cursor: url("ASSETS/images/cursordrag.png") 4 4, auto;

  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  text-align: right;
  padding-right: 6px;
  line-height: 20px;
}

/* Slider */

.slider {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  width: 100%;
  min-height: 250px;
  max-height: 420px;
}

@media (max-width: 750px) {
  .slider {
    max-height: 300px;
  }
}

.slides img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.slides img.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.slider:hover {
  transform: scale(1.02);
}

.slider button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 1.2rem;
  padding: 10px 15px;
  cursor: url("ASSETS/images/cursorhover.png") 4 4, auto;
  border-radius: 4px;
  font-family: "Press Start 2P", cursive;
  z-index: 10;
}

.slider .prev {
  left: 10px;
}
.slider .next {
  right: 10px;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-element {
  flex: 1 1 100px;
  text-align: center;
  padding: 0.5rem 1rem;
  background-color: #a45616;
  border-radius: 6px;
  color: rgb(243, 243, 243);
}

.skill-element:hover {
  transform: scale(1.02);
  background-color: var(--highlight-color);
}

/* === 5. Goals + Projects Layout === */

.goals-project-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.goals,
.projectIntro {
  flex: 1;
}

.projectIntro button {
  margin-top: 20px;
}

.projectIntro .logo {
  display: block;
  margin: 40px auto;
}

ol#goals-list {
  padding-left: 50px;
  margin-bottom: 15px;
}

ol#goals-list:hover {
  cursor: url("ASSETS/images/cursordrag.png") 4 4, auto;
}

/* Buttons */

button {
  background-color: var(--accent-color, #8b5e3c);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 2px;
  font-size: 0.8rem;
  cursor: url("ASSETS/images/cursorhover.png") 4 4, auto;
  transition: background 0.3s ease;
  font-family: "Press Start 2P", cursive;
  height: 35px;
}

button:hover {
  background-color: var(--highlight-color);
}

a button {
  text-decoration: none;
}

/* Project Intro */
.projectIntro {
  text-align: center;
}

/* === 6. Contact Section === */

.contact {
  text-align: center;
}

.contact a {
  display: block;
  color: #8b5e3c;
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
  cursor: url("ASSETS/images/cursorhover.png") 4 4, auto;
}

.contact p {
  text-align: center;
}

#sendEmail {
  display: block;
  margin-left: 95px;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  align-items: flex-start;
  justify-content: center;
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 300px;
  margin-top: 30px;
}

#contactForm button {
  margin: 0px;
}

#contactForm input,
#contactForm textarea,
#contactForm button {
  width: 100%;
}

.socialBox {
  text-align: center;
  margin-top: 30px;
}

.socialBox a {
  margin-top: 20px;
  font-size: 1rem;
}

/* Text Inputs & Textareas */

.textarea-box,
.textbox {
  width: 100%;
  max-width: 300px;
  padding: 14px 16px;
  border: 2px solid #ccc;
  font-size: 0.75rem;
  font-family: "Press Start 2P", monospace;
  line-height: 1.8;
  letter-spacing: 1px;
  white-space: pre-wrap;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

.textarea-box {
  height: 300px;
}

.textbox {
  height: 10px;
  line-height: 2;
}

.textarea-box:focus,
.textbox:focus {
  border-color: #a47551;
  outline: none;
}

/* === 7. Footer === */

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: #8b5e3c;
  color: white;
  font-size: 0.7rem;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  font-family: "Press Start 2P", cursive;
  box-sizing: border-box;
  text-align: center;
  gap: 10px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 10px;
}

.fixed-social-icons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.fixed-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  transition: background 0.2s;
  text-decoration: none;
}

.fixed-social-icons svg {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

.fixed-social-icons a:hover {
  background-color: var(--highlight-color);
  border-radius: 2px;
}

.fixed-social-icons a:hover svg {
  transform: scale(1.2);
}

.fixed-social-icons .youtube-icon svg {
  fill: #ff0000;
}
.fixed-social-icons .x-icon svg,
.fixed-social-icons .github-icon svg {
  fill: #000;
}

.footer-text {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-spacer {
  width: 90px;
}

@media (max-width: 700px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .footer-text,
  .footer-spacer {
    justify-content: center;
  }

  .footer-spacer {
    display: none;
  }
}

/* === 8. Responsive Tweaks === */

@media (max-width: 768px) {
  .interests-slider-container,
  .goals-project-container {
    flex-direction: column;
  }
}

/* === Animations === */

@keyframes fade {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

@keyframes fillProgress {
  to {
    width: var(--progress-width);
  }
}

/* === 9. Utility Classes === */

.sortable-ghost {
  opacity: 0 !important;
}

/* === 10. Dark/Light mode toggle variables === */

:root {
  --bg-color: #f4eee5;
  --text-color: #483127;
  --accent-color: #a06534;
  --section-bg: #fffcf8;
  --card-bg: #f4dcc9;
  --border-color: #4a3a33;
  --outline-color: #e9e0d8;
  --highlight-color: #c88a5a;
}

body.dark-mode {
  --bg-color: #12100f;
  --text-color: #f3eae3;
  --section-bg: #1d1a18;
  --card-bg: #27221f;
  --border-color: #3a3633;
  --outline-color: #1b1917;
  --highlight-color: #d4a173;
}

/* === 11. Toggle Buttons === */

.theme-icon,
.volume-icon,
#toggleClearBtn {
  background: none;
  border: none;
  cursor: url("ASSETS/images/cursorhover.png") 4 4, auto;
  position: fixed;
  padding: 0;
  transition: transform 0.3s ease;
  image-rendering: pixelated;
  border-radius: 2px;
  width: 50px;
}

#themeToggle {
  top: 20px;
  right: 20px;
  z-index: 999;
  background-color: transparent;
}

#toggleClearBtn {
  top: 20px;
  left: 80px;
  z-index: 9999;
  color: var(--text-color);
  background-color: var(--bg-color);
}

#volumeToggle {
  top: 20px;
  left: 20px;
  z-index: 9999;
  background-color: transparent;
  width: 40px;
  height: 40px;
  border-radius: 2px;
}

.theme-icon:hover,
.volume-icon:hover,
#toggleClearBtn:hover {
  transform: scale(1.06);
}

.theme-icon img,
.volume-icon img {
  width: 40px;
  height: 40px;
}

/* === 13. Project Title Styling === */

#project-h1 {
  text-align: center;
  margin-bottom: 2rem;
  border: 4px solid var(--border-color);
  padding: 1rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  box-shadow: 4px 4px 0 var(--highlight-color);
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  #project-h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  #project-h1 {
    font-size: 1.2rem;
  }
}

/* Wrapper for all cards */
.project-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding: 2rem;
}

/* Project card styling */
.project-container {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 5px solid var(--border-color);
  outline: 3px solid var(--outline-color);
  box-shadow: 0 0 0 6px var(--highlight-color);
  width: 400px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 0;
}

.project-container:hover {
  transform: scale(1.02);
  box-shadow: 0 0 0 8px var(--highlight-color);
}

/* Project image */
.project-img {
  width: 100%;
  margin-bottom: 1rem;
  image-rendering: pixelated;
  object-fit: contain;
}

/* Project content */
.project-txt {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-h3 {
  font-size: 1.5rem;
  margin: 0;
  padding: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.project-p {
  font-size: 1rem;
  margin: 0;
}

/* Skills */
.skills-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.skills {
  color: white;
  background-color: var(--highlight-color);
  padding: 0.4rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  box-shadow: 3px 3px 0 var(--border-color);
  transition: background-color 0.3s ease;
}

.skills:hover {
  background-color: rgb(183, 81, 3);
  box-shadow: none;
  transform: translate(2px, 2px);
}

/* Link styling */
.project-txt a {
  color: #a47551;
  margin: 1rem 0 10px;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
  font-size: large;
}

.project-txt a:hover {
  color: #5e3b23;
}

/* === Responsive font size tweaks === */

@media (max-width: 768px) {
  body {
    font-size: 0.85rem;
    line-height: 1.8;
  }

  header.title h1 {
    font-size: 1.3rem;
  }

  section h2 {
    font-size: 1rem;
  }

  .project-h3 {
    font-size: 1.4rem;
  }

  .project-p,
  .interests ul,
  .skills {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
    line-height: 1.8;
  }

  header.title h1 {
    font-size: 1.1rem;
  }

  section h2 {
    font-size: 0.9rem;
  }

  .project-h3 {
    font-size: 1.2rem;
  }

  .project-p,
  .interests ul,
  .skills {
    font-size: 0.8rem;
  }
}
