:root {
    --bg-color: #050505;
    --text-color: #EDEDED;
    --text-muted: #A1A1A1;
    --border-color: rgba(255, 255, 255, 0.1);
    /* Make cards opaque (non-transparent) for stronger contrast */
    --card-bg: #0b0b0b;
    --accent-glow: rgba(255, 255, 255, 0.15);
    --font-main: 'Inter', sans-serif;
    --status-green: #10B981;
}

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

/* Smooth native scrolling where supported and touch momentum */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--status-green);
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Gradient Canvas - Below Hero */
#gradient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Hint to the browser which elements will animate for better GPU usage */
main,
.hero,
.card,
.avatar-placeholder,
.project-visual {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Availability Badge */
.availability-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-muted);
    /* glassmorphism */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px) saturate(120%);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
}

.availability-badge:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.availability-badge:active {
    transform: translateY(0);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--status-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--status-green);
}

main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: #FFFFFF;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 60px;
    /* Space for availability badge on mobile */
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
}

@media (min-width: 768px) {
    .hero-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .hero-text {
        flex: 1;
    }

    .hero-visual {
        flex: 1;
        display: flex;
        justify-content: flex-end;
    }
}

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

@media (min-width: 768px) {
    .hero-text {
        text-align: left;
    }
}

.profile-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Hero Availability Badge */
.availability-badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* glassy accent badge */
    background: linear-gradient(135deg, rgb(5, 23, 17) 100%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--status-green);
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px) saturate(110%);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.availability-badge-hero .status-dot {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 8px var(--status-green);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 15px var(--status-green);
    }
}

