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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navigation */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 8px 16px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

nav a:hover, nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Section Styling */
section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    position: relative;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* Hero Section */
#hero {
    flex-direction: column;
}

.logo-container {
    margin-bottom: 60px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
    justify-content: center;
}

.logo-svg {
    opacity: 0.9;
    transition: all 0.3s ease;
}

.logo-svg:hover {
    opacity: 1;
    transform: scale(1.05);
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 100;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 0.9;
}

.institute-text {
	padding-left:10px;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
}

.tagline {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
 /*   max-width: 800px; */
    margin-left: auto;
    margin-right: auto;
}

/* Section Headers */
h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 200;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Content Styling */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.content-card {
    background: rgba(15, 15, 15, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.content-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.content-card h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #fff;
}

.content-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

/* 3D Visualization Container */
.viz-container {
    display: flex;
    gap: 30px;
    margin: 40px 0;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.viz-item {
    width: 350px;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(100, 150, 255, 0.2);
    position: relative;
    background: rgba(15, 15, 25, 0.7);
    backdrop-filter: blur(20px);
}

.viz-canvas {
    width: 100%;
    height: 100%;
}

.viz-title {
    position: absolute;
    top: 15px;
    left: 20px;
    color: rgba(100, 150, 255, 0.9);
    font-size: 0.9rem;
/*    font-weight: 500; */
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 10px;
}

/* Results Section */
.results-table-section {
    margin: 60px 0;
}

.results-table-section h3 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 30px;
    color: #4d9eff;
    text-align: center;
}

.results-table {
    background: rgba(15, 15, 25, 0.7);
    border: 1px solid rgba(100, 150, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(20px);
    overflow: hidden;
    min-width: 800px;
/*    overflow-x: auto; */
}

.table-header {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr);
    background: rgba(77, 158, 255, 0.1);
    padding: 20px;
/*    font-weight: 600; */
    color: #4d9eff;
    border-bottom: 1px solid rgba(100, 150, 255, 0.2);
    white-space: nowrap;
}

.table-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr);
    padding: 20px;
    border-bottom: 1px solid rgba(100, 150, 255, 0.1);
    transition: all 0.3s ease;
}

.table-row:hover {
    background: rgba(77, 158, 255, 0.05);
}

.table-row:last-child {
    border-bottom: none;
}

.col {
    display: grid;
    align-items: center;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.particle-col {
    flex-direction: column;
    align-items: center;
    gap: 10px;
	width:170px;
}

.particle-col span {
    font-size: 0.9rem;
    color: #4d9eff;
/*    font-weight: 500; */
}

.particle-viz {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(77, 158, 255, 0.3);
}

.particle-viz-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(77, 158, 255, 0.3);
}

.success {
    color: #4d9eff !important;
/*    font-weight: 600; */
}

.element {
		margin:auto;
}
	
/* Mercury Simulation */
.mercury-simulation-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.mercury-viz-wrapper {
	position: relative;
}

.mercury-viz-canvas {
    width: 100%;
    height: 405px;
    border-radius: 15px;
    border: 1px solid rgba(100, 150, 255, 0.2);
    background: rgba(5, 5, 15, 0.8);
}

.simulation-controls {
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 150, 255, 0.2);
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

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

.control-label {
    color: #4d9eff;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 60px;
}

#model-selector {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 5px;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.8rem;
}

select {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 5px;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.8rem;
	width:100%;	
}	



#speed-slider {
    width: 100%;
    height: 4px;
    background: rgba(100, 150, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

#pilsar-speed-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4d9eff;
    cursor: pointer;
}

#pulsar-speed-slider {
    width: 100%;
    height: 4px;
    background: rgba(100, 150, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

#speed-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4d9eff;
    cursor: pointer;
}


#reset-orbit {
    background: rgba(77, 158, 255, 0.2);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 5px;
    color: #4d9eff;
    padding: 5px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#reset-orbit:hover {
    background: rgba(77, 158, 255, 0.3);
}


#reset-pulsar {
    background: rgba(77, 158, 255, 0.2);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 5px;
    color: #4d9eff;
    padding: 5px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#reset-pulsar:hover {
    background: rgba(77, 158, 255, 0.3);
}

.precession-results h4 {
    color: #4d9eff;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 20px;
    text-align: center;
}

.precession-results .table-row {
    transition: all 0.3s ease;
}

.precession-results .table-row:hover {
    background: rgba(77, 158, 255, 0.1);
    transform: scale(1.02);
}

