#theme-toggle {
    display: none;
}

.theme-switch {
    position: fixed;
    top: 50px;
    right: 20px;
    z-index: 1001;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 25px;
    padding: 2px;
    backdrop-filter: blur(10px);
    border: none; 
}



.switch-slider {
    width: 40px;
    height: 20px;
    background: #333;
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.portfolio-toggle {
    position: fixed;
    top: 100px; 
    right: 20px;
    z-index: 1000;
    cursor: pointer;
}

.dark-icon {
    width: 300px; 
    height: auto;
    display: block;
    position: absolute;
    top: -125px;
    right: -30px;
}

.light-icon {
    width: 350px; 
    height: auto;
    display: none;
    position: absolute;
    top: -90px;
    right: -50px;
}

/* Default state - Dark mode (Derrick's portfolio) */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.page-container {
    background-color: #111;
    color: #fff;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: #fff;
    text-decoration: none;
}

header {
    position: sticky;
    top: 30px; 
    z-index: 100;
    padding: 10px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid #333;
    border-radius: 10px;
    background-color: rgba(17, 17, 17, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}



.nav-home-link img {
    width: 24px;
    height: 24px;
}

.nav-social-group a img {
    width: 22.4px;
    height: 22.4px;
    filter: invert(1); /* black icons to white (for dark mode visibility) */
}

#theme-toggle:checked ~ .page-container .nav-social-group a img {
    filter: none;
}

.nav-separator {
    width: 1px;
    height: 24px;
    background-color: #333;
    margin: 0 15px;
}

.nav-social-group {
    display: flex;
    align-items: center;
}

.nav-social-group a{
    margin: 0 12px;
    position: relative;
    transition: opacity 0.3s ease;
}

/*Effect where a small line appears as you hover over each icon*/
.nav-social-group a::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: #00bfff;
    transition: width 0.3s;
}

.nav-social-group a:hover::after{
    width: 100%;
}

.nav-social-group a:hover {
    opacity: 0.7;
}

.hero .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
}

.button {
    background-color: #111;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease, transform 0.3s, box-shadow 0.3s;
    border: 1px solid #333;
}

.button:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.hero {
    text-align: left;
    padding: 150px 0;
}

.hero h1 {
    font-size: 3em;
    margin: 0;
}

.hero p {
    font-size: 1em;
    color: #aaa;
    max-width: 600px;
    margin: 20px 0;
}

.hero-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 20px;
}

.hero .availability {
    background-color: #28a745;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    margin-left: 10px;
}

main {
    padding: 0 20px;
}

section {
    padding: 20px 0;
    border-bottom: 1px solid #444;
}

#theme-toggle:checked ~ .page-container section {
    border-bottom: 1px solid #444;
}

h2 {
    font-size: 2em;
    margin-bottom: 30px;
}

#about p {
    max-width: 800px;
    font-size: 0.98em;
}

#experience .job {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

#experience .job:last-child {
    border-bottom: none;
}

/* Some rectangles surrounding the links to external websites in the work experience area */
#experience .job a[href^="http"]:not([href="#"]) {
    padding: 3px 8px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
    border: 3px solid;
}

#experience .derrick-content .job:nth-child(3) a[href^="http"] {
    background-color: #FFF4A4; 
    border-color: #FFD700;
    color: #000;
}

#experience .derrick-content .job:nth-child(4) a[href^="http"] {
    background-color: #ffcccc; 
    border-color: #a30000;
    color: #fff;
}

#experience .jackie-content .job:nth-of-type(1) a[href^="http"] {
    background-color: #ffe6f0;
    border-color: #cc8090;
    color: #000;
}

#experience .jackie-content .job:nth-of-type(3) a[href^="http"] {
    background-color: #93DA97;
    border-color: #5a9b5a;
    color: #000;
}

#experience .job a[href="https://www.powerlearnprojectafrica.org/"] {
    background-color: #5EABD6; 
    border: 3px solid #00315c !important;
    color: #000;
}


/*Adding some pictures to show things we enjoy doing*/
#hobbies .derrick-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin: 40px auto;
  position: relative;
}
#hobbies .jackie-content {
  display: none;
}

/* Tilt effect */
#hobbies .derrick-content .hobby-card:nth-child(1) {
  transform: rotate(-5deg);
  z-index: 1;
  margin-top: 90px;
}
#hobbies .derrick-content .hobby-card:nth-child(2) {
  transform: rotate(10deg);
  margin-left: -30px;
  z-index: 2;
}


#theme-toggle:checked ~ .page-container #hobbies .derrick-content {
  display: none;
}
#theme-toggle:checked ~ .page-container #hobbies .jackie-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin: 40px auto;
  position: relative;
}

#theme-toggle:checked ~ .page-container #hobbies .jackie-content .hobby-card:nth-child(1) {
  transform: rotate(-5deg);
  z-index: 1;
  margin-top: 90px;
}
#theme-toggle:checked ~ .page-container #hobbies .jackie-content .hobby-card:nth-child(2) {
  transform: rotate(10deg);
  margin-left: -30px;
  z-index: 2;
}

/* constant card size for uniformity */
#hobbies .hobby-card {
  padding: 8px 8px 20px;
  width: 200px;
  height: 255px;
  text-align: center;
  transition: transform 0.3s ease;
  border: 1px solid #ccc;
  overflow: hidden; 
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

/* To ensure images don't just fill the screen */
#hobbies .hobby-image {
  width: 100%;
  height: 200px;        
  object-fit: cover;    
  margin-bottom: 5px;
}

#hobbies .hobby-info {
  margin-top: -5px;  
}

