/* 
  =================================
  CSS for Emre Acarsoy's Portfolio
  =================================
*/

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

body {
    font-family: Arial, sans-serif;
    color: #f0f0f0;
    background-color: #121212;
    /* Dark background */
    line-height: 1.6;
}

/* Define Custom Colors */
:root {
    --primary-color: #ff7f00;
    /* Orange accent */
    --dark-color: #121212;
    /* Dark background */
    --card-color: #1b1b1b;
    /* Slightly lighter background for cards */
    --border-color: #444;
    /* Border color */
    --text-color-light: #f0f0f0;
    --hover-color: #e16f00;
    /* Darker orange for hover states */
}

/* 
  Typography
  ---------
*/
h1,
h2,
h3,
h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--text-color-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* 
  Layout Components
  ---------------
*/

/* Header & Navigation */
header {
    background-color: var(--dark-color);
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

nav h1 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-right a {
    color: var(--text-color-light);
    margin-left: 1.5rem;
    position: relative;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.2rem 0;
}

.nav-right a:hover,
.nav-right a[aria-current="page"] {
    color: var(--primary-color);
}

/* Active link underline effect */
.nav-right a[aria-current="page"]::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    bottom: -3px;
    left: 0;
}

/* Main Content */
main {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Introduction Section */
.intro {
    margin-bottom: 2rem;
}

.intro h2 {
    margin-bottom: 1rem;
}

.intro p {
    font-size: 1.1rem;
}

/* Info Section (Education, Projects, etc.) */
.info-section {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 6px;
    background-color: var(--card-color);
}

/* Project Items */
.project-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.project-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.project-content {
    position: relative;
    padding-right: 150px;
    /* Space for the GitHub button */
}

.project-content h3 {
    margin-bottom: 1rem;
    padding-right: 50px;
    /* Ensure title doesn't overlap with button on small screens */
}

/* Project Images */
.project-images {
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
}

.project-images img {
    width: 75%;
    /* Reduced from 100% to 75% (25% smaller) */
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: contain;
    max-height: 500px;
}

.project-images img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Image gallery for multiple images */
.image-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 75%;
    /* Make the gallery container 75% of its parent */
}

.image-gallery img {
    width: 100%;
    /* Full width within the gallery grid cells */
}

/* Ensure captions don't break the gallery layout */
.image-gallery>div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Image captions */
.image-caption {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #ccc;
    font-style: italic;
    max-width: 90%;
    /* Prevent extremely long captions from overflowing */
}

/* Mobile adjustments for captions */
@media (max-width: 768px) {
    .image-caption {
        font-size: 0.8rem;
    }
}

.project-item a {
    color: #fff;
    text-decoration: underline;
    position: absolute;
    top: 0;
    right: 0;
    margin-top: 0;
    white-space: nowrap;
}

.project-item a:hover {
    color: var(--primary-color);
}

/* Education & Experience Items */
.education-item,
.experience-item {
    margin-bottom: 1.5rem;
}

.education-item h3,
.experience-item h3 {
    margin-bottom: 0.3rem;
}

.info-section ul {
    list-style: none;
    padding-left: 1rem;
}

.info-section ul li {
    margin: 0.5rem 0;
    position: relative;
    padding-left: 1rem;
}

.info-section ul li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Technical Skills - 2-column layout */
.technical-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #1f1f1f;
    color: var(--text-color-light);
    margin-top: 2rem;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.email-protect {
    font-style: italic;
}

/* Social Media Links in Footer */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.social-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s;
}

.social-btn:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    color: white;
}

/* Button Styles */
.contact-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.contact-btn:hover {
    background-color: var(--hover-color);
}

/* 
  Responsive Layout
  ---------------
*/
@media (max-width: 1024px) {

    /* Tweak image gallery for slightly smaller screens */
    .image-gallery {
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    /* Project items styling for mobile */
    .project-content {
        padding-right: 0;
        /* Remove padding on small screens */
    }

    .project-content h3 {
        padding-right: 0;
        /* Remove padding on small screens */
    }

    .project-item a {
        position: static;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
        display: block;
        text-align: right;
    }

    .project-item {
        gap: 1rem;
    }

    .project-images img {
        width: 85%;
        /* Slightly larger on smaller screens */
        max-height: none;
    }

    .image-gallery {
        width: 85%;
        /* Slightly larger on smaller screens */
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    /* Navigation for mobile */
    nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 1rem;
    }

    nav h1 {
        font-size: 1.8rem; /* Slightly smaller on mobile */
        margin: 0 0 0.5rem 0; /* Increased from 0.4rem to 0.5rem */
    }

    .nav-right {
        display: flex;
        justify-content: space-between; /* Spread the navigation links */
        align-items: center;
        width: 100%;
        margin: 0; /* Remove top margin */
    }

    .nav-right a {
        margin: 0;
        padding: 0.3rem 0; /* Increased from 0.2rem to 0.3rem */
        font-size: 1.1rem; /* Slightly smaller on mobile */
        height: 100%;
    }
    
    /* Ensure the underline for active pages stays close to the link text */
    .nav-right a[aria-current="page"]::after {
        bottom: -2px; /* Closer to the text */
    }

    /* Main content for mobile */
    main {
        padding: 1rem;
    }

    .technical-list {
        grid-template-columns: 1fr;
    }

    /* Social links for mobile */
    .social-links {
        flex-direction: row; /* Keep side by side */
        margin: 0.75rem 0;
    }

    .social-btn {
        padding: 0.4rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .info-section {
        padding: 1rem;
    }

    .project-images {
        margin: 0 -0.5rem;
    }

    .image-gallery {
        gap: 0.5rem;
    }

    .project-images img {
        border-radius: 4px;
    }
}

/* Adjust spacing between multiple image sections */
.project-images+.project-images {
    margin-top: 1.5rem;
}