/* ========================================
   Bernard Boateng Portfolio - CSS Design System
   Inspired by Murray Kang's academic portfolio
   ======================================== */

/* ========================================
   CSS Variables / Design Tokens
   ======================================== */
:root {
    --color-primary: #333333;
    --color-secondary: #7a8288;
    --color-link: #52adc8;
    --color-link-hover: #3d8fa8;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-border: #e8e8e8;

    --font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 16px;
    --font-size-small: 14px;
    --font-size-large: 18px;
    --line-height: 1.6;

    --sidebar-width: 250px;
    --content-max-width: 1100px;
    --nav-height: 60px;
    --spacing-unit: 1rem;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-primary);
    background-color: var(--color-bg);
}

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

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

/* ========================================
   Navigation
   ======================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

.nav-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--color-primary);
}

.nav-brand:hover {
    color: var(--color-link);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--color-secondary);
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: var(--color-link);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    transition: 0.3s;
}

.nav-toggle::before { top: 0; }
.nav-toggle span { top: 11px; }
.nav-toggle::after { bottom: 0; }

/* ========================================
   Page Layout
   ======================================== */
.page-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: calc(var(--nav-height) + 2rem) var(--spacing-unit) 2rem;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 3rem;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    height: fit-content;
}

.profile {
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-border);
    margin-bottom: 1rem;
    background: var(--color-bg-alt);
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.profile-title {
    color: var(--color-secondary);
    font-size: var(--font-size-small);
    margin-bottom: 0.25rem;
}

.profile-affiliation {
    color: var(--color-secondary);
    font-size: var(--font-size-small);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.contact-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    color: var(--color-secondary);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.contact-links a:hover {
    background: var(--color-link);
    color: white;
}

.cv-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-bg-alt);
    border-radius: 4px;
    color: var(--color-secondary);
    font-size: var(--font-size-small);
    transition: all 0.2s ease;
}

.cv-download:hover {
    background: var(--color-link);
    color: white;
}

.sidebar-section {
    text-align: center;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    min-width: 0;
}

.content-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

.content-section p strong {
    color: var(--color-primary);
}

/* Research Interests */
.research-interests {
    list-style: none;
    padding-left: 0;
}

.research-interests li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.research-interests li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--color-link);
    font-weight: bold;
    font-size: 1.1rem;
}

/* News List */
.news-list {
    list-style: none;
}

.news-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--color-border);
}

.news-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-date {
    flex-shrink: 0;
    min-width: 80px;
    color: var(--color-link);
    font-weight: 500;
    font-size: var(--font-size-small);
}

.news-content {
    color: var(--color-secondary);
    font-size: var(--font-size-small);
}

/* Timeline (Education) */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-link);
    border: 2px solid var(--color-bg);
}

.timeline-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-primary);
}

.timeline-content .institution {
    color: var(--color-secondary);
    margin-bottom: 0.25rem;
    font-size: var(--font-size-small);
}

.timeline-content .date {
    color: var(--color-link);
    font-size: var(--font-size-small);
    margin-bottom: 0.25rem;
}

.timeline-content .description {
    font-size: var(--font-size-small);
    color: var(--color-secondary);
    font-style: italic;
}

/* Experience */
.experience-item {
    margin-bottom: 1.75rem;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.experience-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.experience-date {
    color: var(--color-link);
    font-size: var(--font-size-small);
    white-space: nowrap;
}

.experience-org {
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    font-size: var(--font-size-small);
}

.experience-details {
    list-style: disc;
    padding-left: 1.25rem;
    color: var(--color-secondary);
}

.experience-details li {
    margin-bottom: 0.4rem;
    font-size: var(--font-size-small);
    line-height: 1.5;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.project-card {
    padding: 1.25rem;
    background: var(--color-bg-alt);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: box-shadow 0.2s ease;
}

.project-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.project-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-primary);
}

.project-subtitle {
    color: var(--color-link);
    font-size: var(--font-size-small);
    margin-bottom: 0.75rem;
}

.project-card > p {
    font-size: var(--font-size-small);
    color: var(--color-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    font-size: var(--font-size-small);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.section-footer {
    text-align: right;
    font-size: var(--font-size-small);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.skill-category h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--color-link);
}

.skill-category p {
    font-size: var(--font-size-small);
    color: var(--color-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    text-align: center;
    padding: 2rem var(--spacing-unit);
    border-top: 1px solid var(--color-border);
    color: var(--color-secondary);
    font-size: var(--font-size-small);
}

/* ========================================
   Projects Page Specific
   ======================================== */
.main-content.full-width {
    grid-column: 1 / -1;
    max-width: 800px;
    margin: 0 auto;
}

.projects-page-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.project-card-large {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--color-bg-alt);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.project-card-large h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.project-card-large h3 a {
    color: var(--color-primary);
}

.project-card-large h3 a:hover {
    color: var(--color-link);
}

.project-card-large p {
    color: var(--color-secondary);
    font-size: var(--font-size-small);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-card-large .project-links {
    margin-top: 0.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: var(--font-size-small);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 925px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        display: none;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .page-container {
        grid-template-columns: 1fr;
        padding-top: calc(var(--nav-height) + 1rem);
        gap: 2rem;
    }

    .sidebar {
        position: static;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 2rem;
    }

    .profile-photo {
        width: 140px;
        height: 140px;
    }

    .experience-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .news-list li {
        flex-direction: column;
        gap: 0.25rem;
    }

    .news-date {
        min-width: auto;
    }
}

/* ========================================
   Utilities
   ======================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
