:root {
    --bg-color: #F7F7F5;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --accent: #0000F2; /* Hermes Blue inspired */
    --accent-hover: #0000B0;
    --border-color: rgba(26, 26, 26, 0.1);
    
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Instrument Serif', serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --grid-size: 40px;
    --header-height: 7rem;
    --sidebar-width: 7rem;
}

@media (max-width: 1024px) {
    :root {
        --header-height: 6rem;
        --sidebar-width: 6rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Custom cursor */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Grid Pattern */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, var(--border-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
    z-index: -1;
    opacity: 0.5;
}

/* Custom Cursor */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    transition: width 0.2s, height 0.2s, border-color 0.2s;
}

/* Typography Selection */
::selection {
    background-color: var(--accent);
    color: #fff;
}

/* L-Shape Branding (MIT Museum style) */
.l-header-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem 0 2.25rem;
    z-index: 100;
    background: var(--bg-color);
}

.brand-first {
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: 4rem;
    line-height: 1;
    letter-spacing: 0.15em; /* spaced out */
    color: var(--text-primary);
}

.l-header-left {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--bg-color);
    z-index: 110; /* Bring above top header so text can overlap */
    display: flex;
    justify-content: center;
    padding-top: 0;
}

.brand-last {
    margin-top: -1.4rem; /* Bring R close to S */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0; /* line-height 1 naturally adds visual space equivalent to horizontal kerning */
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: 4rem;
    line-height: 1;
    color: var(--text-primary);
}

/* Main Body Offset */
main {
    padding-top: var(--header-height);
    padding-left: var(--sidebar-width);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

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

.pub-doi {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

a.pub-doi:hover {
    color: var(--accent-color);
}

.nav-link {
    font-family: var(--font-mono);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 100%;
    left: 0;
    color: var(--accent);
    transition: top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::before {
    top: 0;
}
.nav-link:hover {
    color: transparent;
}

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

/* Sections */
.section {
    padding: 6rem 4rem 6rem 2.25rem;
    border-bottom: 1px solid var(--border-color);
    max-width: 1400px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    padding: 8rem 4rem 6rem 2.25rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    max-width: 1400px;
}

.sys-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.pulse {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 0, 242, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 0, 242, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 0, 242, 0); }
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 6vw, 7rem);
    line-height: 0.9;
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

.highlight {
    color: var(--text-primary);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

.btn {
    font-family: var(--font-mono);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    transition: all 0.3s;
}

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

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

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

.secondary-btn:hover {
    border-color: var(--text-primary);
}

/* Fluid Orb visual */
.hero-visual {
    position: absolute;
    right: -2%;
    top: 65%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    pointer-events: none;
    opacity: 0.85;
    z-index: -1;
}

#orb-canvas {
    width: 100%;
    height: 100%;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.about-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-box {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.stat-val {
    font-family: var(--font-serif);
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 5rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
}

.timeline-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.timeline-date {
    color: var(--text-secondary);
}

.timeline-tag {
    color: var(--accent);
    font-weight: 700;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-secondary);
}

.subsection-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

/* Publications */
.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.pub-card {
    padding: 2rem;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(5px);
    transition: transform 0.3s, border-color 0.3s;
}

.pub-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.pub-venue {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.pub-card h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.pub-authors {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.project-card {
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: all 0.3s;
}

.project-card:hover {
    border-color: var(--text-primary);
    box-shadow: 4px 4px 0 var(--text-primary);
}

.project-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.project-icon {
    color: var(--accent);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

/* Footer */
.footer {
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-left h2 {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-left p {
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: right;
}

.footer-right a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.footer-right a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sys-status {
    color: var(--accent);
}

/* Touch device cursor fix */
@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-outline {
        display: none !important;
    }
    * {
        cursor: auto !important;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: auto;
        --sidebar-width: 0px;
    }
    
    .l-header-top {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem 1rem 1.5rem;
        position: relative;
        border-bottom: 1px solid var(--border-color);
    }
    
    .brand-first {
        position: relative;
        bottom: 0;
        left: 0;
        font-size: 3rem;
        line-height: 1;
        letter-spacing: 0.1em;
        margin-bottom: 3.5rem; /* Make space for RAWAL */
    }
    
    .l-header-left {
        position: absolute;
        top: 5rem; /* Position RAWAL directly under SHORYA */
        left: 0;
        width: 100%;
        height: auto;
        padding: 0;
        background: transparent;
        z-index: 110;
    }
    
    .brand-last {
        position: relative;
        top: 0;
        margin-top: 0;
        flex-direction: row;
        justify-content: center;
        gap: 0.1em;
        font-size: 3rem;
        line-height: 1;
    }
    
    .nav-links {
        margin-top: 0;
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    main {
        padding-top: 0;
        padding-left: 0;
    }
    
    .section {
        padding: 4rem 2rem;
    }
    .about-grid, .timeline-item {
        grid-template-columns: 1fr;
    }
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .hero-section {
        flex-direction: column;
        justify-content: center;
        padding: 4rem 2rem;
    }
    .hero-content {
        text-align: center;
        width: 100%;
        position: relative;
        z-index: 10;
        order: 2;
    }
    .hero-cta {
        justify-content: center;
        flex-direction: column;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-visual {
        display: block;
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 320px;
        height: 320px;
        opacity: 0.9;
        margin: 0 auto 1rem auto;
        order: 1;
    }
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    .footer-right {
        text-align: left;
    }
}
