/* ===================================
   CSS Variables & Design Tokens
   =================================== */
:root {
    /* Color Palette */
    --color-primary: hsl(200, 95%, 55%);
    --color-primary-light: hsl(200, 95%, 65%);
    --color-primary-dark: hsl(200, 95%, 45%);
    --color-secondary: hsl(180, 85%, 55%);
    --color-accent: hsl(220, 90%, 60%);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, hsl(200, 95%, 55%) 0%, hsl(180, 85%, 55%) 100%);
    --gradient-secondary: linear-gradient(135deg, hsl(220, 90%, 60%) 0%, hsl(200, 95%, 55%) 100%);
    --gradient-accent: linear-gradient(135deg, hsl(180, 85%, 55%) 0%, hsl(160, 80%, 50%) 100%);

    /* Dark Theme Colors */
    --color-bg-primary: hsl(240, 15%, 8%);
    --color-bg-secondary: hsl(240, 12%, 12%);
    --color-bg-tertiary: hsl(240, 10%, 16%);
    --color-surface: hsla(240, 10%, 20%, 0.6);
    --color-surface-glass: hsla(240, 10%, 25%, 0.4);

    /* Text Colors */
    --color-text-primary: hsl(0, 0%, 98%);
    --color-text-secondary: hsl(0, 0%, 75%);
    --color-text-tertiary: hsl(0, 0%, 60%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3rem;
    --text-6xl: 4rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px hsla(0, 0%, 0%, 0.1);
    --shadow-md: 0 4px 16px hsla(0, 0%, 0%, 0.2);
    --shadow-lg: 0 8px 32px hsla(0, 0%, 0%, 0.3);
    --shadow-glow: 0 0 40px hsla(250, 84%, 54%, 0.3);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-popover: 500;
}

/* ===================================
   Reset & Base Styles
   =================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* ===================================
   Utility Classes
   =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

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

/* ===================================
   Navigation
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: var(--space-md) 0;
    background: hsla(240, 15%, 8%, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.05);
    transition: all var(--transition-base);
}

.nav.scrolled {
    padding: var(--space-sm) 0;
    box-shadow: var(--shadow-lg);
}

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

.nav-logo {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    position: relative;
    padding: var(--space-xs) 0;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: var(--space-xs);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-base);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--space-3xl) var(--space-lg);
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, hsl(200, 95%, 55%) 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, hsl(180, 85%, 55%) 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, hsl(220, 90%, 60%) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero-greeting {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    animation: fadeInUp 0.6s ease-out;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-4xl), 8vw, var(--text-6xl));
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: var(--text-2xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--color-text-tertiary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-tertiary);
    font-size: var(--text-sm);
    animation: fadeIn 1s ease-out 1s both;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: rotate(45deg) translateY(0);
    }

    50% {
        transform: rotate(45deg) translateY(10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn:hover::before {
    opacity: 0.1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px hsla(200, 95%, 55%, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px hsla(200, 95%, 55%, 0.6);
}

.btn-secondary {
    background: var(--color-surface-glass);
    color: var(--color-text-primary);
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: hsla(0, 0%, 100%, 0.2);
    transform: translateY(-2px);
}

/* ===================================
   Section Styles
   =================================== */
section {
    padding: var(--space-3xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
}

/* ===================================
   About Section
   =================================== */
.about {
    background: var(--color-bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 1;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--color-bg-tertiary);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0.2;
    mix-blend-mode: overlay;
}

.about-text h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
}

.about-text p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid hsla(0, 0%, 100%, 0.1);
}

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

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xs);
}

.stat-label {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

/* ===================================
   Skills Section
   =================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.skill-card {
    background: var(--color-surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(0, 0%, 100%, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: hsla(0, 0%, 100%, 0.15);
    box-shadow: var(--shadow-lg);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-md);
}

.skill-card h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.skill-card p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: hsla(200, 95%, 55%, 0.1);
    border: 1px solid hsla(200, 95%, 55%, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--color-primary-light);
}

/* ===================================
   Certifications Section
   =================================== */
.certifications {
    background: var(--color-bg-secondary);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.cert-card {
    background: var(--color-surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(0, 0%, 100%, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.cert-card:hover {
    transform: translateY(-4px);
    border-color: hsla(0, 0%, 100%, 0.15);
    box-shadow: var(--shadow-lg);
}

.cert-card:hover::before {
    transform: scaleX(1);
}

.cert-badge {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cert-badge-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cert-icon {
    font-size: var(--text-4xl);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.cert-content {
    flex: 1;
}

.cert-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.cert-issuer {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
}

/* ===================================
   Projects Section
   =================================== */
.projects {
    background: var(--color-bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.project-card {
    background: var(--color-surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(0, 0%, 100%, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, hsla(240, 15%, 8%, 0.9) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    color: white;
    font-weight: 600;
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.project-content {
    padding: var(--space-lg);
}

.project-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.project-content p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

/* ===================================
   Contact Section
   =================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
}

.contact-info p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-method {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.method-icon {
    font-size: var(--text-3xl);
    flex-shrink: 0;
}

.method-details h4 {
    font-size: var(--text-base);
    margin-bottom: var(--space-xs);
}

.method-details a,
.method-details p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.method-details a:hover {
    color: var(--color-primary-light);
}

/* Contact Form */
.contact-form {
    background: var(--color-surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(0, 0%, 100%, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--color-bg-tertiary);
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: var(--text-base);
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px hsla(250, 84%, 54%, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--color-bg-secondary);
    padding: var(--space-3xl) 0 var(--space-lg);
    border-top: 1px solid hsla(0, 0%, 100%, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-xl);
}

.footer-brand h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-sm);
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-column h4 {
    font-size: var(--text-base);
    margin-bottom: var(--space-xs);
    color: var(--color-text-primary);
}

.footer-column a {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.footer-column a:hover {
    color: var(--color-primary-light);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid hsla(0, 0%, 100%, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: var(--color-text-tertiary);
    font-size: var(--text-sm);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--color-bg-secondary);
        flex-direction: column;
        padding: var(--space-3xl) var(--space-lg);
        gap: var(--space-lg);
        transition: right var(--transition-base);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: var(--z-popover);
    }

    .hero {
        padding: var(--space-2xl) var(--space-md);
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --space-3xl: 3rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .hero-title {
        font-size: var(--text-3xl);
    }

    .section-title {
        font-size: var(--text-2xl);
    }
}