/* Basic Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Swiss-inspired font */
    line-height: 1.5;
    color: #333;
    background: #fdf6e3; /* Butter color background */
    height: 100vh;
    overflow-y: auto; /* Allow vertical scrolling on the body */
}

.container {
    display: flex;
    height: 100vh; /* Take full viewport height */
}

.left-column {
    flex: 1; /* Takes 1 part of the available space */
    background: #000; /* Solid black background for a strong contrast */
    overflow: hidden; /* Hide overflow for the image */
}

.profile-picture {
    width: 100%; /* Make image fill 100% width of its container */
    height: 100%; /* Make image fill 100% height of its container */
    object-fit: cover; /* Ensures the image fills the space, cropping as needed */
}

.right-column {
    flex: 2; /* Takes 2 parts of the available space */
    padding: 20px 40px 20px 40px; /* Reduced bottom padding */
    background: #fdf6e3; /* Match right column background to butter color */
    display: flex;
    flex-direction: column;
}

header {
    background: none; /* No background */
    color: #333; /* Dark text */
    padding: 0 0 10px 0; /* Adjusted bottom padding for less space */
    text-align: left; /* Align header text to left */
    border-bottom: 1px solid #eee; /* Restored subtle separator */
}

header h1 {
    margin: 0 0 0 0; /* Reduced bottom margin */
    font-size: 2.5em; /* Larger, impactful heading */
    font-weight: 700; /* Bold */
    letter-spacing: -1px; /* Tighten letter spacing */
}

header p {
    margin: 0; /* Remove default margins */
    font-size: 1.2em;
    font-weight: 300; /* Lighter weight */
    color: #666;
}

main {
    padding: 20px 0; /* Adjusted padding */
    margin: 0; /* Remove auto margin */
    box-shadow: none; /* Remove box shadow */
    display: flex;
    flex-direction: column;
    /* Removed justify-content: space-between; for more consistent spacing via margins */
}

section {
    margin-bottom: 20px; /* Adjusted margin for better spacing */
    padding-bottom: 20px; /* Adjusted padding */
    border-bottom: 1px solid #eee; /* Subtle separator */
}

section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

section#education {
    display: none; /* Hide the Education section */
}

section#contact p {
    line-height: 1.2;
    margin-bottom: 0;
}

section#partners {
    text-align: left; /* Align heading to the left */
    padding: 20px 0;
    border-top: 1px solid #eee;
}

section#partners h2 {
    font-size: 1.5em; /* Smaller font size for the heading */
    margin-bottom: 15px; /* Adjust spacing below the heading */
}

.logo-container {
    display: flex;
    justify-content: flex-start; /* Align logos to the left */
    align-items: center;
    flex-wrap: wrap;
    gap: 40px; /* Increased spacing between logos */
    margin-top: 20px;
}

