/* Global Styles */
* {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

body {
    background: #080808;
    color: #fff;
    line-height: 1.5;
}


/* Header Styles */
#header {
    width: 100%;
    height: 100vh;
    background-color: rgb(0, 0, 0);
    background-size: cover;
    background-position: center;
}

.container {
    padding: 10px 10%;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.logo {
    width: 140px;
    margin-right: 20px;
}

nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 10px 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 25px;
    position: relative;
}

nav ul li a::after {
    content: '';
    width: 0;
    height: 3px;
    background: #28a745;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: 0.4s;
    cursor: pointer;
}

nav ul li a:hover::after {
    width: 100%;
}

.header-text {
    margin-top: 20%;
    font-size: 30px;
}

.header-text h1 {
    font-size: 60px;
    margin-top: 20px;
}

.header-text h1 span {
    color: #28a745;
}

#typed-text::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

span {
    color: #28a745;
}

/* About Section Styles */
#about {
    padding: 80px 0;
    background-color: rgb(0, 0, 0);
}

.row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.about-col-1 {
    flex-basis: 35%;
    min-width: 250px;
    max-width: 400px;
    margin-right: 30px;
}

.about-col-1 img {
    width: 100%;
    height: auto;
    border-radius: 15px;
}

.about-col-2 {
    flex-basis: 60%;
}

.sub-title {
    font-size: 60px;
    font-weight: 600;
    color: white;
}

.tab-titles {
    display: flex;
    margin: 20px 0 40px;
}

