/* General Reset and Typography */
body, html {
  margin: 0;
  padding: 0;
  background: #000; /* Deep black for 3D space contrast */
  color: #fff;
  font-family: 'Inter', -apple-system, sans-serif;
  scroll-behavior: smooth;
}

/* Center the intro title across the full screen */
.title-section {
    height: 100vh;
    width: 100vw; /* Full width */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
    margin-left: -50vw; /* Offset the main tag's 50vw margin */
}

/* Ensure the h1 inside is large and centered */
.title-section h1 {
    font-size: 4rem; /* Making it more "markety" and bold */
    text-align: center;
}

/* Scroll Instructions at the top right of the page */
.site-instructions {
    position: fixed;
    top: 20px;
    right: 1%;
    font-size: 0.9rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.502); 
    z-index: 100; /* above everything */
    pointer-events: none; /* Prevents it from blocking clicks to the globe */
    text-align: right; /* Ensures text aligns to the right if it wraps */
}

/**
 * Layout: Bottom Page Instructions
 * Description: Positioned at the end of the document flow to appear 
 * only after the user has scrolled through all content.
 */
.site-bottom-instructions {
    margin-top: 50px; /* Space from the skills box */
    margin-bottom: 20px; /* Space from the very bottom edge */
    padding-right: 5%;
    font-size: 0.9rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5); 
    z-index: 100;
    pointer-events: none;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
}

/* Layout Containers */
#globe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 50vw !important; /* Take up exactly half the screen */
    height: 100vh !important; /* important forces adjerence to size specfs */
    z-index: 1;  /* Bring to front so it's visible */
    background-color: transparent;
}

main {
    margin-left: 50vw; /* Push text to the right half */
    width: 50vw;
    position: relative;
    z-index: 2;
}

/* Sections */
.location-step {
    min-height: 40vh; /* redue to bring cards closer - 100 would be full scroll before next card */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem; /* Reduced top/bottom padding */
    /* Crucial: Ensure sections have NO background color */
    background: transparent !important; 
}

/* Marketing Card */
.content-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
}

/* High-Impact Typography */
h1, h2 {
  font-weight: 800;
  letter-spacing: -0.05em;
  margin-top: 0;
  background: linear-gradient(to right, #fff, #999);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* blue highlight text */
.blue-text {
  color: #004aa5; 
  -webkit-text-fill-color: #004aa5; /* Ensuring override of any global h1 styles */
}

p {
  line-height: 1.6;
  color: #ccc;
  text-align: justify; /* block text formatting */
  hyphens: auto;       /* handles word breaks to keep blocks tight (optional tbh) */
}

/* Container that breaks out of the right-hand column */
.section-overlay-header {
    width: 100vw;
    height: 15vh; /* Give it some vertical presence */
    display: flex;
    align-items: flex-end; /* Aligns text to the bottom, near the line */
    justify-content: flex-start; /* Align text to the left */
    margin-left: -50vw; /* Pull back across the globe */
    padding-left: 5vw; /* Space from the far left edge */
    padding-bottom: 10px; /* Space between text and the line */
    position: relative;
    z-index: 15; /* Ensure it sits above the globe */
    pointer-events: none; /* Allows user to still click the globe behind the text */

    /* The Full-Width Blue Line */
    border-bottom: 2px solid #004aa5; 
    box-sizing: border-box;
}

/* The "Education" text styling */
.overlay-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ccc;
    -webkit-text-fill-color: #ccc;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Ensure italics tags actually render as italics */
i, em {
    font-style: italic;
}


/**
 * Layout: Full-width breakout section
 * Description: Overrides parent margins to span the entire screen width 
 * while maintaining a transparent background to show the globe.
 */
.full-width-section {
    width: 100vw;
    position: relative;
    left: 0%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 80px 10%;
    background: transparent; /* Maintains globe visibility */
    color: #e0e0e0;
    box-sizing: border-box;
}

.publications-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
}

.pub-list p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.skill-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #004aa5, transparent);
    margin: 40px 0;
}

/**
 * ORCID Link Styling
 * Description: Styles the ORCID link to be visually distinct and consistent with the site's color scheme.
 */
.orcid-url {
    color: #004aa5;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.3s ease;
}

.orcid-url:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/**
 * DOI Link Styling
 * Description: Styles the DOI link to be visually distinct.
 */
.doi-url {
    color: #e0e0e0;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.doi-url:hover {
    color: #004aa5;
    opacity: 0.7;
    text-decoration: underline;
}

.name-underline {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/**
 * Layout: Full-width glass section
 * Description: Applies backdrop-filter and a translucent background to create the glass effect.
 */
.skills-glass-box {
    margin-top: 40px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05); /* Slight white tint */
    backdrop-filter: blur(8px); /* Creates the frosted glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    /* Box-sizing ensures padding doesn't increase width beyond container */
    box-sizing: border-box;
    width: 100%;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-item {
    font-size: 0.95rem;
    line-height: 1.6;
}

#cape-town-teaching {
    height: 10px;
    width: 100%;
    visibility: hidden; /* Stays invisible but exists in the layout */
}


/**
 * Layout: Navigation Menu
 * Description: Fixed top-left positioning with a glass effect.
 */
.nav-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.menu-icon {
    width: 35px;
    cursor: pointer;
    filter: invert(1); /* Makes a black icon white for the dark theme */
}

.menu-toggle {
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-block;
}

.menu-toggle:hover {
    /* Simulates a physical lift toward the user */
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 8px #004aa5);
    cursor: pointer;
}

.nav-links {
    list-style: none;
    margin-top: 15px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.nav-links.active {
    display: flex;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #004aa5;
    /* Nudges the text slightly to indicate selection */
    transform: translateX(5px);
}