/* --- Base Reset & Typography --- */
:root {
    /* Colors - Modern Ambient Premium Aesthetic */
    --clr-background: #f8f9fc;
    --clr-surface: #ffffff;
    --clr-surface-elevated: rgba(255, 255, 255, 0.65);
    --clr-primary: #0f172a;
    --clr-secondary: #475569;
    --clr-tertiary: #94a3b8;
    --clr-accent: #3b82f6;
    --clr-border: rgba(15, 23, 42, 0.08);
    --clr-border-highlight: rgba(255, 255, 255, 0.8);
    --clr-glass-bg: rgba(255, 255, 255, 0.4);

    --glow-opacity: 0.15;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* Dark mode overrides logic */
[data-theme="dark"] {
    --clr-background: #040814;
    --clr-surface: #0f172a;
    --clr-surface-elevated: rgba(15, 23, 42, 0.5);
    --clr-primary: #f8fafc;
    --clr-secondary: #94a3b8;
    --clr-tertiary: #64748b;
    --clr-border: rgba(248, 250, 252, 0.12);
    --clr-border-highlight: rgba(248, 250, 252, 0.05);
    --clr-glass-bg: rgba(15, 23, 42, 0.4);

    --glow-opacity: 0.25;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--clr-background);
    color: var(--clr-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

li {
    list-style: none;
}

/* Typography styles */
h1,
h2,
h3,
h4 {
    letter-spacing: -0.02em;
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(120deg, #ff2a85, #8a2387, #e94057, #f27121);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- Layout & Utilities --- */
.max-w-6xl {
    max-width: 1152px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.w-full {
    width: 100%;
}

.px-6 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.px-8 {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.pt-32 {
    padding-top: 9rem;
}

.pb-24 {
    padding-bottom: 8rem;
}

.pb-16 {
    padding-bottom: 4rem;
}

.mt-20 {
    margin-top: 5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.block {
    display: block;
}

/* Typewriter Container & Caret */
.typewriter-container {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .typewriter-container {
        min-height: 140px;
    }

    .md\:mb-4 {
        margin-bottom: 1rem;
    }
}

.typewrite>.wrap {
    border-right: 0.08em solid var(--clr-primary);
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--clr-primary);
    }
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-col {
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

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

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-4xl {
    font-size: 2.25rem;
    letter-spacing: -0.03em;
}

.text-5xl {
    font-size: 3rem;
    letter-spacing: -0.04em;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.text-primary {
    color: var(--clr-primary);
}

.text-secondary {
    color: var(--clr-secondary);
}

.text-tertiary {
    color: var(--clr-tertiary);
}

.text-accent {
    color: var(--clr-accent);
}

.border-border {
    border-color: var(--clr-border);
}

.border-t {
    border-top-width: 1px;
    border-style: solid;
}

.hidden {
    display: none;
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }

    .sm\:w-auto {
        width: auto;
    }
}

@media (max-width: 767px) {
    .md\:hidden {
        display: flex;
    }

    .desktop-menu {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .md\:hidden {
        display: none !important;
    }
}

/* Navigation Removed Background as Per Request */

.fixed {
    position: fixed;
}

nav {
    position: relative;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.0);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.scrolled-nav {
    background: var(--clr-surface-elevated);
    border-bottom: 1px solid var(--clr-border);
}

.nav-inner {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

/* Mobile Menu Overlay Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding-top: 80px;
    background-color: var(--clr-background);
    z-index: 45;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: center;
}

.mobile-menu-overlay.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-menu-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    font-size: 1.5rem;
    font-weight: 500;
}

.mobile-link {
    color: var(--clr-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.mobile-link:hover {
    color: var(--clr-primary);
    transform: translateX(6px);
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 60;
}

main,
footer {
    position: relative;
    z-index: 1;
}

.top-0 {
    top: 0;
}

.z-50 {
    z-index: 50;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.duration-500 {
    transition-duration: 500ms;
}

.hover-fade {
    transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.hover-fade:hover {
    color: var(--clr-primary);
    opacity: 0.85;
    transform: translateY(-1px);
}

/* Animations Triggered by JS or CSS */
@keyframes ping {

    75%,
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Base utility additions */
.space-y-8>*+* {
    margin-top: 2rem;
}

.space-y-10>*+* {
    margin-top: 2.5rem;
}

.space-y-12>*+* {
    margin-top: 3rem;
}

.space-y-24>*+* {
    margin-top: 6rem;
}

@media (min-width: 768px) {
    .md\:space-y-10>*+* {
        margin-top: 2.5rem;
    }

    .md\:space-y-40>*+* {
        margin-top: 10rem;
    }
}

.min-h-\[70vh\] {
    min-height: 70vh;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.leading-tight {
    line-height: 1.1;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-tighter {
    letter-spacing: -0.05em;
}

.tracking-wide {
    letter-spacing: 0.05em;
}

.inline-block {
    display: inline-block;
}

.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

.top-0 {
    top: 0;
}

.bottom-0 {
    bottom: 0;
}

.w-px {
    width: 1px;
}

.bg-border {
    background-color: var(--clr-border);
}

.-translate-x-1\/2 {
    transform: translateX(-50%);
}

.opacity-30 {
    opacity: 0.3;
}

.left-1\/2 {
    left: 50%;
}

.scroll-mt-24 {
    scroll-margin-top: 6rem;
}

/* Custom UI Elements (Apple Style) */

.glass-pill {
    padding: 8px 20px;
    background: var(--clr-surface-elevated);
    border: 1px solid var(--clr-border);
    border-radius: 999px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 1px 1px var(--clr-border-highlight);
    position: relative;
    overflow: hidden;
}

.glass-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.glass-pill:hover::before {
    transform: translateX(100%);
}

.glass-card {
    background: var(--clr-surface-elevated);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), inset 0 1px 1px var(--clr-border-highlight);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at top left, rgba(255, 255, 255, 0.1), transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), inset 0 1px 1px var(--clr-border-highlight);
}

[data-theme="dark"] .glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px var(--clr-border-highlight);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #1d1d1f, #434345);
    color: #ffffff;
    border-radius: 999px;
    font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #f5f5f7, #d2d2d7);
    color: #000000;
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Theme Switcher (Apple Style) */
.theme-switch {
    position: relative;
    width: 60px;
    height: 32px;
    border-radius: 999px;
    background-color: var(--clr-surface-elevated);
    border: 1px solid var(--clr-border);
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0 4px;
}

.theme-switch-track {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.theme-switch-handle {
    width: 24px;
    height: 24px;
    background-color: var(--clr-background);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateX(0);
    /* Light mode position (left) */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .theme-switch-handle {
    transform: translateX(26px);
    /* Dark mode position (right) */
}

.handle-icon {
    width: 14px;
    height: 14px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 12px 24px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--clr-primary);
    border: 1px solid var(--clr-border);
    border-radius: 999px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: var(--clr-surface-elevated);
    border-color: var(--clr-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.btn-secondary:active {
    transform: scale(0.96);
}

.timeline-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #e94057, #8a2387);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(233, 64, 87, 0.6);
    position: relative;
    z-index: 2;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(233, 64, 87, 0.3);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Staggered Animations */
.fade-in-up {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

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

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

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

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

/* Grid specific utilities for Tailwind-like logic */
.lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.overflow-hidden {
    overflow: hidden;
}

.absolute.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.p-6 {
    padding: 1.5rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.text-xs {
    font-size: 0.75rem;
}

.rounded-md {
    border-radius: var(--radius-sm);
}

.rounded-t-\[var\(--radius-xl\)\] {
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
}

.rounded-b-\[var\(--radius-xl\)\] {
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
}

.border-t-0 {
    border-top-width: 0;
}

.cursor-pointer {
    cursor: pointer;
}

.pointer-events-none {
    pointer-events: none;
}

.opacity-10 {
    opacity: 0.1;
}

.blur-\[100px\] {
    filter: blur(100px);
}

.group-hover\:opacity-100 {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* --- My Journey / Experience Section Custom Styles --- */
.journey-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    position: relative;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .journey-wrapper {
        grid-template-columns: 7fr 5fr;
        gap: 4rem;
    }
}

.timeline-beam {
    position: absolute;
    left: 20px;
    top: 50px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.2) 10%, rgba(59, 130, 246, 0.4) 50%, rgba(59, 130, 246, 0.2) 90%, transparent);
    z-index: 0;
    opacity: 0.6;
}

@media (min-width: 768px) {
    .timeline-beam {
        left: 58.33333%;
        transform: translateX(-50%);
    }
}

.journey-col {
    position: relative;
    z-index: 10;
}

.journey-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.journey-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    border: 1px solid var(--clr-border);
    margin-bottom: 2rem;
}

.journey-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), 0 0 20px rgba(59, 130, 246, 0.05);
}

[data-theme="dark"] .journey-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(59, 130, 246, 0.1);
}

.timeline-node {
    position: absolute;
    top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--clr-surface-elevated);
    border: 2px solid var(--clr-accent);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    z-index: 10;
}

.timeline-node-inner {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--clr-accent);
}

.exp-col .timeline-node {
    right: -2rem;
    /* Matches col gap mapping approx */
}

.edu-col .timeline-node {
    left: -2rem;
}

@media (max-width: 767px) {

    .exp-col .timeline-node,
    .edu-col .timeline-node {
        left: -32px;
        right: auto;
    }
}

.edu-node {
    border-color: var(--clr-border);
    box-shadow: none;
    transition: border-color 0.3s ease;
}

.edu-node-inner {
    background-color: var(--clr-tertiary);
    transition: background-color 0.3s ease;
}

.journey-card:hover .edu-node {
    border-color: var(--clr-accent);
}

.journey-card:hover .edu-node-inner {
    background-color: var(--clr-accent);
}

.journey-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Base custom colors */
.text-purple {
    color: #a855f7;
}

.bg-purple-light {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), transparent);
}

.text-orange {
    color: #f97316;
}

.bg-orange-light {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), transparent);
}

.text-accent {
    color: var(--clr-accent);
}

.bg-accent-light {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), transparent);
}

.journey-company {
    font-size: 0.875rem;
    font-weight: 500;
}

/* --- Projects Section Custom Styles --- */

/* Section headers */
.category-header {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--clr-border);
}

