*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-style: normal;
  line-height: 1.6;
  user-select: none;
  /* Enhances readability */
}

h3 {
  font-size: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  /* Bold for headings */
}

p,
h2 {
  color: white;
}

h2 {
  font-size: 2rem;
}

p {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  /* Regular weight for paragraphs */
}

em {
  font-style: italic;
  /* Use italics where needed */
}

strong {
  font-weight: bold;
}

nav {
  display: flex;
  position: fixed;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem;
  margin: auto;
  background: transparent;
  backdrop-filter: blur(10px);
  z-index: 10;
  width: 100%;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.6);
}

nav a {
  text-decoration: none;
  padding-top: 1vh;
  padding-left: 3rem;
  padding-right: 3rem;
  padding-bottom: 1vh;
  font-size: 1.5rem;
  color: #e8e3e3;
  transition: transform 0.3s ease-in, color 0.3s ease-in;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #F55264;
  transform: scaleX(0);
  transition: transform 0.3s ease-out;
}

nav a:hover {
  transform: scale(1.1);
  /* Slightly smaller scaling for a subtler effect */
  color: #F55264;
  /* Brighter color on hover for contrast */
}

nav a:hover::after {
  transform: scaleX(1);
}

#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 2rem;
  color: #FFDE88;
  overflow: hidden;
  user-select: none;
  z-index: -2;
}

#hero h1 {
  font-size: 4.5rem;
  font-weight: 700;
}

#hero-name,
#hero-title {
  position: relative;
  z-index: 2;
}

.single-title {
  font-size: 2.5em;
  margin-bottom: 10vh;
  color: #ED4A6F;
}

.section {
  justify-content: center;
  align-items: center;
  padding: 10vw 15vh;
  text-align: center;
  width: 85vw;
  max-width: 100%;
  height: auto;
  gap: 2rem;
  /* Adds space between elements */
  margin: auto;
  text-align: center;
}

#about {
  height: 60vh;
  display: flex;
  flex-direction: row;
}

#about p {
  line-height: 1.5;
  margin-left: 10%;
  margin-right: 10%;
  font-size: 1.5rem;
}


.section p {
  margin: 0;
  text-align: left;
}


.skills-group {
  text-align: center;
  width: 100%;
}

.skills-group h2 {
  font-size: 2.5em;
  margin-bottom: 10vh;
  color: #fff;
  /* Adjust for your theme */
}

.skills-container {
  display: grid;
  gap: 20px;
  /* Space between cards */
  justify-items: center;
  /* Centers the cards within the grid */
  width: 100%;
  /* Ensures the grid takes up the full width of its container */
  max-width: 1200px;
  /* Optional, restricts the max width */
  margin: 0 auto;
  /* Centers the entire container horizontally */
}

/* Technical Skills Grid */
.technical-skills {
  grid-template-columns: repeat(3, 1fr);
  /* 3 columns for 6 cards */
  grid-gap: 20px;
}

/* Software Skills Grid */
.software-skills {
  grid-template-columns: repeat(4, 1fr);
  /* 4 columns for 12 cards */
  grid-gap: 20px;
}

/* Card Layout */
.card {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 18vw;
  max-width: 140px;
  height: 22vw;
  max-height: 180px;
  perspective: 800px;
}


.content {
  position: relative;
  width: 100%;
  height: 100%;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  transition: transform 1s;
  transform-style: preserve-3d;
}

.card:hover .content {
  transform: rotateY(180deg);
  transition: transform 0.5s;
}

/* Front and Back of Card */
.front,
.back {
  position: absolute;
  height: 100%;
  width: 100%;
  background: white;
  color: white;
  text-align: center;
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  border-radius: 5px;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}


/* Front Image Styling */
.front img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* Back Styling */
.back {
  background: #FFDE88;
  color: black;
  transform: rotateY(180deg);
}

/* individual card styling technical */
.technical-skills .card:nth-child(1) .front {
  background-color: #f0dc4e;
}

.technical-skills .card:nth-child(2) .front {
  background-color: #740568;
}

.technical-skills .card:nth-child(3) .front {
  background-color: #3748ac;
}

.technical-skills .card:nth-child(4) .front {
  background-color: #e45858;
}

.technical-skills .card:nth-child(5) .front {
  background-color: #478497;
}

.technical-skills .card:nth-child(6) .front {
  background-color: #d16fc1;
}

