/* Grunnstillingar og Breytur - EXPRESSIVE EDITION */
:root {
    /* EXPRESSIVE Ljóst Þema - Djörf og litríkari paletta */
    --md-sys-color-primary-light: #7C4DFF;
    --md-sys-color-on-primary-light: #FFFFFF;
    --md-sys-color-primary-container-light: #E8DDFF;
    --md-sys-color-on-primary-container-light: #1A0049;
    --md-sys-color-secondary-light: #FF6E40;
    --md-sys-color-on-secondary-light: #FFFFFF;
    --md-sys-color-secondary-container-light: #FFE6DD;
    --md-sys-color-on-secondary-container-light: #3E0400;
    --md-sys-color-tertiary-light: #00BFA5;
    --md-sys-color-on-tertiary-light: #FFFFFF;
    --md-sys-color-tertiary-container-light: #C5FFF3;
    --md-sys-color-on-tertiary-container-light: #002920;
    --md-sys-color-background-light: #FFFBFE;
    --md-sys-color-on-background-light: #1C1B1F;
    --md-sys-color-surface-light: #FFFBFE;
    --md-sys-color-on-surface-light: #1C1B1F;
    --md-sys-color-surface-variant-light: #E7E0EC;
    --md-sys-color-on-surface-variant-light: #49454F;
    --md-sys-color-outline-light: #79747E;
    --md-sys-color-accent-light: #FFD600;

    /* EXPRESSIVE Dökkt Þema - Dýpri og dramatískari litir */
    --md-sys-color-primary-dark: #B388FF;
    --md-sys-color-on-primary-dark: #2D007A;
    --md-sys-color-primary-container-dark: #5200C6;
    --md-sys-color-on-primary-container-dark: #E8DDFF;
    --md-sys-color-secondary-dark: #FF9E80;
    --md-sys-color-on-secondary-dark: #5A1100;
    --md-sys-color-secondary-container-dark: #7D2500;
    --md-sys-color-on-secondary-container-dark: #FFE6DD;
    --md-sys-color-tertiary-dark: #64FFDA;
    --md-sys-color-on-tertiary-dark: #003D33;
    --md-sys-color-tertiary-container-dark: #00574A;
    --md-sys-color-on-tertiary-container-dark: #C5FFF3;
    --md-sys-color-background-dark: #1C1B1F;
    --md-sys-color-on-background-dark: #E6E1E5;
    --md-sys-color-surface-dark: #1C1B1F;
    --md-sys-color-on-surface-dark: #E6E1E5;
    --md-sys-color-surface-variant-dark: #49454F;
    --md-sys-color-on-surface-variant-dark: #CAC4D0;
    --md-sys-color-outline-dark: #938F99;
    --md-sys-color-accent-dark: #FFD740;

    /* Letur með Expressive stillingar */
    --md-sys-font-family-display: 'Roboto Flex', sans-serif;
    --md-sys-font-family-body: 'Roboto', sans-serif;
    
    /* NÝTT: Roboto Flex Expressive stillingar */
    --font-weight-display: 900;
    --font-width-display: 100;
    --font-grade-display: 0;
    
    /* EXPRESSIVE Form - Óreglulegri og leikinn */
    --md-sys-shape-corner-none: 0px;
    --md-sys-shape-corner-small: 12px;
    --md-sys-shape-corner-medium: 20px;
    --md-sys-shape-corner-large: 32px;
    --md-sys-shape-corner-extra-large: 48px;
    --md-sys-shape-corner-full: 999px;
    
    /* NÝTT: Ósamhverf hyrnu pör fyrir expressive look */
    --shape-asymmetric-1: 40px 8px 40px 8px;
    --shape-asymmetric-2: 8px 40px 8px 40px;
    --shape-asymmetric-3: 60px 20px 60px 20px;
    --shape-asymmetric-4: 80px 16px 48px 24px;
    
    /* EXPRESSIVE Hreyfing - Leikinn og spúðugri */
    --md-sys-motion-easing-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
    --md-sys-motion-easing-emphasized: cubic-bezier(0.2, 0.0, 0, 1);
    --md-sys-motion-easing-expressive: cubic-bezier(0.4, 0.14, 0.3, 1);
    --md-sys-motion-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --md-sys-motion-duration-short: 200ms;
    --md-sys-motion-duration-medium: 400ms;
    --md-sys-motion-duration-long: 600ms;
    --md-sys-motion-duration-extra-long: 1000ms;
    
    /* NÝTT: Gradient backgrounds fyrir expressive look */
    --gradient-primary: linear-gradient(135deg, var(--md-sys-color-primary-light) 0%, var(--md-sys-color-tertiary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--md-sys-color-secondary-light) 0%, var(--md-sys-color-accent-light) 100%);
    --gradient-surface: radial-gradient(circle at top right, color-mix(in srgb, var(--md-sys-color-primary-light) 5%, transparent), transparent 70%);
}

