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

/* CSS Variables */
:root {
    --primary: #00d4ff;
    --secondary: #0a84ff;
    --accent: #5e5ce6;
    --dark-bg: #0a0a0f;
    --dark-card: #16161d;
    --dark-hover: #1f1f28;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --gold: #ffc233;
}

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--dark-bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated 3D Cube Grid Background (index.html only) */
body.home::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    opacity: 0.2;
    background-image: 
        /* Isometric cube pattern - creates 3D effect */
        linear-gradient(30deg, transparent 48%, rgba(0, 212, 255, 0.4) 49%, rgba(0, 212, 255, 0.4) 51%, transparent 52%),
        linear-gradient(150deg, transparent 48%, rgba(0, 212, 255, 0.3) 49%, rgba(0, 212, 255, 0.3) 51%, transparent 52%),
        linear-gradient(90deg, transparent 48%, rgba(94, 92, 230, 0.2) 49%, rgba(94, 92, 230, 0.2) 51%, transparent 52%);
    background-size: 120px 70px;
    background-position: 0 0;
    transform: perspective(500px) rotateX(60deg) rotateZ(45deg);
    transform-origin: center center;
    animation: moveCubes 30s linear infinite;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 212, 255, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(94, 92, 230, 0.15) 0px, transparent 50%);
    pointer-events: none;
}

@keyframes moveCubes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 120px 70px;
    }
}

/* Ensure content is above background */
nav, section, .container, .landing {
    position: relative;
    z-index: 1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation */
nav {
    background: rgba(22, 22, 29, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

nav ul li a:hover {
    color: var(--primary);
}

/* Landing Page */
.landing {
    text-align: center;
    color: var(--text-primary);
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing .logo {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Landing Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    animation: fadeInUp 1s ease-out 0.6s both;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.landing-card {
    background: rgba(22, 22, 29, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.landing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.landing-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(94, 92, 230, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.landing-card:hover::before {
    transform: scaleX(1);
}

.landing-card:hover::after {
    opacity: 1;
}

.landing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.5);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

.landing-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.landing-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Section Styles */
section {
    padding: 2rem 0;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .tagline {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

/* About Section */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.expertise-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.expertise-item {
    background: rgba(22, 22, 29, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.expertise-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.expertise-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Timeline Section (journey.html) */
.timeline-section {
    padding: 3rem 0;
}

.timeline-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    text-align: center;
}

.timeline-section .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Timeline Styles */
.timeline {
    max-width: 900px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.timeline-year {
    font-weight: 700;
    color: var(--primary);
    min-width: 120px;
    flex-shrink: 0;
}

.timeline-content h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 1.5rem;
    text-indent: -1.5rem;
    margin-left: 1.5rem;
}

/* AI Journey Highlight */
.ai-journey {
    background: rgba(0, 212, 255, 0.05);
    border-left: 4px solid var(--primary);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.ai-journey h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.ai-journey p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(22, 22, 29, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

.service-card h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-icon {
    font-size: 1.8rem;
    display: inline-block;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background: rgba(22, 22, 29, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

.portfolio-card-content {
    padding: 2rem;
}

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

.portfolio-card-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.portfolio-tag {
    display: inline-block;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

/* Skills Section (software.html) */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: rgba(22, 22, 29, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skill-list {
    list-style: none;
    color: var(--text-secondary);
}

.skill-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-list li:last-child {
    border-bottom: none;
}

/* GitHub Card Special Styles */
.github-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(94, 92, 230, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.github-card-wide {
    grid-column: span 2;
}

.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--primary);
    color: var(--dark-bg);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-github:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* Contact Section */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 300px;
    justify-content: center;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.5);
}

/* Tools Promo Section */
.tools-promo {
    padding: 4rem 1rem;
    background: var(--dark-card);
}

.tools-promo .container {
    max-width: 1000px;
}

.tools-promo h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tools-promo-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.promo-card {
    background: var(--dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    min-height: 160px;
}

.promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

.promo-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    width: fit-content;
    margin-bottom: 0.5rem;
    min-height: 32px;
}

.promo-logo {
    height: 20px;
    width: auto;
    max-width: 120px;
    display: block;
    object-fit: contain;
}

.promo-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.promo-card a:hover {
    color: var(--secondary);
}

.promo-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .promo-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .promo-card {
        padding: 1rem;
    }
}

/* Footer */
footer {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--dark-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.minecraft-link {
    margin-top: 1.5rem;
}

.minecraft-link a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.minecraft-link a:hover {
    color: var(--gold);
}

/* Dropdown Navigation */
nav ul li {
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(22, 22, 29, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background: rgba(0, 212, 255, 0.1);
    border-left-color: var(--primary);
    color: var(--primary);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        background: rgba(22, 22, 29, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 0;
        transition: right 0.3s ease;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
    }
    
    nav ul.mobile-menu-open {
        right: 0;
    }
    
    nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    nav ul li a {
        display: block;
        padding: 1rem 0;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 212, 255, 0.05);
        border: none;
        border-radius: 0;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0;
    }
    
    .dropdown.mobile-dropdown-open .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem 0;
    }
    
    .dropdown-toggle::after {
        margin-left: auto;
    }
    
    .dropdown.mobile-dropdown-open .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li a {
        font-size: 0.9rem;
    }
    
    .landing .logo {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 2rem 0;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timeline-year {
        min-width: auto;
    }
    
    .timeline-content p {
        padding-left: 0;
        text-indent: 0;
        margin-left: 0;
    }
    
    .github-card-wide {
        grid-column: span 1;
    }
    
    .social-link {
        min-width: 250px;
    }
}
