/* General Styles */
/* Root Variables */
:root {
    --primary-color: #8B4513;
    --secondary-color: #654321;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: 0;
}

/* Navigation Bar Styles (Used on multiple pages) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    transition: var(--transition);
}

.nav-logo:hover {
    transform: scale(1.05);
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 1.1rem;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background-color: var(--light-bg);
}

.nav-menu a.active {
    color: var(--primary-color);
    background-color: var(--light-bg);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Main Content Styles (General) */
main {
    margin-top: 80px;
    padding: 2rem;
}

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

/* Shared Hero Section Styles */
.hero-section {
    background-size: cover;
    background-position: center;
    color: var(--black);
    padding: 4rem 0;
    text-align: center;
    /* Background will be overridden by page-specific styles */
}

.hero-info h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    color: var(--black);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.hero-info p {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: 700;
}

/* General Container Text Styles (Used on multiple pages) */
.container h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: bold;
}

.container p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Home Page Specific Styles */

/* About Page Specific Styles */
.about-section {
    padding: 4rem 2rem;
    background-color: var(--light-bg);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.about-content {
    display: flex; /* Use Flexbox for layout */
    gap: 2rem; /* Space between text and image */
    align-items: flex-start; /* Align items to the top */
}

.about-text {
    flex: 1; /* Allow the text div to grow and shrink */
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: bold;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.about-page-image { /* Styling for the chess journey image */
    width: 40%; /* Control image width within flex container */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Developer Section Styles */
.developer-section {
    padding: 4rem 2rem;
    background-color: var(--white); /* Or a different background if desired */
}

.developer-content {
    display: flex; /* Use Flexbox for layout */
    gap: 2rem; /* Space between image and text */
    align-items: flex-start; /* Align items to the top */
}

.developer-page-image { /* Styling for the developer journey image */
    width: 40%; /* Control image width within flex container, adjust as needed */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* Image is on the left, so no float needed with flexbox */
}

.developer-text {
    flex: 1; /* Allow the text div to grow and shrink */
}

.developer-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: bold;
}

.developer-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700; /* Keeping consistent boldness */
}

/* Skills Page Specific Styles */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Projects Page Specific Styles */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-card p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.see-more-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    align-self: center;
}

.see-more-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Adjust image size as needed */
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-gallery img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* Style to show the details when active */
.project-card.active .project-details {
    display: block; /* Show when parent has 'active' class */
}

/* Project Details Styles */
.project-details {
    display: none; /* Initially hidden */
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee; /* Separator line */
    text-align: left; /* Align details text to the left */
}

.project-details p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Contact Page Specific Styles */
.contact-content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

.contact-info {
    flex: 1; /* Allow contact info to take available space */
    min-width: 300px; /* Minimum width before wrapping */
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-item a {
    display: flex; /* Use flex to align icon and text */
    align-items: center;
    text-decoration: none; /* Remove underline */
    color: var(--text-color); /* Inherit or set text color */
    padding: 0.6rem 0.8rem; /* Reduced padding for smaller size */
    border: 1px solid #ccc; /* Add a border */
    border-radius: 8px; /* Rounded corners */
    transition: var(--transition);
    width: 100%; /* Make link fill the contact-item width */
}

.contact-item a:hover {
    background-color: var(--light-bg); /* Hover effect */
    border-color: var(--primary-color); /* Change border color on hover */
}

.contact-item i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.social-links {
    margin-top: 1.5rem;
}

.social-link {
    display: inline-block;
    margin-right: 15px;
    font-size: 1.8rem;
    color: var(--text-color);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary-color);
}

.contact-form {
    flex: 2; /* Allow form to take more space */
    min-width: 300px; /* Minimum width before wrapping */
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Space between form elements */
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-left: 1rem; /* Add left margin to push the form right */
}

.form-group {
    margin-bottom: 0; /* Remove default margin as gap handles spacing */
    position: relative;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"] {
    width: 100%; /* Make input fields take full width of their container */
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    /* Ensure all input fields have the same height implicitly via padding */
}

.contact-form textarea {
    width: 100%; /* Make textarea take full width */
    min-height: 150px; /* Adjust as needed */
    resize: vertical; /* Allow vertical resizing */
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
}

.contact-form .submit-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: bold;
}

.contact-form .submit-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Personal Page Specific Styles */
/* Add any specific styles for personal.html here if needed */

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-menu a {
        padding: 1rem;
        display: block;
    }

    .about-content,
    .developer-content { /* Apply to both sections */
        flex-direction: column; /* Stack items vertically on smaller screens */
        align-items: center; /* Center items when stacked */
    }

    .about-page-image,
    .developer-page-image { /* Apply to both images */
        width: 80%; /* Adjust image width when stacked */
        margin-bottom: 1rem; /* Add space below image when stacked */
    }
    
    .about-text,
    .developer-text { /* Apply to both text divs */
        flex: none; /* Remove flex grow/shrink when stacked */
    }

    .hero-info h1 {
        font-size: 3rem;
    }

    .hero-info p {
        font-size: 1.2rem;
    }

    .container p {
        font-size: 1rem;
    }
}

