* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --body-bg: radial-gradient(circle at top, #020617 0%, #020617 55%, #000000 100%);
    --text-color: #e5e7eb;
    --muted-text: #9ca3af;
    --card-bg: #020617;
    --card-muted-bg: #020617;
    --border-color: #1f2937;
    --nav-bg: rgba(15, 23, 42, 0.96);
    --nav-link: #e5e7eb;
    --nav-link-hover: #38bdf8;
    --footer-text: #9ca3af;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--body-bg);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 60px 20px;
    color: white;
    animation: fadeInDown 1s ease;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.3em;
    opacity: 0.95;
}

.header-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.btn-primary {
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.7);
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
}

.theme-toggle {
    margin-top: 20px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(15, 23, 42, 0.35);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.7);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.8);
}

.theme-toggle-icon {
    font-size: 1.1em;
}

body[data-theme="dark"] .theme-toggle {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.6);
}

nav {
    background: var(--nav-bg);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--nav-link);
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--nav-link-hover);
}

section {
    background: var(--card-bg);
    margin: 30px 0;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

section h2 {
    color: var(--primary);
    font-size: 2em;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 10px;
}

.about-content {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.profile-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.skills-category {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 20px 18px;
    background: var(--card-muted-bg);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.skills-category h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.skills-category ul {
    list-style: none;
    color: var(--text-color);
    margin-top: 8px;
}

.skills-category ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: 0;
}

.skills-category::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 55%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.skills-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    border-color: var(--primary);
}

.skills-category:hover::after {
    opacity: 1;
}

.skills-intro {
    margin-top: 8px;
    color: var(--muted-text);
    font-size: 0.95em;
}

.skills-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.skills-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.06);
    font-size: 1.2em;
}

.skills-level-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78em;
    background: rgba(148, 163, 184, 0.15);
    color: var(--muted-text);
}

.lang-list {
    list-style: none;
    padding-left: 0;
    margin-top: 8px;
}

.lang-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.lang-list li::before {
    content: none;
    width: 0;
    margin: 0;
}

.lang-list .stars {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 2px;
    color: #f5a524;
}

.lang-list small {
    color: var(--muted-text);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.project-card {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
}

.project-card:hover {
    border-color: #1e3c72;
    box-shadow: 0 5px 20px rgba(30, 60, 114, 0.2);
    transform: translateY(-5px);
}

.project-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s;
}

.project-link:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.tag {
    background: #f3f4f6;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    color: var(--muted-text);
}

body[data-theme="dark"] .tag {
    background: rgba(148, 163, 184, 0.15);
    color: #e5e7eb;
}

.timeline {
    position: relative;
    padding-left: 30px;
    margin-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline-item h3 {
    color: var(--primary);
    margin-bottom: 5px;
}

.timeline-item .date {
    color: #9ca3af;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.contact-form {
    max-width: 600px;
    margin: 20px auto 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 12px 40px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(30, 60, 114, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#scrollTopBtn {
    position: fixed;
    right: 20px;
    bottom: 25px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: none;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.6);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 150;
}

#scrollTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 30px;
    color: var(--footer-text);
    margin-top: 30px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.social-links a {
    color: inherit;
    text-decoration: none;
    font-size: 1.5em;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.2);
}

@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);
    }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    section {
        padding: 25px;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .header-actions {
        flex-direction: column;
    }

    .project-links {
        flex-direction: column;
    }

}
