/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
}

/* ===== NAVIGATION BASE ===== */
nav {
    background-color: teal;
    padding: 2vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 60px;
}

/* ===== SHARED NAV STYLES ===== */
.nav-left-item,
.nav-right-item {
    color: white;
    text-decoration: none;
    font-size: clamp(12px, 2.5vw, 18px);
    -webkit-tap-highlight-color: transparent;
}

.nav-left-item:hover,
.nav-right-item:hover,
.nav-center:hover {
    opacity: 0.8;
}

.nav-left-item.active,
.nav-right-item.active,
.nav-center.active {
    text-decoration: underline;
}

/* ===== DESKTOP NAVIGATION ===== */
.nav-left,
.nav-right {
    display: flex;
    gap: 6vw;
    flex: 1;
}

.nav-left-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(20px, 3vw, 500px);
    font-weight: bold;
    color: white;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

/* ===== MOBILE MENU ===== */
.desktop-only { display: flex; }
.mobile-only { display: none; }

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

.mobile-menu-toggle.open span:nth-child(1) { transform: rotate(-45deg) translate(-6px, 6px); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open span:nth-child(3) { transform: rotate(45deg) translate(-6px, -6px); }

.mobile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: teal;
    width: 200px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-item {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    text-align: left;
}

.mobile-menu-item:hover { background-color: rgba(255,255,255,0.1); }
.mobile-menu-item.active { text-decoration: underline; }

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 768px) {
    nav { padding: 1.5vw; }
    .nav-left, .nav-right { gap: 2.5vw; }
    .nav-left-item, .nav-right-item { font-size: clamp(10px, 2vw, 14px); }
    .nav-left-item { gap: 3px; }
    .nav-center { font-size: clamp(18px, 3.5vw, 28px); }
    
    .desktop-only { display: none; }
    .mobile-only { display: flex; }
    .nav-center {
        position: static;
        transform: none;
        flex: 1;
    }
    nav { justify-content: space-between; }
}

@media (max-width: 480px) {
    nav { padding: 1vw; }
    .nav-left, .nav-right { gap: 3vw; }
    .nav-left-item, .nav-right-item { font-size: clamp(8px, 2vw, 12px); }
    .nav-left-item { gap: 2px; }
    .nav-center { font-size: clamp(16px, 5vw, 24px); }
}

/* ===== DATA SCIENCE PROJECTS ===== */
.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    border: 2px solid #ccc;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.project-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    background-color: #00000;
    border: 1px solid #ddd;
    margin-bottom: 1rem;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.project-card h3 {
    margin-bottom: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.project-description {
    line-height: 1.6;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
}