/* Þemaskipti */
body.theme-light {
    --primary: var(--md-sys-color-primary-light);
    --on-primary: var(--md-sys-color-on-primary-light);
    --primary-container: var(--md-sys-color-primary-container-light);
    --on-primary-container: var(--md-sys-color-on-primary-container-light);
    --secondary: var(--md-sys-color-secondary-light);
    --on-secondary: var(--md-sys-color-on-secondary-light);
    --tertiary: var(--md-sys-color-tertiary-light);
    --on-tertiary: var(--md-sys-color-on-tertiary-light);
    --accent: var(--md-sys-color-accent-light);
    --background: var(--md-sys-color-background-light);
    --on-background: var(--md-sys-color-on-background-light);
    --surface: var(--md-sys-color-surface-light);
    --on-surface: var(--md-sys-color-on-surface-light);
    --surface-variant: var(--md-sys-color-surface-variant-light);
    --on-surface-variant: var(--md-sys-color-on-surface-variant-light);
    --outline: var(--md-sys-color-outline-light);
}

body.theme-dark {
    --primary: var(--md-sys-color-primary-dark);
    --on-primary: var(--md-sys-color-on-primary-dark);
    --primary-container: var(--md-sys-color-primary-container-dark);
    --on-primary-container: var(--md-sys-color-on-primary-container-dark);
    --secondary: var(--md-sys-color-secondary-dark);
    --on-secondary: var(--md-sys-color-on-secondary-dark);
    --tertiary: var(--md-sys-color-tertiary-dark);
    --on-tertiary: var(--md-sys-color-on-tertiary-dark);
    --accent: var(--md-sys-color-accent-dark);
    --background: var(--md-sys-color-background-dark);
    --on-background: var(--md-sys-color-on-background-dark);
    --surface: var(--md-sys-color-surface-dark);
    --on-surface: var(--md-sys-color-on-surface-dark);
    --surface-variant: var(--md-sys-color-surface-variant-dark);
    --on-surface-variant: var(--md-sys-color-on-surface-variant-dark);
    --outline: var(--md-sys-color-outline-dark);
}

/* Almenn Stilling */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--md-sys-font-family-body);
    background-color: var(--background);
    color: var(--on-background);
    transition: background-color var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-emphasized), 
                color var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-emphasized);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* NÝTT: Expressive gradient bakgrunnur */
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-surface);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* EXPRESSIVE Typography */
h1, h2 {
    font-family: var(--md-sys-font-family-display);
    font-weight: var(--font-weight-display);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variation-settings: 'wght' 900, 'wdth' 125;
    /* NÝTT: Leikinn skáletrun á stórum titlum */
    transform: rotate(-1deg);
    display: inline-block;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--on-surface);
    text-align: center;
    margin-bottom: 3rem;
    font-variation-settings: 'wght' 800;
    position: relative;
}

/* NÝTT: Dekorativ lína undir h2 */
h2::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: var(--gradient-primary);
    border-radius: var(--md-sys-shape-corner-full);
}

h3 {
    font-family: var(--md-sys-font-family-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--on-surface);
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--on-surface-variant);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

a:hover {
    opacity: 0.8;
}

/* EXPRESSIVE Header */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 1rem 0;
    background-color: color-mix(in srgb, var(--surface) 85%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid color-mix(in srgb, var(--outline) 20%, transparent);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--md-sys-font-family-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--on-surface);
    font-variation-settings: 'wght' 800, 'wdth' 110;
    transition: transform var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-bounce);
}

.logo:hover {
    transform: scale(1.05) rotate(2deg);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--on-surface);
    font-weight: 500;
    position: relative;
}

/* EXPRESSIVE Segmented Buttons */
.segmented-buttons {
    display: flex;
    list-style: none;
    border-radius: var(--md-sys-shape-corner-full);
    padding: 4px;
    position: relative;
    background: var(--surface-variant);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}