/* Invidivual skills software */
.software-skills .card:nth-child(1) .front {
  background-color: #0D1117;
}

.software-skills .card:nth-child(2) .front {
  background-color: #25292E;
}

.software-skills .card:nth-child(3) .front {
  background-color: #2b2b2b;
}

.software-skills .card:nth-child(4) .front {
  background-color: #d4d4d4;
}

.software-skills .card:nth-child(5) .front {
  background-color: #ffffff;
}

.software-skills .card:nth-child(6) .front {
  background-color: #481A54;
}

.software-skills .card:nth-child(7) .front {
  background-color: #FFE250;
}

.software-skills .card:nth-child(8) .front {
  background-color: #300000;
}

.software-skills .card:nth-child(9) .front {
  background-color: #00005B;
}

.software-skills .card:nth-child(10) .front {
  background-color: #00005B;
}

.software-skills .card:nth-child(11) .front {
  background-color: #001833;
}

.software-skills .card:nth-child(12) .front {
  background-color: #48021F;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  .technical-skills {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns for smaller screens */
  }

  .software-skills {
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns for smaller screens */
  }
}


#projects {
  display: flex;
  flex-direction: column;
  height: auto;
}

#projects img {
  width: 40vw;
}

#contact {
  align-items: center;
  text-align: center;
  margin: auto;
}

.contact-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 4vw;
  padding: 0 8vw;
  max-width: 90vw;
  margin: 0 auto;
}



.contact-links {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 10vh;
  text-align: center;
}

.contact-links a {
  position: relative;
  text-decoration: none;
  font-size: 1.5em;
  font-weight: 600;
  transition: transform 0.3s ease-in, color 0.3s ease-in;
}

/* === Dark Mode === */
body.dark-mode .contact-links a {
  color: #FFDE88;
}

body.dark-mode .contact-links a::after {
  background-color: #F55264;
}

/* === Light Mode === */
body.light-mode .contact-links a {
  color: #ED4A6F;
}

body.light-mode .contact-links a::after {
  background-color: #ED4A6F;
}

/* === Hover Effects Shared === */
.contact-links a:hover {
  transform: scale(1.1);
}

.contact-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transition: transform 0.3s ease-out;
}

.contact-links a:hover::after {
  transform: scaleX(1);
}


.space {
  display: inline-block;
  width: 0.5em;
  /* Adjust the width of the space if needed */
}

.letter {
  display: inline-block;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
  /* text-shadow: 0 0 15px rgba(255, 222, 136, 1), 0 0 30px rgba(255, 222, 136, 1); */
}



.panel p {
  display: block;
}

.headshot {
  border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%;
  width: 60vmin;
  height: 60vmin;
  box-shadow: -2vmin 2vmin 0 rgba(41, 41, 41, 0.5);

  animation: morph 7s linear infinite alternate;
}

@keyframes morph {
  0% {
    border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%;
  }

  100% {
    border-radius: 40% 60%;
  }
}



.theme-toggle {
  position: absolute;
  left: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  z-index: 4;
  user-select: none;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
}

/* Update dark mode colors (most are already correct) */
body.dark-mode {
  background: #374144;
}

body.dark-mode p {
  color: #BDC3C7;
}

/* Dark mode section titles (already correct) */
body.dark-mode .section-title span:first-child {
  color: #F55264;
}

body.dark-mode .section-title span:last-child {
  color: #FFDE88;
}

/* Dark mode project title */
body.dark-mode .single-title {
  color: #FFDE88;
}

body.dark-mode .contact-links {
  color: #FFDE88;
}

/* Dark mode contact title */
body.dark-mode #contact h2 {
  color: #FFDE88;
}

/* Update light mode colors */
body.light-mode {
  background: #F9FAFB;
}

body.light-mode p {
  color: #1F1F1F;
}

/* Light mode section titles */
body.light-mode .section-title span:first-child {
  color: #6B9E96;
  /* "Software", "Technical" */
}

body.light-mode .section-title span:last-child {
  color: #ED4A6F;
  /* "Skills" */
}

/* Light mode project title */
body.light-mode .single-title {
  color: #ED4A6F;
}

/* Light mode contact links */
body.light-mode .contact-links {
  color: #ED4A6F;
}

/* Light mode contact title */
body.light-mode #contact h2 {
  color: #ED4A6F;
}

