@font-face {
    font-family: 'Overused';
    src: url('../fonts/overused.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #FFFFFF;
    --text-color: #1A1A1A;
    --card-bg-color: #FFFFFF;
    --card-border-color: #E5E7EB;
    --grid-line-color: #F7F8F9;
    --pill-bg-color: #F0F0F0;
    --pill-text-color: #333333;
    --subtitle-color: #767676;
    --nav-bg-color: rgba(255, 255, 255, 0.7);
    --nav-border-color: #E5E7EB;
    --selection-bg: #5182eb;
}

html.dark {
    --bg-color: #111111;
    --text-color: #FFFFFF;
    --card-bg-color: #1A1A1A;
    --card-border-color: #2a2a2a;
    --grid-line-color: #10100f;
    --pill-bg-color: #2a2a2a;
    --pill-text-color: #EAEAEA;
    --subtitle-color: #a0a0a0;
    --nav-bg-color: rgba(17, 17, 17, 0.7);
    --nav-border-color: #2a2a2a;
    --selection-bg: #5182eb;
}

body {
    font-family: 'Overused', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.font-switzer {
    font-family: 'Overused', sans-serif;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden;
}

.grid-lines {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
}

.grid-lines-inner {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(5, 1fr);
    width: 100%;
    height: 100%;
}

.grid-line-vertical {
    grid-row: 1 / -1;
    width: 1px;
    height: 100%;
    background: var(--grid-line-color);
    justify-self: stretch;
}

.grid-line-horizontal {
    grid-column: 1 / -1;
    height: 1px;
    width: 100%;
    background: var(--grid-line-color);
    align-self: stretch;
}

.section-title {
    font-family: 'Overused', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1;
}

.section-subtitle {
    font-family: 'Overused', sans-serif;
    font-size: 18px;
    color: var(--subtitle-color);
    transition: color 0.3s ease;
}

.card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.dark .card:hover {
    box-shadow: 0 10px 20px rgba(255,255,255,0.05);
}

.text-muted {
    color: var(--subtitle-color);
}

.dark .text-muted {
    color: var(--subtitle-color);
}

.border-themed {
    border-color: var(--card-border-color);
}

/* Top Bar Styles */
.top-bar-container {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 250;
    display: flex;
    justify-content: space-around;
    transform: translateY(0) !important;
    transition: opacity 0.3s, transform 0.3s;
}

.top-bar-container.visible {
    transform: translateY(0);
}

.top-bar {
    width: 60%;
    max-width: 700px;
    background-color: var(--nav-bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--nav-border-color);
    border-radius: 12px;
    padding: 8px;
}

.top-bar-content {
    width: 100%;
    padding: 0 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-link {
    flex: 0 1 auto;
    width: fit-content;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.top-bar-link:hover {
    color: #2463EB;
}

.theme-toggle-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--pill-bg-color);
    transition: background-color 0.3s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--pill-text-color);
}

.theme-icon {
    height: 1.25rem;
    width: 1.25rem;
    filter: invert(0.2) sepia(0) saturate(0) hue-rotate(0deg) brightness(0.8);
    transition: filter 0.3s ease;
}

html.dark .theme-icon {
    filter: invert(1) sepia(0) saturate(0) hue-rotate(0deg) brightness(1);
}

.theme-toggle-btn:hover .theme-icon {
    filter: invert(1) sepia(0) saturate(0) hue-rotate(0deg) brightness(1);
}

html.dark .theme-toggle-btn:hover .theme-icon {
    filter: invert(0.2) sepia(0) saturate(0) hue-rotate(0deg) brightness(0.8);
}

.theme-icon.hidden {
    display: none;
}

@media (max-width: 640px) {
    .top-bar {
        width: 90%;
    }
    
    .top-bar .flex {
        gap: 0.5rem;
    }
    
    .top-bar a, .top-bar button {
        font-size: 0.875rem;
    }
    
    .top-bar .theme-toggle-btn {
        width: 2rem;
        height: 2rem;
    }
    
    .mobile-hide {
        display: none;
    }
}

/* Marquee Animation */
.marquee-container {
    position: relative;
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
    mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    animation: marquee 40s linear infinite;
}

.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.pill {
    display: inline-block;
    background-color: var(--pill-bg-color);
    color: var(--pill-text-color);
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Overused', sans-serif;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pill:hover {
    background-color: #000000;
    color: #FFFFFF;
    transform: scale(1.05);
}

html.dark .pill:hover {
    background-color: #FFFFFF;
    color: #000000;
}

.footer-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #2463EB;
}