/* Value Proposition Gradient */
.value-prop {
    font-size: clamp(1.5rem, 4vw, 2rem);
    background: linear-gradient(135deg, #C0C0C0 0%, #FFFFFF 50%, #E8E8E8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Hero Description */
.hero-description {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 600px;
}

/* Hero CTA Buttons */
.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #ffffff;
    color: #222222;
    border: none;
    padding: 14px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    color: #333333;
    background: white;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.89);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: rgba(61, 61, 61, 0.97);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

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

.avatar-placeholder {
    width: 280px;
    height: 350px;
    background: transparent;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
    overflow: visible;
}

.avatar-placeholder::after {
    display: none;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(5, 5, 5, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.subtitle {
    margin-top: 1.5rem;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    opacity: 0.8;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 0;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(250px, auto);
    }

    .tech {
        grid-column: 1 / -1;
    }

    /* Full width top */
    .about {
        grid-column: 1 / 2;
    }

    .p1 {
        grid-column: 2 / 3;
    }

    .p2 {
        grid-column: 3 / 4;
    }

    .p3 {
        grid-column: 1 / 2;
    }

    /* Wrap to next row */
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* About Card Specific Styles */
.card.about {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.card.about p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #AAAAAA;
    text-align: justify;
}

.text-highlight {
    color: #FFFFFF;
    font-weight: 500;
}

/* About Footer */
.about-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 24px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Geist Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    color: #888;
}

.footer-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Project Card Styles */
.project-visual {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover .project-visual {
    transform: scale(1.03);
}

.project-visual::before {
    display: none;
}

/* Card Header Updates */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-arrow {
    width: 18px;
    height: 18px;
    color: #FFFFFF;
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: all 0.3s ease;
}

.card:hover .card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* Tech Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tech-tag {
    font-family: 'Geist Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #888;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.card:hover .tech-tag {
    border-color: rgba(255, 255, 255, 0.2);
    color: #AAA;
}

/* Tech Pills */
/* Tech Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

@media (min-width: 1024px) {
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tech-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    cursor: default;
}

.tech-item:hover,
.tech-item.active-glow {
    border-color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.tech-item svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: color 0.3s ease, filter 0.3s ease;
}

.tech-item span {
    font-family: 'Geist Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.8125rem;
    /* ~13px */
    letter-spacing: -0.02em;
    color: var(--text-color);
    font-weight: 500;
}

/* Tech Specific Hover Colors */
.tech-item.react:hover svg,
.tech-item.react.active-glow svg {
    color: #61DAFB;
    filter: drop-shadow(0 0 5px rgba(97, 218, 251, 0.6));
}

.tech-item.node:hover svg,
.tech-item.node.active-glow svg {
    color: #43853d;
    filter: drop-shadow(0 0 5px rgba(67, 133, 61, 0.6));
}

.tech-item.next:hover svg,
.tech-item.next.active-glow svg {
    color: #FFFFFF;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}

.tech-item.mysql:hover svg,
.tech-item.mysql.active-glow svg {
    color: #00758F;
    filter: drop-shadow(0 0 5px rgba(0, 117, 143, 0.6));
}

.tech-item.php:hover svg,
.tech-item.php.active-glow svg {
    color: #777BB4;
    filter: drop-shadow(0 0 5px rgba(119, 123, 180, 0.6));
}

.tech-item.javascript:hover svg,
.tech-item.javascript.active-glow svg {
    color: #F7DF1E;
    filter: drop-shadow(0 0 5px rgba(247, 223, 30, 0.6));
}

.tech-item.typescript:hover svg,
.tech-item.typescript.active-glow svg {
    color: #3178C6;
    filter: drop-shadow(0 0 5px rgba(49, 120, 198, 0.6));
}

.tech-item.figma:hover svg,
.tech-item.figma.active-glow svg {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
    color: unset;
    /* Allow individual fills to take over */
}

.tech-item.figma:hover .f-blue,
.tech-item.figma.active-glow .f-blue {
    fill: #1ABCFE;
}

.tech-item.figma:hover .f-green,
.tech-item.figma.active-glow .f-green {
    fill: #0ACF83;
}

.tech-item.figma:hover .f-red,
.tech-item.figma.active-glow .f-red {
    fill: #FF7262;
}

.tech-item.figma:hover .f-orange,
.tech-item.figma.active-glow .f-orange {
    fill: #F24E1E;
}

.tech-item.figma:hover .f-purple,
.tech-item.figma.active-glow .f-purple {
    fill: #A259FF;
}

/* Project Status */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.status-indicator {
    font-size: 0.75rem;
    color: var(--status-green);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: var(--status-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--status-green);
}

.status-indicator.private {
    color: #FFAB00;
}

.status-indicator.private::before {
    background-color: #FFAB00;
    box-shadow: 0 0 8px #FFAB00;
}

.status-indicator.development {
    color: #3B82F6;
}

.status-indicator.development::before {
    background-color: #3B82F6;
    box-shadow: 0 0 8px #3B82F6;
}

.status-indicator.idea {
    color: #A855F7;
}

.status-indicator.idea::before {
    background-color: #A855F7;
    box-shadow: 0 0 8px #A855F7;
}

.status-indicator.design {
    color: #EC4899;
}

.status-indicator.design::before {
    background-color: #EC4899;
    box-shadow: 0 0 8px #EC4899;
}

/* CTA Section */
.cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.terminal-input {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 8px 8px 24px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
    gap: 12px;
}

/* Show More functionality */
.project-hidden {
    display: none;
}

.visible .project-hidden {
    display: none;
    /* Override fade-in logic if needed */
}

.show-more-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    height: 50px;
    grid-column: 1 / -1;
    /* Span full width in grid */
}

.btn-show-more {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: 100px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    transition: all 0.3s ease;
}

.btn-show-more:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-show-more svg {
    transition: transform 0.3s ease;
}

.prompt {
    color: var(--status-green);
    font-weight: bold;
}

.terminal-input input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    flex-grow: 1;
    outline: none;
}



/* Contact card and form styles */
.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 28px;
    border-radius: 20px;
    max-width: 720px;
    width: 100%;
    text-align: left;
}

.contact-card h2 {
    margin: 0 0 8px 0;
}

.cta-desc {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.contact-form {
    display: grid;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #333;
    padding: 16px;
    border-radius: 8px;
    /* Slightly sharper for code look */
    color: var(--text-color);
    font-family: 'Geist Mono', 'Fira Code', monospace;
    /* Monospace font */
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #555;
    /* Darker placeholder for contrast */
}

/* Focus State */
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #FFFFFF;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.contact-actions {
    display: flex;
    justify-content: flex-end;
    /* Aligned right */
}

.btn-submit {
    background: #FFFFFF;
    color: #050505;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    /* Consistency with inputs */
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 160px;
    /* Ensure space for text swap */
}

.btn-submit:hover {
    background: #FFFFFF;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Hover Effect: Text Change */
.btn-submit:hover {
    color: transparent;
    /* Hide original text */
}

.btn-submit::after {
    content: attr(data-hover);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #050505;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.btn-submit:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Active State */
.btn-submit:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .contact-form {
        grid-template-columns: 1fr 1fr;
    }

    .contact-form textarea {
        grid-column: 1 / -1;
    }

    .contact-actions {
        grid-column: 1 / -1;
    }
}

.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--status-green);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Image styling: make images responsive, cover avatar area, and inherit rounded corners */
.img {
    max-width: 100%;
    height: auto;
    display: block;
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    /* allow the container to float without clipping the image */
}

.avatar-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

