:root {
    --primary-dark: #2C3344;
    --primary-accent: #0f0f1f;
    --secondary-light: #45558D;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    background-image: url('/assets/nebula-stars.jpg');
    background-repeat: repeat;
    background-attachment: fixed;
}

/* Navbar styling */
.navbar {
    background-color: var(--primary-dark) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: #ffffff !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff !important;
}

.navbar-nav .nav-link.active {
    color: #FFD43B !important;
    font-weight: 600;
}

.navbar-nav .nav-link.active:hover {
    color: #ffffff !important;
}

/* Header section */
.header-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-accent) 100%);
    color: white;
    padding: 20px 20px 20px;
    text-align: center;
    margin-top: 40px;
}

.header-section-name {
    color: goldenrod;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1px;
}

.header-section-page {
    color: #bbbbbb;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header-section-quote {
    font-size: 1.1rem;
    opacity: 0.75;
    margin-top: 4px;
    margin-bottom: 20px;
}

.header-emphasis {
    color: #b0b0b0;
    font-weight: 700;
}

.spock-icon {
    font-size: 3rem;
    color: #ffc107;
    margin-left: 15px;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Main content area */
.content-wrapper {
    padding: 60px 20px;
}

.subsection {
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.subsection:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.subsection-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    padding: 10px 15px;
    font-size: 0.95rem;
    font-weight: 500;
}

.caption-text {
    padding: 10px 0;
}

.subsection-image img {
    width: 100%;
    height: auto;
    display: block;
}

.subsection-content {
    display: flex;
    flex-direction: column;
}

.subsection-content h2 {
    margin-top: 0;
}

.subsection-full-width {
    grid-template-columns: 1fr;
}

.subsection-header {
    display: block;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid;
    border-color: currentColor;
}

.subsection-header h2 {
    margin-bottom: 0;
    padding-bottom: 15px;
    color: #FFD43B;
    border-bottom: 2px solid rgba(255, 212, 59, 0.3);
}

.subsection-dark .subsection-header {
    border-color: rgba(255, 212, 59, 0.3);
}

.subsection-light .subsection-header {
    border-color: rgba(255, 212, 59, 0.3);
}

.subsection-image-right {
    order: 2;
}

.subsection-image-left {
    order: -1;
}

.subsection-dark {
    background-color: var(--primary-dark);
    color: #ffffff;
}

.subsection-light {
    background-color: var(--secondary-light);
    color: #ffffff;
}

.subsection h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 2px;
    color: #FFD43B;
    border-bottom: 2px solid rgba(255, 212, 59, 0.3);
}

.subsection h3 {
    color: goldenrod;
    margin-top: .25em;
}

.subsection p {
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.project-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.subsection-dark .project-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.project-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.project-card-content {
    padding: 20px;
}

.project-card-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: goldenrod;
}

.project-card-employer {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: lightgray;
}

.project-card-employer i {
    margin-right: 6px;
}

.subsection-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1em;
}

audio {
    width: 100%;
    max-width: 100%;
}

.subsection-button {
    display: block;
    width: fit-content;
    margin-top: 20px;
    margin-left: auto;
    padding: 10px 25px;
    background-color: #ffc107;
    color: #1a1a2e;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.subsection-button:hover {
    background-color: #ffb300;
    color: #1a1a2e;
    text-decoration: none;
    transform: translateY(-2px);
}

.subsection-dark .subsection-button {
    background-color: #ffc107;
    color: #1a1a2e;
}

.subsection-light .subsection-button {
    background-color: #1a1a2e;
    color: #ffffff;
}

.subsection-light .subsection-button:hover {
    background-color: #16213e;
}

/* Button alignment based on image position */
.subsection-image-left + .subsection-content .subsection-button {
    margin-left: auto;
    margin-right: 0;
}

.subsection-content:has(+ .subsection-image-right) .subsection-button {
    margin-left: 0;
    margin-right: auto;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 20px 20px;
    text-align: center;
    margin-top: 60px;
}

footer p {
    margin-bottom: 10px;
}

.footer-links {
    margin-top: 4px;
    margin-bottom: 4px;
}

.footer-links a {
    color: #ffc107;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-section h1 {
        font-size: 2rem;
    }

    .header-section p {
        font-size: 1rem;
    }

    .spock-icon {
        font-size: 2rem;
        display: block;
        margin-left: 0;
        margin-top: 15px;
    }

    .subsection {
        padding: 30px;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .subsection-image-right,
    .subsection-image-left {
        order: 0;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
