/* Portfolio Design System */
:root {
    /* Colors */
    --background: hsl(0, 0%, 98%);
    --foreground: hsl(240, 10%, 12%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(240, 10%, 12%);
    --primary: hsl(0, 0%, 0%);
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-glow: hsl(250, 100%, 70%);
    --secondary: hsl(240, 5%, 96%);
    --secondary-foreground: hsl(240, 6%, 10%);
    --muted: hsl(240, 5%, 96%);
    --muted-foreground: hsl(240, 4%, 46%);
    --accent: hsl(250, 100%, 95%);
    --accent-foreground: hsl(250, 84%, 54%);
    --border: hsl(240, 6%, 90%);
    --input: hsl(240, 6%, 90%);
    --ring: hsl(250, 84%, 54%);
    
    --work-card-hover: hsl(250, 100%, 98%);
    
    /* Gradients */
    --hero-gradient: linear-gradient(135deg, hsl(250, 84%, 54%), hsl(280, 100%, 70%));
    
    /* Shadows */
    --shadow-soft: 0 4px 20px -4px hsl(240, 10%, 12%, 0.1);
    --shadow-hover: 0 8px 30px -6px hsl(250, 84%, 54%, 0.3);
    --shadow-glow: 0 0 40px hsl(250, 100%, 70%, 0.4);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --radius: 0.75rem;
    --section-padding: 5rem 0;
    --container-max-width: 1200px;
    --container-padding: 1.5rem;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Utility Classes */
.section-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    
}

.gradient-text {
    background: var(--hero-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Moving Shapes Background */
.moving-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(250, 84%, 54%, 0.1), hsl(280, 100%, 70%, 0.1));
    animation: floatMove 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-duration: 25s;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 20%;
    right: 15%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 20%;
    animation-duration: 22s;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 20%;
    animation-duration: 28s;
    animation-delay: -15s;
}

.shape-5 {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 60%;
    animation-duration: 18s;
    animation-delay: -8s;
}

.shape-6 {
    width: 90px;
    height: 90px;
    top: 80%;
    left: 70%;
    animation-duration: 32s;
    animation-delay: -12s;
}

.shape-7 {
    width: 70px;
    height: 70px;
    top: 15%;
    left: 50%;
    animation-duration: 26s;
    animation-delay: -6s;
}

.shape-8 {
    width: 50px;
    height: 50px;
    bottom: 10%;
    left: 40%;
    animation-duration: 24s;
    animation-delay: -18s;
}

.shape-9 {
    width: 110px;
    height: 110px;
    top: 5%;
    right: 5%;
    animation-duration: 27s;
    animation-delay: -3s;
}

.shape-10 {
    width: 35px;
    height: 35px;
    top: 70%;
    right: 40%;
    animation-duration: 19s;
    animation-delay: -14s;
}

.shape-11 {
    width: 75px;
    height: 75px;
    bottom: 30%;
    left: 15%;
    animation-duration: 31s;
    animation-delay: -9s;
}

.shape-12 {
    width: 95px;
    height: 95px;
    top: 35%;
    right: 25%;
    animation-duration: 23s;
    animation-delay: -16s;
}

.shape-13 {
    width: 45px;
    height: 45px;
    bottom: 5%;
    right: 10%;
    animation-duration: 21s;
    animation-delay: -7s;
}

.shape-14 {
    width: 65px;
    height: 65px;
    top: 25%;
    left: 35%;
    animation-duration: 29s;
    animation-delay: -11s;
}

.shape-15 {
    width: 85px;
    height: 85px;
    bottom: 15%;
    right: 35%;
    animation-duration: 33s;
    animation-delay: -20s;
}

@keyframes floatMove {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translate(100px, -100px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translate(-50px, -200px) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translate(-150px, -100px) rotate(270deg);
        opacity: 1;
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
        opacity: 1;
    }
}

/* Project Pages Styles */
.project-hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, var(--background) 0%, var(--section-bg) 100%);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.breadcrumb a {
    color: var(--primary);
    transition: var(--transition-smooth);
}

