/* Modern Professional CV Styles */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Sophisticated Vibrant (from your palette) */
    --primary-color: #1B4B5A;      /* Deep teal (darkened for professionalism) */
    --secondary-color: #00D4AA;    /* Turquoise green */
    --accent-color: #F6C90E;       /* Golden yellow */
    --text-primary: #1B2937;       /* Very dark blue-gray */
    --text-secondary: #4A6B7C;     /* Medium teal-gray */
    --text-light: #7A9CAF;         /* Light blue-gray */
    --background-light: #F8FDFC;   /* Very light teal tint */
    --border-color: #E0F2EF;       /* Soft turquoise border */
    --white: #ffffff;
    
    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Helvetica Neue', Arial, sans-serif;
    --font-headings: 'Playfair Display', 'Georgia', serif;
    --font-headings: 'Playfair Display', 'Georgia', serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Body and Layout */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white);
    font-size: 16px;
    position: relative;
}

/* Headshot positioning */
body::before {
    content: '';
    position: absolute;
    top: 1rem;
    right: 2rem;
    width: 120px;
    height: 120px;
    background-image: url('headshot.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: var(--spacing-2xl) var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

p {
  margin-bottom: var(--spacing-xs);
}

.hide-old .old {
    display: none;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

header h1 {
    font-family: var(--font-headings);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-right: 140px; /* Space for headshot */
    position: relative;
    z-index: 2;
}

/* Navigation */
#cv-navigation {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: var(--spacing-lg);
    z-index: 100;
    max-width: 200px;
}

#cv-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#cv-navigation li {
    margin-bottom: var(--spacing-sm);
}

#cv-navigation li:last-child {
    margin-bottom: 0;
}

#cv-navigation a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

#cv-navigation a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

#cv-navigation a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Main content */
main {
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    margin-left: 240px; /* Space for fixed navigation */
}

/* Section Styling */
section {
    background: var(--white);
    margin-bottom: var(--spacing-xs);
}

/* Section Headers */
section h2 {
    font-family: var(--font-headings);
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--accent-color);
    position: relative;
}

section h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Article (Job Experience) Cards */
article {
    background: var(--background-light);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

article:hover {
    border-left-color: var(--secondary-color);
}

article h3 {
    font-family: var(--font-headings);
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

article h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

article p {
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    line-height: 1.7;
}

article p strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Keywords/Skills Tags */
.keywords {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.keywords li {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Personal Data Section */
.personal-data dl {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xs) var(--spacing-md);
    align-items: baseline;
}

.personal-data dt {
    font-weight: 600;
    color: var(--text-primary);
}

.personal-data dd {
    color: var(--text-secondary);
}

.personal-data dd ul {
    list-style: none;
    padding: 0;
}

.personal-data dd li {
    margin-bottom: var(--spacing-xs);
}

/* Education Section */
.education dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--spacing-md) var(--spacing-lg);
    align-items: baseline;
}

.education dt {
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
    padding-right: var(--spacing-md);
    border-right: 2px solid var(--accent-color);
}

.education dd {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Links and Typography */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Open Source Section Special Styling */
.opensource ul li {
    margin-bottom: var(--spacing-sm);
    padding-left: var(--spacing-md);
    position: relative;
    list-style: none;
}

.opensource ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.opensource strong {
    color: var(--primary-color);
}

.section-content {
    column-count: 2;
}

@media (max-width: 1600px) {
    .section-content {
        column-count: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {

    /* Move navigation below header on narrower screens */
    #cv-navigation {
        position: static;
        transform: none;
        max-width: none;
        padding: 0 var(--spacing-md) var(--spacing-md) 0;
        left: auto;
        top: auto;
    }
    
    #cv-navigation ul {
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-xs);
        justify-content: center;
    }
    
    #cv-navigation li {
        margin-bottom: 0;
    }
    
    #cv-navigation a {
        padding: var(--spacing-xs) var(--spacing-sm);
        white-space: nowrap;
    }
    
    #cv-navigation a:hover {
        transform: translateY(-2px);
    }
    
    main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    body::before {
        width: 80px;
        height: 80px;
        top: 1rem;
        right: 1rem;
    }
    
    header {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    header h1 {
        margin-right: 90px;
        font-size: 2rem;
    }
    
    main {
        padding: 0 var(--spacing-md);
    }
    
    #cv-navigation a {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    section {
        padding: var(--spacing-md);
    }
    
    .personal-data dl,
    .education dl {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .education dt {
        text-align: left;
        border-right: none;
        padding-right: 0;
        padding-bottom: var(--spacing-xs);
    }
    
    .keywords {
        gap: var(--spacing-xs);
    }
    
    .keywords li {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    body::before {
        width: 60px;
        height: 60px;
    }
    
    header h1 {
        margin-right: 70px;
        font-size: 1.75rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    article h3 {
        font-size: 1.125rem;
    }
}

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Print styles hint (main styles in print.css) */
@media print {
    body::before {
        display: none;
    }
}
