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

:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff6b6b;
    --accent-color: #4ecdc4;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-light: #ffffff;
    --text-dim: #b0b0b0;
    --neon-glow: 0 0 20px var(--primary-color);
    --tech-gradient: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
}

body {
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--dark-bg);
    background-image: 
        radial-gradient(circle at 25% 25%, #00d4ff22 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #ff6b6b22 0%, transparent 50%),
        linear-gradient(45deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 212, 255, 0.03) 2px,
            rgba(0, 212, 255, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
    animation: scanlines 2s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

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

/* Header and Navigation */
.navbar {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--primary-color);
    box-shadow: 0 2px 30px rgba(0, 212, 255, 0.3);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: var(--neon-glow);
    animation: pulse 2s ease-in-out infinite;
}

.nav-logo i {
    margin-right: 10px;
    animation: rotate 4s linear infinite;
}

@keyframes pulse {
    0%, 100% { text-shadow: 0 0 5px var(--primary-color); }
    50% { text-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transition: left 0.5s;
}

.nav-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    left: 100%;
}

/* Hero Section */
.hero {
    background: var(--tech-gradient);
    color: var(--text-light);
    text-align: center;
    padding: 150px 0 80px;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, var(--primary-color)22 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, var(--secondary-color)22 0%, transparent 50%);
    animation: heroGlow 4s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.6; transform: scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.5s both;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* Calculator Sections */
.calculator-section {
    padding: 80px 0;
    background: var(--card-bg);
    margin: 20px 0;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: sectionSlideIn 0.8s ease-out;
}

.calculator-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: borderScan 3s ease-in-out infinite;
}

.calculator-section:nth-child(even) {
    background: rgba(42, 42, 42, 0.8);
    border-color: rgba(255, 107, 107, 0.2);
}

.calculator-section:nth-child(even)::before {
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

@keyframes sectionSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes borderScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.calculator-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    font-weight: 700;
    position: relative;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.calculator-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: underlineExpand 2s ease-in-out infinite;
}

.calculator-section h2 i {
    margin-right: 15px;
    color: var(--primary-color);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
    100% { text-shadow: 0 0 20px rgba(0, 212, 255, 0.8), 0 0 30px rgba(0, 212, 255, 0.3); }
}

@keyframes underlineExpand {
    0%, 100% { width: 50px; opacity: 0.5; }
    50% { width: 150px; opacity: 1; }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.calculator-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 
        0 5px 25px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 212, 255, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calculator-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
}

.calculator-card:hover::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.calculator-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    font-weight: 600;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    animation: cardTitlePulse 3s ease-in-out infinite;
}

@keyframes cardTitlePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Basic Calculator Styles */
.calculator {
    max-width: 300px;
    margin: 0 auto;
    background: var(--dark-bg);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(0, 212, 255, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    animation: calculatorGlow 4s ease-in-out infinite alternate;
}

@keyframes calculatorGlow {
    0% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 212, 255, 0.3); }
    100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 60px rgba(0, 212, 255, 0.6); }
}

.display {
    margin-bottom: 20px;
}

.display input {
    width: 100%;
    height: 60px;
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
    text-align: right;
    border: 2px solid var(--accent-color);
    background: var(--dark-bg);
    color: var(--primary-color);
    border-radius: 10px;
    padding: 0 15px;
    outline: none;
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(78, 205, 196, 0.3);
    transition: all 0.3s ease;
    text-shadow: 0 0 10px currentColor;
}

.display input:focus {
    border-color: var(--primary-color);
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(0, 212, 255, 0.6);
    animation: displayPulse 1s ease-in-out infinite;
}

