/* ========== Global Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

/* ========== Base ========== */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    background: #fafafa;
    display: flex;
    flex-direction: column;
}

/* ========== Navbar ========== */
nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 1200px;
    width: 95%;
    z-index: 1000;
    box-shadow: 
        inset 5px 5px 10px #ffffff,
        inset -5px -5px 10px #00000013;
    background: rgba(235, 235, 235, 0.5);
    -webkit-backdrop-filter: blur(50%);
    backdrop-filter: blur(0.5rem);
    border-radius: 1.75rem;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-top: 0.5%;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 1rem 2rem;
}

nav a {
    position: relative;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0.75rem; /* Add padding to the links to create a larger hit area */
    border-radius: 1.75rem; /* Rounded corners for the link container */
}

nav a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 1rem;
    opacity: 0; /* Initially invisible */
    transition: opacity 0.3s ease;
    z-index: -1; /* Place it behind the text */
}

nav a:hover {
    color: white;
}

nav a:hover::before {
    opacity: 1; /* Fade in on hover */
}
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 4rem;
}

.two-column {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
}

/* .main-content {
    flex: 2;
} */

.sidebar {
    flex: 1;
    text-align: center;
}

/* ========== Sidebar ========== */
.headshot {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.contact h3 {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact li {
    display: inline-block;
}

.contact a {
    position: relative;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.4rem 0.5rem;
    border-radius: 1.75rem;
}

.contact a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.contact a:hover {
    color: white;
    font-weight: bold;
}

.contact a:hover::before {
    opacity: 1;
}

/* ========== Project Selector ========== */
.proj-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
}

.work-btn {
    position: relative;
    padding: 0.75rem 1rem;
    background: rgba(235, 235, 235, 0.5);
    border-radius: 1.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: transform 0.3s ease-out, color 0.3s ease; 
    transform-style: preserve-3d;
    box-shadow: 
        inset 5px 5px 10px #ffffff,
        inset -5px -5px 10px #00000013;
}

.work-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 1.75rem;
    z-index: -1;
}

.work-btn:hover {
    color: white;
    font-weight: bold;
    transform: translateY(-5px); /* Lift-up effect */
}

.work-btn:hover::before {
    opacity: 1; /* Fade-in background */
}

/* ========== Projects ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project {
    padding: 1rem;
    border-radius: 1.5rem;
    background: #e7e7e7;
    transition: box-shadow 0.3s ease, transform 0.2s ease-out;
    display: flex; /* Makes the content flexible within the card */
    flex-direction: column; /* Stacks the content vertically */
    justify-content: space-between; /* Distributes space between elements */
}

.project img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 1.5rem;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.project-link:hover {
    transform: translateY(-5px);
}

.project-link:hover .project {
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* ========== Project Detail ========== */
.project-detail {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.project-hero {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1.75rem;
    margin-bottom: 2rem;
}

.project-detail h1 {
    margin-bottom: 1rem;
    color: #222;
}

.lead {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem auto;
    width: 100%;
}

.project-gallery img {
    width: 100%;
    border-radius: 8px;
}

.back-link {
    display: inline-block;
    position: relative;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 2rem auto 0;
    padding: 0.5rem 0.75rem;
    border-radius: 1.75rem;
}

.back-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.back-link:hover {
    color: white;
}

.back-link:hover::before {
    opacity: 1;
}

/* ========== Footer ========== */
footer {
    text-align: center;
    padding: 1rem;
    background: #f4f4f4;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #555;
}

/* ========== Responsive ========== */
@media (max-width: 500px) {
    .two-column {
        flex-direction: column;
    }
}