/* --- Basic Setup & Typography --- */
:root {
    --bg-color: #0a0f14; /* Deep charcoal/navy */
    --surface-color: #101820; /* Slightly lighter surface */
    --primary-color: #00f5c4; /* Vibrant Cyan */
    --secondary-color: #3b82f6; /* A calm blue for secondary accents */
    --text-color: #e6f1ff; /* Soft off-white */
    --text-muted: #8899a6; /* Muted gray */
    --border-color: #27303a;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7; /* Increased for readability */
}

.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
h1, h2, h3, h4 { line-height: 1.3; margin-bottom: 1rem; font-weight: 600; }
h1 { font-size: 3rem; color: var(--text-color); }
h2 { font-size: 2.5rem; margin-top: 4rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.75rem; color: var(--primary-color); }
h3 { font-size: 1.5rem; color: var(--text-color); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }
a { color: var(--primary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; display: block; }

/* Style for linked titles */
h3 a, h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}
h3 a:hover, h4 a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}


/* --- Profile Header Section --- */
.profile-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 2rem; padding: 2.5rem; background-color: var(--surface-color);
    border-radius: 12px; border: 1px solid var(--border-color);
}
.profile-info { display: flex; align-items: center; gap: 2rem; flex: 2; min-width: 300px; }
.profile-picture {
    width: 150px; height: 150px; border-radius: 50%;
    border: 3px solid var(--primary-color);
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--primary-color);
}

.contacts { flex: 1; min-width: 250px; }
.contacts h3 { color: var(--text-color); margin-bottom: 1rem; }
.contact-list { list-style: none; }
.contact-list li { margin-bottom: 0.75rem; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}
.contact-item:hover { color: var(--primary-color); }
.contact-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* --- REDESIGNED: Showcase Project Section --- */
#showcase-project {
    margin-top: 4rem;
}

.showcase-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#showcase-project .section-title {
    text-align: left;
    margin: 0;
    padding: 0;
    border-bottom: none;
}

.store-links {
    display: flex;
    gap: 1rem;
}
.store-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #27303a;
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.store-link:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-3px);
}
.store-link img {
    height: 24px;
    width: auto;
}

.showcase-content-box {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

#showcaseDescription {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 80ch;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.screenshots-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.screenshot-item img {
    width: 100%;
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.screenshot-item img:hover {
    transform: scale(1.03);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 245, 196, 0.2);
}
.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.achievement-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.achievement-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    filter: invert(92%) sepia(27%) saturate(4225%) hue-rotate(95deg) brightness(102%) contrast(106%); /* Force icon to primary color */
}
.achievement-text {
    display: flex;
    flex-direction: column;
}
.achievement-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.1;
}
.achievement-description {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.screenshot-item, .achievement-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.screenshot-item:nth-child(1) { animation-delay: 0.1s; }
.screenshot-item:nth-child(2) { animation-delay: 0.2s; }
.screenshot-item:nth-child(3) { animation-delay: 0.3s; }

.achievement-card:nth-child(1) { animation-delay: 0.4s; }
.achievement-card:nth-child(2) { animation-delay: 0.5s; }
.achievement-card:nth-child(3) { animation-delay: 0.6s; }
.achievement-card:nth-child(4) { animation-delay: 0.7s; }


/* --- Section Title & Description --- */
.section-title { text-align: center; margin-bottom: 2.5rem; }

.section-description {
    text-align: center;
    max-width: 70ch;
    margin: -1.5rem auto 3rem auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.nda-tip {
    text-align: center;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: -1.5rem;
    margin-bottom: 3rem;
    color: var(--text-muted);
}

/* --- Featured Projects Section --- */
.featured-project-list {
    display: grid;
    gap: 2.5rem;
}
.featured-card {
    display: flex;
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.featured-card-media {
    flex: 1 1 45%;
    min-width: 300px;
    aspect-ratio: 16 / 9;
}
.featured-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}
.featured-card-media iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.featured-card-content {
    flex: 1 1 55%;
    padding: 2rem;
}

/* --- Hypercasual Grid Section --- */
.project-grid-hypercasual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}
.hypercasual-card {
    background-color: var(--surface-color); border-radius: 8px; overflow: hidden;
    text-align: center; border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.hypercasual-card:hover { transform: translateY(-5px); }
.hypercasual-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.hypercasual-card h4 { padding: 1rem; margin: 0; background-color: rgba(0,0,0,0.3); color: var(--text-color); font-weight: 500; }

a.hypercasual-card { display: block; text-decoration: none; }
.hypercasual-card.is-clickable { cursor: pointer; }
.hypercasual-card.is-clickable:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 245, 196, 0.3);
}
.hypercasual-card:not(.is-clickable) img { cursor: pointer; }


/* --- Game Jams Section --- */
.gamejam-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.gamejam-item {
    display: flex;
    gap: 2rem;
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    align-items: center;
}
.gamejam-info { flex: 2; }
.gamejam-visual { flex: 1; min-width: 250px; }
.gamejam-visual img { border-radius: 8px; cursor: pointer; }
.gamejam-item .row-container {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem; flex-wrap: wrap; gap: 1rem;
}
.gamejam-item h3 { margin-bottom: 0; }
.gamejam-item .platforms, .gamejam-item .links { display: flex; gap: 0.75rem; align-items: center; }
.gamejam-item .icon, .gamejam-item .href-icon { width: 24px; height: 24px; opacity: 0.7; }
.gamejam-item .href-icon { transition: opacity 0.3s ease, transform 0.3s ease; }
.gamejam-item a:hover .href-icon { opacity: 1; transform: scale(1.1); }


/* --- Videos Section --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}
.video-card {
    background-color: var(--surface-color); padding: 1.5rem; border-radius: 12px;
    border: 1px solid var(--border-color);
}
.video-card iframe {
    width: 100%; border-radius: 8px; border: none;
    margin-bottom: 1rem; aspect-ratio: 16/9;
}

/* --- Footer --- */
footer { text-align: center; padding: 2.5rem 1rem; margin-top: 4rem; border-top: 1px solid var(--border-color); color: var(--text-muted); }

/* --- Image Modal Styles --- */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(10, 15, 20, 0.9);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}
.modal-content {
    display: block;
    max-width: 90%;
    max-height: 90vh;
    animation: zoomIn 0.3s ease-in-out;
}
.modal-close {
    position: absolute;
    top: 20px; right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.modal-close:hover, .modal-close:focus { color: #bbb; text-decoration: none; }
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .featured-card, .gamejam-item { flex-direction: column; }
    .featured-card-media { min-width: 100%; }
}
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .profile-header, .profile-info { flex-direction: column; }
    .profile-info { text-align: center; }
    .contacts { text-align: center; width: 100%; }
    .contact-list { display: inline-block; text-align: left; }
    .video-grid { grid-template-columns: 1fr; }
    .screenshots-container { grid-template-columns: repeat(2, 1fr); }
    .showcase-header { flex-direction: column; align-items: flex-start; }
    #showcase-project .section-title { text-align: center; width: 100%; }
    .store-links { justify-content: center; width: 100%; }
}
@media (max-width: 480px) {
    .screenshots-container { grid-template-columns: 1fr; }
}