* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #111;
    color: #fff;
    min-height: 100vh;
    background: url('images/eat-sleep-code-3840x2160-16019.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    font-size: 0.95rem;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    height: calc(100vh - 1.5rem);
    width: 340px; /* Fixed width for sidebar */
    min-width: 340px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.5);
    border-right: 6px solid #fff;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
    border-radius: 0;
    padding: 2rem 1.5rem;
    z-index: 1000;
}

.header-content {
    display: flex;
    flex-direction: column;       /* Stack vertically */
    align-items: center;          /* Center horizontally */
    gap: 1.5rem;
}

.header-content > div {
    display: flex;
    flex-direction: column;
    align-items: center;          /* Center text and links */
}

.social-links {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: #fff; /* White text for black background */
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    letter-spacing: 1px;
}

.social-links img {
    width: 28px;
    height: 28px;
    background: whitesmoke;   
    padding: 6px;
    border-radius: 10px;        
    box-shadow: 0 2px 8px rgba(0,0,0,0.25); 
    transition: filter 0.2s, background 0.2s;
}

.social-links a:hover {
    color: #e0e0e0; /* Slightly lighter on hover */
    text-decoration: underline;
}

.social-links a:hover img {
    background: rgb(84, 83, 83);        /* Slightly gray on hover */
    filter: grayscale(0) brightness(1.2);
}

.profile-picture {
    width: 140px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    display: block;
    margin: 0 auto 0.50rem auto; 
}

header {
    border-radius: 0;
}

header h1 {
    font-size: 2rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1rem;
    color: #ccc;
    letter-spacing: 1px;
}

main {
    margin-left: 340px; 
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    min-height: 0;
    height: calc(100vh - 1.5rem);;
    box-sizing: border-box;
    overflow: auto;
    padding-bottom: 0;
}

.interactive-section {
    position: relative;
    width: 320px;
    aspect-ratio: 16/9;                  /* Ensures perfect fit for standard images */
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(6px);
    border: 2px solid #fff;              /* Fine white border */
}

.interactive-section:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
    background: rgba(255,255,255,0.12);
}

.background {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.7);
    z-index: 1;
    transition: filter 0.3s;
}

.interactive-section:hover .background {
    filter: grayscale(0.5) blur(1px) brightness(0.85);
}

.interactive-section h2 {
    position: relative;
    z-index: 2;
    color: #fff;
    text-shadow: 0 2px 8px #000;
    font-size: 1.5rem;
    margin: 0;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
    transform: translateY(-50%);
    letter-spacing: 1px;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    width: 80px;
    height: 80px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: ripple 0.6s linear;
    z-index: 3;
}
@keyframes ripple {
    from { opacity: 1; transform: scale(0); }
    to { opacity: 0; transform: scale(2); }
}

footer {
    width: 100%;
    text-align: center;
    padding: 0;
    color: #ccc;
    background: rgba(0,0,0,0.6);
    font-size: 0.85rem;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 10;
    letter-spacing: 1px;
    height: 1.5rem;
    line-height: 1.5rem;   
}

@media (max-width: 900px) {
    body {
        flex-direction: column;
        background-attachment: fixed;;
    }
    header {
        position: relative;
        width: 100%;
        min-width: 0;
        max-width: 100vw;
        height: auto;
        border-right: none;
        border-bottom: 4px solid #fff;
        border-radius: 0;
        box-shadow: 0 4px 24px rgba(0,0,0,0.2);
        padding: 1rem 0.5rem;
        z-index: 1000;
    }
    main {
        margin-left: 0;
        margin-top: 0;
        padding: 1rem 0.5rem;
        gap: 1rem;
        height: auto;
        min-height: 0;
        overflow: visible
    }
    .interactive-section {
        width: 98vw;
        min-width: 0;
        max-width: 100vw;
        aspect-ratio: 16/9;
        height: auto;
        border: 2px solid #fff;
        border-radius: 18px;
        overflow: hidden;
        position: relative;
        margin-bottom: 1rem;
        box-shadow: 0 4px 24px rgba(0,0,0,0.5);
        background: rgba(255,255,255,0.05);
    }
    .interactive-section h2 {
        position: relative;
        width: 100%;
        margin: 0;
        padding: 0.5rem 1rem;
        text-align: center;
        color: #fff;
        text-shadow: 0 2px 8px #000;
        font-size: 1.1rem;
        z-index: 2;
        background: transparent;
        box-sizing: border-box;
        line-height: 1;
        display: block;
    }
    .background {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background-size: cover;           /* Stretch image to fill border */
        background-position: center;
        background-repeat: no-repeat;
        z-index: 1;
    }
}

html, body {
    height: 100%;
    min-height: 100%;
}