/* ==========================================================
   SHARED STYLES — used by index.html and cv.html
   Page-specific rules stay in the <style> block on each page.
   ========================================================== */

/* --- Design tokens --- */
:root {
    --navy: #011730;
    --light-grey: #eef1f3;
    --text-dark: #111;
    --text-grey: #666;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--navy);
    background-color: #ffffff;
    line-height: 1.6;
    padding-top: 100px;
}

/* --- Fixed, scroll-up header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    background-color: #ffffff;
    z-index: 999;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: top 0.3s ease-in-out;
}

.header-left, .header-right { flex: 1; }
.header-center { flex: 1; text-align: center; }
.header-right { text-align: right; }

.logo img { height: 50px; }

.menu-icon {
    font-size: 2.2rem;
    cursor: pointer;
    color: var(--navy);
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--navy);
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-family: var(--font-sans);
    text-transform: uppercase;
}

.btn-primary:hover { opacity: 0.8; }

.btn-outline {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--navy);
    color: var(--navy);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    height: fit-content;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-transform: uppercase;
    text-align: center;
}

.btn-outline:hover {
    background-color: var(--navy);
    color: white;
}

/* --- Slide-in overlay menu --- */
.overlay {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    background-color: #ffffff;
    overflow-x: hidden;
    transition: 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.overlay-content {
    position: relative;
    top: 100px;
    width: 100%;
}

.overlay a {
    padding: 0.5rem 0;
    text-decoration: none;
    display: block;
    transition: 0.3s;
    font-family: var(--font-sans);
}

.overlay a:hover { color: #888; }

.menu-dropdown { margin-bottom: 0.5rem; }

.menu-dropdown summary {
    list-style: none;
    outline: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--navy);
    padding-left: 3rem;
    margin-top: 1.5rem;
    text-transform: uppercase;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
}

.menu-dropdown summary::-webkit-details-marker { display: none; }
.menu-dropdown summary:hover { color: #888; }

.arrow {
    font-size: 0.8rem;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.menu-dropdown[open] summary .arrow { transform: rotate(180deg); }

.dropdown-content {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.overlay-main-link {
    font-size: 1.2rem;
    color: var(--navy);
    padding-left: 3rem !important;
    margin-top: 1.5rem;
    text-transform: uppercase;
    display: block;
}

.overlay-sub {
    font-size: 1rem;
    color: #333;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.overlay .close-btn {
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 3rem;
    font-weight: normal;
    color: #2b2b2b;
    cursor: pointer;
    text-decoration: none;
}

/* --- Scroll reveal animation --- */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Section layout --- */
.section-wrapper {
    padding: 4rem 2rem;
    position: relative;
    z-index: 5;
}

.bg-light { background-color: var(--light-grey); }
.bg-white { background-color: #ffffff; }

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

h2 {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 3rem;
    color: var(--navy);
}

/* --- Contact details grid --- */
.contact-grid {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-item h4 { margin-bottom: 0.2rem; }

.contact-item p {
    margin-top: 0;
    color: #666;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* --- Contact form --- */
.contact-form {
    margin-top: 2rem;
    max-width: 600px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.contact-form label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 0px;
    font-family: var(--font-sans);
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #fafafa;
    transition: border-color 0.2s;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--navy);
}

.contact-form button {
    background-color: var(--navy);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    font-family: var(--font-sans);
    margin-top: 1rem;
    transition: opacity 0.2s ease;
    -webkit-appearance: none;
    text-transform: uppercase;
}

.contact-form button:hover { opacity: 0.8; }

/* --- Footer --- */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    border-top: 1px solid #eee;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--navy);
    text-align: center;
    flex-grow: 1;
    font-family: var(--font-sans);
}

/* --- Mobile --- */
@media (max-width: 768px) {

    .header-left { display: none; }
    .header-center { text-align: left; }

    header { padding: 1rem 1.5rem; }

    .section-wrapper { padding: 3rem 1.5rem; }

    h2 { font-size: 2rem; margin-bottom: 2rem; }

    .btn-outline { width: fit-content; }

    .contact-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    footer { padding: 1.5rem; }
}
