/* Appearance: color, fonts, layout, hover effects, animations*/

/*Applys to whole document */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling when clicking nav links, offset for the sticky header */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/*Navigation Bar*/
header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;

    background-color: rgba(250, 248, 244, 0.95);
    border-bottom: 1px solid rgba(26, 23, 20, 0.1);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    max-width: 1152px;
    height: 64px;

    margin: 0 auto;
    padding: 0 0px;
}

.logo {
    color: #1a1714;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;

    margin-left: auto;
}

.nav-links a {
    color: #7a766c;

    font-family: "DM Mono", monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    line-height: 1;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #1a1714;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: 28px;
    padding: 8px 16px;

    background-color: #22204a;
    color: #faf8f4;

    border: none;
    border-radius: 0;

    font-family: "DM Mono", monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    line-height: 1;
    letter-spacing: 0.08em;

    transition: opacity 0.2s ease;
}

.cv-btn:hover {
    opacity: 0.9;
}

/* Introduction Section */
.introduction {
    width: 100%;
    /* Left/right match the logo's position in the 1152px nav container */
    padding: 48px max(0px, calc((100vw - 1152px) / 2)) 60px;

    background-color: #faf8f4;
}

/* "Annalise Harms" */
.introduction h1 {
    max-width: 520px;
    margin: 20px 0 36px;

    font-family: "Fraunces", serif;
    font-weight: 650;
    font-size: 7rem;
    line-height: 0.9;
    letter-spacing: -0.05em;

    color: #171310;
}

/* "Junior Data Analyst - Munich" */
.introduction h2 {
    margin: 0 0 24px;

    font-family: "Courier New", Courier, monospace;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.32em;
    text-transform: uppercase;

    color: #22204a;
}

/* "A few sentences about me." */
.introduction p {
    max-width: 570px;
    margin: 0;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.08rem;
    font-weight: 400;
    line-height: 1.55;

    color: #777168;
}

/* About Me Section*/
.about {
    width: 100%;
    padding: 72px 40px 80px;

    background-color: #f2eee6;
}

/* Keeps the text aligned with the rest of the page */
.about {
    width: 100%;
    margin: 0;
    padding-top: 72px;
    /* Left/right match the logo's position in the 1152px nav container */
    padding-right: max(0px, calc((100vw - 1152px) / 2));
    padding-bottom: 80px;
    padding-left: max(0px, calc((100vw - 1152px) / 2));

    background-color: #f2eee6;
}

/* Small "ABOUT" label */
.about h2 {
    margin-bottom: 18px;

    font-family: "Courier New", Courier, monospace;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.32em;
    text-transform: uppercase;

    color: #22204a;
}

/* "A little about me" */
.about h3 {
    margin-bottom: 54px;

    font-family: "Fraunces", Georgia, "Times New Roman", serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;

    color: #171310;
}

/* About paragraphs */
.about p {
    max-width: 100%;
    margin-bottom: 20px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.65;

    color: #837b70;
}

/* Removes extra space after the final paragraph */
.about p:last-of-type {
    margin-bottom: 0;
}

/* Two-column layout: paragraphs on the left, video on the right */
.about-content {
    display: flex;
    align-items: flex-start;
    gap: 48px;
}

.about-text {
    flex: 1;
}

/* Removes extra space after the final paragraph */
.about-text p:last-of-type {
    margin-bottom: 0;
}

/* YouTube video */
.about iframe {
    display: block;

    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 9;
    height: auto;
    flex: 1;

    border: 0;
}

/* Stack the video under the text on narrow screens */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }
}

/* Aligns the remaining sections with the logo until they get their own styles */
.experience,
.projects,
.contact {
    width: 100%;
    /* Left/right match the logo's position in the 1152px nav container */
    padding: 72px max(0px, calc((100vw - 1152px) / 2)) 80px;
}

/*Experience Section*/
.experience {
    background-color: #faf8f4;
}

