/* Base styles */
:root {
    --text-color: #000000;
    --bg-color: #ffffff;
    --header-bg: #000000;
    --header-text: #ffffff;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    /* Removing padding from body for full-screen layout */
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.intro-content a,
.publications-list a,
.activity-content a {
    color: #666666;
    text-decoration: none;
}

.intro-content a:hover,
.publications-list a:hover,
.activity-content a:hover {
    text-decoration: underline;
}

ul,
ol {
    margin: 0;
    padding-left: 20px;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

.page-wrapper {
    display: flex;
    min-height: 100vh;
}

.resume-container {
    max-width: none;
    margin: 0;
    background: white;
}

/* Sidebar Styles */
.sidebar {
    width: 310px;
    background-color: #f5f5f5;
    /* border-right removed */
    padding: 30px;
    /* Reduced padding to help fit height */
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    /* scroll if needed, but trying to fit */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.top-nav {
    background-color: #f5f5f5;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    gap: 30px;
    align-items: center;
}

.top-nav a {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.top-nav a:hover {
    opacity: 1;
    text-decoration: none;
}

.content-wrapper {
    padding: 40px;
}

/* Header inside Sidebar */
.main-header {
    display: flex;
    flex-direction: column;
    /* Stack vertically in sidebar */
    align-items: flex-start;
    margin-bottom: 20px;
    /* Compact spacing */
    flex-shrink: 0;
    width: 100%;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 20px;
}

.name-block {
    /* Container has no background now */
    background-color: transparent;
    color: var(--header-text);
    /* This won't apply directly if spans override, but good to keep clean */
    padding: 0;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align */
    text-align: left;
    margin-bottom: 20px;
    margin-right: 0;
    flex: unset;
    min-height: auto;
}

.name-block span {
    display: inline-block;
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 5px 10px;
    margin-bottom: 2px;
    /* Reduced space */
}

.profile-picture {
    width: 180px;
    height: 180px;
    object-fit: cover;
    margin-bottom: 0;
    border: 1px solid #ddd;
    /* Optional: make it round if desired, user didn't specify. Keeping square/rect based on placeholder. */
    display: block;
    flex-shrink: 0;
}

.header-subtitle {
    margin-top: 20px;
    font-size: 15px;
    /* Slightly smaller to fit single line */
    line-height: 1.3;
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.header-subtitle span {
    display: block;
    width: 100%;
}

.contact-info {
    text-align: left;
    font-size: 13px;
    /* Slightly smaller to fit */
    padding-top: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    /* Compact spacing */
    gap: 10px;
    word-break: break-all;
}

.icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background: black;
    color: white;
    border-radius: 4px;
    flex-shrink: 0;
}

.icon svg {
    fill: white;
    width: 14px;
    height: 14px;
}

/* Sections */
section {
    margin-bottom: 30px;
    scroll-margin-top: 80px;
}

.section-title {
    background-color: var(--header-bg);
    color: var(--header-text);
    display: inline-block;
    padding: 4px 10px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* Intro Section */
.intro-content {
    display: flex;
    gap: 40px;
}

.intro-content>p {
    flex: 1.5;
    text-align: left;
}

.skills-list {
    flex: 1;
}

.skills-list p {
    margin-bottom: 4px;
}

/* Resume Items (Grid Layout) */
.resume-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.date-col {
    font-size: 16px;
}

.year {
    font-weight: 400;
}

.duration {
    font-size: 12px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.role {
    font-weight: 700;
    font-size: 16px;
}

.institution {
    font-weight: 700;
    font-size: 16px;
    text-align: right;
}

.subtitle {
    font-style: italic;
    margin-bottom: 4px;
}

.award {
    margin-top: 4px;
}

/* Publications */
.publications-list {
    list-style-type: decimal;
    padding-left: 20px;
}

.publications-list li {
    margin-bottom: 10px;
    padding-left: 5px;
}

/* Activities */
.activity-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.activity-label {
    font-weight: 700;
}

.sub-label {
    font-weight: 400;
    font-size: 12px;
}

.activity-content ul {
    list-style-type: disc;
}

/* .activity-content li rule removed */

/* Print Styles */
@media print {
    body {
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .resume-container {
        width: 100%;
        max-width: none;
    }
}