/* ===== ROOT VARIABLES ===== */
:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #242424;
    --bg-card-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #4a9eff;
    --accent-hover: #3a8eef;
    --accent-light: rgba(74, 158, 255, 0.1);
    --minecraft: #7fc968;
    --minecraft-light: rgba(127, 201, 104, 0.1);
    --gradient: linear-gradient(135deg, #4a9eff 0%, #7b61ff 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== NAVIGATION ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1.25rem 0;
    transition: all var(--transition-normal);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

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

.logo a {
    color: var(--accent);
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-fast);
    letter-spacing: -0.5px;
}

.logo a:hover {
    transform: translateY(-1px);
    text-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width var(--transition-normal);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(74, 158, 255, 0.05) 0%, transparent 70%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.02)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 900px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
    font-weight: 300;
}

.hero-links {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn {
    padding: 0.875rem 2.25rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 158, 255, 0.35);
}

.btn-secondary {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 158, 255, 0.35);
}

/* ===== SECTIONS ===== */
section {
    padding: 6rem 0;
    position: relative;
}

.alternate-bg {
    background: var(--bg-secondary);
}

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

.section-title {
    font-size: 3rem;
    margin-bottom: 3.5rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
    animation: fadeInUp 0.6s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* ===== TECH STACK ===== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tech-item {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    cursor: default;
    animation: fadeInUp 0.6s ease;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

.tech-item:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    box-shadow: 0 12px 40px rgba(74, 158, 255, 0.15);
}

.tech-item:hover::before {
    transform: translateX(0);
}

/* ===== EXPERIENCE CARDS ===== */
.experience-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.exp-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.exp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.exp-card:hover {
    transform: translateX(10px);
    box-shadow: 0 12px 40px rgba(74, 158, 255, 0.1);
}

.exp-card:hover::before {
    transform: scaleY(1);
}

.minecraft-card:hover {
    box-shadow: 0 12px 40px rgba(127, 201, 104, 0.15);
}

.minecraft-card::before {
    background: linear-gradient(135deg, #7fc968 0%, #6eb85a 100%);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.exp-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.exp-company {
    color: var(--accent);
    font-weight: 500;
}

.exp-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.375rem 1rem;
    border-radius: 20px;
}

.exp-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.exp-skills {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.skill-tag {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== MINECRAFT SPECIFIC ===== */
.minecraft-hero {
    background: radial-gradient(ellipse at center, rgba(127, 201, 104, 0.08) 0%, transparent 70%);
}

.minecraft-section {
    background: linear-gradient(135deg, rgba(127, 201, 104, 0.03) 0%, rgba(127, 201, 104, 0.08) 100%);
}

.minecraft-section .section-title {
    color: var(--minecraft);
}

.minecraft-cta {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.minecraft-highlights {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.highlight-item {
    text-align: center;
}

.highlight-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--minecraft);
    margin-bottom: 0.5rem;
}

.highlight-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.certifications-section {
    margin-top: 3rem;
}

.cert-title {
    color: var(--accent);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    text-align: center;
}

.hero-description {
    color: var(--text-secondary);
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--gradient), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.2);
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

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

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== ROLE GRID ===== */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.role-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease;
}

.role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(127, 201, 104, 0.1);
    border-color: rgba(127, 201, 104, 0.2);
}

.role-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.role-card h3 {
    color: var(--minecraft);
    margin-bottom: 0.5rem;
}

.role-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.role-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* ===== SKILLS CONTAINER ===== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease;
}

.skill-category h3 {
    color: var(--minecraft);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.skill-list {
    display: grid;
    gap: 1rem;
}

.skill-item {
    background: rgba(127, 201, 104, 0.05);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.skill-item:hover {
    background: rgba(127, 201, 104, 0.1);
    color: var(--text-primary);
    border-color: rgba(127, 201, 104, 0.3);
    transform: translateX(5px);
}

/* ===== PROJECTS ===== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(74, 158, 255, 0.15);
}

.project-header {
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--accent-light) 0%, rgba(123, 97, 255, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.project-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.project-content {
    padding: 2rem 2.5rem 2.5rem;
}

.project-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.project-tech {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.tech-tag {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.project-card:hover .tech-tag {
    background: var(--accent);
    color: white;
}

/* ===== CERTIFICATIONS ===== */
.cert-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.cert-list li {
    background: var(--bg-card);
    padding: 1.75rem 2rem;
    border-radius: 16px;
    border-left: 4px solid var(--accent);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.cert-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--accent-light) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.cert-list li:hover {
    transform: translateX(12px);
    box-shadow: 0 8px 30px rgba(74, 158, 255, 0.1);
}

.cert-list li:hover::before {
    opacity: 1;
}

.cert-list li a {
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-secondary);
    padding: 4rem 0 3rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
}

.social-links a::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    filter: blur(20px);
    transition: all var(--transition-normal);
}

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

.social-links a:hover::after {
    opacity: 0.3;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(74, 158, 255, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero .subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }
    
    .tech-item {
        padding: 1.25rem 1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .project-grid,
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item::before {
        left: -1.9rem;
    }
}

@media (max-width: 480px) {
    section {
        padding: 4rem 0;
    }
    
    .container {
        padding: 0 1.25rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.75rem;
        font-size: 0.9rem;
    }
    
    .exp-card {
        padding: 1.75rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}