/* Global Styles */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #1a252f;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* This effect whole body of the web page */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Hide the checkbox but keep it accessible */
.toggle-checkbox {
    position: absolute;
    left: -9999px;
}

/* Styling the label as a toggle button, was assisted by some internet searches to get it right, would have been easier with Javascript but its not allowed for this hackathon */
.toggle-label {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1100;
    font-size: 0.9rem;
}

/* Toggle styles using :checked, this implies clicked and unclicked, its taking some features from the global*/
#darkToggle:checked ~ body *,
#darkToggle:checked ~ * {
    --primary: #5d07df;
    --secondary: #3498db;
    --accent: #e67e22;
    --light: #1a252f;
    --dark: #ffffff;
    background-color: #1a252f;
    color: #ecf0f1;
}

#darkToggle:checked header,
#darkToggle:checked footer {
    background-color: #0f1820;
}

#darkToggle:checked .btn,
#darkToggle:checked button {
    background: #3498db;
}

#darkToggle:checked .edu-item,
#darkToggle:checked .project-card,
#darkToggle:checked .interest-section {
    background: #2c3e50;
    color: #ecf0f1;
}

#darkToggle:checked input,
#darkToggle:checked textarea {
    background-color: #34495e;
    color: #fff;
    border: 1px solid #555;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.container p {
  margin-bottom: 20px; /* Space between paragraphs */
  text-align: justify; /* Optional: Aligns text evenly on both sides */
}

section {
    padding: 5rem 0;
}

h1, h2, h3 {
    color: var(--primary);
}

/* Header Styles */
header {
    background: var(--primary);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem;
}

nav li {
    margin: 0 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav a:hover {
    color: var(--secondary);
    transform:scale(1.1);
    text-decoration: underline;
}

/* Hero Section, I used my image as the background for the home page or front page*/
#hero {
    background-image: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('assets/mosmit-picture1.jpeg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: rgb(8, 8, 8);
}

#hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: rgb(15, 13, 13);
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid var(--light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: white;
    animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* Adding a bit of interactivity to my h2, this effect will only show when the page is refreshed */
h2 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards;
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.container h2 {
    text-align: center;
}

/* Section Styles */
section:nth-child(even) {
    background-color: #f9f9f9;
}

.edu-item, .project-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
    transition: 0.3s;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

.btn, button {
    transition: 0.3s ease, transform 0.3s ease;
}

.btn:hover, button:hover {
    transform: scale(1.05);
}

.edu-item, .project-card, .interest-section {
    transition: transform 0.3s ease;
    color:black;
}

.edu-item:hover, .project-card:hover, .interest-section:hover {
    transform: translateY(-5px);
}


/* Skills Grid */
#skills ul {
    columns: 2;
    list-style-type: none;
    margin: 1.5rem 0;
}

#skills li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

#skills li:before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* i had issues with this particular container inheriting the previous, was unable to effect the change i wanted, so i had to add 1 at the end to separate it out **would have to study more on it */
.container1 {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px;
  font-family: Arial, sans-serif;
}

.container1 h2 {
  text-align:center;
  margin-bottom: 30px;
  color: #2c3e50;
}

.interests-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 20px; /* space between columns */
  flex-wrap: wrap; /* allows stacking on smaller screens */
}

.interest-section {
  flex: 1; /* makes all columns equal width */
  min-width: 250px;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.interest-section h2 {
  font-size: 1.2rem;
  color: #34495e;
  margin-bottom: 15px;
}

.interest-section ul {
  padding-left: 20px;
  line-height: 1.6;
}

/* Contact Form */
form {
    max-width: 600px;
    margin: 0 auto;
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 1.5rem;
}

.social-icons {
    margin-top: 1rem;
}

.social-icons a img {
    width: 30px;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

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


/* Responsive Design, this is for smaller screen */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.5rem 0;
    }
    
    #skills ul {
        columns: 1;
    }
}