/* Base styles with journal color scheme */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Journal color palette */
    --parchment-bg: #f5f2e8;
    --parchment-light: #faf8f0;
    --paper-white: #fefcf5;
    --ink-dark: #3a2f2a;
    --ink-medium: #5d4f47;
    --ink-light: #8b7d75;
    --accent-warm: #b8860b;
    --accent-soft: #d4af37;
    --highlight-subtle: #f0e6d2;
    --shadow-soft: rgba(58, 47, 42, 0.1);
    --border-light: #e6d7c3;
}

body {
    font-family: 'Crimson Text', 'Georgia', serif;
    line-height: 1.7;
    color: var(--ink-dark);
    background-color: var(--parchment-bg);
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(184, 134, 11, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(212, 175, 55, 0.02) 0%, transparent 50%);
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Hamburger Menu aligned with title */
.hamburger-menu {
    background: var(--paper-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    padding: 12px;
    width: 50px;
    height: 50px;
    position: relative;
    box-shadow: 0 4px 12px var(--shadow-soft);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hamburger-menu:hover {
    background: var(--highlight-subtle);
    border-color: var(--accent-warm);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-soft);
}

.hamburger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--ink-dark);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger-menu span:nth-child(1) {
    top: 16px;
}

.hamburger-menu span:nth-child(2) {
    top: 23px;
}

.hamburger-menu span:nth-child(3) {
    top: 30px;
}

/* Sidebar Overlay - only for mobile */
@media (max-width: 768px) {
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(58, 47, 42, 0.4);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, var(--paper-white) 0%, var(--parchment-light) 100%);
    border-right: 3px solid var(--border-light);
    box-shadow: 4px 0 20px var(--shadow-soft);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 20px 0;
    margin: 60px 30px 20px 30px;
    border-top: 3px solid var(--border-light);
}

.sidebar-nav li {
    margin: 8px 20px;
}

.sidebar-link {
    display: block;
    padding: 14px 20px;
    color: var(--ink-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    font-family: 'Libre Baskerville', serif;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-link:hover {
    background-color: var(--highlight-subtle);
    color: var(--ink-dark);
    transform: translateX(4px);
}

/* Current page indicator - same style as hover */
.sidebar-link.current {
    background-color: var(--highlight-subtle);
    color: var(--ink-dark);
    font-weight: 600;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 60px 0 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--border-light);
    gap: 20px;
}

.page-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--ink-dark);
    margin: 0;
    letter-spacing: -0.5px;
    text-shadow: 1px 1px 2px var(--shadow-soft);
    text-align: right;
    flex-grow: 1;
}

/* Header Message Button - positioned in page header */
.header-message-button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-soft));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.header-message-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
    background: linear-gradient(135deg, var(--accent-soft), var(--accent-warm));
}

/* Main content area */
.main-content {
    padding: 0 0 60px;
    min-height: calc(100vh - 120px);
}

/* Container for any resume section */
.resume-section-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 30px; /* Reduced from 40px */
    background: var(--paper-white);
    border-radius: 16px;
    box-shadow: 0 8px 25px var(--shadow-soft);
    border: 2px solid var(--border-light);
    position: relative;
}

.resume-section-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-soft), transparent);
    opacity: 0.3;
}

/* Typography improvements */
p, .description {
    text-align: justify;
    hyphens: auto;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Each individual entry (education or experience) */
.resume-entry {
    margin-bottom: 12px; /* Reduced from 24px */
    padding-bottom: 8px;  /* Reduced from 20px */
}

/* Header layout for each entry */
.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px; /* Reduced from 8px */
}

/* Left side info (institution/company and location) */
.primary-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: baseline;
}

/* Institution/Company styles */
.institution,
.company {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.1rem; /* Reduced from 1.2rem */
    color: var(--ink-dark);
}

/* Location styling */
.location {
    color: var(--ink-light);
    font-style: italic;
    font-size: 0.95rem;
}

/* Date range styling */
.date-range {
    font-style: italic;
    color: var(--ink-medium);
    white-space: nowrap;
    font-size: 0.95rem;
}

/* Second line details */
.resume-details {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: var(--ink-medium);
    margin-bottom: 6px; /* Reduced from 12px */
}

/* Subject/Position styling - Education only */
.subject {
    font-weight: 600;
    font-size: 1rem; /* Reduced from 1.05rem */
    color: var(--ink-dark);
}

/* Tier styling - Education only */
.tier {
    font-style: italic;
    text-align: right;
    color: var(--ink-light);
    font-size: 0.95rem;
}

/* Title styling - Experience only */
.title {
    font-weight: 600;
    color: var(--ink-dark);
    font-size: 1.05rem;
}

/* Tech skills styling - Experience only */
.tech-skills {
    color: var(--accent-warm);
    font-style: italic;
    margin-bottom: 12px;
    word-wrap: break-word;
    font-size: 0.95rem;
    background: var(--highlight-subtle);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-soft);
}

/* Description for experience entries */
.description {
    margin-top: 12px;
    color: var(--ink-medium);
    line-height: 1.8;
}

/* Divider between entries - HIDDEN for compact layout */
.resume-divider {
    display: none;
}

/* Grouped Education Styles */
.education-group {
    margin-bottom: 24px;
}

.institution-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border-light);
}

.institution-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: baseline;
}

.institution-dates {
    font-style: italic;
    color: var(--ink-medium);
    font-size: 0.95rem;
    font-weight: 500;
}

.education-subitems {
    margin-left: 20px;
    margin-top: 6px;
}

