/* ==========================================
   1. IMPORTS & BASE SETTINGS
   ========================================== */
/* Imports Open Sans from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&display=swap');

/* Default Global Styles (Dark Mode) */
body {
    background-color: #1a1d2e; /* Navy theme */
    color: #ffffff;            
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;          /* Breathing room between text lines */
    margin: 0;
    padding: 60px 20px;        
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth toggle transition */
}

/* Central container constraint */
.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Universal Spacing Reset */
h1, h2, p, ul {
    margin-top: 0;
    margin-bottom: 15px; 
}

/* ==========================================
   2. TYPOGRAPHY & dividers
   ========================================== */
h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0;
}

h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Horizontal line spacer */
hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    margin: 40px 0; /* Ensures consistent 40px gap between sections */
}

/* ==========================================
   3. LINKS & LISTS
   ========================================== */
a {
    color: #ffffff;
    text-decoration: none; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Subtle custom underline */
    transition: all 0.2s ease; 
}

a:hover {
    color: #00a8ff; /* Cockpit blue hover state */
    border-bottom-color: #00a8ff;
    opacity: 1;
}

ul {
    list-style: none; /* Removes default dots */
    padding: 0;
}

ul li {
    margin-bottom: 12px;
}

/* ==========================================
   4. COMPONENTS
   ========================================== */
   
/* --- Academic Research Subtitle --- */
.research-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: -10px;
    font-style: italic;
}

/* --- Connect Section (Social Pills) --- */
.connect-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.connect-item {
    flex: 1;               /* Forces buttons to share available width equally */
    min-width: 120px;      /* Prevents squishing on mobile */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 20px;   /* Creates the 'pill' shape */
    background: rgba(255, 255, 255, 0.08); /* Subtle highlight */
    font-size: 0.9rem;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: all 0.2s ease-in-out;
}

.connect-item:hover {
    background: rgba(0, 168, 255, 0.15); /* Subtle blue glow */
    transform: translateY(-2px); /* Lift effect */
}

.connect-item svg {
    stroke-width: 2px;
}

/* --- Photo Gallery --- */
.photo-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;          /* Allows stacking on small screens */
    gap: 20px;                
}

.photo-grid img {
    height: 350px;            
    width: auto;              
    border-radius: 2px;       
    display: block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
}

/* --- Theme Toggle Button --- */
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
    padding: 0;
}

#theme-toggle svg {
    stroke: currentColor;
    transition: transform 0.3s ease;
    display: block;
    margin: auto;
}

#theme-toggle:hover svg {
    transform: scale(1.1);
}

/* ==========================================
   5. LIGHT MODE THEME OVERRIDES
   ========================================== */
/* These rules only apply when the 'light-mode' class is added to the html element via Javascript */

html.light-mode body {
    background-color: #ffffff;
    color: #1a1d2e;
}

html.light-mode a {
    color: #1a1d2e;
    border-bottom-color: rgba(26, 29, 46, 0.3);
}

html.light-mode a:hover {
    color: #00a8ff;
    border-bottom-color: #00a8ff;
}

html.light-mode hr {
    border-top: 1px solid rgba(26, 29, 46, 0.2);
}

html.light-mode .research-meta {
    color: rgba(26, 29, 46, 0.7);
}

html.light-mode .connect-item {
    background: rgba(26, 29, 46, 0.05);
    color: #1a1d2e;
}

/* Icon visibility for theme toggle */
#theme-toggle #moon-icon {
    display: none;
}

html.light-mode #theme-toggle #sun-icon {
    display: none;
}

html.light-mode #theme-toggle #moon-icon {
    display: block;
}
