:root {
    --primary: #0F2537; /* Academic Blue */
    --primary-light: #1A3A56;
    --accent: #C5A880; /* Gold */
    --accent-hover: #D6BC97;
    --bg: #F8F9FA;
    --surface: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden; /* Main app handles scrolling */
}

/* Header */
.app-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    height: 64px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 10;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
}

.logo-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-left: 0.25rem;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

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

/* App Root Container */
.app-root {
    flex: 1;
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Page Views */
.view-container {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Home View */
.hero {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--primary);
    color: white;
    padding: 2rem 1.5rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: var(--accent);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2.5rem;
    font-weight: 300;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Network View */
.page-header {
    background: var(--surface);
    padding: 3rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
}

.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.member-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
    border-color: var(--accent);
}

.member-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.member-avatar {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
}

.member-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.member-field {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 500;
}

.member-degrees-preview {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
}

.degree-tag {
    background: var(--bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Profile View */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary);
}

.profile-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    background-color: var(--primary);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 3rem;
    flex-shrink: 0;
}

.profile-info h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.profile-info .field {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.profile-info p {
    color: var(--text-muted);
    line-height: 1.6;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.degrees-timeline {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 3rem;
}

.degrees-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0;
    width: 2px;
    background-color: var(--border);
}

.degree-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.degree-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.3rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--surface);
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.degree-item.terminal::before {
    background-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(197, 168, 128, 0.2);
}

.degree-level {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.degree-inst {
    color: var(--text-main);
    font-weight: 500;
}

.degree-year {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.degree-thesis {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: var(--bg);
    border-left: 3px solid var(--accent);
    font-style: italic;
    font-size: 0.95rem;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
}