/* Focus Card Base Styles */
.focus-card {
    border-radius: 28px;
    transition: box-shadow 0.4s ease-out, transform 0.3s ease-out;
    will-change: box-shadow, transform;
    transform: perspective(1000px);
    background: #09090B;
}
html.dark .focus-card {
     background: #09090B;
}
html:not(.dark) .focus-card {
    background: #F9FAFB;
}
.focus-card h3 {
    color: #e0e3e6;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.focus-card:hover h3 {
    color: #09090B;
     text-shadow: 0 0 10px rgba(15, 15, 15, 0.205);
}
html:not(.dark) .focus-card h3 {
    color: #09090B;
}
html.dark .focus-card:hover h3 {
    color: #F9FAFB;
    text-shadow: 0 0 10px rgba(255,255,255,0.7);
}
/* Focus Card Hover Effects */
.focus-card-1:hover {
    transform: translateY(-8px) perspective(1000px) rotateX(2deg);
    box-shadow: inset 0 80px 80px -30px #ff6281, inset 0 40px 30px -8px #ff9aa7, inset 0 -20px 20px -6px rgba(255, 64, 102, 0.15), inset 0 6px 6px -2px rgba(255, 64, 102, 0.1);
}
html:not(.dark) .focus-card-1:hover {
    box-shadow: inset 0 80px 80px -30px #ff6281, inset 0 40px 30px -8px #ff9aa7, inset 0 -20px 20px -6px rgba(255, 64, 102, 0.15), inset 0 6px 6px -2px rgba(255, 64, 102, 0.1);
}
html.dark .focus-card-1:hover {
    box-shadow: inset 0 80px 80px -30px #ff6281, inset 0 40px 30px -8px #ff9aa7, inset 0 -20px 20px -6px rgba(255, 64, 102, 0.15), inset 0 6px 6px -2px rgba(255, 64, 102, 0.1);
}
.focus-card-2:hover {
    transform: translateY(-8px) perspective(1000px) rotateX(2deg);
    box-shadow: inset 0 80px 80px -30px #5694ff, inset 0 40px 30px -8px  #c6fff7, inset 0 -20px 20px -6px rgba(127, 255, 212, 0.15), inset 0 6px 6px -2px rgba(35, 101, 255, 0.1);
}
html:not(.dark) .focus-card-2:hover {
    box-shadow: inset 0 80px 80px -30px #5694ff, inset 0 40px 30px -8px  #c6fff7, inset 0 -20px 20px -6px rgba(127, 255, 212, 0.15), inset 0 6px 6px -2px rgba(35, 101, 255, 0.1);
}
html.dark .focus-card-2:hover {
    box-shadow: inset 0 80px 80px -30px #5694ff, inset 0 40px 30px -8px  #c6fff7, inset 0 -20px 20px -6px rgba(127, 255, 212, 0.15), inset 0 6px 6px -2px rgba(35, 101, 255, 0.1);
}
.focus-card-3:hover {
    transform: translateY(-8px) perspective(1000px) rotateX(2deg);
    box-shadow: inset 0 80px 80px -30px #ffbb1c, inset 0 40px 30px -8px #f9e71a, inset 0 -20px 20px -6px rgba(255, 255, 255, 0.15), inset 0 6px 6px -2px rgba(255, 165, 0, 0.1);
}
html:not(.dark) .focus-card-3:hover {
    box-shadow: inset 0 80px 80px -30px #ffbb1c, inset 0 40px 30px -8px #f9e71a, inset 0 -20px 20px -6px rgba(255, 255, 255, 0.15), inset 0 6px 6px -2px rgba(255, 165, 0, 0.1);
}
html.dark .focus-card-3:hover {
    box-shadow: inset 0 80px 80px -30px #ffbb1c, inset 0 40px 30px -8px #f9e71a, inset 0 -20px 20px -6px rgba(255, 255, 255, 0.15), inset 0 6px 6px -2px rgba(255, 165, 0, 0.1);
}
.focus-card-4:hover {
    transform: translateY(-8px) perspective(1000px) rotateX(2deg);
    box-shadow: inset 0 80px 80px -30px #2ecc71, inset 0 40px 30px -8px #27ae60, inset 0 -20px 20px -6px rgba(240, 255, 240, 0.15), inset 0 6px 6px -2px rgba(0, 128, 0, 0.1);
}
html:not(.dark) .focus-card-4:hover {
    box-shadow: inset 0 80px 80px -30px #2ecc71, inset 0 40px 30px -8px #27ae60, inset 0 -20px 20px -6px rgba(240, 255, 240, 0.15), inset 0 6px 6px -2px rgba(0, 128, 0, 0.1);
}
html.dark .focus-card-4:hover {
    box-shadow: inset 0 80px 80px -30px #2ecc71, inset 0 40px 30px -8px #27ae60, inset 0 -20px 20px -6px rgba(240, 255, 240, 0.15), inset 0 6px 6px -2px rgba(0, 128, 0, 0.1);
}
.focus-card-5:hover {
    transform: translateY(-8px) perspective(1000px) rotateX(2deg);
    box-shadow: inset 0 80px 80px -30px #3cdee7, inset 0 40px 30px -8px #e84393, inset 0 -20px 20px -6px rgba(255, 240, 245, 0.15), inset 0 6px 6px -2px rgba(220, 20, 60, 0.1);
}
html:not(.dark) .focus-card-5:hover {
    box-shadow: inset 0 80px 80px -30px #3cdee7, inset 0 40px 30px -8px #e84393, inset 0 -20px 20px -6px rgba(255, 240, 245, 0.15), inset 0 6px 6px -2px rgba(220, 20, 60, 0.1);
}
html.dark .focus-card-5:hover {
    box-shadow: inset 0 80px 80px -30px #3cdee7, inset 0 40px 30px -8px #e84393, inset 0 -20px 20px -6px rgba(255, 240, 245, 0.15), inset 0 6px 6px -2px rgba(220, 20, 60, 0.1);
}
.focus-card-6:hover {
    transform: translateY(-8px) perspective(1000px) rotateX(2deg);
    box-shadow: inset 0 80px 80px -30px #5b6eff, inset 0 40px 30px -8px #e84393, inset 0 -20px 20px -6px rgba(255, 240, 245, 0.15), inset 0 6px 6px -2px rgba(220, 20, 60, 0.1);
}
html:not(.dark) .focus-card-6:hover {
    box-shadow: inset 0 80px 80px -30px #5b6eff, inset 0 40px 30px -8px #e84393, inset 0 -20px 20px -6px rgba(255, 240, 245, 0.15), inset 0 6px 6px -2px rgba(220, 20, 60, 0.1);
}
html.dark .focus-card-6:hover {
    box-shadow: inset 0 80px 80px -30px #5b6eff, inset 0 40px 30px -8px #e84393, inset 0 -20px 20px -6px rgba(255, 240, 245, 0.15), inset 0 6px 6px -2px rgba(220, 20, 60, 0.1);
}

