:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --warning: #f59e0b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 2rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

nav.visible {
    transform: translateY(0);
}

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

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-weight: 600;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.4);
}

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

.btn-secondary:hover {
    background: rgba(6, 182, 212, 0.1);
    transform: translateY(-2px);
}

.btn-github {
    background: #333;
    color: white;
    padding: 0.75rem 1.5rem;
}

.btn-github:hover {
    background: #24292e;
    transform: translateY(-2px);
}

.btn-website {
    background: #333;
    color: white;
    padding: 0.75rem 1.5rem;
}

.btn-website:hover {
    background: #24292e;
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

section:first-of-type {
    border-top: none;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

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

.skill-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.skill-card:hover {
    border-color: var(--accent);
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.1);
}

.skill-card:hover::before {
    left: 0;
}

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

.skill-card ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary);
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    border: 1px solid rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Experience Section */
.experience-timeline {
    position: relative;
    padding: 2rem 0;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent), var(--border));
}

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

.experience-item {
    margin-bottom: 3rem;
    padding-left: 4rem;
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 0 3px var(--primary);
}

.experience-item:hover::before {
    transform: scale(1.3);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.2);
}

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

.experience-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

.experience-company {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.experience-item p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.experience-item ul {
    list-style: none;
    margin-top: 1rem;
}

.experience-item li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.experience-item li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Experience Section - New Layout */
.experience-subsection {
    margin-top: 3rem;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
}

/* Domain Grid */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.domain-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-align: center;
}

.domain-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.15);
}

.domain-icon {
    color: var(--accent);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.domain-card:hover .domain-icon {
    color: var(--primary);
}

.domain-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

/* Scale Grid */
.scale-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.scale-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-align: center;
}

.scale-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.15);
}

.scale-icon {
    color: var(--accent);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.scale-card:hover .scale-icon {
    color: var(--primary);
}

.scale-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.achievement-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.15);
}

.achievement-number {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.achievement-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.achievement-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Experience Section Responsive */
@media (max-width: 1024px) {
    .domain-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .domain-grid,
    .scale-grid {
        grid-template-columns: 1fr;
    }
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(6, 182, 212, 0.15);
}

.project-card:hover::before {
    top: -25%;
    right: -25%;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
    position: relative;
    z-index: 1;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.project-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.project-card a:hover {
    color: var(--accent);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Education Section */
.education-item {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--accent);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.education-item:hover {
    border-left-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
    transform: translateX(4px);
}

.education-degree {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.education-school {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

/* Languages & Hobbies */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.info-card:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.info-card ul {
    list-style: none;
}

.info-card li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.info-card li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    margin-top: 5rem;
    text-align: center;
}

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

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

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-link:hover {
    color: var(--accent);
}

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

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(20px);
    }
}

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

section {
    animation: slideInUp 0.6s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(2, 6, 23, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--border);
        gap: 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

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

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

    .experience-item {
        padding-left: 3.5rem;
    }

    main {
        padding: 0 1rem;
    }
}