.experience h2 {
    margin-bottom: 18px;

    font-family: "Courier New", Courier, monospace;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.32em;
    text-transform: uppercase;

    color: #22204a;
}

.experience h3 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 48px;
}

.job {
    display: grid;
    /* grid-template-columns: 100px 24px 1fr; */
    grid-template-columns: 160px 24px 1fr;

    gap: 0 24px;
    position: relative;
    padding-bottom: 32px;
}

.job-date {
    font-family: monospace;
    font-size: 0.85rem;
    color: #888;
    padding-top: 4px;
}

.job-marker {
    position: relative;
    display: flex;
    justify-content: center;
}

.job-marker::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: -32px;
    width: 1px;
    background: #ddd;
}

.job:last-child .job-marker::before {
    display: none;
}

.job-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    border: 2px solid #999;
    cursor: pointer;
    z-index: 1;
}

.job-header {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.job-header h4 {
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
}

.job-tag {
    background: #eee;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
}

.job-description {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-left: 20px;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.4s ease;
}

.job-description li {
    list-style: disc;
    margin-bottom: 8px;
    color: #555;
}

.job.active .job-description {
    max-height: 500px;
    opacity: 1;
    margin-top: 12px;
}

.job.active .job-dot {
    background: #111;
    border-color: #111;
}

/*Projects Section*/
.projects {
    background-color: #f2eee6;
}

/* Small "PROJECTS" label */
.projects h2 {
    margin-bottom: 18px;

    font-family: "Courier New", Courier, monospace;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.32em;
    text-transform: uppercase;

    color: #22204a;
}

/* "Selected work" */
.projects h3 {
    margin-bottom: 48px;

    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.05;
    letter-spacing: -0.04em;

    color: #171310;
}

/* Four-up card grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
    align-items: start;
}

/* Preview card: image + label + title + short description */
.project-card {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-card:focus-visible {
    outline: 2px solid #22204a;
    outline-offset: 4px;
}

.project-image {
    overflow: hidden;
    margin-bottom: 16px;

    aspect-ratio: 16 / 10;
    background-color: #e4dfd5;
    border-radius: 4px;
}

.project-image img,
.project-image video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.04);
}

.project-label {
    display: block;
    margin-bottom: 8px;

    font-family: "Courier New", Courier, monospace;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;

    color: #22204a;
}

.project-card h4 {
    margin-bottom: 8px;

    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;

    color: #171310;
}

.project-card p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;

    color: #837b70;
}

/* ----- Project modal (full view) ----- */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 200;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

/*PBI Video*/
.modal-video {
    display: block;
    width: 100%;      /* same width as the paragraph text */
    max-width: 100%;  /* never overflow the text column */
    height: auto;
    margin: 16px 0 8px;
    border-radius: 4px;
}

/* Small italic note directly under the video */
.modal-panel .video-caption {
    margin: 0 0 20px;

    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
    font-size: 0.78rem;
    line-height: 1.5;

    color: #9a938a;
}

.project-modal[hidden] {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(23, 19, 16, 0.55);
}

.modal-dialog {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow-y: auto;

    padding: 40px;

    background-color: #faf8f4;
    border-radius: 6px;
    box-shadow: 0 24px 60px rgba(23, 19, 16, 0.3);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 36px;
    height: 36px;

    background: none;
    border: none;

    font-size: 1.6rem;
    line-height: 1;
    color: #837b70;
    cursor: pointer;

    transition: color 0.2s ease;
}

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

/* Only the active panel is shown; JS toggles .is-active */
.modal-panel {
    display: none;
}

.modal-panel.is-active {
    display: block;
}

.modal-panel h3 {
    margin: 6px 0 18px;

    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.03em;

    color: #171310;
}

.modal-panel p {
    margin-bottom: 16px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.6;

    color: #837b70;
}

.modal-panel .project-label {
    font-size: 0.68rem;
}