#hobbies .hobby-info p {
  margin: 0;
  padding: 0;
}


#hobbies .derrick-content .hobby-card {
  background: #1a1a1a;
  border-color: #333;
  box-shadow: 0 4px 8px rgba(255,255,255,0.15); 
}

#hobbies .derrick-content .hobby-info p {
  color: #fff;
}


#theme-toggle:checked ~ .page-container #hobbies .jackie-content .hobby-card {
  background: #fff;
  border-color: #ccc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25); 
}

#theme-toggle:checked ~ .page-container #hobbies .jackie-content .hobby-info p {
  color: #333;
}


#projects {
    text-align: left;
}

.project-card {
    width: 90%;
    border: 1px solid #333;
    border-radius: 10px;
    margin: 20px auto;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}
/*in dark mode, adding a light color so that the hover effect is visible (shadow)*/
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.project-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

.derrick-content .project-image {
    display: block;
}

.jackie-content .project-image {
    display: none;
}

#theme-toggle:checked ~ .page-container .derrick-content .project-image {
    display: none;
}

#theme-toggle:checked ~ .page-container .jackie-content .project-image {
    display: block;
}

.project-info h3 {
    margin: 10px 0;
}

.project-info p {
    color: #aaa;
    transition: color 0.3s ease;
}

.tags span {
    background-color: #333;
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 5px;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

#contact {
    text-align: left;
}

#contact p {
    max-width: 600px;
}

#contact .button {
    margin: 0 10px 0 0;
}

footer {
    text-align: center;
    padding: 50px 0;
    color: #aaa;
    transition: color 0.3s ease;
}

/* Content containers for each portfolio */
.derrick-content {
    display: block;
}

.jackie-content {
    display: none;
}

/* Light mode (Jackie's portfolio) */
#theme-toggle:checked ~ .page-container {
    background-color: #fff;
    color: #333;
}

#theme-toggle:checked ~ .page-container a {
    color: #333;
}

#theme-toggle:checked ~ .page-container .nav-social-group a img {
    filter: none;
}

#theme-toggle:checked ~ .page-container .button {
    background-color: #fff;
    color: #333;
    border: 1px solid #eee;
}

#theme-toggle:checked ~ .page-container .button:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#theme-toggle:checked ~ .page-container .hero p {
    color: #666;
}



#theme-toggle:checked ~ .page-container #experience .job {
    border-bottom: none;
}

#theme-toggle:checked ~ .page-container .project-card {
    border: 1px solid #eee;
}


/*due to some changes made for the cards, adding this ensures that in light mode 
the hover effect (esp the box shadow) is actually visible*/

#theme-toggle:checked ~ .page-container .project-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#theme-toggle:checked ~ .page-container .project-image-placeholder {
    background-color: #eee;
}

#theme-toggle:checked ~ .page-container .project-info p {
    color: #666;
}

#theme-toggle:checked ~ .page-container .tags span {
    background-color: #f0f0f0;
    color: #333;
}

#theme-toggle:checked ~ .page-container footer {
    color: #666;
}

#theme-toggle:checked ~ .page-container .hero .availability {
    background-color: #007bff;
}

/* Toggle switch animation for light mode */
#theme-toggle:checked ~ .theme-switch .switch-slider {
    background: #007bff;
}

#theme-toggle:checked ~ .theme-switch .switch-slider::before {
    transform: translateX(30px);
}


/* Content switching */
#theme-toggle:checked ~ .portfolio-toggle .dark-icon {
    display: none;
}

#theme-toggle:checked ~ .portfolio-toggle .light-icon {
    display: block;
}

/* Original content switching */
#theme-toggle:checked ~ .page-container .derrick-content {
    display: none;
}

#theme-toggle:checked ~ .page-container .jackie-content {
    display: block;
}

nav .derrick-content, nav .jackie-content {
    display: none; 
}

nav .derrick-content {
    display: flex;
    align-items: center;
}


#theme-toggle:checked ~ .page-container nav .derrick-content {
    display: none;
}

#theme-toggle:checked ~ .page-container nav .jackie-content {
    display: flex;
    align-items: center;
}

#theme-toggle:checked ~ header nav {
    border: 1px solid #eee;
    background-color: rgba(255, 255, 255, 0.75);
}

#theme-toggle:checked ~ header .nav-separator {
    background-color: #eee;
}


#theme-toggle:checked ~ .page-container header nav {
  background-color: rgba(255, 255, 255, 0.75);
}





#theme-toggle:checked + .theme-switch .switch-slider {
  background: #ccc; 
}


#theme-toggle:checked + .theme-switch .switch-slider::before {
  background: #000; 
  transform: translateX(20px);
}

/* Fade-in Animation(looks cool)*/
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeInUp 1s ease-out forwards;
  opacity: 0;
}

/* After how long each section renders */
#about {
  animation-delay: 0.8s;
}

#experience {
  animation-delay: 1s;
}

#projects {
  animation-delay: 1.2s;
}

#contact {
  animation-delay: 1.4s;
}


/* Media Queries for mobile responsiveness, to prevent overlapping elements */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5em;
    }

    .nav-social-group a {
        margin: 0 8px;
    }

    .button {
        padding: 8px 16px;
    }

    .hero .availability {
        padding: 8px 16px;
    }

    .theme-switch {
        top: 110px;
    }

    .portfolio-toggle {
        top: 150px;
    }

    .dark-icon {
        width: 200px;
        top: -80px;
        right: -20px;
    }

    .light-icon {
        width: 250px;
        top: -70px;
        right: -40px;
    }
}

