:root {
    --bg-primary: #0a0c10;
    --bg-secondary: #0e1116;
    --bg-card: #12161d;
    --text-primary: #e8f1f2;
    --text-secondary: #a8c6c7;
    --text-muted: #6b7280;
    --accent: #0ea5a4;
    --accent-bright: #2dd4bf;
    --border: #1b2330;
    --glass: rgba(255,255,255,0.03);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.logo-animation {
    width: 80px;
    height: 100px;
}

.logo-path {
    fill: none;
    stroke: var(--accent-bright);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawLogo 2s ease forwards;
}

.logo-cross {
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    animation: drawLogo 1.5s ease 0.5s forwards;
}

@keyframes drawLogo {
    to { stroke-dashoffset: 0; }
}

.loading-text {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(10, 12, 16, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 100;
    transition: all 0.3s ease;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 24px;
    color: var(--accent-bright);
}

.brand-logo {
    width: 32px;
    height: 40px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--accent-bright);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-bright);
    transition: width 0.3s ease;
}

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

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #0a0c10;
}

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

.btn-outline {
    background: transparent;
    color: var(--accent-bright);
    border: 1px solid var(--accent-bright);
}

.btn-outline:hover {
    background: rgba(45, 212, 191, 0.1);
    transform: translateY(-2px);
}

/* Mobile Navigation */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    flex-direction: column;
    justify-content: space-around;
    cursor: pointer;
}

.mobile-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 24px 50px;
    background: radial-gradient(ellipse at center, rgba(14, 165, 164, 0.1) 0%, transparent 70%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--accent-bright);
    font-weight: 600;
    margin-bottom: 12px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-card {
    width: 300px;
    height: 400px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(45, 212, 191, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

.hero-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.hero-logo {
    width: 120px;
    height: 150px;
    z-index: 2;
}

/* Section Styles */
.section {
    padding: 100px 24px;
}

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

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

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 50px;
    text-align: center;
    color: var(--text-primary);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    list-style: none;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
    transition: left 0.5s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
}

.skill-card h3 {
    color: var(--accent-bright);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

/* Experience Timeline */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -42px;
    top: 30px;
    width: 12px;
    height: 12px;
    background: var(--accent-bright);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

.timeline-item:hover {
    transform: translateX(10px);
    border-color: var(--accent);
}

.job-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.job-meta {
    color: var(--accent-bright);
    font-weight: 600;
    margin-bottom: 12px;
}

.job-description {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.job-highlights {
    list-style: none;
}

.job-highlights li {
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.job-highlights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-bright);
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-bright) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--bg-primary);
}

.project-content {
    padding: 24px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.project-links {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(14, 165, 164, 0.1);
    color: var(--accent-bright);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(14, 165, 164, 0.2);
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(14, 165, 164, 0.2);
    transform: translateY(-2px);
}

.project-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(45, 212, 191, 0.1);
    color: var(--accent-bright);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(45, 212, 191, 0.2);
}

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

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(45, 212, 191, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-bright);
}

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

.contact-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--accent-bright);
}

.contact-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

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

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent-bright);
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 8px;
    cursor: pointer;
    z-index: 50;
    transition: opacity 0.3s ease;
}

.scroll-dot {
    width: 4px;
    height: 8px;
    background: var(--accent-bright);
    border-radius: 2px;
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(12px); opacity: 1; }
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-item:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 24px;
        right: 24px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 20px;
        flex-direction: column;
        gap: 20px;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero {
        padding: 120px 24px 50px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

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