@keyframes displayPulse {
    0%, 100% { text-shadow: 0 0 10px currentColor; }
    50% { text-shadow: 0 0 20px currentColor, 0 0 30px currentColor; }
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.btn {
    height: 60px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 10px currentColor;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.btn:hover::before {
    width: 100%;
    height: 100%;
}

.btn:active {
    transform: scale(0.95) translateY(0);
    animation: buttonRipple 0.3s ease;
}

@keyframes buttonRipple {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.btn.number {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--dark-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.btn.number:hover {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
    animation: numberGlow 0.5s ease;
}

@keyframes numberGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 35px rgba(0, 212, 255, 0.8); }
}

.btn.operator {
    background: linear-gradient(45deg, var(--secondary-color), #ff8e8e);
    color: var(--text-light);
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

.btn.operator:hover {
    background: linear-gradient(45deg, #ff8e8e, var(--secondary-color));
    box-shadow: 0 0 25px rgba(255, 107, 107, 0.6);
    animation: operatorPulse 0.5s ease;
}

@keyframes operatorPulse {
    0%, 100% { transform: scale(1.05) translateY(-2px); }
    50% { transform: scale(1.1) translateY(-4px); }
}

.btn.equals {
    background: linear-gradient(45deg, #00ff88, var(--accent-color));
    color: var(--dark-bg);
    grid-row: span 2;
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    font-size: 1.5rem;
}

.btn.equals:hover {
    background: linear-gradient(45deg, var(--accent-color), #00ff88);
    box-shadow: 0 0 35px rgba(0, 255, 136, 0.7);
    animation: equalsGlow 0.8s ease infinite;
}

@keyframes equalsGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
        text-shadow: 0 0 10px currentColor;
    }
    50% { 
        box-shadow: 0 0 40px rgba(0, 255, 136, 0.8);
        text-shadow: 0 0 20px currentColor;
    }
}

.btn.clear {
    background: linear-gradient(45deg, #ff4757, #ff3742);
    color: var(--text-light);
    border-color: #ff4757;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.3);
}

.btn.clear:hover {
    background: linear-gradient(45deg, #ff3742, #ff4757);
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.6);
    animation: clearWarning 0.3s ease;
}

@keyframes clearWarning {
    0%, 100% { transform: scale(1.05) translateY(-2px); }
    25% { transform: scale(1.1) translateY(-4px) rotate(-2deg); }
    75% { transform: scale(1.1) translateY(-4px) rotate(2deg); }
}

.btn.zero {
    grid-column: span 2;
}

/* Expression Calculator */
.expression-calc {
    text-align: center;
}

.expression-calc input {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

.expression-calc input:focus {
    border-color: #667eea;
}

.expression-calc button {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.expression-calc button:hover {
    background: #5a67d8;
}

#expression-result {
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
    animation: labelGlow 2s ease-in-out infinite alternate;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    background: var(--dark-bg);
    color: var(--text-light);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 212, 255, 0.4);
    animation: inputPulse 1s ease-in-out infinite;
}

@keyframes labelGlow {
    0% { text-shadow: 0 0 5px rgba(0, 212, 255, 0.3); }
    100% { text-shadow: 0 0 15px rgba(0, 212, 255, 0.6); }
}

@keyframes inputPulse {
    0%, 100% { box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 212, 255, 0.4); }
    50% { box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 25px rgba(0, 212, 255, 0.7); }
}

.form-group select {
    cursor: pointer;
}

/* Button Styles */
button {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--dark-bg);
    border: 2px solid var(--primary-color);
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 10px currentColor;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 212, 255, 0.4);
    animation: buttonGlow 0.6s ease;
}

button:hover::before {
    left: 100%;
}

@keyframes buttonGlow {
    0%, 100% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 212, 255, 0.7); }
}

button:active {
    transform: translateY(0);
}

/* Result Styles */
[id$="-result"] {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    font-weight: 600;
    color: var(--text-light);
    font-family: 'Courier New', monospace;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 20px rgba(0, 212, 255, 0.2);
    position: relative;
    overflow: hidden;
}

[id$="-result"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: resultScan 2s ease-in-out infinite;
}

@keyframes resultScan {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.loading-tech {
    color: var(--primary-color);
    text-align: center;
    font-family: 'Courier New', monospace;
    animation: loadingPulse 1s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Scientific Calculator */
.scientific-calc {
    max-width: 500px;
    margin: 0 auto;
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 20px;
    background: var(--dark-bg);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(78, 205, 196, 0.3);
    animation: scientificGlow 4s ease-in-out infinite alternate;
}

.scientific-display {
    margin-bottom: 20px;
}

.scientific-display input {
    width: 100%;
    height: 60px;
    font-size: 1.3rem;
    font-family: 'Courier New', monospace;
    text-align: right;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    padding: 0 15px;
    outline: none;
    background: var(--dark-bg);
    color: var(--primary-color);
    text-shadow: 0 0 10px currentColor;
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(78, 205, 196, 0.3);
}

.scientific-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.scientific-buttons button {
    height: 50px;
    font-size: 0.9rem;
    margin: 0;
    padding: 8px;
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    border: 1px solid var(--accent-color);
    animation: scientificButtonFloat 3s ease-in-out infinite;
}

.scientific-buttons button:nth-child(odd) {
    animation-delay: 0.2s;
}

.equals-btn {
    grid-column: span 5;
    background: linear-gradient(45deg, #00ff88, var(--accent-color)) !important;
    margin-top: 10px;
    font-size: 1.2rem !important;
    animation: equalsGlow 2s ease-in-out infinite !important;
}

@keyframes scientificGlow {
    0% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(78, 205, 196, 0.3); }
    100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 50px rgba(78, 205, 196, 0.6); }
}

@keyframes scientificButtonFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

/* Developer Section */
.developer-section {
    background: var(--tech-gradient);
    padding: 80px 0;
    margin: 40px 0 0 0;
    border-top: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.developer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, var(--primary-color)22 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--accent-color)22 0%, transparent 50%);
    animation: developerGlow 6s ease-in-out infinite alternate;
}