/* Image Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 10000; /* Sit on top (higher than navbar) */
    padding-top: 60px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.9); /* Black with opacity */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
}

/* Caption of Modal Image */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
}

/* Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}

/* Modal Styles */
.skill-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 2rem;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    margin-top: 1rem;
}

.modal-body h2 {
    color: #333;
    margin-bottom: 1rem;
}

#modalDetails {
    line-height: 1.6;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}

/* Chess Board Section Styles */
.chess-board-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 4rem 0;
}

.chess-intro {
    color: var(--primary-color);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: bold;
}

.chess-board {
    display: grid;
    grid-template-rows: repeat(8, 1fr);
    width: 400px;
    height: 400px;
    border: 2px solid #333;
    margin: 20px auto;
    z-index: 10;
}

.board-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
}

.board-square {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.board-square.white {
    background-color: #f0d9b5;
}

.board-square.black {
    background-color: #b58863;
}

.board-square.valid-move {
    position: relative;
}

.board-square.valid-move::after {
    content: '';
    position: absolute;
    width: 25%;
    height: 25%;
    background-color: rgba(0, 255, 0, 0.3);
    border-radius: 50%;
}

.board-square.valid-move:hover {
    background-color: rgba(0, 255, 0, 0.2);
}

.board-square i {
    font-size: 2.5rem;
    transition: transform 0.2s;
}

.board-square i:hover {
    transform: scale(1.1);
}

.white-piece {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.black-piece {
    color: #000;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.chess-cta {
    text-align: center;
}

.play-chess-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.play-chess-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.play-chess-button i {
    font-size: 1.4rem;
}

/* Responsive Chess Board */
@media (max-width: 500px) {
    .chess-board {
        width: 300px;
        height: 300px;
    }
    
    .board-square i {
        font-size: 2rem;
    }
}

@media (max-width: 350px) {
    .chess-board {
        width: 250px;
        height: 250px;
    }
    
    .board-square i {
        font-size: 1.5rem;
    }
}

/* Explore Section Styles */
.explore-section {
    text-align: center;
    padding: 4rem 0;
    margin-top: 2rem;
}

.explore-intro {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.explore-text {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

.explore-cta {
    margin-top: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Responsive Explore Section */
@media (max-width: 768px) {
    .explore-intro {
        font-size: 2rem;
    }
    
    .explore-text {
        font-size: 1.1rem;
    }
} 

@media (max-width: 600px) {
  .projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .project-card {
    margin: 0 auto;
    width: 95%;
    padding: 1.2rem;
  }
}

/* Mobile grid for chess pieces on index.html */
@media (max-width: 600px) {
  .chess-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1rem;
    width: 98%;
    max-width: 400px;
    height: auto;
    position: static;
    margin: 0 auto 1.5rem auto;
  }
  .intro-piece {
    position: static !important;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .intro-piece img {
    width: 90px;
    max-width: 100%;
  }
  .piece-label {
    font-size: 1rem;
    padding: 0.2rem 0.5rem;
  }
  .homepage-text h1 {
    font-size: 1.3rem;
  }
  .homepage-text p {
    font-size: 0.95rem;
  }
} 

@media (max-width: 600px) {
  .about-content,
  .contact-content,
  .skills-grid,
  .personal-content {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.2rem !important;
    padding: 0.5rem !important;
  }
  .developer-content {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.2rem !important;
    padding: 0.5rem !important;
  }
  .about-page-image,
  .developer-page-image {
    width: 90% !important;
    margin-bottom: 1rem !important;
  }
  .skill-card,
  .contact-info,
  .contact-form {
    width: 100% !important;
    min-width: unset !important;
    margin: 0.5rem 0 !important;
  }
  .skills-grid {
    grid-template-columns: 1fr !important;
  }
  .container h2,
  .hero-info h1 {
    font-size: 1.5rem !important;
  }
  .container p,
  .hero-info p {
    font-size: 1rem !important;
  }
  .login-form,
  .personal-info {
    width: 100% !important;
    margin: 0.5rem 0 !important;
  }
} 

@media (min-width: 901px) {
  .about-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }
  .about-text {
    order: 1;
    flex: 1;
  }
  .about-page-image {
    order: 2;
    width: 40%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  .developer-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }
  .developer-page-image {
    order: 1;
    width: 40%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  .developer-text {
    order: 2;
    flex: 1;
  }
} 

@media (max-width: 900px) {
  .about-content {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.2rem !important;
    padding: 0.5rem !important;
    display: flex !important;
  }
  .developer-content {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.2rem !important;
    padding: 0.5rem !important;
    display: flex !important;
  }
  .about-page-image,
  .developer-page-image {
    width: 90% !important;
    margin-bottom: 1rem !important;
  }
} 