:root {
    --bg-primary: #fafafa;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    --text-muted: #a3a3a3;
    --accent: #0066ff;
    --accent-hover: #4FB7B3;
    --border: #e5e5e5;
    --shadow: rgba(0, 0, 0, 0.08);
    color-scheme: light;
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --text-primary: #fafafa;
    --text-secondary: #a3a3a3;
    --text-muted: #525252;
    --border: #262626;
    --shadow: rgba(0, 0, 0, 0.3);
    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Floating Navigation */
.floating-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 100px;
    border: 1px solid var(--border);
    clip-path: inset(0 0 0 100%);
    animation: unroll 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    animation-delay: 0.2s;
}

@keyframes unroll {
    0% { clip-path: inset(0 0 0 100%); }
    100% { clip-path: inset(0 0 0 0); }
}

[data-theme="dark"] .floating-nav {
    background: rgba(10, 10, 10, 0.8);
}

.nav-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 100px;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    touch-action: manipulation;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-btn:hover {
    color: var(--accent-hover);
    background: var(--bg-secondary);
}

.nav-btn.active {
    color: var(--accent-hover);
    background: var(--bg-secondary);
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    transition: background-color 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
    outline: none;
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    padding: 21px 24px;
}

.site-name {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    letter-spacing: -0.02em;
    margin: 16px 0px 10px 32px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.1s;
}

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

/*  Section Styling 
section {
    padding: 60px 0;
} */

.section-header {
    margin-bottom: 16px;
    position: relative;
}

.section-header h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
}

#about {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Work Section Carousel */
#work {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#work .container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-carousel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    overflow: hidden;
}

.work-grid {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    min-width: 0;

    padding: 40px 20px 20px;
    scroll-padding-left: 24px;
}

.work-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    scroll-snap-align: start;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: cardFadeIn 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.work-card:nth-child(1) { animation-delay: 0.1s; }
.work-card:nth-child(2) { animation-delay: 0.2s; }
.work-card:nth-child(3) { animation-delay: 0.3s; }
.work-card:nth-child(4) { animation-delay: 0.4s; }
.work-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes cardFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.work-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px var(--shadow), 0 0 20px var(--accent-hover);
    border-color: var(--accent-hover);
}

.work-image {
    height: 480px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.work-image .placeholder {
    font-size: 3rem;
    opacity: 0.3;
}

.work-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.work-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.work-tag {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.work-content h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.work-content p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.5;
    flex: 1;
}

/* Carousel Navigation */
.carousel-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.carousel-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-hover);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
}

.about-image {
    aspect-ratio: 4/5;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-secondary);
}

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

.about-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 24px;
}

.about-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.about-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1rem;
}

.about-list li svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

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

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
}

#skills {
    padding-top: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-card h3 svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

#approach {
    padding-top: 20px;
}

/* Approach Section */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.approach-card {
    padding: 32px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.approach-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

.approach-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.approach-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Contact Section */
#contact {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact {
    background: var(--bg-secondary);
    border-radius: 32px;
    padding: 80px;
    text-align: center;
    margin: 0 24px;
}

.contact h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
}

.contact>p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.9375rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    touch-action: manipulation;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

.contact-link svg {
    width: 18px;
    height: 18px;
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-github {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.footer-github:hover {
    color: var(--accent-hover);
}

.footer-github svg {
    width: 24px;
    height: 24px;
}

.footer-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.footer-linkedin:hover {
    color: var(--accent-hover);
}

.footer-linkedin svg {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
    .work-card {
        flex: 0 0 calc(50% - 12px);
    }
}

@media (max-width: 768px) {
    .floating-nav {
        top: auto;
        bottom: 24px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        padding: 8px;
        gap: 4px;
    }

    .nav-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    #work {
        padding-bottom: 100px;
    }

    .work-carousel {
        gap: 8px;
        padding: 0 8px;
    }

    .work-grid {
        gap: 16px;
    }

    .work-card {
        flex: 0 0 calc(100% - 96px);
        max-height: calc(100vh - 240px);
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }

    .cta-btn {
        padding: 12px 24px;
        font-size: 0.875rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        width: 100%;
        max-height: calc(100vh - 200px);
        margin: 0 auto;
    }

    .contact {
        padding: 48px 24px;
        margin: 0 16px;
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    .carousel-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .carousel-btn svg {
        width: 14px;
        height: 14px;
    }

    .work-carousel {
        gap: 6px;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

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

.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

/* Hero CTA Buttons */
.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 128px 0px 64px 0px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    touch-action: manipulation;
}

.cta-btn svg {
    width: 18px;
    height: 18px;
}

.cta-primary {
    background: var(--accent);
    color: white;
    border: 1px solid var(--accent);
}

.cta-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 183, 179, 0.3);
}

.cta-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.cta-secondary:hover {
    border-color: var(--accent-hover);
    color: var(--accent-hover);
    transform: translateY(-2px);
}

/* CTA Wrapper for Arrows */
.cta-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 30px 40px;
}

.sketch-arrow {
    position: absolute;
    opacity: 0.6;
    transition: all 0.3s ease;
    pointer-events: none;
    filter: invert(0) grayscale(100%) brightness(0.7);
}

[data-theme="dark"] .sketch-arrow {
    filter: invert(1) brightness(1.2);
}

.sketch-arrow.arrow-1 {
    width: 36px;
    top: -20px;
    left: 0px;
    transform: rotate(135deg);
}

.sketch-arrow.arrow-2 {
    width: 36px;
    top: -20px;
    right: 0px;
    transform: rotate(225deg);
}

.sketch-arrow.arrow-3 {
    width: 36px;
    bottom: -20px;
    left: 0px;
    transform: rotate(45deg);
}

