/* --- CSS Variables & Themes --- */
:root {
    /* Colors */
    --primary-blue: #007bff;
    --primary-orange: #ff7f50;
    
    /* Light Mode Defaults */
    --bg-color: #ffffff;
    --text-color: #333333;
    --glass-bg: rgba(200, 200, 200, 0.2);
    --glass-border: rgba(255, 255, 255, 0.3);
    --nav-text: #222;
    --card-bg: rgba(255,255,255, 0.5);
}

[data-theme="dark"] {
    /* Dark Mode Overrides */
    --bg-color: #1a1a1a;
    --text-color: #f4f4f4;
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-text: #f4f4f4;
    --card-bg: rgba(40, 40, 40, 0.5);
}

/* --- Global Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
}

/* --- Gradient Semicircles (Background) --- */
.shape {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 40vw;
    height: 80vh;
    border-radius: 50%;
    filter: blur(80px); /* Creates the soft gradient diffuse look */
    z-index: -1;
    opacity: 0.6;
}

.shape-left {
    left: -15vw;
    background: radial-gradient(circle, var(--primary-blue), var(--bg-color));
}

.shape-right {
    right: -15vw;
    background: radial-gradient(circle, var(--primary-orange), var(--bg-color));
}

/* --- Glassy Navigation Bar --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: center; /* Centered as per sketch mostly, or adjust to space-between */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Active State (controlled by JS) */
.nav-link.active, .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--nav-text);
    border-radius: 5px;
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 600;
}

/* --- Theme Toggle Switch --- */
.theme-switch-wrapper {
    position: absolute; /* Positioned to the far right */
    right: 0;
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 26px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    font-size: 14px;
}

.slider:before {
    background-color: white;
    bottom: 4px;
    content: "";
    height: 18px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 18px;
    border-radius: 50%;
    z-index: 2;
}

input:checked + .slider {
    background-color: #666;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* --- Main Layout & Sections --- */
main {
    padding-top: 80px; /* Offset for fixed header */
}

.section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.container {
    max-width: 1000px;
    width: 100%;
}

.section-header {
    margin-bottom: 2rem;
    text-align: left; /* Default Left */
}

.section-header h2 {
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

/* --- Alternating Layout Logic --- */

/* Normal Section (Bio, Work): Header Left, Content Flow Normal */
.content-wrapper {
    display: flex;
    gap: 3rem;
    align-items: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* Alternating Section (Hobby, Contact): Header Right, Content Reversed */
.alt-layout .section-header {
    text-align: right;
}

.alt-layout .content-wrapper {
    flex-direction: row-reverse;
    text-align: right;
}

/* --- Content Styling --- */
.photo-frame {
    flex: 1;
    display: flex;
    justify-content: center;
}

.photo-placeholder {
    width: 250px;
    height: 300px;
    background-color: #ddd;
    border: 2px dashed #999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    border-radius: 15px;
    font-weight: bold;
}

.profile-photo {
    width: 250px;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.text-content {
    flex: 2;
}

.text-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.alt-layout .text-content h3 {
    color: var(--primary-orange);
}

.visual-content {
    flex: 1;
}

.generic-placeholder {
    width: 100%;
    height: 200px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 10px 20px;
    background-color: var(--primary-orange);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .content-wrapper, .alt-layout .content-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    .section-header, .alt-layout .section-header {
        text-align: center;
    }

    .nav-links {
        display: none; /* Hide nav on mobile for simplicity or add hamburger later */
    }
}

/* --- Games Grid System (NEW) --- */

.games-grid {
    display: grid;
    /* Responsive Grid: Cards min 280px wide */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem;
    width: 100%;
    margin-top: 1rem;
}

.game-card {
    background: var(--card-bg); 
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    cursor: pointer;
    min-height: 250px;
}

/* Hover Effects */
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .game-card:hover {
    background: rgba(60, 60, 60, 0.6);
}

.game-card h3 {
    margin: 1rem 0 0.5rem 0;
    font-size: 1.4rem;
    color: var(--primary-blue);
}

[data-theme="dark"] .game-card h3 {
    color: var(--primary-orange); 
}

.game-card p {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* --- Card Visuals (Icons) --- */
.card-visual {
    width: 100%;
    height: 100px;
    background: rgba(0,0,0,0.03);
    border-radius: 10px;
    border: 2px dashed var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-family: monospace;
    font-weight: 800;
    color: var(--text-color);
}

.math-icon {
    font-size: 1.5rem;
}

/* CSS Drawing: Simple Smith Chart Circle */
.icon-smith {
    width: 60px;
    height: 60px;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    position: relative;
    opacity: 0.8;
}
.icon-smith::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-color);
}
.icon-smith::before {
    content: '';
    position: absolute;
    top: 15%; /* Arbitrary arc line */
    left: 15%;
    width: 70%;
    height: 70%;
    border-bottom: 1px solid var(--text-color);
    border-radius: 50%;
}

/* CSS Drawing: Divider Symbol */
.icon-divider {
    width: 60px;
    height: 2px;
    background: var(--text-color);
    position: relative;
    opacity: 0.8;
}
.icon-divider::before, .icon-divider::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 24px;
    border: 2px solid var(--text-color);
    background: transparent;
    top: -12px;
}
.icon-divider::before { left: 10px; }
.icon-divider::after { right: 10px; }
