:root {
    --bg: #f5f5f7; /* Slightly darker grey background */
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --card-bg: #ffffff; /* Pure white cards */
    --hover-shadow: 0 10px 40px -10px rgba(0,0,0,0.15);
    --border: rgba(0,0,0,0.04);
    --accent: #2997ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    padding: 0 20px;
}

nav {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 0;
    margin-bottom: 60px;
}

.logo {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    opacity: 0.8;
}

main {
    max-width: 980px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.hero {
    margin-bottom: 80px;
    text-align: center; /* Center text */
}

h1 {
    font-size: 56px;
    line-height: 1.07;
    font-weight: 700;
    letter-spacing: -0.005em;
    margin-bottom: 16px;
}

.hero p {
    font-size: 24px;
    line-height: 1.4;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto; /* Center the block */
}

/* Grid Layout */
.grid {
    display: grid;
    /* 3 columns to keep items side-by-side */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    grid-auto-rows: 420px;
}

.card {
    background: var(--card-bg);
    border-radius: 28px;
    padding: 40px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    /* Stronger border and initial shadow for visibility */
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px); /* Lift up instead of just scale */
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.12); /* Stronger hover shadow */
    border-color: rgba(0,0,0,0.0); /* Border disappears into shadow */
}

/* .card-large styles removed */

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: block;
}

.card h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 12px;
}

.card p {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 500;
    line-height: 1.4;
    max-width: 300px;
}

.cta {
    font-size: 15px;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.arrow {
    transition: transform 0.3s ease;
}

.card:hover .arrow {
    transform: translateX(3px);
}

/* Visuals inside cards */
.card-visual {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.visual-games {
    bottom: -40px;
    right: -40px;
    top: auto;
    transform: none;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #ffecd2 0%, #fcb69f 100%);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.5;
}

.visual-editor {
    bottom: -40px;
    right: -40px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #a1c4fd 0%, #c2e9fb 100%);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.5;
}

.visual-formicy {
    bottom: -40px;
    right: -40px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #d4fc79 0%, #96e6a1 100%);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.5;
}

.card:hover .visual-games {
    transform: scale(1.1);
}

.card:hover .visual-editor, .card:hover .visual-formicy {
    transform: scale(1.1);
}

.game-icon, .editor-icon {
    font-size: 80px;
    position: absolute;
    z-index: 5;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
}

.card .game-icon {
    top: auto;
    bottom: 40px;
    right: 40px;
    transform: none;
}

.card:not(.card-large) .editor-icon {
    top: auto;
    bottom: 40px;
    right: 40px;
    transform: none;
}

.coming-soon {
    background: #f5f5f7;
    border: 1px dashed rgba(0,0,0,0.1);
    box-shadow: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.coming-soon h2 {
    font-size: 24px;
    color: #ceced2;
}

.coming-soon p {
    font-size: 15px;
    color: #ceced2;
}

footer {
    max-width: 980px;
    margin: 0 auto;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 30px 0;
    text-align: center;
}

footer p {
    font-size: 11px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    h1 { font-size: 40px; }
    .hero p { font-size: 20px; }
    .grid { grid-template-columns: 1fr; }
    .card-large { grid-column: auto; flex-direction: column; align-items: flex-start; }
    .card-large .card-visual { top: auto; bottom: -50px; right: -50px; }
    .game-icon { top: auto; bottom: 50px; right: 50px; }
}

/* MCHP Project Styles */
.visual-mchp {
    bottom: -40px;
    right: -40px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #ff9a9e 0%, #fecfef 100%);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.5;
}
.card:hover .visual-mchp {
    transform: scale(1.1);
}

