:root {
    --primary: #FF2D20;
    /* Laravel Red */
    --primary-hover: #D92318;
    --bg-dark: #0F172A;
    --bg-card: #1E293B;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --accent-glow: rgba(255, 45, 32, 0.15);
    --glass: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);

    --font-main: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Glow Effect */
.background-glow {
    position: fixed;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.logo {
    font-family: var(--font-code);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

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

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

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.lang-switch button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    transition: color 0.3s;
}

.lang-switch button.active,
.lang-switch button:hover {
    color: var(--primary);
}

.divider {
    color: var(--border);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    gap: 4rem;
    padding-top: 80px;
    /* Navbar offset */
}

.hero-content {
    flex: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 45, 32, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 45, 32, 0.2);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94A3B8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 45, 32, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.code-block {
    background: #1E1E1E;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: #D4D4D4;
    position: relative;
    width: 100%;
    max-width: 500px;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 12px;
    height: 12px;
    background: #FF5F56;
    border-radius: 50%;
    box-shadow: 20px 0 0 #FFBD2E, 40px 0 0 #27C93F;
}

pre {
    margin-top: 1.5rem;
    overflow-x: auto;
}

/* Sections */
.section {
    padding: 6rem 5%;
    text-align: center;
}

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

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    text-align: left;
}

.about-image {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-date {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: var(--font-code);
}

.timeline-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    position: relative;
    transition: transform 0.3s;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 20px;
    width: 16px;
    height: 16px;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    right: -3rem;
    transform: translateX(50%);
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -3rem;
    transform: translateX(-50%);
}

.timeline-content h3 {
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 50px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-content::after {
        left: -30px !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
}

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

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.skill-category:hover .skill-tags span {
    border-color: rgba(255, 45, 32, 0.3);
    color: var(--text-main);
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-main);
    text-decoration: none;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.social-link:hover {
    background: rgba(255, 45, 32, 0.1);
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: var(--font-main);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

#form-status {
    margin-top: 1rem;
    font-weight: 600;
    text-align: center;
    min-height: 1.5rem;
}

/* Footer */
footer {
    padding: 2rem 5%;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        display: none;
        /* Mobile menu to be implemented if needed, simple hide for now */
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content p {
        margin: 0 auto 2.5rem;
    }

    .cta-group {
        justify-content: center;
    }

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 350px;
        margin: 0 auto;
        justify-content: center;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 50px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-content::after {
        left: -30px !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-icon.success {
    color: #10b981;
}

.modal-icon.error {
    color: #ef4444;
}

.modal-icon.success::before {
    content: '✓';
}

.modal-icon.error::before {
    content: '✕';
}

.modal-content h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

#modal-btn {
    min-width: 120px;
}