.sketch-arrow.arrow-4 {
    width: 36px;
    bottom: -20px;
    right: 0px;
    transform: rotate(-45deg);
}

.sketch-arrow.arrow-5 {
    width: 32px;
    top: 50%;
    left: -40px;
    transform: translateY(-50%) rotate(90deg);
}

.sketch-arrow.arrow-6 {
    width: 32px;
    top: 50%;
    right: -40px;
    transform: translateY(-50%) rotate(-180deg);
}

.sketch-arrow.arrow-7 {
    width: 28px;
    top: -5px;
    left: -35px;
    transform: rotate(45deg);
}

.sketch-arrow.arrow-8 {
    width: 28px;
    bottom: -5px;
    left: -35px;
    transform: rotate(55deg);
}

.sketch-arrow.arrow-9 {
    width: 36px;
    top: -28px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
}

.sketch-arrow.arrow-10 {
    width: 36px;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
}

/* Arrow hover - excited state */
.cta-wrapper:hover .sketch-arrow {
    animation-duration: 0.25s;
    filter: brightness(0) saturate(100%) invert(72%) sepia(18%) saturate(400%) hue-rotate(135deg) brightness(95%) contrast(90%);
}

.cta-wrapper:hover .arrow-1 {
    animation: arrow1 0.25s ease-in-out infinite alternate;
}

.cta-wrapper:hover .arrow-2 {
    animation: arrow2 0.25s ease-in-out infinite alternate;
}

.cta-wrapper:hover .arrow-3 {
    animation: arrow3 0.25s ease-in-out infinite alternate;
}

.cta-wrapper:hover .arrow-4 {
    animation: arrow4 0.25s ease-in-out infinite alternate;
}

.cta-wrapper:hover .arrow-5 {
    animation: arrow5 0.25s ease-in-out infinite alternate;
}

.cta-wrapper:hover .arrow-6 {
    animation: arrow6 0.25s ease-in-out infinite alternate;
}

.cta-wrapper:hover .arrow-7 {
    animation: arrow7 0.25s ease-in-out infinite alternate;
}

.cta-wrapper:hover .arrow-8 {
    animation: arrow8 0.25s ease-in-out infinite alternate;
}

.cta-wrapper:hover .arrow-9 {
    animation: arrow9 0.25s ease-in-out infinite alternate;
}

.cta-wrapper:hover .arrow-10 {
    animation: arrow10 0.25s ease-in-out infinite alternate;
}

/* Get closer to button on hover */
.cta-wrapper:hover .arrow-1 {
    top: -10px;
}

.cta-wrapper:hover .arrow-2 {
    top: -10px;
}

.cta-wrapper:hover .arrow-3 {
    bottom: -10px;
}

.cta-wrapper:hover .arrow-4 {
    bottom: -10px;
}

.cta-wrapper:hover .arrow-5 {
    left: -30px;
}

.cta-wrapper:hover .arrow-6 {
    right: -30px;
}

.cta-wrapper:hover .arrow-7 {
    left: -25px;
}

.cta-wrapper:hover .arrow-8 {
    left: -25px;
}

.cta-wrapper:hover .arrow-9 {
    top: -17px;
    left: 50%;
    transform: translateX(-50%);
}

.cta-wrapper:hover .arrow-10 {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes arrow1 {
    0% {
        transform: rotate(135deg) translate(0, 0);
    }

    100% {
        transform: rotate(135deg) translate(-3px, -3px);
    }
}

@keyframes arrow2 {
    0% {
        transform: rotate(225deg) translate(0, 0);
    }

    100% {
        transform: rotate(225deg) translate(3px, -3px);
    }
}

@keyframes arrow3 {
    0% {
        transform: rotate(45deg) translate(0, 0);
    }

    100% {
        transform: rotate(45deg) translate(-3px, 3px);
    }
}

@keyframes arrow4 {
    0% {
        transform: rotate(-45deg) translate(0, 0);
    }

    100% {
        transform: rotate(-45deg) translate(3px, 3px);
    }
}

@keyframes arrow5 {
    0% {
        transform: translateY(-50%) rotate(90deg) translate(0, 0);
    }

    100% {
        transform: translateY(-50%) rotate(90deg) translate(-4px, 0);
    }
}

@keyframes arrow6 {
    0% {
        transform: translateY(-50%) rotate(-180deg) translate(0, 0);
    }

    100% {
        transform: translateY(-50%) rotate(-180deg) translate(4px, 0);
    }
}

@keyframes arrow7 {
    0% {
        transform: rotate(45deg) translate(0, 0);
    }

    100% {
        transform: rotate(45deg) translate(-3px, 0);
    }
}

@keyframes arrow8 {
    0% {
        transform: rotate(55deg) translate(0, 0);
    }

    100% {
        transform: rotate(55deg) translate(-3px, 0);
    }
}

@keyframes arrow9 {
    0% { transform: translateX(-50%) rotate(180deg) translate(0, 0); }
    100% { transform: translateX(-50%) rotate(180deg) translate(0, -3px); }
}

@keyframes arrow10 {
    0% { transform: translateX(-50%) rotate(0deg) translate(0, 0); }
    100% { transform: translateX(-50%) rotate(0deg) translate(0, 3px); }
}

/* Placeholder Project Cards */
.work-card-placeholder {
    border-style: dashed;
    opacity: 0.6;
}

.work-card-placeholder:hover {
    transform: none;
    box-shadow: none;
}

.work-image-placeholder {
    height: 180px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px dashed var(--border);
}

.work-image-placeholder svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

.nav-btn:focus-visible,
.theme-toggle:focus-visible,
.carousel-btn:focus-visible,
.contact-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .stagger-1,
    .stagger-2,
    .stagger-3,
    .stagger-4 {
        animation-delay: 0s;
    }

    .clients-marquee {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}