/* Iridescence container */
.iridescence-container {
    width: 500px;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
}

/* Floating Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.scroll-to-top-btn:hover {
  background: #222;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
}
@media (min-width: 641px) {
  .scroll-to-top-btn {
    display: none !important;
  }
}

/* Theme handling */
.dark { color-scheme: dark; }
.dark body { background-color: #000; color: #fff; }

/* Top bar visibility */
.visible { opacity: 1; transform: translateY(0); }

#top-bar-container {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 50;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.3s, transform 0.3s;
}

/* Hero CTA Button */
.hero-cta-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
    background: #000;
    color: #fff;
    border: none;
    box-shadow: none;
}
.dark .hero-cta-btn {
    color: #000;
    background: #fff;
}
.hero-cta-btn:hover {
    color: #fff;
    background: #2463EB;
}
.dark .hero-cta-btn:hover {
    color: #fff;
    background: #2463EB;
}

/* Ensure arrow icons in CTA buttons change color correctly */
.hero-cta-btn .theme-icon {
    transition: filter 0.2s ease;
    /* Default (light theme): button text is white → make icon white */
    filter: brightness(0) saturate(100%) invert(1);
}
.dark .hero-cta-btn .theme-icon {
    /* Dark theme default button is white with black text → make icon black */
    filter: brightness(0) saturate(100%) invert(0);
}
.hero-cta-btn:hover .theme-icon,
.dark .hero-cta-btn:hover .theme-icon {
    /* On hover, button turns blue with white text → make icon white */
    filter: brightness(0) saturate(100%) invert(1);
}

/* Why Work With Me Section */
.why-work-card {
    padding: 1.5rem;
    border: 1px solid var(--card-border-color);
    border-radius: 1rem;
    background-color: var(--card-bg-color);
    overflow: hidden;
    transition: all 0.2s ease;
}