.ms-instructions {
    font-family: "DM Mono", "Courier New", monospace;
    font-size: 0.85rem;
}

.modal-placeholder {
    font-style: italic;
}

.project-tools {
    margin-top: 20px;
    margin-bottom: 0 !important;

    font-family: "DM Mono", "Courier New", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.02em;

    color: #22204a !important;
}

/* ----- Minesweeper board ----- */
.ms-status {
    display: flex;
    align-items: center;
    gap: 16px;

    margin: 20px 0 14px;

    font-family: "DM Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: #171310;
}

#ms-message {
    font-weight: 700;
}

#ms-message.win {
    color: #2e7d32;
}

#ms-message.lose {
    color: #c62828;
}

#ms-restart-btn {
    margin-left: auto;
    padding: 6px 14px;

    background-color: #22204a;
    color: #faf8f4;
    border: none;
    border-radius: 4px;

    font-family: "DM Mono", "Courier New", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    cursor: pointer;

    transition: opacity 0.2s ease;
}

#ms-restart-btn:hover {
    opacity: 0.9;
}

.ms-grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 2px;

    max-width: 480px;
    margin: 0 auto;

    background-color: #cfc9bd;
    padding: 2px;
    border-radius: 4px;
}

.ms-cell {
    aspect-ratio: 1 / 1;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #e4dfd5;
    border: none;

    font-family: "DM Mono", "Courier New", monospace;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    color: #171310;
    cursor: pointer;

    user-select: none;
}

.ms-cell:hover:not(.revealed) {
    background-color: #d8d2c6;
}

.ms-cell.revealed {
    background-color: #faf8f4;
    cursor: default;
}

.ms-cell.flagged {
    color: #c62828;
}

.ms-cell.mine.revealed {
    background-color: #c62828;
    color: #faf8f4;
}

/* Classic-ish number colors */
.ms-cell.n1 { color: #1565c0; }
.ms-cell.n2 { color: #2e7d32; }
.ms-cell.n3 { color: #c62828; }
.ms-cell.n4 { color: #22204a; }
.ms-cell.n5 { color: #7b1e1e; }
.ms-cell.n6 { color: #00838f; }
.ms-cell.n7 { color: #171310; }
.ms-cell.n8 { color: #837b70; }

/* Responsive columns */
@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .modal-dialog {
        padding: 28px 20px;
    }
}

/*Contact Section*/
.contact {
    background-color: #faf8f4;
}

.contact h2 {
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 0.68rem;
    font-family: "Courier New", Courier, monospace;
    color: #22204a;
    margin-bottom: 18px;
}

.contact h3 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #171310;
    margin-bottom: 48px;
}

.contact-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-row {
    display: flex;
    align-items: center;
    flex: 0 0 auto;

    padding: 20px 24px;
    border-right: 1px solid rgba(23, 19, 16, 0.1);

    color: #171310;
    font-family: "DM Mono", monospace;
    font-size: 0.95rem;

    transition: opacity 0.2s ease;
}

.contact-row:last-child {
    border-right: none;
}

a.contact-row:hover {
    opacity: 0.6;
}

.contact-copy-btn.copied {
    font-size: 0.7rem;
    font-weight: 600;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-right: 12px;

    background-color: #22204a;
    color: #faf8f4;

    font-size: 0.9rem;
    line-height: 1;
    font-weight: 700;
    border-radius: 4px;
}

.contact-label {
    font-weight: 600;
}

/* Keep the email address on a single line */
#email-text {
    white-space: nowrap;
    margin-right: 12px;
}

.contact-arrow {
    margin-left: 6px;
    font-size: 1.2rem;
}


.contact-copy-btn {
    margin-left: 4px;
    background: none;
    border: none;
    color: #171310;
    font-size: 1.1rem;
    cursor: pointer;
}

/* Footer Section */
.footer {
    padding: 16px 20px;
    text-align: center;

    background-color: #f2eee6;
}

.footer p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem;
    color: #837b70;
}
