/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
    background: #111827;
    color: #f3f4f6;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

body.dark header {
    border-bottom-color: #374151;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-center {
    text-align: center;
}

.icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
    color: #1a1a1a;
}

body.dark h1 {
    color: #f3f4f6;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

body.dark .subtitle {
    color: #d1d5db;
}

/* Dark Mode Toggle */
.dark-toggle {
    background: #e5e7eb;
    border: none;
    border-radius: 25px;
    width: 60px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
    padding: 2px;
}

.dark-toggle:hover {
    background: #d1d5db;
}

body.dark .dark-toggle {
    background: #4b5563;
}

body.dark .dark-toggle:hover {
    background: #6b7280;
}

.toggle-slider {
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateX(0);
}

body.dark .toggle-slider {
    background: #1f2937;
    transform: translateX(28px);
}

.sun-icon, .moon-icon {
    width: 16px;
    height: 16px;
    position: relative;
}

.sun-icon::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
    top: 4px;
    left: 4px;
}

.sun-icon::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #fbbf24;
    border-radius: 50%;
    top: 0;
    left: 0;
    background: transparent;
}

.moon-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fbbf24;
    top: 2px;
    left: 2px;
}

.moon-icon::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1f2937;
    top: 1px;
    left: 4px;
}

/* Interactive Elements */
.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable:hover {
    transform: scale(1.05);
}

.icon.clickable:hover {
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

/* Hamburger Menu */
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
}

.hamburger-icon {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

body.dark .hamburger-line {
    background: #f3f4f6;
}

.hamburger.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.menu-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.menu-content {
    background: transparent;
    padding: 60px 40px;
    width: 100%;
    max-width: 600px;
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-overlay.active .menu-content {
    transform: translateY(0);
}

.menu-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

.menu-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 2rem;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.15s ease;
    cursor: pointer;
    transform: translateY(20px);
    opacity: 0;
}

.menu-overlay.active .menu-links a {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s ease;
}

.menu-links a:nth-child(1) { transition-delay: 0.1s; }
.menu-links a:nth-child(2) { transition-delay: 0.2s; }
.menu-links a:nth-child(3) { transition-delay: 0.3s; }
.menu-links a:nth-child(4) { transition-delay: 0.4s; }

.menu-links a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.menu-links a.active {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
}

/* Main Content */
main {
    padding: 60px 0;
}

/* Game Styles */
.game-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 40px;
    border-radius: 8px;
    overflow: hidden;
    background: #87CEEB;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

body.dark .game-container {
    background: #1e3a8a;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 200px;
    cursor: pointer;
}

.game-instructions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    pointer-events: none;
    text-align: center;
}

/* Section Header Images */
.section-header-image {
    width: 100%;
    max-width: 100%; /* Changed from 400px to 100% */
    height: 250px;   /* Increased from 150px to 250px */
    margin: 0 auto 40px; /* Increased bottom margin */
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    text-align: center;
    border: 2px dashed #d1d5db;
}

body.dark .section-header-image {
    background: #374151;
    color: #9ca3af;
    border-color: #4b5563;
}

.section-header-image {
    width: 100%;
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Signature Image */
.signature-image {
    text-align: center;
    margin-top: 30px;
}

.signature-image img {
    max-width: 200px;
    height: auto;
    opacity: 0.8;
}

body.dark .signature-image img {
    opacity: 0.9;
    filter: brightness(1.2);
}

/* Typography and Content */
.content {
    color: #555;
    line-height: 1.7;
}

body.dark .content {
    color: #d1d5db;
}

.content p {
    margin-bottom: 20px;
}

h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 30px;
    color: #1a1a1a;
}

body.dark h2 {
    color: #f3f4f6;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 30px 0 15px;
    color: #1a1a1a;
}

body.dark h3 {
    color: #f3f4f6;
}

/* Content Boxes */
.gray-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
}

body.dark .gray-box {
    background: #374151;
    border-color: #4b5563;
}

/* Job/Experience Styles */
.job {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

body.dark .job {
    border-bottom-color: #374151;
}

.job:last-child {
    border-bottom: none;
}

.job-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
}

body.dark .job-title {
    color: #f3f4f6;
}

.job-company {
    color: #666;
    margin-bottom: 5px;
}

body.dark .job-company {
    color: #d1d5db;
}

.job-period {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}

body.dark .job-period {
    color: #9ca3af;
}

/* Buttons */
.btn {
    display: inline-block;
    margin: 20px 0;
    padding: 12px 24px;
    background-color: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    transform: scale(1);
}

.btn:hover {
    background-color: #333;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

body.dark .btn {
    background-color: #f3f4f6;
    color: #1a1a1a;
}

body.dark .btn:hover {
    background-color: #e5e7eb;
}

/* Cards */
.card-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    background: #f9fafb;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #d1d5db;
    text-decoration: none;
    color: inherit;
}

body.dark .card {
    background: #374151;
    border-color: #4b5563;
}

body.dark .card:hover {
    border-color: #6b7280;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card h4 {
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
    flex: 1;
}

body.dark .card h4 {
    color: #f3f4f6;
}

.card-date {
    font-size: 0.85rem;
    color: #888;
    margin-left: 12px;
    flex-shrink: 0;
}

body.dark .card-date {
    color: #9ca3af;
}

.card p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

body.dark .card p {
    color: #9ca3af;
}

/* Footer and Social */
footer {
    border-top: 1px solid #eee;
    padding: 40px 0;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

body.dark footer {
    border-top-color: #374151;
    color: #9ca3af;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    transition: all 0.2s ease;
    color: white;
}

.social-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.social-icon.linkedin {
    background: #0077B5;
}

.social-icon.bluesky {
    background: #00A8E6;
}

.social-icon.github {
    background: #333;
}

body.dark .social-icon.github {
    background: #f3f4f6;
    color: #333;
}

.social-icon.farcaster {
    background: #855DCD;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .container {
        padding: 0 15px;
    }
}