/* Fonts are now loaded optimally in HTML head for better performance */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    position: relative;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

/* Hero Section */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    padding: 4rem 0 2rem 0;
}

.hero-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.hero-text {
    flex-grow: 1;
}

.aliases {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    color: #666;
    margin-top: -1rem;
    margin-bottom: 1rem;
}

/* Profile Image */
.profile-image {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    margin-top: 0rem;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Introduction */
.introduction p {
    margin-bottom: 1rem;
}

.introduction a, .contact a{
    color: #0066cc;
    text-decoration: none;
}

.introduction a:hover {
    text-decoration: underline;
}

/* Social Links */
.social-links {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.9em;
}

.social-links a {
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.social-links a span {
    text-decoration: underline;
}

.social-links a:hover span {
    text-decoration: none;
}

.social-links a i {
    width: 16px;
    color: #666;
}

.social-links a:hover {
    color: #888;
} 

/* Games Section */
.games {
    position: relative;
    background-color: #1a365d;
    color: white;
    padding: 3rem 0;
    margin-top: 0;
}

.games h2 {
    font-family: 'Clash Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0rem;
    margin-top: -1rem;
    letter-spacing: -0.02em;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 1rem;
    gap: 1rem;
}

/* Game Cards */
.game-card {
    position: relative;
    padding: 15px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #4a90e2;  /* You can change this color to match your theme */
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.game-image {
    position: relative;
    width: 100%;
    padding-top: 79.365%; /* This maintains 315:250 aspect ratio (250/315 = 0.79365) */
    overflow: hidden;
    margin-bottom: 1rem;
}

.game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.game-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.game-card-subtitle {
    font-weight: 500;
}

/* Research Section */
.research {
    background-color: #e0f2f1;
    padding: 3rem 0;
    color: #333;
}

.research h1, .research h2 {
    font-family: 'DM Serif Display', Georgia, 'Times New Roman', Times, serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0rem;
    margin-top: -1rem;
    letter-spacing: -0.02em;
}

.research.full-page {
    min-height: 100vh;
    padding-top: 2rem;
}

.research-section-header {
    margin-bottom: 1rem;
}

.research-entry {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 3px solid #444;
    transition: border-left-width 0.1s ease;
}

.research-entry:hover {
    border-left-width: 6px;
}

.research-title {
    margin-bottom: 0rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.research-title a {
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.research-title a:hover {
    text-decoration: underline;
}

.research-entry p {
    color: #555;
    font-size: 0.8rem;
}

.research-filters {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.research-filters select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.full-page .research-list {
    display: block;
}

/* Tags */
.tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    padding: 0rem 0.6rem;
    border-radius: 4px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Game of Life Canvas */
#gameOfLife {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 0;
        margin-top: 0rem;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .profile-container {
        display: flex;
        gap: 1.5rem;
        align-items: flex-start;
        margin-bottom: 1rem;
    }

    .profile-image {
        width: 180px;
        height: 180px;
        margin: 0;
    }

    .social-links {
        margin-top: 0px;
        flex: 1;
        justify-content: center;
    }

    h1 {
        font-size: 2rem;
        clear: both;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .profile-container {
        gap: 1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .games {
        padding: 2rem 0;
    }
    
    .games h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
}

.research-box {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    padding: 16px;
}

.research-footer {
    margin-top: 8px;
    /* text-align: right; */
}

.see-all-link {
    color: #000;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.1s;
}

.see-all-link:hover {
    opacity: 1;
}

.see-all-link i {
    margin-left: 8px;
    font-size: 0.9em;
}

.research-entry .year {
    color: #888;
    font-size: 0.9em;
    margin-left: -4px;
    font-weight: normal;
}

.research-header {
    margin-bottom: 2rem;
}

.back-link {
    color: #000;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: inline-block;
    margin-bottom: 1rem;
}

.back-link:hover {
    opacity: 1;
}

.back-link i {
    margin-right: 8px;
    font-size: 0.9em;
}

.floating-cat {
    position: absolute;
    bottom: 0;
    left: 10%;
    image-rendering: pixelated;
    /* transform: translateX(-50%);
    z-index: 1;
    margin-bottom: -4px; Adjust this value to fine-tune the vertical position */
}

.things {
    position: relative;
    background-color: #1a365d;
    color: white;
    padding: 3rem 0;
    margin-top: 0;
}

.things h2 {
    font-family: 'Clash Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0rem;
    margin-top: -1rem;
    letter-spacing: -0.02em;
}

.contact {
    background-color: #ffffff;
    color: black;
    padding: 3rem 0;
    margin-top: 0;
}

.contact h2 {
    font-family: 'Clash Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0rem;
    margin-top: -1rem;
    letter-spacing: -0.02em;
}

.venue {
    font-style: italic;
    color: #666;

    font-size: 0.9em;
}