/* Horizontal Scroll Containers */
.project-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    padding-top: 1rem;
    padding-inline: 0.5rem;
    margin-inline: -0.5rem;
    /* Offset padding for scrolling */

    /* Smooth native scrolling */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for a cleaner look */
.project-carousel::-webkit-scrollbar {
    height: 6px;
}

.project-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.project-carousel::-webkit-scrollbar-thumb {
    background: var(--clr-border);
    border-radius: 10px;
}

.project-carousel:hover::-webkit-scrollbar-thumb {
    background: var(--clr-tertiary);
}

/* Common Card Styles */
.showcase-card {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: var(--clr-surface-elevated);
    border: 1px solid var(--clr-border);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

@media (min-width: 768px) {
    .showcase-card {
        width: 320px;
    }
}

.showcase-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .showcase-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Media Containers */
.showcase-media {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--clr-background);
}

.showcase-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.showcase-card:hover .showcase-media img {
    transform: scale(1.05);
}

/* Aspect ratios based on project type */
.game-card .showcase-media {
    aspect-ratio: 16 / 9;
    /* Landscape for games */
}

/* For apps, use a slightly taller card to show mobile screens */
.app-card {
    width: 240px;
}

@media (min-width: 768px) {
    .app-card {
        width: 280px;
    }
}

