:root {
    --apple-black: #1d1d1f;
    --apple-grey: #f5f5f7;
    --apple-blue: #0071e3;
    --victoria-blue: #0098D4;
    --context-orange: #f39200;
    --glass: rgba(255, 255, 255, 0.85);
    --dot-size: 20px;
    --line-height: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    background-color: #ffffff;
    color: var(--apple-black);
    line-height: 1.5;
    overflow-x: hidden;
}

/* --- Navigation --- */
nav.top-nav {
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

.nav-flex {
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; text-transform: uppercase; }
.brand-name span { color: var(--context-orange); }

.contact-header {
    display: flex;
    gap: 25px;
    font-size: 13px;
    font-weight: 500;
    color: #86868b;
}

/* --- Global Link Reset & Nav Hover --- */
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }

.contact-header a:hover { 
    color: var(--apple-blue); 
}

.contact-header span:hover {
    color: var(--apple-black);
}

header { padding: 160px 0 40px; text-align: center; }
header h1 { font-size: 56px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 15px; }
header .tagline { font-size: 19px; color: #86868b; font-weight: 400; max-width: 850px; margin: 0 auto; line-height: 1.5; }

/* --- Tabs --- */
.tab-wrapper {
    display: flex;
    justify-content: center;
    background: var(--apple-grey);
    padding: 6px;
    border-radius: 14px;
    width: fit-content;
    margin: 30px auto 30px;
    flex-wrap: wrap;
    gap: 4px;
}

.tab-btn {
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: var(--apple-black);
}

.tab-btn:not(.active):hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--apple-blue);
}

.tab-btn.active { 
    background: #ffffff; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); 
    color: var(--apple-blue);
}

/* --- Content Section: The "Apple Style" Gap --- */
.content-section { 
    display: none; 
    opacity: 0; 
    transform: translateY(20px); 
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    /* 40px is the sweet spot for professional whitespace below the navigation */
    padding-top: 40px; 
}
.content-section.active { display: block; opacity: 1; transform: translateY(0); }

/* --- Grid Layouts & Cards --- */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    /* Margin bottom keeps a consistent space before the full-width footer line */
    margin-bottom: 20px; 
}

.card {
    background: var(--apple-grey);
    padding: 30px;
    border-radius: 24px;
    transition: transform 0.3s ease;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-5px); }

/* --- Push content logic for Samples --- */
#samples .card p {
    flex-grow: 1; 
    margin-bottom: 20px;
}

/* --- Fix for Education and Memberships boxes --- */
#education .card, #memberships .card {
    height: 100%;
}

#education .card p, #memberships .card p {
    margin-top: auto; 
    padding-top: 15px;
}

.card h3 { 
    font-size: 18px; 
    margin-bottom: 0; 
    font-weight: 600; 
    color: var(--victoria-blue); 
    line-height: 1.2;
}

.card .year { font-size: 12px; font-weight: 700; color: #86868b; text-transform: uppercase; display: block; margin-bottom: 2px; }
.card p { color: #424245; font-size: 14px; line-height: 1.6; margin-top: 10px; }

/* Lists logic */
.card ul { list-style: none; margin-top: 10px; flex-grow: 0; }
.card li { 
    font-size: 14px; 
    margin-bottom: 8px; 
    color: #1d1d1f; 
    font-weight: 500; 
    position: relative;
    padding-left: 20px;
}
.card li::before { 
    content: ""; 
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--victoria-blue);
    border-radius: 50%;
}

/* --- View Application Button --- */
.view-app-btn {
    align-self: flex-start;
    background-color: var(--victoria-blue);
    color: white !important;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 152, 212, 0.15);
}

.view-app-btn:hover {
    background-color: var(--apple-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 113, 227, 0.25);
}

/* --- Inline Icon Headers --- */
.sample-card-header { 
    display: flex; 
    align-items: flex-start; 
    gap: 15px; 
    margin-bottom: 15px; 
}

.sample-icon-box { 
    width: 50px; height: 50px; 
    background: #ffffff; 
    border-radius: 12px; 
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-shrink: 0;
    margin-top: -4px; 
}
.sample-icon-box i { font-size: 22px; color: var(--victoria-blue); }

.more-link { color: var(--victoria-blue); cursor: pointer; font-weight: 700; margin-left: 4px; }

/* --- Experience Viewport (Matching Grid Gap) --- */
.experience-viewport {
    background: transparent;
    /* Margin 0 here because padding-top in .content-section handles the top gap */
    margin: 0; 
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    min-height: 380px; 
    position: relative;
}

.map-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    position: relative;
    width: 100%;
    max-width: 900px;
}

.station {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 33%;
    flex-shrink: 0;
    cursor: pointer;
}

.station-link { text-decoration: none; color: inherit; display: block; }

.station:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 50%; 
    width: 100%; 
    height: var(--line-height);
    background-color: var(--victoria-blue);
    z-index: 1;
    border-top: 2px solid white;
    border-bottom: 2px solid white;
}

.station:first-child::before {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 50%;
    width: 120px; 
    height: var(--line-height);
    background: linear-gradient(to left, var(--victoria-blue), transparent);
    z-index: 1;
    mask-image: linear-gradient(to right, black 50%, transparent 50%);
    mask-size: 12px 100%;
    -webkit-mask-image: linear-gradient(to right, black 50%, transparent 50%);
    -webkit-mask-size: 12px 100%;
}

.dot {
    width: var(--dot-size);
    height: var(--dot-size);
    background-color: white;
    border: 5px solid var(--victoria-blue);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.station:hover .dot { transform: scale(1.2); background-color: var(--apple-blue); border-color: var(--apple-blue); }
.station:hover .station-name { color: var(--apple-blue); transition: color 0.2s ease; }

.label-wrapper {
    position: absolute;
    bottom: 30px; 
    left: 50%;
    transform: rotate(-45deg);
    transform-origin: bottom left;
    width: 200px;
    text-align: left;
}

.station-date { display: block; font-size: 10px; letter-spacing: 1px; color: #666; font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }
.station-name { font-weight: 800; font-size: 15px; color: var(--apple-black); display: block; line-height: 1.2; }

.service-status {
    position: relative;
    /* Ensures this element doesn't float too far from the footer */
    margin-top: 20px; 
    align-self: flex-end; 
    background: var(--apple-grey);
    padding: 6px 14px;
    border-radius: 6px;
    border-left: 4px solid #00b01c;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-content {
    background: #ffffff;
    margin: 5vh auto;
    width: 90%;
    max-width: 650px;
    padding: 40px;
    border-radius: 28px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.close-btn { position: absolute; right: 25px; top: 25px; cursor: pointer; color: #d2d2d7; font-size: 22px; }

@media (max-width: 850px) {
    header h1 { font-size: 38px; }
    .contact-header { display: none; }
    .tab-wrapper { width: 100%; }
}

/* --- Full-Width Footer Styling --- */
.footer {
    width: 100%; 
    padding: 30px 0;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(0,0,0,0.1); 
    text-align: center;
    /* Reinstated tight gap between content and footer line */
    margin-top: 10px;
    position: relative;
}

.footer p {
    font-size: 12px;
    color: #86868b;
    font-weight: 500;
    letter-spacing: -0.01em;
    max-width: 1000px; 
    margin: 0 auto;
    padding: 0 24px;
}