.breadcrumb a:hover {
    color: var(--primary-glow);
}

.project-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.project-subtitle {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 3rem;
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
}

.project-showcase {
    padding: 4rem 0;
}

.project-image-large {
    max-width: 1000px;
    margin: 2rem auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.project-image-large img {
    width: 100%;
    height: auto;
    display: block;
}

.project-content {
    padding: 4rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.content-main h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.content-main h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 2rem 0 1rem;
}

.content-main p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.content-main ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.content-main li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--muted-foreground);
}

.content-main li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.content-sidebar {
    position: sticky;
    top: 6rem;
}

.sidebar-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.sidebar-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--muted-foreground);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--accent);
    color: var(--accent-foreground);
    padding: 0.375rem 0.75rem;
    border-radius: calc(var(--radius) * 0.5);
    font-size: 0.875rem;
    font-weight: 500;
}

.recognition-text {
    color: var(--primary);
    font-weight: 500;
    font-style: italic;
}

.project-navigation {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    background: var(--section-bg);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--foreground);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.nav-btn:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.nav-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

@media (max-width: 768px) {
    .project-title {
        font-size: 2rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--background);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition-smooth);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition-smooth);
}

.logo:hover {
    color: var(--primary-glow);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.mobile-menu-btn {
    display: none;
    padding: 0.5rem;
    color: var(--foreground);
}

.menu-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background: var(--primary-glow);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Hero Section */
.hero-section {
    padding: 8rem 0 5rem;
    background: var(--section-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    max-width: 24rem;
    width: 100%;
}

.image-glow {
    position: absolute;
    inset: 0;
    background: var(--hero-gradient);
    border-radius: var(--radius);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

.profile-image {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

/* Sections */
.section {
    padding: var(--section-padding);
}

.section-alt {
    background: var(--section-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 48rem;
    margin: 0 auto;
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Work Cards */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.ui-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 64rem;
    margin: 0 auto 3rem;
}

.work-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    background: var(--work-card-hover);
}

.work-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.work-card:hover .work-image img {
    transform: scale(1.05);
}

.work-content {
    padding: 1.5rem;
}

.work-category {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.work-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.work-description {
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.work-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition-smooth);
}

.work-link:hover {
    color: var(--primary-glow);
    gap: 0.75rem;
}

/* Video Preview */
.video-preview .play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.video-preview:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 4rem;
    height: 4rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
    transform: scale(0.8);
    transition: var(--transition-spring);
}

.video-preview:hover .play-button {
    transform: scale(1);
}

.play-button svg {
    width: 2rem;
    height: 2rem;
    margin-left: 0.25rem;
}

/* CTA Section */
.cta-section {
    padding: var(--section-padding);
    background: var(--section-bg);
}

.cta-content {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
}

/* Works Page */
.works-main {
    padding-top: 4rem;
}

.works-header {
    padding: 4rem 0;
    background: var(--section-bg);
}

.works-header-content {
    text-align: center;
}

.works-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.works-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 48rem;
    margin: 0 auto;
}

.works-section {
    padding: var(--section-padding);
}

.all-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.works-cta {
    text-align: center;
}

/* Tags */
.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--accent);
    color: var(--accent-foreground);
    font-size: 0.75rem;
    border-radius: 9999px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .work-grid,
    .ui-work-grid,
    .all-works-grid {
        grid-template-columns: 1fr;
    }
    
    :root {
        --container-padding: 1rem;
        --section-padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in-up {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
.btn:focus-visible,
.nav-link:focus-visible,
.logo:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .mobile-menu-btn {
        display: none;
    }
    
    .hero-section {
        padding-top: 2rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-soft: 0 4px 20px -4px rgba(0, 0, 0, 0.5);
        --shadow-hover: 0 8px 30px -6px rgba(0, 0, 0, 0.6);
    }
}