.app-card .showcase-media {
    aspect-ratio: 4 / 3;
}

.app-card .showcase-media img {
    object-fit: contain;
    /* Apps often have varying device frames, contain prevents cutting */
    padding: 1rem;
}

/* Card Content Details */
.showcase-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.showcase-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clr-primary);
    margin-bottom: 0.5rem;
    transition: color 0.3s auto;
}

.showcase-card:hover .showcase-title {
    color: var(--clr-accent);
}

.game-card:hover .showcase-title {
    color: #f43f5e;
}

/* Rose/Red for games */
.swift-card:hover .showcase-title {
    color: #f97316;
}

/* Orange for Swift */
.flutter-card:hover .showcase-title {
    color: #60a5fa;
}

/* Blue for Flutter */

.showcase-desc {
    font-size: 0.875rem;
    color: var(--clr-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    /* Pushes the 'View' link to bottom */
}

.showcase-link {
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.game-card .showcase-link {
    color: #f43f5e;
}

.swift-card .showcase-link {
    color: #f97316;
}

.flutter-card .showcase-link {
    color: #60a5fa;
}

.showcase-card:hover .showcase-link i {
    transform: translateX(4px);
}

.showcase-link i {
    transition: transform 0.3s ease;
}


/* Tags */
.pfc-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.pfc-tag.game {
    background: rgba(244, 63, 94, 0.9);
    /* Rose-500 */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pfc-tag.swift {
    background: rgba(249, 115, 22, 0.9);
    /* Orange-500 */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pfc-tag.flutter {
    background: rgba(59, 130, 246, 0.9);
    /* Blue-500 */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Margin Utility Fixes */
.mb-12 {
    margin-bottom: 3rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

/* --- Canvas Code Background --- */
#code-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] #code-canvas {
    opacity: 0.50;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.active-filter {
    background-color: var(--clr-primary);
    color: var(--clr-background);
}

/* Project Cards */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    /* subtle light shadow */
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* subtle dark shadow */
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn {
    background: var(--clr-primary);
    color: var(--clr-background);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.group:hover .view-btn {
    transform: translateY(0);
}

/* Form Inputs */
.input-field {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    color: var(--clr-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.input-field::placeholder {
    color: var(--clr-tertiary);
}

.input-field:focus {
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.resize-none {
    resize: none;
}

/* Ambient Glow Orbs */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    opacity: var(--glow-opacity);
    z-index: -2;
    pointer-events: none;
    transition: opacity 1s ease;
}

.glow-1 {
    top: -15%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(138, 35, 135, 0.7) 0%, transparent 70%);
    animation: float1 24s infinite alternate ease-in-out;
}

.glow-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(0, 180, 219, 0.5) 0%, transparent 70%);
    animation: float2 28s infinite alternate ease-in-out;
}

.glow-3 {
    top: 40%;
    left: 40%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(233, 64, 87, 0.4) 0%, transparent 70%);
    animation: float3 32s infinite alternate ease-in-out;
}

@keyframes float1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(8%, 8%) scale(1.1);
    }
}

@keyframes float2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-8%, -8%) scale(1.1);
    }
}