.model-col {
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.error {
    color: #ff4d4d !important;
/*    font-weight: 600; */
}

.warning {
    color: #ffaa4d !important;
/*    font-weight: 600; */
}

/* Pulsars Simulation */
.pulsars-simulation-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.pulsars-viz-wrapper {
    position: relative;
}

.pulsars-viz-canvas {
    width: 100%;
    height: 423px;
    border-radius: 15px;
    border: 1px solid rgba(100, 150, 255, 0.2);
    background: rgba(5, 5, 15, 0.8);
}

.zak-phase-indicator {
/*    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7); */
    padding: 10px 15px;

/*    border-radius: 8px;
    backdrop-filter: blur(10px);    border: 1px solid rgba(100, 150, 255, 0.2); */
    display: flex;
    align-items: center;
/*    gap: 10px;
	margin-top:6px; */
	position:absolute;
	bottom: 200px;
	width: 100%;
	height: 25px;
}

.zak-phase-indicator.hidden {
    display: none !important;
}

.phase-label {
    color: #4d9eff;
    font-size: 0.8rem;
/*    font-weight: 500; */
	width:100px;
}

.phase-value {
    color: #fff;
    font-size: 0.9rem;
  /*  font-weight: 600; */
    min-width: 50px;
}

.phase-bar {
    width: 100%;
    height: 4px;
    background: rgba(100, 150, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.phase-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4d9eff, #6bb6ff);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.pulsars-results h4 {
    color: #4d9eff;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 20px;
    text-align: center;
}

.system-col {
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.system-col, .model-col span {
    font-size: 0.9rem;
    color: #4d9eff;
/*    font-weight: 500;*/
}	

.physics-info {
    margin-top: 6px;
    background: rgba(15, 15, 25, 0.5);
    border: 1px solid rgba(100, 150, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
/*	height:162px */
}

.physics-info h5 {
    color: #4d9eff;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
}

.physics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.physics-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(100, 150, 255, 0.1);
}

.physics-item:last-child {
    border-bottom: none;
}

.physics-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.physics-value {
    color: #4d9eff;
    font-size: 0.85rem;
/*    font-weight: 500; */
    font-family: 'SF Mono', Monaco, monospace;
}

/* Row highlighting */
.b1913-row.active {
    background: rgba(77, 158, 255, 0.1);
    border-left: 3px solid #4d9eff;
}

.j0737-row.active {
    background: rgba(138, 102, 255, 0.1);
    border-left: 3px solid #8a66ff;
}

.s2-row.active {
    background: rgba(255, 187, 102, 0.1);
    border-left: 3px solid #ffbb66;
}

/* 3-column tables (Mercury precession) */
.table-3-cols .table-header,
.table-3-cols .table-row {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 2fr) minmax(130px, 1fr);
}

/* 4-column tables (BSM predictions) */
.table-4-cols .table-header,
.table-4-cols .table-row {
    grid-template-columns: minmax(180px, 2fr) minmax(180px, 2fr) minmax(150px, 2fr) minmax(100px, 1fr);
}

/* Keep BSM Table adjustments for backwards compatibility */
.results-table-section:nth-child(5) .table-header,
.results-table-section:nth-child(5) .table-row {
    grid-template-columns: minmax(180px, 2fr) minmax(180px, 2fr) minmax(150px, 2fr) minmax(100px, 1fr);
}

/* Contact Section */
.contact-info {
    background: rgba(15, 15, 15, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 60px;
    backdrop-filter: blur(20px);
    max-width: 600px;
    margin: 0 auto;
}

.contact-info a {
    color: #4d9eff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    color: #fff;
}

/* Floating Elements */
.floating-element {
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        top: 10px;
        padding: 6px 12px;
    }
    
    nav a {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .logo-wrapper {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .logo-text-container {
        align-items: center;
    }
    
    .logo-svg svg {
        width: 60px;
        height: 60px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    .col {
        padding: 10px;
        border-bottom: 1px solid rgba(100, 150, 255, 0.1);
        justify-content: space-between;
    }
    
    .col:before {
        content: attr(data-label);
   /*     font-weight: 600; */
        color: #4d9eff;
        min-width: 120px;
    }
    
    .particle-col {
        flex-direction: row;
        gap: 15px;
    }
    
    .particle-viz,
    .particle-viz-small {
        width: 30px;
        height: 30px;
    }
    
    .mercury-simulation-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mercury-viz-canvas {
        height: 250px;
    }
    
    .simulation-controls {
        position: relative;
        top: 0;
        left: 0;
        margin-top: 15px;
    }
    
    .pulsars-simulation-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pulsars-viz-canvas {
        height: 250px;
    }
    
    .physics-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Publications Section */
.publications-grid {
/*    display: grid; */
	
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.publication-card {
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(77, 158, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
	text-align:left;
	margin-bottom:15px;
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4d9eff, #0066cc);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.publication-card:hover {
    transform: translateY(-8px);
    border-color: rgba(77, 158, 255, 0.4);
    box-shadow: 0 20px 40px rgba(77, 158, 255, 0.1);
}

.publication-card:hover::before {
    opacity: 1;
}

.publication-header {
  /*  display: flex; */
	display:none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.publication-icon {
    font-size: 2.5em;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(77, 158, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(77, 158, 255, 0.3);
}

.publication-year {
    background: rgba(77, 158, 255, 0.2);
    color: #4d9eff;
    padding: 8px 16px;
    border-radius: 20px;
 /*   font-weight: 600; */
    font-size: 0.9em;
}

.publication-card h3 {
    color: #ffffff;
    font-size: 1.4em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.publication-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 20px;
}

.publication-details {
/*    display: flex; */
	display:inline-block;
    gap: 20px;
/*    margin-bottom: 15px; */
}

.publication-details span {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.9);
}

.venue {
    background: rgba(77, 158, 255, 0.2) !important;
    color: #4d9eff !important;
}

.publication-doi {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
	display:inline-block;
	padding-left:25px;
}

.publication-doi a {
    color: #4d9eff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.publication-doi a:hover {
    color: #66b3ff;
    text-decoration: underline;
}

/* GitHub Section */
.github-section {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.github-card {
    background: rgba(15, 15, 15, 0.6);
    border: 2px solid rgba(77, 158, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.github-card:hover {
    transform: translateY(-5px);
    border-color: rgba(77, 158, 255, 0.5);
    box-shadow: 0 20px 40px rgba(77, 158, 255, 0.15);
}

.github-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.github-icon {
    color: #4d9eff;
    background: rgba(77, 158, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(77, 158, 255, 0.3);
}

.github-info h3 {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 1.3em;
}

.github-info p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #4d9eff, #0066cc);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.github-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(77, 158, 255, 0.3);
}

/* Responsive adjustments for publications */
@media (max-width: 768px) {
    .publications-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .publication-card {
        padding: 25px;
    }
    
    .publication-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .github-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .github-card {
        padding: 30px;
    }
}