@font-face {
    font-family: 'Space Grotesk';
    src: url('/Space_Grotesk/SpaceGrotesk-VariableFont_wght.ttf') format('truetype');
    font-weight: 300 700;
    font-style: normal;
}

:root {
    --sys-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --grotesk: 'Space Grotesk', sans-serif;
    --text-color: #111;
    --bg-color: #fff;
    --border-color: #ccc;
    --link-color: #111;
}

* {
    box-sizing: border-box;
}

/* Print Styles */
.print-layout {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
}

.print-page-break {
    page-break-before: always;
}

.print-cover {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.print-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.print-subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 2rem;
}

.print-bio ul {
    font-size: 1.1rem;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.print-skill-category h3 {
    margin-bottom: 0.25rem;
}

.print-skill-category p {
    margin: 0 0 1rem 0;
    color: #444;
}

.print-project h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    margin-top: 2rem;
}

.print-project-skills {
    font-family: var(--sys-font);
    font-style: italic;
    color: #666;
    margin: 0 0 0.5rem 0;
}

.print-project-meta {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
}

.print-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 2rem;
}

.print-images img {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
    object-fit: cover;
    aspect-ratio: 4/3;
}

@media print {
    body {
        background-color: white;
        font-size: 0.85rem;
    }
    .print-layout {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    .print-title {
        font-size: 2.5rem;
    }
    .print-subtitle {
        font-size: 1.25rem;
    }
    .print-project h2 {
        font-size: 1.75rem;
    }
    .print-images {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--sys-font);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--grotesk);
    margin-top: 0;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }
}

/* Homepage Grid */
.home-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .home-layout {
        grid-template-columns: 300px 1fr;
        gap: 4rem;
    }
}

@media (max-width: 767px) {
    .home-layout .skills-section {
        display: none;
    }
}

/* Profile Sidebar */
.profile-section {
    font-family: var(--sys-font);
}

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

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

.profile-name {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.profile-subtitle {
    font-family: monospace;
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.profile-bio {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-left: 0;
    list-style: none;
}
.profile-bio li::before {
    content: "- ";
}

.skills-section {
    margin-bottom: 2rem;
}

.skill-category {
    margin-bottom: 1rem;
}

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

.skill-list {
    font-size: 0.9rem;
    color: #444;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .social-links {
        justify-content: flex-start;
    }
}

.social-icon {
    width: 24px;
    height: 24px;
}

/* Projects Section */
.projects-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-areas: 
        "thumb title"
        "skills skills";
    column-gap: 1.5rem;
    align-items: center;
    border: 1px solid var(--border-color);
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    background: #fff;
}

@media (min-width: 768px) {
    .project-card {
        grid-template-areas: 
            "thumb title"
            "thumb skills";
        grid-template-rows: 1fr 1fr;
    }
    .project-title {
        align-self: end;
        margin-bottom: 0.25rem;
    }
    .project-skills {
        align-self: start;
        margin-top: 0.25rem;
    }
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-decoration: none;
}

.project-thumb {
    grid-area: thumb;
    width: 120px;
    height: 90px;
    object-fit: cover;
    background: #eee;
    border: 1px solid var(--border-color);
}

.project-title {
    grid-area: title;
    font-size: 1.25rem;
    margin: 0;
    padding-right: 4.5rem; /* Space for the featured badge */
}

.project-skills {
    grid-area: skills;
    font-family: var(--sys-font);
    font-style: italic;
    font-size: 0.85rem;
    color: #888;
    margin: 0.5rem 0 0 0;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-family: var(--sys-font);
}

/* Project Detail Page */
.project-detail-layout {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    margin-bottom: 1rem;
    font-family: var(--sys-font);
}

.back-icon {
    width: 16px;
    height: 16px;
}

.detail-header {
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.detail-skills {
    font-family: monospace;
    color: #666;
    margin: 0 0 0.1rem 0;
}

.detail-meta {
    margin: 0;
    font-size: 0.95rem;
}

.detail-meta a {
    color: #888;
}

.detail-meta a:hover {
    color: #555;
}

.detail-content {
    font-family: var(--sys-font);
    line-height: 1.6;
    margin-bottom: 3rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

.image-grid img {
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    object-fit: cover;
    aspect-ratio: 4/3;
}

.pdf-container {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pdf-button {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.pdf-button:hover {
    background: #ebebeb;
    color: #333;
    text-decoration: none;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}