/* Light mode filter buttons */
body.light-mode .filter-btn {
  border: 2px solid #592B63;
  color: #592B63;
  background: none;
}

body.light-mode .filter-btn:hover,
body.light-mode .filter-btn.active {
  background: #ED4A6F;
  color: white;
  border-color: #ED4A6F;
}

/* Light mode navigation */
body.light-mode nav a {
  color: #6B9E96;
}

body.light-mode nav a:hover {
  color: #ED4A6F;
}

body.light-mode nav a::after {
  background-color: #ED4A6F;
}

/* Light mode hero section */
body.light-mode #hero-name {
  color: #6B9E96;
}

body.light-mode #hero-title span:first-child {
  color: #6B9E96;
  /* "Web" */
}

body.light-mode #hero-title span:last-child {
  color: #ED4A6F;
  /* "Developer" */
}

/* Light mode card backs */
body.light-mode .back {
  background: #6B9E96;
  color: white;
}

/* Light mode contact snippets */
body.light-mode .contact-snippet h3 span:first-child {
  color: #6B9E96;
}

body.light-mode .contact-snippet h3 span:last-child {
  color: #ED4A6F;
}

body.light-mode .contact-snippet p {
  color: #1F1F1F;
}

/* Light mode footer */
body.light-mode footer {
  color: #2D1F57;
}

.theme-icon.animate {
  animation: spin 0.3s ease;
}

@keyframes spin {
  0% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(0) rotate(180deg);
  }

  100% {
    transform: scale(1) rotate(360deg);
  }
}

@media (min-width: 768px) {
  #button {
    min-width: 196px;
  }
}



/* HERO SPLIT COLORS */
#hero-title span:first-child {
  color: #F55264;
}

#hero-title span:last-child {
  color: #5F96BF;
}

#hero-name {
  color: #FFDE88;
}

/* NAV COLORS */
nav a {
  color: #FFDE88;
}

nav a:hover {
  color: #F55264;
}

nav a::after {
  background-color: #F55264;
}

/* BODY TEXT */
body.dark-mode p {
  color: #BDC3C7;
}

/* setion titles */
.section-title span:first-child {
  color: F55264;
}

.section-title span:last-child {
  color: FFDE88
}

/* TECH/SOFT HEADERS */
.skills-group h2 {
  font-size: 2.5em;
}

.skills-group h2 span:first-child {
  color: #F55264;
}

.skills-group h2 span:last-child {
  color: #FFDE88;
}

/* FILTER BUTTON STYLES */
.filter-buttons {
  text-align: center;
  margin: 2rem 0;
}

.filter-btn {
  background: none;
  border: 2px solid #5F96BF;
  color: #5F96BF;
  padding: 0.5rem 1.5rem;
  margin: 0 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: scale(0.97);
}

.filter-btn:hover {
  background: #F55264;
  color: white;
}

.filter-btn.active {
  background: #F55264;
  color: #374144;
  transform: scale(1.05);
  border-color: #F55264;
}

/* PROJECT CONTAINER */
.web-projects .project {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 4rem;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.web-projects .project:nth-child(even) {
  flex-direction: row-reverse;
}

.web-projects p {
  font-size: 1.3rem;
}

.projects-container .project.hide {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.projects-container img {
  width: 40vw;
}

.projects-container.hide {
  display: none;
}

/*GRAPHIC PROJECTS */

.graphic-projects {
  column-count: 2;
  column-gap: 2rem;
  padding: 2rem 5%;
}

.project.graphic {
  break-inside: avoid;
  margin-bottom: 2rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  max-width: 100%;
}

.project.graphic img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
  max-height: 800px;
}

.project.graphic p {
  text-align: center;
  margin-top: 0.5rem;
  color: white;
}

/* PHOTO PROJECT GRID */
.photo-view {
  column-count: 2;
  column-gap: 2rem;
  padding: 2rem 5%;
}

.project.photo {
  break-inside: avoid;
  margin-bottom: 2rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  cursor: pointer;
}

.project.photo img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
  max-height: 800px;
}



/* CONTACT SECTION */

.contact-snippet h3 span:first-child {
  color: #5F96BF;
  font-size: 2rem;
}

.contact-snippet h3 span:last-child {
  color: #F55264;
  font-size: 2rem;
}