.segmented-buttons-indicator {
    position: absolute;
    top: 4px;
    left: var(--indicator-left);
    width: var(--indicator-width);
    height: calc(100% - 8px);
    background: var(--gradient-primary);
    border-radius: var(--md-sys-shape-corner-full);
    opacity: 0;
    transition: left 0.5s var(--md-sys-motion-easing-expressive), 
                width 0.5s var(--md-sys-motion-easing-expressive), 
                opacity 0.4s var(--md-sys-motion-easing-standard);
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.segmented-buttons li {
    position: relative;
}

.segmented-buttons a {
    display: block;
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
    color: var(--on-surface-variant);
    transition: color 0.4s var(--md-sys-motion-easing-expressive), 
                transform 0.2s var(--md-sys-motion-easing-bounce);
    border-radius: var(--md-sys-shape-corner-full);
}

.segmented-buttons a:hover {
    transform: translateY(-2px);
}

.segmented-buttons a.active {
    color: var(--on-primary);
    font-weight: 700;
}

/* EXPRESSIVE Buttons */
.button, .icon-button {
    border: none;
    border-radius: var(--md-sys-shape-corner-full);
    padding: 1rem 2rem;
    font-family: var(--md-sys-font-family-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-emphasized);
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.button:active {
    transform: translateY(-2px) scale(0.98);
}

.button-primary {
    background: var(--gradient-primary);
    color: var(--on-primary);
}

.button-secondary {
    background: var(--gradient-secondary);
    color: var(--on-secondary);
}

.icon-button {
    background-color: transparent;
    color: var(--on-surface);
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.icon-button:hover {
    background-color: color-mix(in srgb, var(--primary) 12%, transparent);
}

/* EXPRESSIVE Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple-effect 0.8s var(--md-sys-motion-easing-expressive);
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* EXPRESSIVE Hero Section */
.hero {
    padding: 12rem 0 6rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* NÝTT: Animated background shapes */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, color-mix(in srgb, var(--tertiary) 20%, transparent), transparent 70%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morphShape 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes morphShape {
    0%, 100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%;
        transform: rotate(90deg);
    }
    50% {
        border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 30% 70% 60% 40% / 50% 30% 70% 50%;
        transform: rotate(270deg);
    }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--shape-asymmetric-4);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transition: transform var(--md-sys-motion-duration-long) var(--md-sys-motion-easing-expressive);
}

.hero-image:hover img {
    transform: scale(1.05) rotate(2deg);
}

/* EXPRESSIVE Gallery */
.gallery {
    padding: 6rem 0;
    position: relative;
}

.carousel-group {
    margin-bottom: 5rem;
    position: relative;
}

.carousel-group h3 {
    font-family: var(--md-sys-font-family-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--on-surface);
    margin-bottom: 2rem;
    padding-left: 1rem;
    font-variation-settings: 'wght' 700, 'wdth' 110;
    position: relative;
}

/* NÝTT: Dekorativ accent við titla */
.carousel-group h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--gradient-primary);
    border-radius: var(--md-sys-shape-corner-full);
}

.carousel {
    position: relative;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    gap: 16px;
    padding: 16px 16px 24px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
}

.carousel-track.is-grabbing {
    cursor: grabbing;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-track.is-sparse {
    justify-content: flex-start;
}

.carousel-track.is-sparse .carousel-item {
    flex-basis: 40%;
}

.carousel-item {
    flex: 0 0 20%;
    height: 280px;
    scroll-snap-align: center;
    transition: all 0.6s var(--md-sys-motion-easing-expressive);
}

.carousel-item.is-center {
    flex-basis: 50%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: var(--shape-asymmetric-3);
    transition: all var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-emphasized);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.gallery-item:hover img {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.carousel-item.is-center img {
    border-radius: var(--shape-asymmetric-1);
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

/* EXPRESSIVE About Section */
.about {
    padding: 6rem 0;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--surface-variant) 80%, transparent), 
        color-mix(in srgb, var(--primary-container) 30%, transparent));
    color: var(--on-surface-variant);
    border-radius: var(--shape-asymmetric-4);
    margin: 6rem 0;
    position: relative;
    overflow: hidden;
}

/* NÝTT: Animated decorative element */
.about::before {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, color-mix(in srgb, var(--secondary) 15%, transparent), transparent 70%);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.about-image {
    width: 350px;
    height: 350px;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    clip-path: inset(0);
    transition: clip-path 1s var(--md-sys-motion-easing-expressive),
                opacity 0.8s ease-out, 
                transform 1s var(--md-sys-motion-easing-expressive);
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

.about-image.is-visible {
    clip-path: url(#about-image-clip-path);
    opacity: 1;
    transform: translateY(0) scale(1);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 2rem;
    color: var(--on-surface);
}

.about-text p {
    color: var(--on-surface-variant);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

/* EXPRESSIVE Contact Section */
.contact {
    padding: 6rem 0;
}

.contact form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-field {
    position: relative;
    background: linear-gradient(135deg, 
        var(--surface-variant), 
        color-mix(in srgb, var(--surface-variant) 90%, var(--primary-container)));
    border-top-left-radius: var(--md-sys-shape-corner-medium);
    border-top-right-radius: var(--md-sys-shape-corner-medium);
    padding-top: 1.2rem;
    transition: transform var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-bounce);
}

.form-field:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.form-field label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--on-surface-variant);
    transition: all 0.3s var(--md-sys-motion-easing-expressive);
    pointer-events: none;
}

