/* 
   Aspirancy - Digital Alchemy Theme 
   Vanilla CSS Implementation
*/

:root {
    /* Colors */
    --quantum-blue: #0A2463;
    --neutron-white: #FFFFFF;
    --energy-amber: #0078D4;
    --carbon-grey: #2E2E2E;
    --carbon-dark: #1a1a1a;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);

    /* Elemental Colors */
    --fire: #0078D4;
    --water: #3B82F6;
    --earth: #10B981;
    --air: #E5E7EB;
    --purple: #50C8F5;

    /* Fonts */
    --font-head: 'Inter', sans-serif;
    --font-body: 'Source Sans Pro', sans-serif;
    --font-code: 'JetBrains Mono', monospace;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 6rem 1.5rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--carbon-grey);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Hide default cursor */
}

/* Custom Cursor */
.cursor {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--energy-amber);
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease, background 0.2s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--energy-amber);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.75, -0.5, 0.25, 1.5);
    opacity: 0.6;
}

.cursor.expand {
    transform: scale(2);
    background: var(--purple);
}

.cursor-follower.expand {
    transform: scale(1.5);
    border-color: var(--purple);
}

::selection {
    background-color: var(--energy-amber);
    color: #0A1929;
}

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

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-highlight {
    color: var(--energy-amber);
}

.text-water {
    color: var(--water);
}

.text-earth {
    color: var(--earth);
}

.text-air {
    color: var(--air);
}

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

.hidden {
    display: none !important;
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(46, 46, 46, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.logo {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.05em;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--energy-amber);
    transition: transform 0.7s ease;
}

.logo:hover .logo-icon {
    transform: rotate(180deg);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover {
    color: var(--energy-amber);
}

.cta-button {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--energy-amber);
    color: var(--energy-amber);
    font-family: var(--font-code);
    font-size: 0.85rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--energy-amber);
    color: var(--neutron-white);
    border-radius: 12px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    /* Offset for fixed nav */
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.hero-text {
    z-index: 10;
}

.system-ready {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--energy-amber);
    margin-bottom: 1.5rem;
}

.pulse-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

