/* CSS Variables - McMaster Brand Colors */
:root {
    /* McMaster Heritage Colors */
    --mcmaster-maroon: #7A003C;
    --mcmaster-maroon-light: #9a1a5a;
    --mcmaster-maroon-dark: #5a002c;
    --mcmaster-gold: #FDBF57;
    --mcmaster-gold-light: #fdd078;
    --mcmaster-grey: #495965;
    
    /* Theme colors mapped to McMaster palette */
    --color-bg: #0f0a0c;
    --color-bg-alt: #1a1012;
    --color-surface: #241418;
    --color-surface-hover: #2e1a1f;
    --color-border: #3d2028;
    --color-text: #fafafa;
    --color-text-muted: #b8a0a8;
    --color-primary: var(--mcmaster-maroon);
    --color-primary-hover: var(--mcmaster-maroon-light);
    --color-accent: var(--mcmaster-gold);
    --color-success: #22c55e;
    --color-warning: var(--mcmaster-gold);
    --color-gradient: linear-gradient(135deg, var(--mcmaster-maroon), var(--mcmaster-gold));
    --font-sans: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(122, 0, 60, 0.25);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gradient);
    transition: width var(--transition);
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 24px 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(122, 0, 60, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(253, 191, 87, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.hero-name {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 12px;
    font-weight: 500;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-research {
    margin-bottom: 32px;
}

.research-main {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.research-topics {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 20px;
    border-left: 2px solid var(--mcmaster-maroon);
    list-style: none;
}

.research-topics li {
    font-size: 1rem;
    color: var(--mcmaster-gold);
    font-weight: 500;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(122, 0, 60, 0.35);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-text-muted);
}

/* Profile Image */
.profile-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image-container::before {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    background: linear-gradient(135deg, var(--mcmaster-maroon), var(--mcmaster-gold));
    border-radius: 50%;
    opacity: 0.4;
    filter: blur(40px);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.05); opacity: 0.4; }
}

.profile-image {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--mcmaster-maroon);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(122, 0, 60, 0.3);
    position: relative;
    z-index: 1;
    transition: all var(--transition);
}

.profile-image:hover {
    transform: scale(1.02);
    border-color: var(--mcmaster-gold);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(253, 191, 87, 0.3);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-gradient);
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-text strong {
    color: var(--color-text);
}

.about-education h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: var(--color-text);
}

.education-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.education-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gradient);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.education-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.education-details h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.education-details .degree {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.education-details .supervisor {
    color: var(--mcmaster-gold);
    font-size: 0.9rem;
    margin-top: 4px;
}

.education-details .date {
    color: var(--color-primary);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

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

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 48px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--color-gradient);
    border-radius: 50%;
    border: 3px solid var(--color-bg-alt);
}

.timeline-content {
    background: var(--color-surface);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.timeline-header {
    margin-bottom: 16px;
}

.timeline-header h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.timeline-location {
    color: var(--color-primary);
    font-size: 0.95rem;
    display: block;
}

.timeline-date {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: block;
    margin-top: 4px;
}

.timeline-courses {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.course {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.course-code {
    background: var(--color-gradient);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.course-name {
    color: var(--color-text);
    font-weight: 500;
}

.course-date {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.timeline-list {
    list-style: disc;
    padding-left: 20px;
}

.timeline-list li {
    color: var(--color-text-muted);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Publications */
.publications-list {
    max-width: 800px;
    margin: 0 auto;
}

.publication-card {
    background: var(--color-surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.publication-card.featured {
    border-color: var(--mcmaster-maroon);
    box-shadow: 0 0 40px rgba(122, 0, 60, 0.2);
}

.publication-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-gradient);
}

.publication-badge {
    display: inline-block;
    background: var(--color-gradient);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.publication-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.publication-authors {
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.publication-venue {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

.publication-location {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.publication-links {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-surface-hover);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.pub-link:hover {
    background: var(--mcmaster-maroon);
}

.pub-link svg {
    width: 16px;
    height: 16px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--color-surface);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--mcmaster-maroon);
    box-shadow: 0 0 30px rgba(122, 0, 60, 0.2);
}

.project-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.project-status.submitted { background: rgba(122, 0, 60, 0.3); color: #d4618a; }
.project-status.in-prep { background: rgba(253, 191, 87, 0.2); color: #fdbf57; }
.project-status.completed { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.project-status.awarded { background: rgba(253, 191, 87, 0.3); color: #fdd078; }

.project-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.project-authors {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.project-venue {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

.project-date {
    color: var(--color-primary);
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.skill-category {
    background: var(--color-surface);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--color-text);
}

.skill-category h3 svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--color-bg);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.skill-tag:hover {
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.1);
}

/* Contact */
.contact-content {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 24px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--mcmaster-maroon);
    box-shadow: 0 0 30px rgba(122, 0, 60, 0.2);
}

.contact-card svg {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
}

.contact-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
        margin-bottom: 32px;
    }

    .profile-image-container::before {
        width: 240px;
        height: 240px;
    }

    .profile-image {
        width: 220px;
        height: 220px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .hero-research {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .research-topics {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding: 100px 20px 80px;
        min-height: auto;
        padding-bottom: 100px;
    }

    .hero-name {
        font-size: 2.4rem;
    }

    .hero-title {
        font-size: 1.2rem;
    }

    .research-main {
        font-size: 1rem;
    }

    .research-topics li {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .scroll-indicator {
        position: relative;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 40px;
        text-align: center;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    .container {
        padding: 0 16px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        padding-left: 0;
    }

    .timeline-marker {
        display: none;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-header h3 {
        font-size: 1.2rem;
    }

    /* Fix course cards on mobile */
    .course {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px;
        background: var(--color-bg);
        border-radius: var(--radius-sm);
    }

    .course-code {
        font-size: 0.8rem;
        padding: 3px 10px;
    }

    .course-name {
        font-size: 0.9rem;
    }

    .course-date {
        margin-left: 0;
        font-size: 0.8rem;
    }

    .timeline-list li {
        font-size: 0.9rem;
    }

    /* Publication card mobile */
    .publication-card {
        padding: 20px;
    }

    .publication-title {
        font-size: 1.15rem;
    }

    .publication-authors,
    .publication-venue {
        font-size: 0.85rem;
    }

    /* Project cards mobile */
    .project-card {
        padding: 20px;
    }

    .project-card h3 {
        font-size: 1rem;
    }

    /* Skill cards mobile */
    .skill-category {
        padding: 20px;
    }

    .skill-category h3 {
        font-size: 1rem;
    }

    .skill-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Contact mobile */
    .contact-cards {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 24px 20px;
    }

    .contact-value {
        font-size: 0.9rem;
        word-break: break-all;
    }

    /* Education cards mobile */
    .education-item {
        padding: 16px;
    }

    .education-icon {
        width: 40px;
        height: 40px;
    }

    .education-icon svg {
        width: 20px;
        height: 20px;
    }

    .education-details h4 {
        font-size: 1rem;
    }

    .education-details .degree {
        font-size: 0.85rem;
    }

    /* About section mobile */
    .about-text p {
        font-size: 0.95rem;
    }

    .about-education h3 {
        font-size: 1.1rem;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .profile-image-container::before {
        width: 180px;
        height: 180px;
    }

    .profile-image {
        width: 160px;
        height: 160px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