.contact-snippet p {
  color: #BDC3C7;
  font-size: 1.3rem;
  margin: 0 auto 2rem;
}

/* SECTION ANIMATION */
.section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}



/* FOOTER */
footer {
  text-align: center;
  color: #FFDE88;
  padding: 2rem 0;
  font-size: 0.9rem;
}

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: transparent;
  pointer-events: none;
  z-index: -1;
}


/* === MODAL STYLES === */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  /* dimmed background */
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.modal.open {
  display: flex;
  animation: fadeIn 0.3s ease-out forwards;
}

.modal-content {
  position: relative;
  background-color: #1f1f1f;
  padding: 1rem;
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  overflow: visible;
}

.modal-content img,
.modal-content video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  border-radius: 6px;
  display: block;
}

.hover-preview {
  width: 40vw;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s ease;
}



.close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  background: #F55264;
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: #ff7a87;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}


@media (max-width: 768px) {

  nav {
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 5vw;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    overflow-x: hidden;
  }

  nav a {
    display: none;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    z-index: 11;
    margin: 0 5vw 0 auto;
  }

  /* tweak bar color */
  .hamburger .hamburger-inner,
  .hamburger .hamburger-inner::before,
  .hamburger .hamburger-inner::after {
    background-color: #F55264 !important;
  }


  .mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: #1a1a1af6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
    z-index: 4;
  }

  .mobile-menu a {
    color: #FFDE88;
    text-decoration: none;
    padding: 1rem 0;
    display: block;
    font-size: 1.5rem;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
  }

  .mobile-menu.show {
    transform: translateX(0);
    display: flex;
    pointer-events: auto;
  }

  .close-mobile {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #FFDE88;
    cursor: pointer;
    z-index: 5;
  }

  .section {
    width: 100%;
    max-width: 100%;
    padding: 10vw 5vw;
  }

  body.light-mode .mobile-menu {
    background: #f9fafbde;
  }

  body.light-mode .mobile-menu a {
    color: #ED4A6F;
  }

  .mobile-menu.show {
    display: flex;
  }

  #hero h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    max-width: 90vw;
    word-break: break-word;
  }

  #hero-name span {
    display: inline;
    font-size: inherit;
  }

  #hero-name br {
    display: block;
  }


  .skills-container {
    grid-template-columns: repeat(2, 1fr);
    padding: 0;
  }


  .skills-container .card {
    width: 40vw;
    max-width: none;
    height: 40vw;
    max-height: none;
  }

  .technical-skills {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: 20px;
  }

  .software-skills {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: 20px;
  }

  .projects-container.web-projects .project video,
  .projects-container.web-projects .project p {
    width: 90vw;
  }

  .graphic-projects,
  .photo-view {
    column-count: 1;
  }

  .project.graphic,
  .project.photo {
    margin: 0 auto 2rem;
    width: 100%;
  }

  .web-projects .project,
  .graphic-projects .project,
  .photo-view .project {
    flex-direction: column !important;
    text-align: center;
    gap: 1rem;
  }

  .web-projects video,
  .graphic-projects img,
  .photo-view img {
    width: 100%;
    height: auto;
  }

  .single-title,
  .section-title {
    text-align: center;
  }

  #about {
    flex-direction: column;
    height: auto;
  }

  #about img.headshot {
    width: 80vw;
    height: auto;
    margin: 0 auto 2rem;
    display: block;
  }

  #about p {
    width: 90%;
    max-width: 90%;
    margin: 0 auto;
    text-align: center;
  }


  .contact-content {
    flex-direction: column;
    margin: 0 auto;
    text-align: center;
    padding: 0 5vw;
    width: 100%;
  }

  .contact-snippet h3 {
    max-width: 90vw;
    margin: auto;
    
  }

  .contact-snippet {
    max-width: 90vw;
    margin: 0 auto;
    text-align: center;
  }

  .contact-snippet p {
    font-size: 1.3rem;
    line-height: 1.6;
  }

  .contact-links {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }


  nav {
    box-sizing: border-box;

    padding: 1rem 5vw;
  }


  .hamburger {
    margin: 0;
  }


  .projects-container.web-projects .project video,
  .projects-container.web-projects .project p {
    width: 100%;
  }

}

@media (min-width: 769px) {
  .mobile-menu {
    display: none;
  }

  .hamburger {
    display: none !important;
  }
}