@keyframes float3 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(12%, -12%) scale(1.2);
    }
}

/* --- Contact Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
}

@media (max-width: 960px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.contact-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--clr-surface-elevated);
    border: 1px solid var(--clr-border);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--clr-secondary);
    margin-bottom: 1.5rem;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--clr-primary);
}

.contact-desc {
    font-size: 1rem;
    color: var(--clr-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--clr-secondary);
    font-size: 0.9rem;
    transition: color 0.2s, gap 0.2s;
}

.contact-link:hover {
    color: var(--clr-primary);
    gap: 14px;
}

/* Form card */
.contact-form-card {
    background: var(--clr-surface-elevated);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .contact-form-card {
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

.contact-form-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--clr-secondary);
    letter-spacing: 0.01em;
}

.btn-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #8a2387, #e94057, #f27121);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(233, 64, 87, 0.3);
}

.btn-send:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233, 64, 87, 0.4);
}

.btn-send:active {
    transform: scale(0.97);
}

/* --- Projects Mosaic Layout --- */
.projects-mosaic {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

@media (max-width: 960px) {
    .projects-mosaic {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.projects-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: space-between;
}

/* ---- Feature Card (Large) ---- */
.project-feature-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--clr-border);
    background: var(--clr-surface-elevated);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.project-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .project-feature-card:hover {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.pfc-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--clr-surface);
}

.pfc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-feature-card:hover .pfc-image img {
    transform: scale(1.06);
}

.pfc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

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

.pfc-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    letter-spacing: 0.02em;
}

.pfc-info {
    padding: 1.5rem 1.75rem 1.75rem;
}

.pfc-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.875rem;
}

.pfc-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
}

.pfc-tag.swift {
    background: rgba(255, 42, 133, 0.12);
    color: #ff2a85;
}

.pfc-tag.flutter {
    background: rgba(0, 180, 219, 0.12);
    color: #00b4db;
}

.pfc-tag.game {
    background: rgba(138, 35, 135, 0.15);
    color: #b06fc4;
}

.pfc-year {
    font-size: 0.8rem;
    color: var(--clr-tertiary);
    margin-left: auto;
}

.pfc-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.625rem;
    color: var(--clr-primary);
}

.pfc-desc {
    font-size: 0.9rem;
    color: var(--clr-secondary);
    line-height: 1.65;
}

/* ---- Mini Card ---- */
.project-mini-card {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--clr-border);
    background: var(--clr-surface-elevated);
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    flex: 1;
}

@media (max-width: 500px) {
    .project-mini-card {
        flex-direction: column;
        gap: 0;
    }
}

.project-mini-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.09), inset 0 1px 1px var(--clr-border-highlight);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .project-mini-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 1px var(--clr-border-highlight);
    border-color: rgba(255, 255, 255, 0.2);
}

.pmc-image {
    position: relative;
    width: 150px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--clr-surface);
}

@media (max-width: 500px) {
    .pmc-image {
        width: 100%;
        height: 160px;
    }
}

.pmc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-mini-card:hover .pmc-image img {
    transform: scale(1.08);
}

.pmc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.pmc-info {
    padding: 1.125rem 1.125rem 1.125rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    justify-content: center;
}

.pmc-title {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--clr-primary);
}

.pmc-desc {
    font-size: 0.8125rem;
    color: var(--clr-secondary);
    line-height: 1.55;
}

/* Subtle Saks Blue Border Glow Overlay */
.site-border-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    box-shadow: inset 0 0 80px rgba(65, 105, 225, 0.3);
    transition: box-shadow 0.3s ease;
}

[data-theme="dark"] .site-border-glow {
    box-shadow: inset 0 0 100px rgba(65, 105, 225, 0.5);
}