.why-work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.dark .why-work-card:hover {
    box-shadow: 0 10px 20px rgba(255,255,255,0.05);
}

.why-work-icon {
    width: 4rem;
    height: auto;
    object-fit: cover;
}

.why-work-title {
    font-family: 'Overused', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.why-work-description {
    color: var(--subtitle-color);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Section Animation Classes */
.section-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.section-animate .stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-animate.animate-in .stagger-item {
    opacity: 1;
    transform: translateY(0);
}

/* Add delay to staggered items */
.section-animate.animate-in .stagger-item:nth-child(1) { transition-delay: 0.1s; }
.section-animate.animate-in .stagger-item:nth-child(2) { transition-delay: 0.2s; }
.section-animate.animate-in .stagger-item:nth-child(3) { transition-delay: 0.3s; }
.section-animate.animate-in .stagger-item:nth-child(4) { transition-delay: 0.4s; }
.section-animate.animate-in .stagger-item:nth-child(5) { transition-delay: 0.5s; }
.section-animate.animate-in .stagger-item:nth-child(6) { transition-delay: 0.6s; }

/* Try it out Button Styles */
.try-it-out-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    border-radius: 0.5rem;
    border: none;
    box-sizing: border-box;
    min-width: 120px;
    max-width: 480px;
    height: 44px;
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    font-family: 'Overused', sans-serif;
    font-weight: 600;
    line-height: 20px;
    background: rgba(0,0,0,0.1);
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
}

.dark .try-it-out-btn {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.try-it-out-btn .text {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.try-it-out-btn .icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Font Awesome 6 Pro', 'Overused', sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 135%;
    position: relative;
    color: inherit;
}

/* Hover & Focus State */
.try-it-out-btn:hover,
.try-it-out-btn:focus-visible {
    background: #2463EB;
    color: #fff;
    outline: none;
}

.dark .try-it-out-btn:hover,
.dark .try-it-out-btn:focus-visible {
    background: #2463EB;
    color: #fff;
}

.try-it-out-btn:hover .icon,
.try-it-out-btn:focus-visible .icon {
    color: #fff;
}

/* Active State */
.try-it-out-btn:active {
    background: #1a47b8;
    color: #fff;
}

.dark .try-it-out-btn:active {
    background: #1a47b8;
    color: #fff;
}

/* Disabled State */
.try-it-out-btn:disabled,
.try-it-out-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    background: #222;
    color: #aaa;
    border-color: #444;
}

.dark .try-it-out-btn:disabled,
.dark .try-it-out-btn[aria-disabled="true"] {
    background: #333;
    color: #888;
    border-color: #444;
}

/* --- Base Reset & Typography (from styles.css if missing) --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.container-large { 
    max-width: 1200px; 
    margin-left: auto; 
    margin-right: auto; 
}

.container-medium { 
    max-width: 900px; 
    margin-left: auto; 
    margin-right: auto; 
}

.container-extralarge { 
    max-width: 1600px; 
    margin-left: auto; 
    margin-right: auto; 
}

h1, h2, h3, h4, h5, h6 { 
    font-weight: 600; 
    line-height: 1.2; 
}

p { 
    line-height: 1.6; 
    color: var(--subtitle-color); 
}

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

/* --- Utility Classes (from styles.css if missing) --- */
.grid {
    display: grid;
}
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}
.gap-8 {
    gap: 2rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.mb-12 {
    margin-bottom: 3rem;
}
.rounded-lg {
    border-radius: 0.5rem;
}
.h-60 {
    height: 15rem;
}
.w-full {
    width: 100%;
}
.h-full {
    height: 100%;
}
.object-cover {
    object-fit: cover;
}
.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}
.duration-300 {
    transition-duration: 300ms;
}
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* --- Shared Components (from styles.css if missing) --- */
.section-title {
    font-family: 'Overused', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1;
}
.text-muted {
    color: var(--subtitle-color);
}
.card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.dark .card:hover {
    box-shadow: 0 10px 20px rgba(255,255,255,0.05);
}
.bg-gray-200 {
    background-color: var(--pill-bg-color);
}

/* --- Project Images with 16:10 Aspect Ratio --- */
.project-img-main {
    aspect-ratio: 16/10;
    object-fit: cover;
    width: 100%;
    max-width: 100%;
    height: auto;
}
