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

:root {
    /* Brittany Chiang Inspired Dark Theme */
    --navy: #0a192f;
    --light-navy: #112240;
    --lightest-navy: #233554;
    --navy-shadow: rgba(2, 12, 27, 0.7);
    --dark-slate: #495670;
    --slate: #8892b0;
    --light-slate: #a8b2d1;
    --lightest-slate: #ccd6f6;
    --white: #e6f1ff;
    --green: #64ffda;
    --green-tint: rgba(100, 255, 218, 0.1);
    
    --bg-color: var(--navy);
    --text-color: var(--white);
    --text-secondary: var(--white);
    --text-tertiary: var(--white);
    --border-color: var(--lightest-navy);
    --link-color: var(--green);
    --link-hover: var(--white);
    --accent-blue: var(--green);
    --accent-blue-bright: var(--green);
    --accent-blue-light: var(--green-tint);
    --accent-blue-medium: var(--green);
    --accent-blue-dark: var(--green);
    --accent-blue-navy: var(--navy);
    --accent-gray: var(--slate);
    --accent-gray-light: var(--light-navy);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --max-width: 680px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
    counter-reset: section;
}

/* Typography */
h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-xs);
    color: var(--white);
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--green);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--white);
}

a:focus {
    outline: 2px solid var(--green);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Layout */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 1024px) {
    main {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg) var(--spacing-md);
        align-items: start;
        grid-auto-rows: min-content;
    }
    
    /* Row 1: Hero full width */
    .hero {
        grid-column: 1 / -1;
        grid-row: 1;
    }
    
    /* Row 2: Education | Work */
    #education {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
    }
    
    #work {
        grid-column: 2;
        grid-row: 2 / 5;
        align-self: start;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: fit-content;
        overflow: hidden;
    }
    
    .work-section {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    /* Row 3: Projects | Work continuation */
    #projects {
        grid-column: 1;
        grid-row: 3;
        align-self: start;
    }
    
    /* Row 4: Certifications | Work continuation */
    #certifications {
        grid-column: 1;
        grid-row: 4;
        align-self: start;
    }
}

@media (max-width: 768px) {
    main {
        padding: var(--spacing-xl) var(--spacing-sm);
    }
    
    h1 {
        font-size: 28px;
    }
}

/* Hero Section */
.hero {
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding: var(--spacing-lg);
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.hero-description {
    font-size: 18px;
    line-height: 1.6;
    color: var(--white);
    max-width: 600px;
    margin-top: var(--spacing-sm);
}

/* Social Links */
.social-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--white);
    border-radius: 4px;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
}

.social-links a:hover {
    color: var(--green);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* Content Sections */
.content-section {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: fit-content;
}

/* Section Separator */
.section-separator {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--lightest-navy);
    margin: var(--spacing-lg) 0;
    position: relative;
}

.section-separator::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 1px;
    background: var(--green);
    opacity: 0.5;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
    position: relative;
    padding-left: 40px;
    counter-increment: section;
}

.section-title::before {
    content: '0' counter(section) '.';
    position: absolute;
    left: 0;
    color: var(--green);
    font-size: 16px;
    font-weight: 400;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* Item Lists */
.item-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex-shrink: 1;
}

.item-list-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--lightest-navy);
    transition: all 0.2s ease;
}

.item-list-item:hover {
    border-bottom-color: var(--green);
    padding-left: var(--spacing-xs);
    background: var(--green-tint);
}

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

.item-list-item a {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    color: var(--white);
    transition: all 0.2s ease;
}

.item-list-item a:hover {
    color: var(--green);
}

.item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.item-title .external-icon {
    width: 12px;
    height: 12px;
    opacity: 0.6;
    margin-left: 4px;
    color: var(--green);
    transition: all 0.3s ease;
}

.item-list-item:hover .external-icon {
    opacity: 1;
    color: var(--green);
    transform: translate(2px, -2px);
}

.item-description {
    font-size: 13px;
    color: var(--white);
    line-height: 1.4;
}

.item-meta {
    font-size: 12px;
    color: var(--white);
    margin-top: 2px;
}

/* Work Section - styling handled by grid layout */

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.work-nav {
    display: flex;
    gap: var(--spacing-xs);
}

.work-nav-btn {
    background: transparent;
    border: 1px solid var(--green);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--green);
    font-size: 18px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.work-nav-btn:hover:not(:disabled) {
    background: var(--green-tint);
    color: var(--green);
    transform: translateY(-2px);
}

.work-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.work-container {
    overflow: hidden !important;
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 100%;
}

.work-list {
    transition: transform 0.3s ease;
    will-change: transform;
    display: flex;
    flex-direction: column;
}

/* Work Items */
.work-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--lightest-navy);
    transition: all 0.2s ease;
}

.work-item:hover {
    border-bottom-color: var(--green);
    background: var(--green-tint);
    padding-left: var(--spacing-xs);
    border-left: 3px solid var(--green);
}

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

.work-item a {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    width: 100%;
    color: var(--white);
    transition: all 0.2s ease;
}

.work-item a:hover {
    color: var(--green);
}

.work-logo {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--lightest-navy);
    border: 1px solid var(--lightest-navy);
    box-shadow: 0 2px 6px rgba(2, 12, 27, 0.5);
}

.work-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.work-company {
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
}

.work-role {
    font-size: 13px;
    color: var(--white);
}

.work-date {
    font-size: 12px;
    color: var(--white);
    white-space: nowrap;
    margin-bottom: 4px;
}

.work-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.work-skill-tag {
    font-size: 11px;
    color: var(--green);
    background: transparent;
    border: 1px solid var(--green);
    border-radius: 3px;
    padding: 2px 8px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.work-skill-tag:hover {
    background: var(--green-tint);
}

/* Skills */
.skills-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

@media (min-width: 1024px) {
    .skills-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skills-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.skills-group-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--lightest-navy);
}

.skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.skills-list li {
    font-size: 12px;
    color: var(--white);
    padding-left: var(--spacing-sm);
    position: relative;
}

.skills-list li::before {
    content: '▹ ';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: normal;
    font-size: 14px;
    line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .work-item {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-list-item,
.work-item,
.skills-group {
    animation: fadeIn 0.5s ease-out;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .social-links {
        display: none;
    }
}
