/* Personal Site - Clean, Full Width */

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

:root {
    --text: #1a1a1a;
    --text-muted: #666;
    --link: #0066cc;
    --link-hover: #004499;
    --bg: #fafafa;
    --border: #e0e0e0;
    --box-bg: #fff;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

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

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.nav a {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

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

/* Contact Dropdown */
.contact-dropdown {
    position: relative;
}

.contact-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    min-width: 200px;
}

.contact-popup.show {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-popup a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.contact-popup a:hover {
    background: var(--bg);
    color: var(--link);
}

/* Intro */
.intro {
    max-width: 800px;
    margin-bottom: 4rem;
}

.lead {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-size: 1.75rem;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.intro p {
    margin-bottom: 1rem;
}

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

.intro a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s;
}

.intro a:hover {
    text-decoration-color: var(--link);
}

.intro strong {
    font-weight: 600;
}

/* Sections */
section {
    margin-bottom: 3.5rem;
}

h2 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Work */
.work {
    max-width: 800px;
}

.job {
    margin-bottom: 2rem;
}

.job:last-child {
    margin-bottom: 0;
}

.job-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.job-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.job p {
    color: var(--text);
}

.job ul, .project-box ul {
    margin-top: 0.5rem;
    padding-left: 0;
    list-style: none;
}

.job li, .project-box li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    color: var(--text);
}

.job li::before, .project-box li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.project-box {
    background: var(--box-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}

.project-box .project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-box .project-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.project-box .project-tech {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-box p {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.project-box ul {
    flex: 1;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--link);
    text-decoration: none;
    transition: color 0.15s;
}

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

/* Details Grid */
.details {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

h3 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.detail-item {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item strong {
    font-weight: 500;
}

/* Elsewhere */
.elsewhere {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.links a {
    color: var(--link);
    text-decoration: none;
    font-size: 0.95rem;
}

.links a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* PDF Header - only shown in PDF mode */
.pdf-header {
    display: none;
}

/* ========================================
   PDF MODE - Clean One-Page Resume
   ======================================== */

body.pdf-mode {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 9pt;
    line-height: 1.3;
    background: white;
    color: #000;
}

body.pdf-mode .container {
    max-width: 100%;
    padding: 0;
}

/* Reorder sections in PDF: Work, Details, then Projects at bottom */
body.pdf-mode #resume-content {
    display: flex;
    flex-direction: column;
}

body.pdf-mode .pdf-header { order: 1; }
body.pdf-mode .work { order: 2; }
body.pdf-mode .details { order: 3; }
body.pdf-mode .projects { order: 4; }

/* Hide web-only elements in PDF */
body.pdf-mode .site-header,
body.pdf-mode .lead,
body.pdf-mode .intro,
body.pdf-mode .elsewhere,
body.pdf-mode .footer,
body.pdf-mode .project-link {
    display: none;
}

/* Show PDF header */
body.pdf-mode .pdf-header {
    display: block;
    text-align: center;
    margin-bottom: 10pt;
    padding-bottom: 6pt;
    border-bottom: 2px solid #000;
}

body.pdf-mode .pdf-header h1 {
    font-family: Georgia, serif;
    font-size: 18pt;
    font-weight: bold;
    margin-bottom: 4pt;
    letter-spacing: 0.1em;
    color: #000;
}

body.pdf-mode .pdf-header .contact {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9pt;
    color: #000;
}

body.pdf-mode .pdf-header .contact a {
    color: #000;
    text-decoration: none;
}

body.pdf-mode .pdf-header .contact span {
    margin: 0 6pt;
    color: #666;
}

body.pdf-mode .pdf-header .pdf-summary {
    margin-top: 6pt;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8.5pt;
    color: #000;
    line-height: 1.35;
}

/* Sections */
body.pdf-mode section {
    margin-bottom: 12pt;
}

body.pdf-mode h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9pt;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4pt;
    padding-bottom: 1pt;
    border-bottom: 1px solid #000;
    color: #000;
}

/* Work Experience */
body.pdf-mode .work {
    max-width: 100%;
    margin-top: 4pt;
}

body.pdf-mode .job {
    margin-bottom: 10pt;
}

body.pdf-mode .job-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9.5pt;
    font-weight: bold;
    margin-bottom: 0pt;
    color: #000;
}

body.pdf-mode .job-meta {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8.5pt;
    color: #444;
    margin-bottom: 3pt;
}

body.pdf-mode .job ul {
    margin-top: 2pt;
}

body.pdf-mode .job li {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8.5pt;
    padding-left: 8pt;
    margin-bottom: 1pt;
    line-height: 1.25;
    color: #000;
}

body.pdf-mode .job li::before {
    content: '•';
    color: #000;
}

/* Projects - Stacked vertically */
body.pdf-mode .projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12pt;
}

body.pdf-mode .project-box {
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
}

body.pdf-mode .project-box .project-header {
    margin-bottom: 3pt;
}

body.pdf-mode .project-box .project-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9.5pt;
    font-weight: bold;
    color: #000;
}

body.pdf-mode .project-box .project-tech {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8.5pt;
    color: #444;
}

body.pdf-mode .project-box p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8pt;
    margin-bottom: 2pt;
    color: #000;
}

body.pdf-mode .project-box ul {
    margin-top: 2pt;
}

body.pdf-mode .project-box li {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8pt;
    padding-left: 8pt;
    margin-bottom: 1pt;
    line-height: 1.2;
    color: #000;
}

body.pdf-mode .project-box li::before {
    content: '•';
}

/* Details Grid */
body.pdf-mode .details {
    padding-top: 10pt;
    border-top: none;
    margin-bottom: 12pt;
}

body.pdf-mode .details-grid {
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 8pt;
}

body.pdf-mode h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9pt;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4pt;
    color: #000;
}

body.pdf-mode .detail-item {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8pt;
    line-height: 1.3;
    margin-bottom: 3pt;
    color: #000;
}

body.pdf-mode .detail-item strong {
    font-weight: bold;
}

/* Print */
@media print {
    body {
        background: white;
        font-size: 11pt;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .nav a[onclick],
    .footer {
        display: none;
    }

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

    section {
        margin-bottom: 1.5rem;
    }

    .projects-grid {
        gap: 1rem;
    }

    .project-box {
        padding: 1rem;
    }
}

/* Tablet */
@media (max-width: 900px) {
    .container {
        padding: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1.25rem 3rem;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .lead {
        font-size: 1.4rem;
    }

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