.project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Smaller avatar on narrow screens to avoid overflow */
@media (max-width: 480px) {
    .avatar-placeholder {
        width: 200px;
        height: 250px;
    }
}

/* 3D tilt support: perspective on container and smooth transforms */
.avatar-placeholder,
.project-visual {
    perspective: 1200px;
    /* creates the 3D space */
    transform-style: preserve-3d;
    transition: transform 180ms ease-out;
    will-change: transform;
}

.avatar-placeholder img {
    /* ensure inner image preserves the container's rounding in 3D */
    transform-style: preserve-3d;
    position: relative;
    z-index: 2;
    /* keep image above the container frame when it overflows */
}

/* Floating animation applied to the wrapper */
.avatar-floater {
    animation: float-anim 6s ease-in-out infinite;
    will-change: transform;
}

.avatar-placeholder {
    /* keep container free of transform animations so JS tilt remains responsive */
    transform-origin: center center;
    /* Enhanced visual style */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@keyframes float-anim {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Remove animation from inner image as it's now on the wrapper */
.avatar-placeholder img {
    animation: none;
    transform-origin: center center;
    will-change: transform;
}

@media (max-width: 480px) {
    .avatar-floater {
        animation-duration: 8s;
    }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {

    .fade-in,
    .avatar-floater,
    .avatar-placeholder,
    .project-visual,
    .btn-submit {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Engineering Philosophy Section */
.philosophy-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 70px 0;
}

@media (min-width: 768px) {
    .philosophy-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.philosophy-card {
    background: transparent;
    border-left: 2px solid var(--status-green);
    padding: 0 0 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.3s ease;
}

.philosophy-card:hover {
    transform: translateX(4px);
}

.phi-icon {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.phi-icon svg {
    width: 28px;
    height: 28px;
    color: var(--status-green);
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
}

.philosophy-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #FFFFFF;
    font-weight: 600;
}

.philosophy-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Fat Footer */
.site-footer {
    border-top: 1px solid #333;
    padding: 1rem 0;
    margin-top: 6rem;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .footer-left {
        text-align: left;
    }

    .footer-right {
        justify-content: flex-end;
    }
}

.footer-left h4 {
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-left p {
    font-size: 0.875rem;
    color: #666;
}

.footer-center svg {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.footer-right a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.footer-right a:hover {
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* Mobile Optimizations */
@media (max-width: 768px) {

    /* Optimization 3: Reduce Padding & Frame Text */
    .bento-grid {
        padding: 2rem 0;
    }

    .hero {
        min-height: 50vh;
        /* Restore some height for framing */
        padding-top: 100px;
        padding-bottom: 50px;
        display: flex;
        align-items: center;
    }

    .hero-visual {
        display: none;
        /* Hide visual/avatar on mobile */
    }

    .hero-container {
        flex-direction: column;
        justify-content: center;
    }

    /* Optimization 1: Text Centers & Avatar */
    .hero-text {
        margin-bottom: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    /* Button Ergonomics */
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    /* Restore Native Scrolling on Mobile */
    main {
        position: relative !important;
        transform: none !important;
        height: auto !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        border-radius: 100px;
        /* Ensure visual consistency */
    }

    .philosophy-grid {
        margin: 2rem 0;
    }

    .card {
        padding: 1.5rem;
    }

    /* Optimization 2: Layout Stacking */
    /* Ensure System Modules remain 2-col (default is 2, just ensuring) */
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Ensure Philosophy is 1-col (default is 1, just ensuring margin) */
    .philosophy-card {
        margin-bottom: 0;
        /* managed by grid gap, but adding safety if block */
    }

    /* Projects Full Width */
    .project-visual {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    /* Ensure availability badge doesn't overlap header on small screens */
    .availability-badge {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Footer Mobile Optimizations */
    .site-footer {
        margin-top: 4rem;
        padding-bottom: 2rem;
    }

    .footer-content {
        gap: 20px;
    }

    .footer-center svg {
        display: none;
    }

    .footer-right {
        gap: 12px;
        width: 100%;
    }

    .footer-right a {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px 20px;
        border-radius: 100px;
        font-size: 0.85rem;
        flex: 1 1 auto;
        /* Grow to fill space but behave nicely */
        text-align: center;
        min-width: 80px;
    }
}

/* Skeleton Loading */
.skeleton {
    background-color: #1a1a1a;
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0));
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    position: relative;
    overflow: hidden;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

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

.img-hidden {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.img-reveal {
    opacity: 1;
}

/* Ensure project visuals maintain aspect ratio even when empty/skeleton */
.project-visual.skeleton {
    background-color: #1a1a1a;
    /* Fallback */
}