h1 {
    font-family: var(--font-head);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.text-highlight {
    background: linear-gradient(to right, var(--energy-amber), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    /* Standard syntax support */
    color: transparent;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    font-family: var(--font-head);
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--energy-amber);
    color: white;
}

.btn-primary:hover {
    border-radius: 16px;
}

.btn-secondary {
    border: 1px solid var(--border-color);
    background: transparent;
    color: white;
}

.btn-secondary:hover {
    border-color: white;
}

.icon-move {
    transition: transform 0.3s ease;
}

.group:hover .icon-move {
    transform: translateX(4px);
}

/* Hero Visualizer */
.hero-visualizer {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.code-window {
    width: 90%;
    background: rgba(46, 46, 46, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    position: relative;
}

.code-window:hover {
    transform: rotateY(0) rotateX(0) scale(1.02);
}

.window-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.dot-red {
    background: #EF4444;
}

.dot-yellow {
    background: #F59E0B;
}

.dot-green {
    background: #10B981;
}

.filename {
    margin-left: auto;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.code-content {
    font-family: var(--font-code);
    font-size: 0.9rem;
}

.line {
    margin-bottom: 0.25rem;
}

.comment {
    color: #6B7280;
}

.var {
    color: #F87171;
}

/* Red/Pink ish for vars usually? Or white */
.keyword {
    color: var(--purple);
}

.method {
    color: var(--water);
}

.func {
    color: var(--earth);
}

.cursor-line {
    animation: blink 1s step-end infinite;
    color: var(--text-secondary);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    opacity: 0.3;
}

.orb-1 {
    width: 100px;
    height: 100px;
    background: var(--energy-amber);
    top: -20px;
    right: -20px;
    animation: float 6s ease-in-out infinite;
}

.orb-2 {
    width: 120px;
    height: 120px;
    background: var(--quantum-blue);
    bottom: -30px;
    left: -30px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {

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

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}

/* Services */
#services {
    padding: var(--section-padding);
    background: rgba(46, 46, 46, 0.5);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-head);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.periodic-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    overflow-x: auto;
    /* For small screens */
}

.element-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.element-card:hover {
    border-color: rgba(0, 120, 212, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.element-card[data-category="water"]:hover {
    border-color: rgba(59, 130, 246, 0.5);
}

.element-card[data-category="earth"]:hover {
    border-color: rgba(16, 185, 129, 0.5);
}

.element-card[data-category="air"]:hover {
    border-color: rgba(229, 231, 235, 0.5);
}

.element-number {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.element-symbol {
    font-size: 2rem;
    font-weight: 700;
    color: var(--energy-amber);
}

.element-name {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* Process Section */
#process {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

.process-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
}

.process-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.process-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    position: relative;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-border {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px dashed rgba(0, 120, 212, 0.3);
    border-radius: 50%;
    animation: spin 20s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.circle-content {
    text-align: center;
    z-index: 2;
}

.icon-flask {
    font-size: 3.5rem;
    color: var(--energy-amber);
    margin-bottom: 0.5rem;
}

.satellite {
    position: absolute;
    background: var(--carbon-grey);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--text-secondary);
}

.sat-1 {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--energy-amber);
}

.sat-2 {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    color: var(--water);
}

.sat-3 {
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--earth);
}

.sat-4 {
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    color: white;
}

.process-steps h2 {
    font-family: var(--font-head);
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.step-item:hover {
    transform: translateX(10px);
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-code);
    color: var(--energy-amber);
    transition: all 0.3s ease;
}

.step-item:hover .step-number {
    background: var(--energy-amber);
    color: white;
}

.step-item:hover .step-blue {
    background: var(--water);
}

.step-item:hover .step-green {
    background: var(--earth);
}


.step-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Work / Case Studies */
#work {
    padding: var(--section-padding);
    background: linear-gradient(to bottom, var(--carbon-grey), #0f0f0f);
}

.section-title {
    font-family: var(--font-head);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
}

.case-studies {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.case-study {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.case-study.reverse .case-info {
    order: 2;
}

.case-study.reverse .case-visual {
    order: 1;
}

.log-entry {
    font-family: var(--font-code);
    font-size: 0.875rem;
    color: var(--energy-amber);
    margin-bottom: 1rem;
}

.log-blue {
    color: var(--water);
}

.case-info h3 {
    font-family: var(--font-head);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.metrics {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric .val-green {
    color: var(--earth);
    font-size: 1.5rem;
    font-weight: 700;
}

.metric .val-blue {
    color: var(--water);
    font-size: 1.5rem;
    font-weight: 700;
}

.metric .val-purple {
    color: var(--purple);
    font-size: 1.5rem;
    font-weight: 700;
}

.metric .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 99px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--energy-amber);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.case-visual {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    height: 350px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.case-visual:hover {
    border-color: rgba(0, 120, 212, 0.3);
}

.visual-1 {
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-2 {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mockups inside Visuals */
.code-mockup {
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.bar-1 {
    width: 80%;
}

.bar-2 {
    width: 50%;
}

.bar-3 {
    width: 70%;
}

.ui-mockup {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(59, 130, 246, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-pulse {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    animation: pulse 2s infinite;
}


/* Team Section */
#team {
    padding: var(--section-padding);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.team-card {
    padding: 2px;
    border-radius: 16px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.5s ease;
}

.card-orange:hover {
    background: linear-gradient(to bottom, var(--energy-amber), var(--purple));
}

.card-blue:hover {
    background: linear-gradient(to bottom, var(--water), #06b6d4);
}

.card-green:hover {
    background: linear-gradient(to bottom, var(--earth), #10b981);
}

.card-inner {
    background: var(--carbon-grey);
    border-radius: 14px;
    padding: 2rem;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
    text-align: center;
    z-index: 1;
    /* Ensure solid background */
    background-clip: padding-box;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.team-card:hover .avatar img {
    filter: grayscale(0%);
}

.card-orange:hover .avatar {
    border-color: var(--energy-amber);
    transform: scale(1.1);
}

.card-blue:hover .avatar {
    border-color: var(--water);
    transform: scale(1.1);
}

.card-green:hover .avatar {
    border-color: var(--earth);
    transform: scale(1.1);
}

.member-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
}

.role {
    font-family: var(--font-code);
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.card-orange .role {
    color: var(--energy-amber);
}

.card-blue .role {
    color: var(--water);
}

.card-green .role {
    color: var(--earth);
}

.desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.element-sign {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-code);
    font-size: 2rem;
    opacity: 0.05;
    font-weight: 700;
}

/* Contact Section */
#contact {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--carbon-grey), transparent);
    z-index: 0;
    opacity: 0.5;
}

.relative-z {
    position: relative;
    z-index: 1;
}

.contact-box {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.contact-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.contact-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-head);
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--energy-amber);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--carbon-dark);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    color: white;
    border-radius: 4px;
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--energy-amber);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--energy-amber);
    border: none;
    color: white;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-text-init {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-fill {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    transition: top 0.3s ease;
    z-index: 1;
}

.btn-submit:hover .btn-fill {
    top: 0;
}

.btn-submit:hover .btn-text-init {
    color: var(--carbon-grey);
}

/* Footer */
footer {
    background: var(--carbon-dark);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
}

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

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--energy-amber);
}

.copyright {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

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

    .nav-links,
    .cta-button {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin: 0 auto 2rem;
    }

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

    .periodic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-container {
        grid-template-columns: 1fr;
    }

    .process-circle {
        margin-bottom: 3rem;
    }

    .case-study,
    .case-study.reverse {
        grid-template-columns: 1fr;
    }

    .case-info {
        order: 2 !important;
    }

    .case-visual {
        order: 1 !important;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

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

/* ========================================
   MICRO-INTERACTIONS & ADVANCED EFFECTS
   ======================================== */

/* 1. Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 120, 212, 0.1);
}

nav,
.code-window,
.contact-box,
.element-card,
.team-card .card-inner {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 2. Text Selection Highlight on Hover for Readability */
.hero-description:hover,
.step-content p:hover,
.case-info p:hover,
.desc:hover,
.contact-header p:hover {
    background: rgba(0, 120, 212, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* 3. Magnetic Button Class */
.magnetic {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.magnetic::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--energy-amber), var(--purple));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.magnetic:hover::before {
    opacity: 0.3;
    animation: magneticGlow 1.5s ease-in-out infinite;
}

@keyframes magneticGlow {

    0%,
    100% {
        filter: blur(5px);
    }

    50% {
        filter: blur(10px);
    }
}

/* 4. Button Hover Lift */
.btn,
.cta-button,
.btn-submit {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn:hover,
.cta-button:hover,
.btn-submit:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 120, 212, 0.3);
}

/* 5. Card 3D Tilt Effect */
.element-card,
.case-visual {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.element-card:hover,
.case-visual:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) scale(1.02);
}

/* 6. Ripple Effect Container */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: radial-gradient(circle, rgba(0, 120, 212, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.ripple:active::after {
    animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
    to {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 1;
    }
}

/* 7. Link Underline Animation */
.nav-link,
.footer-links a {
    position: relative;
}

.nav-link::after,
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--energy-amber);
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-link:hover::after,
.footer-links a:hover::after {
    width: 100%;
}

/* 8. Logo Spin on Hover */
.logo:hover .logo-icon {
    animation: logoSpin 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes logoSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 9. Button Shake (Idle Animation) */
@keyframes shake {

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

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

.btn-primary {
    animation: shake 3s ease-in-out infinite;
}

.btn-primary:hover {
    animation: none;
}

/* 10. Gradient Border Animation */
.element-card {
    position: relative;
    background-clip: padding-box;
}

.element-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(45deg, transparent, var(--energy-amber), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.element-card:hover::before {
    opacity: 1;
    animation: rotateBorder 2s linear infinite;
}

@keyframes rotateBorder {
    to {
        transform: rotate(360deg);
    }
}

/* 11. Text Glow Effect */
h1,
h2,
h3,
.logo {
    transition: text-shadow 0.3s ease;
}

h1:hover,
h2:hover,
h3:hover,
.logo:hover {
    text-shadow: 0 0 20px rgba(0, 120, 212, 0.5);
}

/* 12. Image Zoom on Hover */
.avatar img,
.case-visual {
    transition: transform 0.5s ease;
}

.avatar:hover img {
    transform: scale(1.15);
}

/* 13. Input Focus Glow */
.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2), 0 0 20px rgba(0, 120, 212, 0.1);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* 14. Scroll Indicator Pulse */
.scroll-indicator {
    animation: bounce 2s infinite, pulse 2s infinite alternate;
}

/* 15. Code Window Floating */
.code-window {
    animation: float 6s ease-in-out infinite;
}

/* 16. Step Item Slide In */
.step-item {
    opacity: 0;
    animation: slideIn 0.5s ease forwards;
}

.step-item:nth-child(1) {
    animation-delay: 0.1s;
}

.step-item:nth-child(2) {
    animation-delay: 0.2s;
}

.step-item:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 17. Tag Bounce on Hover */
.tag {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tag:hover {
    transform: translateY(-3px) scale(1.1);
    background: var(--energy-amber);
    color: var(--carbon-dark);
}

/* 18. Satellite Orbit */
.satellite {
    animation: orbit 10s linear infinite;
}

.sat-1 {
    animation-delay: 0s;
}

.sat-2 {
    animation-delay: 2.5s;
}

.sat-3 {
    animation-delay: 5s;
}

.sat-4 {
    animation-delay: 7.5s;
}

@keyframes orbit {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(160px) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) translateX(160px) rotate(-360deg);
    }
}

/* 19. Navbar Blur Increase on Scroll */
nav.scrolled {
    background: rgba(46, 46, 46, 0.95);
    backdrop-filter: blur(30px);
    box-shadow: 0 4px 30px rgba(0, 120, 212, 0.1);
}

/* 20. Metric Counter Animation */
.metric .val-green,
.metric .val-blue,
.metric .val-purple {
    display: inline-block;
    transition: transform 0.3s ease;
}

.metric:hover .val-green,
.metric:hover .val-blue,
.metric:hover .val-purple {
    transform: scale(1.2);
}

/* 21. Team Card Tilt */
.team-card {
    perspective: 1000px;
}

.card-inner {
    transition: transform 0.5s ease;
}

.team-card:hover .card-inner {
    transform: rotateY(5deg);
}

/* 22. Form Success Pop */
#form-success {
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 23. Process Circle Scale */
.process-circle {
    transition: transform 0.5s ease;
}

.process-circle:hover {
    transform: scale(1.05);
}

/* 24. Icon Flask Shake */
.icon-flask {
    transition: transform 0.3s ease;
}

.process-circle:hover .icon-flask {
    animation: shake 0.5s ease infinite;
}

/* 25. Element Number Fade */
.element-number {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.element-card:hover .element-number {
    opacity: 1;
}

/* 26. Bar Growth Animation */
.bar {
    transform-origin: left;
    transform: scaleX(0);
    animation: growBar 1s ease forwards;
}

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

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

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

@keyframes growBar {
    to {
        transform: scaleX(1);
    }
}

/* 27. Circle Pulse Wave */
.circle-pulse {
    animation: pulseWave 2s ease-in-out infinite;
}

@keyframes pulseWave {

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

    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

/* 28. Smooth Color Transition on Hover */
* {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* 29. Orb Glow Pulse */
.orb {
    animation: orbPulse 4s ease-in-out infinite;
}

.orb-1 {
    animation-delay: 0s;
}

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

@keyframes orbPulse {

    0%,
    100% {
        opacity: 0.3;
        filter: blur(40px);
    }

    50% {
        opacity: 0.6;
        filter: blur(60px);
    }
}

/* 30. Section Header Underline */
.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--energy-amber), var(--purple));
    border-radius: 2px;
}

/* 31. Parallax for Hero Elements */
.hero-text,
.hero-visualizer {
    transition: transform 0.3s ease-out;
}

/* Add magnetic effect to all buttons */
.btn,
.cta-button,
.btn-submit,
.btn-text {
    cursor: none !important;
}

/* ========================================
   ENHANCED INTERACTIONS CSS
   ======================================== */

/* IDLE CIRCLE ANIMATION */
.idle-circle {
    position: fixed;
    width: 60px;
    height: 60px;
    border: 2px solid var(--energy-amber);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    margin-left: -30px;
    margin-top: -30px;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 120, 212, 0.5);
    background: radial-gradient(circle, rgba(0, 120, 212, 0.1), transparent);
}

.idle-circle.visible {
    animation: idlePulse 2s ease-in-out infinite;
}

@keyframes idlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* EXPLOSION PARTICLES */
.explosion-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--energy-amber);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 10px var(--energy-amber);
}

/* RIPPLE WAVE */
.ripple-wave {
    position: fixed;
    border: 2px solid var(--energy-amber);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    margin-left: -150px;
    margin-top: -150px;
    opacity: 0;
}

/* MOUSE TRAIL */
.mouse-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--energy-amber);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9996;
    margin-left: -5px;
    margin-top: -5px;
    opacity: 0.7;
    box-shadow: 0 0 10px var(--energy-amber);
}

/* KONAMI MODE */
.konami-mode {
    animation: rainbow 2s linear infinite;
    filter: hue-rotate(0deg);
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* COLOR CHANGE OVERLAY */
.color-change-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 120, 212, 0.3), transparent);
    pointer-events: none;
    z-index: 10000;
    animation: colorFlash 1s ease-out;
}

@keyframes colorFlash {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* TYPING FAST EFFECT */
.typing-fast {
    animation: shake 0.1s ease infinite;
}

/* FAST SCROLL EFFECT */
.fast-scroll {
    filter: blur(1px);
    transition: filter 0.3s ease;
}

/* CONNECTION MODE */
.connection-mode .element-card:hover {
    box-shadow: 0 0 30px rgba(0, 120, 212, 0.8);
}

/* GRAVITY REVERSED */
.gravity-reversed * {
    transform: scaleY(-1);
}

/* CARD FLIP */
.element-card,
.team-card {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.element-card.flipped,
.team-card.flipped {
    transform: rotateY(180deg);
}

.card-inner {
    backface-visibility: hidden;
}

/* HELP OVERLAY */
#help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#help-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.help-content {
    background: var(--carbon-grey);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
}

.help-content h3 {
    margin-bottom: 1.5rem;
    color: var(--energy-amber);
}

.help-content ul {
    list-style: none;
}

.help-content li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.help-content kbd {
    background: var(--carbon-dark);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-code);
    font-size: 0.875rem;
    color: var(--energy-amber);
}

/* SECRET MESSAGE */
.secret-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--energy-amber);
    color: var(--carbon-dark);
    padding: 2rem 3rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 10002;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 120, 212, 0.5);
}

/* TOUCH DEVICE ENHANCEMENTS */
.touch-device .cursor,
.touch-device .cursor-follower,
.touch-device .idle-circle {
    display: none;
}

.touch-device body {
    cursor: auto;
}

/* MOBILE MENU */
.nav-links.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(46, 46, 46, 0.98);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    gap: 1.5rem;
}

.mobile-menu-btn.active {
    transform: rotate(90deg);
}

/* RESPONSIVE ENHANCEMENTS */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .process-container {
        grid-template-columns: 1fr;
    }

    .periodic-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    h1 {
        font-size: 3rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .periodic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .case-study {
        grid-template-columns: 1fr;
    }

    .process-circle {
        width: 250px;
        height: 250px;
    }

    .code-window {
        width: 100%;
    }

    .contact-box {
        padding: 2rem 1.5rem;
    }

    /* Reduce animations on mobile for performance */
    .orb {
        display: none;
    }

    .particle-count {
        display: none;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .element-card {
        height: 140px;
        padding: 1rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .periodic-grid {
        grid-template-columns: 1fr;
    }
}

/* PERFORMANCE OPTIMIZATIONS */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.3);
        --text-secondary: rgba(255, 255, 255, 0.8);
    }
}

/* DARK MODE ENHANCEMENTS (already dark, but ensure consistency) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--carbon-grey);
    }
}

/* PRINT STYLES */
@media print {
    .cursor,
    .cursor-follower,
    .idle-circle,
    #alchemy-canvas,
    nav,
    .scroll-indicator {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* ACCESSIBILITY ENHANCEMENTS */
:focus-visible {
    outline: 3px solid var(--energy-amber);
    outline-offset: 2px;
}

/* SMOOTH SCROLLING */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* LOADING STATES */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ANIMATION PERFORMANCE */
.element-card,
.team-card,
.btn,
.case-visual {
    will-change: transform;
}

/* GPU ACCELERATION */
.cursor,
.cursor-follower,
.idle-circle,
.explosion-particle,
.mouse-trail {
    transform: translateZ(0);
    will-change: transform, opacity;
}