/* 
  General Styles 
*/
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --accent-color: #2563eb;
    --border-color: #e5e7eb;
    --max-width: 900px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: "Georgia", Times, serif;
}

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: 2rem 1rem;
}

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

a:hover {
    opacity: 0.8;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* 
  Index Page Styles 
*/
header {
    text-align: center;
    margin-bottom: 4rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

header p.title {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
}

.social-links li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

section {
    margin-bottom: 4rem;
}

section h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.about p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    margin-bottom: 0.5rem;
}

.project-card .tech-stack {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.project-card p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

footer {
    text-align: center;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* 
  Resume Page Styles (LaTeX Style)
*/
.resume-body {
    background-color: #f3f4f6;
    padding: 4rem 1rem;
}

.resume-paper {
    background-color: #fff;
    max-width: 850px;
    margin: 0 auto;
    padding: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-family: var(--font-serif);
    color: #000;
}

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

.resume-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
}

.resume-contact {
    font-size: 0.9rem;
    color: #333;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.resume-contact span:not(:last-child)::after {
    content: "|";
    margin-left: 0.75rem;
    color: #ccc;
}

.resume-section {
    margin-bottom: 1.25rem;
}

.resume-section h2 {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid #000;
    margin-bottom: 0.5rem;
    padding-bottom: 2px;
}

.resume-item {
    margin-bottom: 0.75rem;
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 700;
    margin-bottom: 2px;
}

.resume-item-subheader {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.resume-item ul {
    list-style-type: disc;
    margin-left: 1.25rem;
    font-size: 0.9rem;
}

.resume-item li {
    margin-bottom: 2px;
}

.skills-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
}

.skills-category {
    font-weight: 700;
}

.coursework-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.course-tag {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.resume-nav {
    max-width: 850px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    justify-content: space-between;
}

.btn-print {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-sans);
}

.btn-print:hover {
    background: #f9fafb;
}

/* 
  Print Styles 
*/
@media print {
    body {
        padding: 0;
        background-color: #fff;
    }

    .resume-body {
        padding: 0;
        background-color: #fff;
    }

    .resume-paper {
        box-shadow: none;
        padding: 0;
        width: 100%;
        max-width: none;
    }

    .resume-nav, .btn-print {
        display: none !important;
    }

    a {
        text-decoration: none;
        color: #000;
    }

    .course-tag {
        border: none;
        background: transparent;
        padding: 0;
    }
    
    .course-tag::after {
        content: ", ";
    }
    
    .course-tag:last-child::after {
        content: "";
    }
}

/* 
  Responsive Adjustments 
*/
@media (max-width: 640px) {
    header h1 {
        font-size: 2rem;
    }
    
    .resume-paper {
        padding: 1.5rem;
    }
    
    .resume-item-header, .resume-item-subheader {
        flex-direction: column;
    }
    
    .resume-item-header span:last-child, 
    .resume-item-subheader span:last-child {
        font-weight: 400;
        font-style: normal;
        font-size: 0.8rem;
        color: var(--text-muted);
    }
}

/* default: show all 4 */
.item {
  display: inline-block;
}

/* small screens: hide 2 items */
@media (max-width: 600px) {
  .item:nth-child(n+3) {
    display: none;
  }
}