/* Root Variables for Modern Dark Theme */
:root {
    --bg-color: #050510;
    --surface-color: rgba(20, 20, 35, 0.6);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --primary-color: #7209b7;
    --secondary-color: #4361ee;
    --accent-color: #4cc9f0;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    position: relative;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(76, 201, 240, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 201, 240, 0.4);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(76, 201, 240, 0.2) transparent;
}

/* Background Animated Glows */
.glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: floatingGlow 10s infinite ease-in-out alternate;
    pointer-events: none;
}

@keyframes floatingGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.glow-1 {
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
}

.glow-2 {
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    animation-delay: -5s;
}

/* Typography */
h1, h2, h3, .logo {
    font-family: var(--font-heading);
    font-weight: 800;
}

.highlight {
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar with Glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(5, 5, 16, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-border);
    z-index: 1000;
    transition: padding 0.3s ease;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Main Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

section {
    padding: 120px 0 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
}

/* Hero Section */
.hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease backwards;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s 0.2s ease backwards;
}

.hero-actions {
    display: flex;
    gap: 20px;
    animation: fadeInUp 0.8s 0.4s ease backwards;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    box-shadow: 0 10px 20px rgba(114, 9, 183, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(114, 9, 183, 0.5);
}

.btn-secondary {
    background: var(--surface-color);
    color: white;
    border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.btn-game {
    background: linear-gradient(135deg, #11998E, #38EF7D);
    color: white;
    border: none;
    box-shadow: 0 10px 20px rgba(17, 153, 142, 0.3);
}

.btn-game:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(17, 153, 142, 0.5);
}

/* CSS Art Code Card */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: floatIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.6s backwards;
}

@keyframes floatIn {
    from { opacity: 0; transform: scale(0.8) rotate(5deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.code-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 25px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    transform: perspective(1000px) rotateY(-15deg) rotateX(10deg);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.code-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    box-shadow: 0 40px 80px rgba(114, 9, 183, 0.2);
}

.code-card .header {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
}

.code-card .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-lines .line {
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

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

.stat-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: white;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.project-image {
    height: 200px;
    width: 100%;
}

.project-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(255,255,255,0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 500;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, gap 0.3s ease;
}

.project-link:hover {
    color: var(--accent-color);
    gap: 12px;
}

/* Highlight specific card */
.highlight-card {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(114, 9, 183, 0.15);
}

/* Footer Section */
.footer {
    border-top: 1px solid var(--surface-border);
    padding: 40px;
    text-align: center;
    background: rgba(5, 5, 16, 0.8);
    margin-top: 60px;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}

/* Intersection Observer Animations */
.section-hidden {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Games Section */
.games {
    padding: 120px 0 60px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.game-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.game-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.game-info h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.game-info {
    min-width: 0;
}

.game-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

@media (max-width: 640px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== About Page ===== */
.about-main {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 40px;
}

.about-hero {
    padding: 160px 0 40px;
    min-height: auto;
    display: block;
}

.about-name {
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 10px;
}

.about-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.about-focus {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.about-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    transition: all 0.3s ease;
}

.about-link-pill:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.about-section {
    padding: 0 0 48px;
    min-height: auto;
    display: block;
}

.about-section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.about-section-title i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.about-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 28px 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 12px;
}

.about-card p:last-child {
    margin-bottom: 0;
}

.about-card strong {
    color: var(--text-primary);
}

.timeline-item {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--surface-border);
}

.timeline-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.timeline-header strong {
    color: var(--text-primary);
    font-size: 1.05rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent-color);
    white-space: nowrap;
}

.timeline-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.timeline-detail {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.skill-group {
    margin-bottom: 20px;
}

.skill-group:last-child {
    margin-bottom: 0;
}

.skill-group h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.about-contact {
    padding-bottom: 0;
}

/* Responsive Design */
@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; padding-top: 15vh; gap: 60px; }
    .hero-title { font-size: 3rem; }
    .hero-actions { justify-content: center; flex-wrap: wrap; }
    .code-card { margin: 0 auto; transform: none; }
    .code-card:hover { transform: translateY(-5px); }
    section { padding: 80px 0; min-height: auto; }
}

@media (max-width: 600px) {
    .nav-content { flex-direction: column; padding: 15px 20px; gap: 15px; }
    .navbar { padding: 5px 0; position: relative; }
    .nav-links { 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 15px; 
        font-size: 0.9rem; 
    }
    main { padding: 0 15px; }
    .about-main { padding: 0 15px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .btn { justify-content: center; padding: 12px 20px; font-size: 0.9rem; }
    .section-title { font-size: 1.8rem; margin-bottom: 30px; }
    .stats-grid { gap: 15px; }
    .stat-card { padding: 25px 15px; }
    .stat-number { font-size: 2.5rem; }
    .projects-grid { gap: 20px; }
    .project-content { padding: 20px; }
    .project-content h3 { font-size: 1.2rem; }
    .games-grid { gap: 15px; }
    .game-card { padding: 20px; gap: 15px; }
    .game-icon { width: 50px; height: 50px; font-size: 1.2rem; }
    .game-info h3 { font-size: 1.1rem; }
    .game-info p { font-size: 0.85rem; }
    .footer { padding: 30px 15px; }
    .about-name { font-size: 2.2rem; }
    .about-hero { padding-top: 120px; }
    .about-card { padding: 20px 18px; }
    .timeline-header { flex-direction: column; gap: 2px; }
    .about-links { gap: 8px; }
    .about-link-pill { padding: 7px 14px; font-size: 0.85rem; }
}
