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

:root {
    --bg-color: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #E0E0E0;
    --link-color: #0066CC;
    --link-hover: #004499;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 16px;
    padding-top: 60px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 1px;
}

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

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

/* Hero Section */
.hero {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-content-wrapper {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.hero-headshot {
    flex-shrink: 0;
    width: 200px;
}

.hero-headshot img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-name {
    font-family: 'Merriweather', serif;
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    line-height: 1.8;
    text-align: justify;
}

.contact-info {
    margin-top: 2rem;
}

.contact-info table {
    width: 100%;
    border-collapse: collapse;
}

.contact-info td {
    padding: 8px 0;
    vertical-align: top;
    font-size: 0.95rem;
}

.contact-info td:first-child {
    width: 120px;
    color: var(--text-secondary);
}

.contact-info a {
    color: var(--link-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Section Styles */
.section {
    padding: 50px 0;
    border-bottom: 1px solid var(--border-color);
}

.section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-family: 'Merriweather', serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.section-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* News Section */
.news-table {
    width: 100%;
    border-collapse: collapse;
}

.news-table tr {
    border-bottom: 1px solid var(--border-color);
}

.news-table tr:last-child {
    border-bottom: none;
}

.news-date {
    padding: 15px 20px 15px 0;
    vertical-align: top;
    width: 100px;
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.news-table td:last-child {
    padding: 15px 0;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Experience Section */
.experience-item {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

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

.experience-content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.experience-image {
    flex-shrink: 0;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.experience-image:empty {
    display: none;
}

.experience-image img {
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    display: block;
    object-fit: contain;
}

.experience-text {
    flex: 1;
    min-width: 0;
}

.experience-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.experience-header h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
}

.company {
    color: var(--text-secondary);
    font-weight: 400;
}

.period-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.experience-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.experience-list li {
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    line-height: 1.8;
    text-align: justify;
}

.experience-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}

/* OpenEd Videos */
.opened-videos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.video-wrapper {
    display: flex;
    flex-direction: column;
}

.video-wrapper video {
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    display: block;
}

.video-label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Projects Section */
.project-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.project-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.project-content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.project-media-left {
    flex-shrink: 0;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-media-left img,
.project-media-left video {
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    display: block;
}

.project-text {
    flex: 1;
    min-width: 0;
}

.project-item h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.project-meta a {
    color: var(--link-color);
}

.project-item p {
    color: var(--text-primary);
    line-height: 1.8;
    text-align: justify;
}

.project-links {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.skill-category h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-category p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.subsection-title {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.achievements-list {
    list-style: none;
    padding-left: 0;
}

.achievements-list li {
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.achievements-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}


/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.footer p {
    margin: 0;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Clickable Images */
.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    display: block;
    margin: 60px auto;
    max-width: 90%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    animation: modalZoom 0.3s ease;
}

@keyframes modalZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #ccc;
}

/* Responsive Design */

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }

    .nav-container {
        padding: 0 20px;
    }

    .experience-image {
        width: 240px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    body {
        padding-top: 50px;
        font-size: 15px;
    }

    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
        flex-wrap: wrap;
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .hero-content-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-headshot {
        width: 150px;
        margin: 0 auto;
    }

    .hero {
        padding: 40px 0;
    }

    .hero-name {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .contact-info {
        overflow-x: auto;
    }

    .contact-info table {
        font-size: 0.9rem;
    }

    .contact-info td:first-child {
        width: 100px;
        white-space: nowrap;
    }

    .news-table {
        display: block;
        overflow-x: auto;
    }

    .news-date {
        width: 80px;
        padding-right: 15px;
        white-space: nowrap;
    }

    .experience-content-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .experience-image {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

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

    .experience-header h3 {
        font-size: 1.1rem;
    }

    .opened-videos {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .project-content-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .project-media-left {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .project-item h3 {
        font-size: 1.1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    body {
        padding-top: 45px;
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .nav-container {
        padding: 0 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nav-logo {
        font-size: 1rem;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.8rem;
        font-size: 0.85rem;
        width: 100%;
    }

    .hero {
        padding: 30px 0;
    }

    .hero-name {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .section {
        padding: 30px 0;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    .contact-info table {
        font-size: 0.85rem;
        display: block;
    }

    .contact-info tr {
        display: block;
        margin-bottom: 0.8rem;
    }

    .contact-info td {
        display: block;
        padding: 2px 0;
    }

    .contact-info td:first-child {
        width: 100%;
        font-weight: 600;
        margin-bottom: 2px;
    }

    .news-table {
        display: block;
    }

    .news-table tr {
        display: block;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
    }

    .news-date {
        display: block;
        width: 100%;
        padding: 0 0 5px 0;
        font-weight: 600;
    }

    .news-table td:last-child {
        display: block;
        padding: 0;
        font-size: 0.9rem;
    }

    .experience-content-wrapper {
        gap: 1.2rem;
    }

    .experience-image {
        max-width: 100%;
    }

    .experience-image img {
        width: 100%;
    }

    .experience-header h3 {
        font-size: 1rem;
    }

    .experience-list li {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .opened-videos {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .video-wrapper video {
        width: 100%;
    }

    .project-content-wrapper {
        gap: 1rem;
    }

    .project-media-left {
        max-width: 100%;
    }

    .project-item h3 {
        font-size: 1rem;
    }

    .project-meta {
        font-size: 0.85rem;
    }

    .project-item p {
        font-size: 0.9rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skill-category h3 {
        font-size: 1rem;
    }
}

/* Small mobile */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }

    .nav-container {
        padding: 0 10px;
    }

    .hero-name {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .nav-menu {
        font-size: 0.8rem;
        gap: 0.6rem;
    }
}