@keyframes developerGlow {
    0% { opacity: 0.2; transform: scale(1); }
    100% { opacity: 0.4; transform: scale(1.1); }
}

.developer-card {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(0, 212, 255, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    animation: developerCardFloat 4s ease-in-out infinite;
}

@keyframes developerCardFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.developer-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--dark-bg);
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.5),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
    animation: avatarPulse 3s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes avatarPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.5), inset 0 2px 10px rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.8), inset 0 2px 10px rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }
}

.developer-info h3 {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: textGlow 2s ease-in-out infinite alternate;
}

.developer-info h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    animation: nameGlow 3s ease-in-out infinite;
}

@keyframes nameGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
    50% { text-shadow: 0 0 30px rgba(0, 212, 255, 0.8), 0 0 40px rgba(0, 212, 255, 0.3); }
}

.developer-title {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.developer-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dev-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dev-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.2;
    transition: left 0.5s;
}

.dev-link:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.dev-link:hover::before {
    left: 100%;
}

.dev-link.email:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.dev-link.website:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.developer-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    min-width: 100px;
    animation: statFloat 3s ease-in-out infinite;
}

.stat:nth-child(2) {
    animation-delay: 0.5s;
}

.stat:nth-child(3) {
    animation-delay: 1s;
}

@keyframes statFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    animation: numberPulse 2s ease-in-out infinite;
}

@keyframes numberPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* Footer */
footer {
    background: var(--dark-bg);
    border-top: 2px solid var(--primary-color);
    color: var(--text-light);
    padding: 3rem 0 1rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 100%;
    animation: footerGlow 3s linear infinite;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
    line-height: 1.6;
}

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

.footer-section a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    padding: 0.3rem 0;
    opacity: 0.8;
    position: relative;
    padding-left: 1rem;
}

.footer-section li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    opacity: 0.8;
    animation: footerText 4s ease-in-out infinite alternate;
}

.footer-bottom strong {
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

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

@keyframes footerText {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(78, 205, 196, 0.3); }
    100% { text-shadow: 0 0 15px rgba(78, 205, 196, 0.6); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .calculator-section h2 {
        font-size: 2rem;
    }
    
    .scientific-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .developer-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 2rem;
    }
    
    .developer-info h2 {
        font-size: 2rem;
    }
    
    .developer-links {
        justify-content: center;
    }
    
    .developer-stats {
        justify-content: center;
    }
    
    /* Reduce animations on mobile for performance */
    * {
        animation-duration: 0.3s !important;
    }
    
    body::before,
    body::after {
        display: none;
    }
    
    .btn {
        height: 50px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .calculator {
        padding: 15px;
    }
    
    
    .display input {
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success and Error Messages */
.success {
    color: #27ae60;
    background: #d5f4e6;
    border-color: #27ae60;
}

.error {
    color: #e74c3c;
    background: #fdf2f2;
    border-color: #e74c3c;
}