.tab-links {
    margin-right: 50px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.tab-links::after {
    content: '';
    width: 0;
    height: 3px;
    background: #28a745;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: 0.4s;
}

.tab-links.active-link::after {
    width: 75%;
}

.tab-contents {
    width: 75%;
    display: none;
}

.tab-contents.active-tab {
    display: block;
}

.tab-contents ul li {
    list-style: none;
    margin: 10px 0;
}

.tab-contents ul li span {
    color: #28a745;
    font-size: 17px;
}

/* Projects Section */
.projects-layout {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Sidebar */
.project-menu {
    flex: 1;
    min-width: 150px;
    min-height: 300px;
}

.project-menu ul {
    list-style: none;
    padding: 0;
}

.project-menu li {
    margin-bottom: 10px;
}

.project-menu button {
    background-color: #222;
    color: white;
    border: none;
    padding: 10px 15px;
    width: 100%;
    height: 70px;
    cursor: pointer;
    text-align: left;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-size: 20px;
}

.project-menu button:hover,
.project-menu button.active {
    background-color: #3c7e41;
}

/* Projects Grid */
.project-content {
    flex: 4;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.project-box {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.project-box:hover {
    transform: translateY(-5px);
    background-color: #3c7e41;
}

.read-more-btn {
    display: block;
    margin-top: 10px;
    background-color: #444;
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 1.0rem;
    border-radius: 5px;
    text-align: left;
    white-space: normal;
}

.project-icons {
    margin-top: 30px;
}

.project-icons a {
    text-decoration: none;
    font-size: 30px;
    margin-right: 15px;
    color: lightgray;
    display: inline-block;
    transition: transform 0.5s;
}

.project-icons a:hover {
    color: black;
    transform: translateY(-5px);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 80px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-box {
    background-color: #1e1e1e;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border: 1px solid #888;
    width: 60%;
    max-width: 600px;
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
.modal-box i {
    color: #28a745; /* or white/lightgray */
    font-size: 24px;
    margin-right: 10px;
}


.modal-box .close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-box .close:hover {
    color: white;
}

/* Contact Section */
#contact {
    background-color: black;
}

.contact-left {
    flex-basis: 35%;
}

.contact-right {
    flex-basis: 65%;
}

.contact-left p {
    margin-top: 30px;
}

.contact-left p i {
    color: #3c7e41;
    margin-right: 15px;
    font-size: 25px;
}

.social-icons {
    margin-top: 30px;
}

.social-icons a {
    text-decoration: none;
    font-size: 30px;
    margin-right: 15px;
    color: lightgray;
    display: inline-block;
    transition: transform 0.5s;
}

.social-icons a:hover {
    color: #3c7e41;
    transform: translateY(-5px);
}

.btn.btn2 {
    display: inline-block;
    background: #3c7e41;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 15px 0;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

.btn:active {
    transform: scale(1);
}

.btn.btn2:visited {
    color: #ae02f1;
}

.btn2 {
    background-color: #28a745;
    text-decoration: none;
}

.btn2:hover {
    background-color: #218838;
}

.contact-right form {
    width: 100%;
}

form input, form textarea, select {
    width: 100%;
    border: 0;
    outline: none;
    background: #262626;
    padding: 15px;
    margin: 15px 0;
    color: #ffffff;
    font-size: 18px;
    border-radius: 6px;
    resize: none;
}

form .btn2 {
    padding: 14px 60px;
    font-size: 18px;
    margin-top: 20px;
    cursor: pointer;
}

label {
    width: 100%;
    border: 0;
    outline: none;
    padding: 15px;
    margin: 15px 0;
    color: #747474;
    font-size: 18px;
    border-radius: 6px;
}

#msg {
    color: #39FF14;
    margin-top: -20px;
    display: none;
}

/* Responsive Design */
@media only screen and (max-width: 800px) {
    .container {
        padding: 10px 5%;
    }

    nav {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a {
        font-size: 20px;
    }

    .logo {
        width: 100px;
        margin: 10px 0;
    }

    .header-text {
        margin-top: 40%;
        font-size: 22px;
        text-align: center;
    }

    .header-text h1 {
        font-size: 40px;
    }

    .sub-title {
        font-size: 36px;
        text-align: center;
    }

    .row {
        flex-direction: column;
        align-items: center;
    }

    .about-col-1,
    .about-col-2,
    .contact-left,
    .contact-right {
        flex-basis: 100%;
        align-items: center;
    }

    .about-col-1 {
        margin-bottom: 20px;
    }

    .tab-titles {
        flex-direction: column;
    }

    .tab-links {
        margin: 10px 0;
    }

    .tab-contents {
        width: 100%;
    }

    .btn, .btn2 {
        padding: 10px 20px;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    form input, form textarea, select {
        font-size: 16px;
    }

    label {
        font-size: 16px;
    }

    .social-icons a {
        font-size: 24px;
        margin: 10px;
    }

    .projects-layout {
        flex-direction: column;
    }

    .project-menu {
        width: 100%;
        min-height: auto;
    }

    .project-content {
        grid-template-columns: 1fr;
    }

    .project-menu button {
        height: auto;
        font-size: 18px;
        padding: 10px;
    }
}

/*Games tab*/
.instructions-click {
  padding-left: 10%;
  padding-right: 10%;
}

#warning {
  color: red;
}

.game-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
}

.game-container {
  position: relative;
  width: 500px;
  height: 500px;
  background-color: #1e1e1e;
  border: 3px solid #28a745;
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}

#click-me {
  position: absolute;
  padding: 12px 20px;
  background-color: #28a745;
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

#click-me:hover {
  transform: scale(1.1);
}

#score {
  font-size: 20px;
  color: white;
}

@keyframes rainbow {
  0% { background-color: red; }
  16% { background-color: orange; }
  33% { background-color: yellow; }
  50% { background-color: green; }
  66% { background-color: blue; }
  83% { background-color: indigo; }
  100% { background-color: violet; }
}

.rainbow {
  animation: rainbow 5s infinite;
}

.rainbow#click-me {
  color: black;
  font-weight: bold;
  border-radius: 50%;
}

/*Memory Game*/
.memory-game {
  width: 320px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.memory-card {
  width: 70px;
  height: 70px;
  background-color: #444;
  border-radius: 8px;
  cursor: pointer;
  font-size: 2rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: transform 0.3s ease;
}

.memory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.memory-card.flipped,
.memory-card.matched {
  background-color: #28a745;
  transform: scale(1.1);
}

#reset-memory-game {
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #3c7e41;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#reset-memory-game:hover {
  background-color: #2e6131;
}