.form-field input,
.form-field textarea {
    background-color: transparent;
    border: none;
    border-bottom: 3px solid var(--outline);
    border-radius: 0;
    padding: 0.5rem 1rem;
    width: 100%;
    font-family: var(--md-sys-font-family-body);
    font-size: 1.1rem;
    color: var(--on-surface);
    transition: border-bottom-color 0.3s var(--md-sys-motion-easing-emphasized);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-bottom-color: var(--primary);
    border-bottom-width: 4px;
}

.form-field input:focus + label,
.form-field textarea:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:not(:placeholder-shown) + label {
    top: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    transform: translateX(-2px);
}

/* EXPRESSIVE Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    background: linear-gradient(135deg, 
        var(--surface-variant), 
        color-mix(in srgb, var(--surface-variant) 80%, var(--tertiary)));
    color: var(--on-surface-variant);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* EXPRESSIVE Switch */
.switch {
    position: relative;
    display: inline-flex;
    width: 56px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.switch-track {
    width: 100%;
    height: 100%;
    background-color: var(--surface-variant);
    border: 2px solid var(--outline);
    border-radius: var(--md-sys-shape-corner-full);
    transition: all var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-emphasized);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}

.switch-thumb {
    position: absolute;
    left: 6px;
    top: 50%;
    width: 24px;
    height: 24px;
    background-color: var(--outline);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    transition: all 0.4s var(--md-sys-motion-easing-bounce);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.switch-icon--unchecked, .switch-icon--checked {
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s var(--md-sys-motion-easing-standard), 
                color 0.3s var(--md-sys-motion-easing-standard);
}

.switch .switch-icon--unchecked {
    opacity: 1;
    color: var(--surface-variant);
}

.switch .switch-icon--checked {
    opacity: 0;
}

.switch.checked .switch-track {
    background: var(--gradient-primary);
    border-color: var(--primary);
}

.switch.checked .switch-thumb {
    background-color: var(--on-primary);
    transform: translateX(20px) translateY(-50%) rotate(360deg);
}

.switch.checked .switch-icon--unchecked {
    opacity: 0;
}

.switch.checked .switch-icon--checked {
    opacity: 1;
    color: var(--primary);
}

.switch:hover .switch-thumb {
    box-shadow: 0 0 0 12px color-mix(in srgb, var(--primary) 15%, transparent);
}

.switch:focus {
    outline: none;
}

/* EXPRESSIVE Form Notification */
.form-notification {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--gradient-primary);
    color: var(--on-primary);
    padding: 1.2rem 2rem;
    border-radius: var(--shape-asymmetric-1);
    position: relative;
    max-width: 600px;
    margin: 2rem auto 0;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    visibility: hidden;
    transition: opacity var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-bounce), 
                transform var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-bounce),
                visibility var(--md-sys-motion-duration-medium);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.form-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.form-notification p {
    margin: 0;
    font-weight: 600;
    color: var(--on-primary);
}

.form-notification.error {
    background: var(--gradient-secondary);
    color: var(--on-secondary);
}

.form-notification.error p {
    color: var(--on-secondary);
}