.education-subitem {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px; /* Reduced from 8px for tighter spacing */
    padding: 2px 0; /* Reduced from 6px 0 */
}

.subitem-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.education-subitem .subject {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink-dark);
    margin: 0;
}

.education-subitem .tier {
    font-style: italic;
    color: var(--ink-light);
    font-size: 0.9rem;
    margin: 0;
}

.subitem-date {
    font-style: italic;
    color: var(--ink-medium);
    font-size: 0.85rem;
    white-space: nowrap;
}

.institution-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 20px 0;
    border-radius: 1px;
}

/* Profile/Bio page specific styles */
.bio-container {
    margin-top: 0;
}

.profile-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-header {
    margin-bottom: 15px;
}

.profile-name {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--ink-dark);
    font-weight: 700;
}

.profile-title {
    font-size: 1.3rem;
    color: var(--ink-medium);
    font-weight: 600;
    font-style: italic;
}

.profile-contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--highlight-subtle);
    border-radius: 12px;
    border: 2px solid var(--border-light);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-label {
    font-weight: 600;
    color: var(--ink-dark);
}

.contact-value {
    color: var(--ink-medium);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    text-decoration: none;
    color: var(--accent-warm);
    font-weight: 600;
    transition: color 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--ink-dark);
    background-color: var(--accent-soft);
    text-decoration: none;
}

/* Update the .profile-bio class in your style.css file */
.profile-bio {
    line-height: 1.8;
    font-size: 1.1rem;
    text-align: justify; /* Center-justify the bio text */
}

.profile-bio p {
    margin-bottom: 18px;
}

/* Footer styles */
footer {
    background: linear-gradient(180deg, var(--parchment-bg) 0%, var(--parchment-light) 100%);
    color: var(--ink-light);
    padding: 30px 0;
    text-align: center;
    border-top: 2px solid var(--border-light);
    font-style: italic;
}

/* Simplified Contact Page Styles */
.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.contact-intro {
    font-family: 'Libre Baskerville', serif;
    font-size: 2rem;
    color: var(--ink-dark);
    margin: 0;
    font-weight: 600;
}

.contact-send-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-soft));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

.contact-send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
    background: linear-gradient(135deg, var(--accent-soft), var(--accent-warm));
}

.contact-info-simple {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-label {
    font-family: 'Libre Baskerville', serif;
    font-weight: 600;
    color: var(--ink-dark);
    min-width: 100px;
    flex-shrink: 0;
}

.contact-value {
    color: var(--ink-medium);
    flex-grow: 1;
}

.contact-link {
    color: var(--accent-warm);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.contact-link:hover {
    color: var(--ink-dark);
    border-bottom-color: var(--accent-warm);
}

.availability-item {
    background: var(--highlight-subtle);
    border-radius: 8px;
    padding: 16px 12px;
    border-bottom: none;
    margin-top: 10px;
}

.availability-item .contact-label {
    min-width: 80px;
}

.contact-error {
    text-align: center;
    color: var(--ink-light);
    font-style: italic;
}

/* Redesigned Skills section - more dense */
.skill-category {
    margin-bottom: 20px;
}

.skill-type {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.2rem;
    color: var(--ink-dark);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 6px;
    font-weight: 600;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-item {
    display: inline-flex;
    align-items: center;
    background: var(--highlight-subtle);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: var(--accent-soft);
    border-color: var(--accent-warm);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.skill-name {
    font-weight: 600;
    color: var(--ink-dark);
    margin-right: 6px;
}

.skill-level {
    font-style: italic;
    color: var(--ink-medium);
    font-size: 0.85rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .page-header {
        margin: 40px 0 30px;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .page-title {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .hamburger-menu {
        width: 45px;
        height: 45px;
        padding: 10px;
    }
    
    .hamburger-menu span {
        width: 18px;
    }

    .header-message-button {
        font-size: 0.85rem;
        padding: 8px 16px;
        order: 3; /* Place button last on mobile */
    }
    
    /* On mobile, keep overlay behavior for better UX */
    body.sidebar-open .main-content {
        margin-left: 0;
    }
    
    body.sidebar-open footer {
        margin-left: 0;
    }
    
    .resume-section-container {
        padding: 20px; /* Even more compact on mobile */
    }
    
    .resume-entry {
        margin-bottom: 10px; /* More compact on mobile */
        padding-bottom: 6px;
    }
    
    .resume-header {
        flex-direction: column;
        gap: 6px;
    }
    
    .resume-details {
        flex-direction: column;
        gap: 6px;
    }
    
    .tier {
        text-align: left;
    }
    
    .profile-contact {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .skill-list {
        gap: 6px;
    }
    
    .skill-item {
        padding: 5px 12px;
        font-size: 0.85rem;
    }

    /* Simplified Contact Page Mobile Styles */
    .contact-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .contact-intro {
        font-size: 1.7rem;
    }
    
    .contact-send-button {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .contact-label {
        min-width: 80px;
        font-size: 0.95rem;
    }
    
    .contact-item {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
    
    .availability-item {
        padding: 12px;
    }

    /* Mobile adjustments for grouped education */
    .institution-header {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    
    .education-subitems {
        margin-left: 15px;
    }
    
    .education-subitem {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
        margin-bottom: 6px;
    }
    
    .subitem-main {
        flex-direction: column;
        gap: 1px;
        align-items: flex-start;
    }
    
    .subitem-date {
        font-size: 0.8rem;
        margin-top: 2px;
    }
    
    .institution {
        font-size: 1.1rem;
    }
}