.greyscale-logo {
    max-height: 50px; /* Reverted maximum height for logos */
    width: auto;
    max-width: 120px; /* Reverted maximum width for logos */
    object-fit: contain;
    filter: grayscale(100%) brightness(100%); /* Adjusted brightness to make it darker */
    opacity: 0.7; /* Adjusted opacity to make it darker */
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.greyscale-logo:hover {
    filter: grayscale(0%) brightness(100%); /* Remove greyscale and restore brightness on hover */
    opacity: 1;
}

/* Removed specific SVG path fill override as filter should handle it */

/* Adjust specific logo default appearances */
.atu-logo img.greyscale-logo {
    opacity: 0.8; /* Make ATU logo darker */
    filter: grayscale(100%) brightness(80%); /* Further darken ATU logo */
}

.aalto-logo img.greyscale-logo {
    opacity: 0.5; /* Make Aalto logo less dark */
    filter: grayscale(100%) brightness(120%); /* Further lighten Aalto logo */
}

.yahoo-logo img.greyscale-logo {
    opacity: 0.7; /* Adjusted opacity to make Yahoo logo darker */
    filter: grayscale(100%) brightness(90%); /* Adjusted brightness to make Yahoo logo darker */
}

/* Ensure specific logo hover states also revert */
.atu-logo:hover img.greyscale-logo,
.aalto-logo:hover img.greyscale-logo,
.yahoo-logo:hover img.greyscale-logo {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
}

.netlight-logo {
    position: relative;
    top: 4px;
}

h2 {
    color: #333;
    font-size: 1.8em; /* Slightly larger headings */
    font-weight: 600; /* Semi-bold */
    margin-top: 0;
    margin-bottom: 15px;
}

p {
    margin-bottom: 10px;
}

ul {
    list-style: none; /* Ensure no default bullet points */
    padding: 0;
    margin: 0;
}

ul li {
    /* Removed specific list item styling as it's no longer needed for bullet points */
    position: relative;
    width: max-content;
    color: #333333;
    margin-bottom: 8px;
    border-radius: 20px;
    padding: 3px 9px;
    border: 1px solid #323232;
}

footer {
    text-align: left; /* Align footer text to left */
    padding: 10px 0; /* Adjusted padding */
    background: none; /* No background */
    color: #666; /* Lighter text color */
    margin-top: auto;
    margin-bottom: 0; /* Remove bottom margin */
    border-top: 1px solid #eee; /* Subtle separator */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.download-cv {
    background-color: transparent;
    border: 0.5px solid #ddd; /* Even thinner border */
    color: #333;
    padding: 1px 4px; /* Further reduced padding */
    border-radius: 2px;
    font-size: 0.7em; /* Even smaller font size */
    font-weight: normal; /* Normal font weight */
    transition: background-color 0.3s ease; /* Smooth transition for background color */
    display: block; /* Make the CV link visible */
    display: none;
}

.download-cv:hover {
    background-color: #f0f0f0; /* Slightly lighter grey background on hover */
}

.download-cv a {
    color: #333;
    text-decoration: none;
}

.download-cv a:hover {
    text-decoration: none; /* No underline on hover for the CV link */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .container {
        flex-direction: column; /* Stack columns vertically */
    }

    .left-column {
        flex: none; /* Remove flex sizing */
        width: 100%; /* Take full width */
        height: 40vh; /* Set a vertical height for the image container */
    }

    .profile-picture {
        height: 100%; /* Make image fill 100% height of its container */
        object-fit: cover; /* Ensures the image fills the space, cropping as needed */
        object-position: 50% 30%; /* Focus on the second third, a bit higher */
    }

    .right-column {
        flex: none; /* Remove flex sizing */
        width: 100%; /* Take full width */
        padding: 20px; /* Adjust padding for mobile */
        height: auto; /* Allow content to dictate height */
    }

    main {
        overflow-y: auto; /* Enable vertical scrolling for main content */
        height: auto; /* Allow main to take necessary height */
        flex-grow: 1; /* Allow main to grow and shrink */
    }

    header h1 {
        font-size: 2em; /* Adjusted heading size for mobile */
        margin-bottom: 0; /* Reduced space below heading */
    }

    header p {
        font-size: 1.1em; /* Adjusted subheading size for tablets */
    }

    h2 {
        font-size: 1.8em; /* Adjusted section heading size for tablets */
    }

    p {
        font-size: 1em; /* Adjusted paragraph size for tablets */
    }

    .download-cv {
        position: static; /* Remove fixed positioning */
        margin-top: 20px; /* Add some space above */
        width: fit-content; /* Adjust width to content */
    }

    footer {
        flex-direction: row; /* Align footer items horizontally */
        text-align: left; /* Align footer content to left */
        padding: 10px 20px; /* Adjust padding for mobile */
        justify-content: space-between; /* Space out items */
        align-items: center; /* Vertically align items */
    }

    footer p {
        margin-bottom: 10px; /* Add space between copyright and CV link */
    }
}

@media (max-width: 414px) { /* Targeting smaller mobile devices like iPhone SE */
    header h1 {
        font-size: 1.8em; /* Slightly larger heading size for very small screens */
    }

    header p {
        font-size: 1.1em; /* Slightly larger subheading size for very small screens */
    }

    h2 {
        font-size: 1.6em; /* Slightly larger section headings for very small screens */
    }

    .right-column {
        padding: 15px; /* Further reduce padding for very small screens */
    }

    footer {
        padding: 10px 15px; /* Adjust footer padding for very small screens */
    }
}