/* EXPRESSIVE Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: opacity 0.8s var(--md-sys-motion-easing-expressive), 
                transform 0.8s var(--md-sys-motion-easing-expressive);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gallery-item {
    transition-delay: calc(0.1s * var(--item-index, 1));
}

/* EXPRESSIVE Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s var(--md-sys-motion-easing-emphasized), 
                visibility 0.5s;
}

.lightbox.is-open {
    visibility: visible;
    opacity: 1;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: color-mix(in srgb, var(--background) 60%, transparent);
    backdrop-filter: blur(24px) saturate(150%);
}

.lightbox-container {
    display: flex;
    flex-direction: row;
    width: auto;
    height: 90vh;
    max-width: 1600px;
    position: relative;
    z-index: 1;
    transform: scale(0.9) rotateX(10deg);
    opacity: 0;
    transition: transform 0.6s var(--md-sys-motion-easing-expressive), 
                opacity 0.6s var(--md-sys-motion-easing-expressive);
    align-items: stretch;
}

.lightbox.is-open .lightbox-container {
    transform: scale(1) rotateX(0deg);
    opacity: 1;
    transition-delay: 0.1s;
}

.lightbox.is-open .lightbox-content, .lightbox.is-open .lightbox-details {
    transform: translateX(0);
    opacity: 1;
}

.lightbox-content {
    flex: 1 1 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 0;
    min-width: 0;
    justify-content: center;
    transform: translateX(-50px);
    opacity: 0;
    transition: transform 0.6s var(--md-sys-motion-easing-expressive) 0.2s, 
                opacity 0.6s var(--md-sys-motion-easing-expressive) 0.2s;
}

.lightbox-content img {
    display: block;
    max-height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: var(--shape-asymmetric-3);
    box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}

.lightbox-details {
    flex-basis: 380px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--surface) 95%, var(--primary-container)));
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,0.2);
    height: 100%;
    min-height: 0;
    min-width: 0;
    transform: translateX(50px);
    opacity: 0;
    transition: transform 0.6s var(--md-sys-motion-easing-expressive) 0.25s, 
                opacity 0.6s var(--md-sys-motion-easing-expressive) 0.25s;
    border-radius: var(--shape-asymmetric-2);
}

.lightbox-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem 1.5rem 2rem;
    border-bottom: 2px solid color-mix(in srgb, var(--outline) 30%, transparent);
    background: color-mix(in srgb, var(--surface-variant) 40%, transparent);
}

#lightbox-title {
    font-family: var(--md-sys-font-family-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--on-surface);
    font-variation-settings: 'wght' 800, 'wdth' 110;
}

#lightbox-close {
    background-color: transparent;
    color: var(--on-surface-variant);
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-bounce);
}

#lightbox-close:hover {
    transform: rotate(90deg) scale(1.1);
    color: var(--primary);
}

.lightbox-details-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#lightbox-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--on-surface-variant);
}

.tech-details {
    display: grid;
    gap: 1.2rem;
}

.tech-detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--on-surface-variant);
    padding: 0.8rem;
    background: color-mix(in srgb, var(--surface-variant) 50%, transparent);
    border-radius: var(--md-sys-shape-corner-medium);
}

.tech-detail-item .material-icons-outlined {
    color: var(--primary);
}

.lightbox-details-content h4 {
    font-family: var(--md-sys-font-family-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--on-surface);
    margin-top: 1rem;
    border-top: 2px solid color-mix(in srgb, var(--outline) 30%, transparent);
    padding-top: 2rem;
}

.camera-settings {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--gradient-primary);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: transform var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-bounce);
}

.setting-item:hover {
    transform: translateY(-4px);
}

.setting-item span:first-child {
    font-size: 0.7rem;
    color: var(--on-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    opacity: 0.9;
}

.setting-item span:last-child {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--on-primary);
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    background: var(--gradient-primary);
    color: var(--on-primary);
    opacity: 0.9;
    width: 56px;
    height: 56px;
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-bounce);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.nav-button:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

#lightbox-prev {
    left: 2rem;
}

#lightbox-next {
    right: 2rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    h1 {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-image {
        grid-row: 1;
        margin-bottom: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        margin: 0 auto;
        width: 280px;
        height: 280px;
    }
    
    .carousel-item {
        flex-basis: 45%;
    }
    
    .lightbox-container {
        flex-direction: column;
        width: 90vw;
        height: 90vh;
    }
    
    .lightbox-details {
        flex-basis: auto;
        flex-shrink: 1;
        max-height: 40%;
        border-radius: 0 0 var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large);
    }
    
    .lightbox-content img {
        border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large) 0 0;
    }
}

@media (max-width: 600px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .carousel-item {
        flex-basis: 80%;
    }
    
    .lightbox-container {
        width: 100vw;
        height: 100vh;
    }
    
    .lightbox-content img, .lightbox-details {
        border-radius: 0;
    }
    
    .nav-button {
        bottom: 2rem;
        top: auto;
        transform: none;
    }
    
    .nav-button:hover {
        transform: scale(1.1);
    }
    
    #lightbox-prev {
        left: 1rem;
    }
    
    #lightbox-next {
        right: 1rem;
    }
    
    .lightbox-details {
        max-height: 50%;
    }
}

/* Print Styles */
@media print {
    header, .switch, .button-group, .nav-button {
        display: none;
    }
    
    body::before, .hero::before, .about::before {
        display: none;
    }
}
