/* Base Styles */
:root {
    --black: #1a1a1a;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #eaeaea;
    --off-white: #f8f8f8;
    --white: #ffffff;
    --border: 1px solid #e0e0e0;
    --accent-color: #FF3B30;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    font-size: 16px;
    font-weight: 400;
    max-width: 100%;
    overflow-x: hidden;
    max-width: 650px;
    margin: 0 auto;
    padding: 2rem;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--dark-gray);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style-position: inside;
    color: #555;
    margin: 0 0 1.5rem;
    padding-left: 1.2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--black);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0;
}

h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--dark-gray);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--medium-gray);
    margin: 1.5rem 0 1.5rem;
    letter-spacing: 0.01em;
}

h4::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--black);
}

p {
    color: #555;
    margin-bottom: 1rem;
}

/* Header */
header {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--black);
}

nav {
    width: 100%;
}

.menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    padding: 0;
    margin: 0;
}

.menu a {
    color: var(--medium-gray);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s;
}

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

.menu a.active {
    color: var(--accent-color);
    font-weight: 500;
}

/* Intro / Profile */
.intro {
    margin-bottom: 3rem;
}

.profile {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.bio {
    flex: 1;
}

.bio h2 {
    margin-bottom: 0.5rem;
}

.bio p {
    margin-bottom: 0;
}

/* Projects */
.projects {
    margin-bottom: 3rem;
}

.project-item {
    display: flex;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.project-date {
    min-width: 50px;
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.project-content h4 {
    margin-bottom: 0.25rem;
}

.project-content p {
    margin-bottom: 0.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.tags a, .tags span {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    background-color: var(--light-gray);
    color: var(--medium-gray);
    border-radius: 10px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tags a:hover {
    background-color: var(--medium-gray);
    color: var(--white);
    text-decoration: none;
}

/* About */
.about {
    margin-bottom: 3rem;
}

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

.work-experience, .education-section {
    margin-bottom: 3rem;
}

.work-experience h3, .education-section h3 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: var(--border);
}

.exp-item, .edu-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--light-gray);
    align-items: baseline;
}

.exp-item:last-child, .edu-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.exp-date {
    font-size: 0.9rem;
    color: var(--medium-gray);
    font-weight: 500;
}

.exp-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.exp-role h4 {
    font-size: 1.25rem;
    color: var(--dark-gray);
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

.exp-role h4 a {
    color: var(--black);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

.exp-role h4 a:hover {
    color: var(--accent-color);
}

.exp-details ul {
    list-style-type: disc;
    margin: 0;
    padding-left: 1.2rem;
}

.exp-details ul li {
    color: var(--medium-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.exp-details ul li:last-child {
    margin-bottom: 0;
}

.exp-details p {
    margin: 0 0 0.5rem 0;
    color: var(--medium-gray);
    font-size: 0.95rem;
}

.exp-details p:last-child {
    margin-bottom: 0;
}

.exp-item a, .edu-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.exp-item a:hover, .edu-item a:hover {
    text-decoration: underline;
}

/* Education */
.education {
    margin-bottom: 3rem;
}

.edu-content p {
    margin-bottom: 0.25rem;
}

/* Skills */
.skills {
    margin-bottom: 3rem;
}

.skills-group {
    margin-bottom: 1.5rem;
}

.skills-group h4 {
    margin-bottom: 0.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.skills-list span {
    background-color: var(--light-gray);
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 3px;
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--medium-gray);
    border-top: var(--border);
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .profile {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        text-align: center;
    }
    
    .profile-image {
        margin: 0 auto;
    }
    
    .bio {
        text-align: center;
    }
    
    .work-experience h3, .education-section h3 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .exp-item, .edu-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-bottom: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .exp-date {
        margin-bottom: 0.5rem;
    }

    .exp-content {
        gap: 1rem;
    }

    .exp-role h4 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .menu {
        gap: 1rem;
    }

    body {
        padding: 1rem;
    }

    .work-experience h3, .education-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }

    .exp-item ul {
        margin-left: 1rem;
    }
}

/* Thesis Page Styles */
.thesis {
    margin-bottom: 3rem;
}

.thesis-header {
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--medium-gray);
    text-decoration: none;
    font-size: 0.95rem;
}

.back-link:hover {
    color: var(--black);
    text-decoration: underline;
}

.thesis-header h2 {
    color: var(--medium-gray);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.thesis-header h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.thesis-meta {
    color: var(--medium-gray);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.thesis-meta p {
    margin-bottom: 0.25rem;
}

.thesis-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: none;
    padding-bottom: 0;
}

.thesis-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.thesis-content li {
    margin-bottom: 0.5rem;
}

/* PDF Download and Preview Styles */
.thesis-download {
    margin: 2rem 0;
    text-align: center;
    background-color: var(--off-white);
    padding: 2rem;
    border-radius: 4px;
}

.thesis-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--black);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.button:hover {
    background-color: var(--dark-gray);
    text-decoration: none;
}

.thesis-embed {
    margin: 1.5rem 0 3rem;
}

.thesis-embed iframe {
    border: 1px solid var(--light-gray);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    height: 600px;
}

@media (max-width: 768px) {
    .thesis-embed iframe {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .thesis-embed iframe {
        height: 300px;
    }
    
    .thesis-buttons {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
        text-align: center;
    }
}

/* Toggle Preview Button */
.toggle-preview {
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    margin-top: 2rem;
}

.toggle-icon {
    margin-left: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
}

.toggle-preview:hover {
    color: var(--medium-gray);
}

/* Thesis Figure Styles */
.thesis-figure {
    margin: 2rem 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.thesis-figure img {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 auto;
    display: block;
}

.figure-caption {
    margin-top: 0.75rem;
    color: var(--medium-gray);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

/* Add proper company logo styling */
.company-logo {
    width: 20px;
    height: auto;
    vertical-align: middle;
    margin-left: 5px;
}

@media (max-width: 768px) {
    .thesis-figure img {
        max-width: 100%;
    }
}

/* Additional styles for multi-page layout */

/* Home page highlights */
.home-links {
    margin-top: 1.5rem;
}

.text-link {
    color: var(--black);
    font-weight: 500;
    margin-right: 1.5rem;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 1.5rem;
}

.highlight-card {
    padding: 1.5rem;
    background-color: var(--off-white);
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.highlight-card:hover {
    transform: translateY(-5px);
}

.highlight-card h4 {
    margin-bottom: 0.75rem;
}

/* Page headers */
.page-header {
    margin-bottom: 2.5rem;
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
}

/* Project sections */
.project-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: var(--border);
}

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

.project-section h3 {
    border-bottom: none;
    padding-bottom: 0;
}

.project-section h4 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.project-section h5 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
}

.project-meta {
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
}

/* Thesis project specific */
.thesis-project {
    padding-bottom: 0;
}

.thesis-figure {
    margin: 2rem 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.thesis-figure img {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 auto;
    display: block;
}

.figure-caption {
    margin-top: 0.75rem;
    color: var(--medium-gray);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

@media (max-width: 768px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

/* Additional styles for new pages */

/* About page */
.about-intro {
    margin-bottom: 1rem;
}

.about-content {
    margin-bottom: 3rem;
}

.about-content p {
    margin-bottom: 1.25rem;
}

/* Work Experience & Education */
.work-experience, .education-section {
    margin-bottom: 3rem;
}

.work-experience h3, .education-section h3 {
    margin-bottom: 1rem;
}

/* Responsive adjustments for new layouts */
@media (max-width: 768px) {
    .contact-section {
        grid-template-columns: 1fr;
    }
    
    .contact-form-container {
        order: 2;
    }
    
    .contact-info-sidebar {
        order: 1;
        margin-bottom: 1rem;
    }
}

/* Projects List Page Styles */
.project {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--light-gray);
}

.project:last-child {
    border-bottom: none;
}

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

.project-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    color: var(--dark-gray);
    text-decoration: none;
}

.project-date {
    font-size: 0.8rem;
    color: var(--medium-gray);
}

.project-title:hover {
    text-decoration: underline;
}

.project-description {
    margin: 0.25rem 0;
    color: #555;
    font-size: 0.9rem;
}

/* Individual Project Page Styles */
.project-page-header {
    margin-bottom: 3rem;
}

.project-page-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--black);
}

.project-page-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0.5rem 0 1.5rem;
}

.project-page-meta-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-page-company {
    font-size: 1rem;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-page-company span {
    color: var(--medium-gray);
}

.project-page-tags {
    color: var(--medium-gray);
    font-size: 0.95rem;
}

.project-page-meta-right {
    display: flex;
    gap: 1rem;
    font-size: 0.95rem;
}

.project-page-meta-right a {
    color: var(--medium-gray);
    text-decoration: none;
}

.project-page-meta-right a:hover {
    color: var(--black);
    text-decoration: underline;
}

/* Quote Styles */
.quote {
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--medium-gray);
}

/* Image and Caption Styles */
.caption {
    text-align: center;
    color: var(--medium-gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}

/* Image Preview Styles */
.image-preview-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    cursor: pointer;
}

.image-preview-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90vh;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.clickable-image {
    cursor: pointer;
    transition: opacity 0.2s;
}

.clickable-image:hover {
    opacity: 0.9;
}

/* Project Content */
.project-content {
    margin-bottom: 2rem;
}

/* Project Video */
.project-video {
    margin: 2rem 0;
}

.project-video video {
    width: 100%;
    border-radius: 4px;
}

/* Project Diagram */
.project-diagram {
    margin: 2rem 0;
}

.project-diagram img {
    width: 100%;
    border-radius: 4px;
}

/* About Page Styles */
.about-intro img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 0 2rem 0;
    border-radius: 4px;
}

.about-intro p {
    margin: 0 0 1.25rem 0;
}

/* Experience Page Styles */
.exp-item, .edu-item {
    margin-bottom: 1rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--light-gray);
}

.exp-item:last-child, .edu-item:last-child {
    border-bottom: none;
}

.exp-date, .edu-date {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-bottom: 0.5rem;
}

.company {
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

.exp-role .company a {
    color: var(--medium-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.exp-role .company a:hover {
    color: var(--black);
    text-decoration: none;
}

