:root {
    --cyber-purple-dark: #18092c;
    --cyber-purple: #7b2cbf;
    --cyber-purple-light: #9d4edd;
    --cyber-pink: #e040fb;
    --cyber-cyan: #00e5ff;
    --cyber-white: #f0f0f0;
}

/* Light theme */
[data-theme="light"] {
    --cyber-purple-dark: #f5f0ff;
    --cyber-purple: #9d4edd;
    --cyber-purple-light: #7b2cbf;
    --cyber-pink: #c026d3;
    --cyber-cyan: #0891b2;
    --cyber-white: #1a1a2e;
}

[data-theme="light"] .terminal-window {
    background: rgba(245, 240, 255, 0.95);
    box-shadow:
        0 0 20px rgba(157, 78, 221, 0.3),
        inset 0 0 50px rgba(123, 44, 191, 0.05);
}

[data-theme="light"] .terminal-header {
    background: linear-gradient(90deg, #e9d5ff, #d8b4fe);
}

[data-theme="light"] .command {
    color: #1a1a2e;
}

[data-theme="light"] .link-item {
    background: rgba(157, 78, 221, 0.1);
}

[data-theme="light"] .link-item:hover {
    background: rgba(123, 44, 191, 0.2);
}

[data-theme="light"] body::before {
    background: linear-gradient(
        transparent 50%,
        rgba(157, 78, 221, 0.05) 50%
    );
}

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

body {
    background: var(--cyber-purple-dark);
    min-height: 100vh;
    font-family: 'Fira Code', monospace;
    overflow-x: hidden;
    position: relative;
}

/* CRT Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 4px; }
}

/* Floating pixels background */
.pixel-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.pixel {
    position: absolute;
    width: 8px;
    height: 8px;
    opacity: 0.3;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Terminal container */
.terminal-window {
    background: rgba(24, 9, 44, 0.95);
    border: 3px solid var(--cyber-purple);
    border-radius: 8px;
    box-shadow:
        0 0 20px rgba(123, 44, 191, 0.4),
        inset 0 0 50px rgba(157, 78, 221, 0.1);
    overflow: hidden;
}

.terminal-header {
    background: linear-gradient(90deg, #1a0a2e, #0d0515);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--cyber-purple);
}

.terminal-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
}

.btn-red { background: #ff5f56; }
.btn-yellow { background: #ffbd2e; }
.btn-green { background: #27ca3f; }

.terminal-title {
    color: var(--cyber-purple-light);
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    margin-left: 10px;
}

.prompt {
    color: var(--cyber-cyan);
}

.command {
    color: #fff;
}

.output {
    margin: 15px 0;
    padding-left: 10px;
}

/* Typing animation */
.typing {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 2s steps(40);
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--cyber-purple-light);
    animation: blink 1s infinite;
    vertical-align: middle;
    margin-left: 5px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Retro avatar */
.avatar-container {
    text-align: center;
    margin: 20px 0;
}

.avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
    animation: bounce 2s ease-in-out infinite;
}

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

/* Avatar image */
.avatar-img {
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--cyber-purple);
    box-shadow:
        0 0 20px rgba(123, 44, 191, 0.6),
        0 0 40px rgba(157, 78, 221, 0.4);
    transition: all 0.3s ease;
    animation: bounce 2s ease-in-out infinite;
}

.avatar-img:hover {
    transform: scale(1.1);
    box-shadow:
        0 0 30px rgba(224, 64, 251, 0.7),
        0 0 60px rgba(157, 78, 221, 0.5);
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
    98% { transform: translate(2px, 2px); }
}

/* Info sections */
.info-line {
    margin: 10px 0;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.info-line:nth-child(1) { animation-delay: 0.5s; }
.info-line:nth-child(2) { animation-delay: 1s; }
.info-line:nth-child(3) { animation-delay: 1.5s; }
.info-line:nth-child(4) { animation-delay: 2s; }

@keyframes fadeIn {
    to { opacity: 1; }
}

.highlight {
    color: var(--cyber-cyan);
}

.keyword {
    color: var(--cyber-pink);
}

/* Links section */
.links-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed var(--cyber-purple);
}

.link-item::before {
    content: ">";
    position: absolute;
    left: -20px;
    transition: left 0.3s;
    color: var(--cyber-pink);
}

.link-item:hover {
    background: rgba(157, 78, 221, 0.25);
    transform: translateX(10px);
    box-shadow: 0 0 20px rgba(123, 44, 191, 0.5);
}

.link-item:hover::before {
    left: 5px;
}

.link-icon {
    min-width: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--cyber-purple-light);
    font-size: 14px;
    opacity: 0.5;
}

.footer span {
    animation: heartbeat 1s infinite;
    display: inline-block;
    color: var(--cyber-pink);
}

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

/* Retro Mechanical Keyboard Keys Toggle */
.retro-keys-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #2a2035 0%, #1a1520 100%);
    border: 2px solid #444;
    border-radius: 8px;
    box-shadow:
        0 4px 8px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

[data-theme="light"] .retro-keys-toggle {
    background: linear-gradient(180deg, #e8e0f0 0%, #d0c8e0 100%);
    border-color: #bbb;
}

.key-group {
    display: flex;
    gap: 6px;
}

.keys-separator {
    width: 2px;
    height: 30px;
    background: linear-gradient(180deg, transparent, #555, transparent);
    margin: 0 4px;
}

[data-theme="light"] .keys-separator {
    background: linear-gradient(180deg, transparent, #aaa, transparent);
}

/* Individual Mechanical Key */
.mech-key {
    cursor: pointer;
    position: relative;
    transition: transform 0.1s ease;
}

.mech-key:active {
    transform: translateY(2px);
}

.key-cap {
    width: 36px;
    height: 36px;
    background: linear-gradient(180deg, #4a4050 0%, #3a3040 50%, #2a2530 100%);
    border-radius: 6px 6px 4px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid #555;
    box-shadow:
        0 4px 0 #1a1520,
        0 5px 2px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -1px 0 rgba(0,0,0,0.2);
    transition: all 0.15s ease;
}

[data-theme="light"] .key-cap {
    background: linear-gradient(180deg, #f5f0fa 0%, #e8e0f0 50%, #d8d0e5 100%);
    border-color: #ccc;
    box-shadow:
        0 4px 0 #b0a8c0,
        0 5px 2px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.8),
        inset 0 -1px 0 rgba(0,0,0,0.1);
}

.mech-key:active .key-cap {
    box-shadow:
        0 1px 0 #1a1520,
        0 2px 1px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

[data-theme="light"] .mech-key:active .key-cap {
    box-shadow:
        0 1px 0 #b0a8c0,
        0 2px 1px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

.key-base {
    position: absolute;
    bottom: -4px;
    left: 2px;
    right: 2px;
    height: 6px;
    background: #1a1520;
    border-radius: 0 0 4px 4px;
    z-index: -1;
}

[data-theme="light"] .key-base {
    background: #a8a0b8;
}

.key-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: #888;
    text-shadow: 0 1px 0 rgba(0,0,0,0.5);
    letter-spacing: -1px;
}

[data-theme="light"] .key-label {
    color: #666;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.key-icon {
    font-size: 16px;
    color: #888;
    text-shadow: 0 1px 0 rgba(0,0,0,0.5);
}

[data-theme="light"] .key-icon {
    color: #666;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

/* Active Key State */
.mech-key.active .key-cap {
    background: linear-gradient(180deg, #7b2cbf 0%, #5a1f8f 50%, #4a1a7f 100%);
    border-color: #9d4edd;
    box-shadow:
        0 4px 0 #3a1560,
        0 5px 2px rgba(0,0,0,0.3),
        0 0 15px rgba(157, 78, 221, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 -1px 0 rgba(0,0,0,0.2);
}

[data-theme="light"] .mech-key.active .key-cap {
    background: linear-gradient(180deg, #e040fb 0%, #c026d3 50%, #a020b0 100%);
    border-color: #e040fb;
    box-shadow:
        0 4px 0 #8010a0,
        0 5px 2px rgba(0,0,0,0.2),
        0 0 15px rgba(224, 64, 251, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.3),
        inset 0 -1px 0 rgba(0,0,0,0.1);
}

.mech-key.active .key-base {
    background: #3a1560;
}

[data-theme="light"] .mech-key.active .key-base {
    background: #8010a0;
}

.mech-key.active .key-label,
.mech-key.active .key-icon {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Inactive key hover */
.mech-key:not(.active):hover .key-cap {
    background: linear-gradient(180deg, #5a5060 0%, #4a4050 50%, #3a3540 100%);
}

[data-theme="light"] .mech-key:not(.active):hover .key-cap {
    background: linear-gradient(180deg, #fff 0%, #f0e8f8 50%, #e0d8f0 100%);
}

.mech-key:not(.active) {
    opacity: 0.7;
}

.mech-key:not(.active):hover {
    opacity: 1;
}

/* Mobile-first: Base styles for mobile */
.links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(123, 44, 191, 0.1);
    border: 2px solid transparent;
    border-image: linear-gradient(45deg, var(--cyber-purple), var(--cyber-cyan)) 1;
    text-decoration: none;
    color: var(--cyber-white);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.link-text {
    font-size: 13px;
    overflow: hidden;
}

.link-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    color: var(--cyber-cyan);
    display: block;
    margin-bottom: 3px;
}

.terminal {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
    position: relative;
    z-index: 1;
}

.terminal-window {
    margin-top: 20px;
}

.terminal-body {
    padding: 15px;
    color: var(--cyber-white);
    font-size: 14px;
    line-height: 1.7;
}

.ascii-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    color: var(--cyber-pink);
    text-shadow:
        2px 2px 0 var(--cyber-purple),
        4px 4px 0 var(--cyber-cyan);
    margin: 15px 0;
    animation: glitch 3s infinite;
}

.avatar-img {
    width: 120px;
    height: 120px;
}


/* Tablet and up */
@media (min-width: 480px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .link-item {
        padding: 15px;
    }

    .link-text {
        font-size: 14px;
    }

    .link-label {
        font-size: 10px;
    }
}

/* Desktop */
@media (min-width: 768px) {
    .terminal {
        padding: 20px;
    }

    .terminal-window {
        margin-top: 40px;
    }

    .terminal-body {
        padding: 25px;
        font-size: 16px;
        line-height: 1.8;
    }

    .ascii-name {
        font-size: 14px;
        margin: 20px 0;
    }

    .avatar-img {
        width: 150px;
        height: 150px;
    }
}

/* Email copy animation */
.copied-text {
    display: none;
    color: var(--cyber-cyan);
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    animation: popIn 0.3s ease-out;
}

.link-item.copied .email-text {
    display: none;
}

.link-item.copied .copied-text {
    display: inline;
}

.link-item.copied {
    background: rgba(0, 229, 255, 0.2) !important;
    border-image: linear-gradient(45deg, var(--cyber-cyan), var(--cyber-pink)) 1 !important;
    animation: copyPulse 0.5s ease-out;
}

.link-item.copied .link-icon {
    animation: iconBounce 0.5s ease-out;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes copyPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(0, 229, 255, 0.4);
    }
    100% {
        box-shadow: 0 0 20px rgba(123, 44, 191, 0.5);
    }
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3) rotate(-10deg);
    }
    50% {
        transform: scale(0.9);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* ========================================
   Floating Hardware Decorations
   ======================================== */

.floating-hardware {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    display: none;
}

@media (min-width: 1200px) {
    .floating-hardware {
        display: block;
    }
}

.hw-item {
    position: absolute;
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

.hw-item:hover {
    opacity: 0.3;
}

/* Arduino Board */
.arduino {
    animation: floatArduino 8s ease-in-out infinite;
}

.arduino-board {
    width: 70px;
    height: 50px;
    background: #00979d;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 151, 157, 0.5);
}

.arduino-usb {
    position: absolute;
    top: 5px;
    left: -8px;
    width: 12px;
    height: 10px;
    background: #888;
    border-radius: 2px;
}

.arduino-chip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 12px;
    background: #222;
    border-radius: 2px;
}

.arduino-pins.top {
    position: absolute;
    top: -4px;
    left: 15px;
    right: 5px;
    height: 4px;
    background: repeating-linear-gradient(
        to right,
        #ffd700 0px,
        #ffd700 2px,
        transparent 2px,
        transparent 4px
    );
}

.arduino-pins.bottom {
    position: absolute;
    bottom: -4px;
    left: 15px;
    right: 5px;
    height: 4px;
    background: repeating-linear-gradient(
        to right,
        #ffd700 0px,
        #ffd700 2px,
        transparent 2px,
        transparent 4px
    );
}

.arduino-led {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 4px;
    height: 4px;
    background: #0f0;
    border-radius: 50%;
    animation: ledBlink 1s infinite;
}

@keyframes floatArduino {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* Raspberry Pi */
.raspi {
    animation: floatRaspi 10s ease-in-out infinite;
}

.raspi-board {
    width: 65px;
    height: 45px;
    background: #c51a4a;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 15px rgba(197, 26, 74, 0.5);
}

.raspi-chip {
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: #444;
    border-radius: 2px;
}

.raspi-gpio {
    position: absolute;
    top: 2px;
    left: 5px;
    width: 40px;
    height: 5px;
    background: repeating-linear-gradient(
        to right,
        #ffd700 0px,
        #ffd700 1px,
        transparent 1px,
        transparent 2px
    );
}

.raspi-ports {
    position: absolute;
    right: -5px;
    top: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.raspi-usb {
    width: 8px;
    height: 6px;
    background: #888;
    border-radius: 1px;
}

.raspi-eth {
    width: 10px;
    height: 8px;
    background: #666;
    border-radius: 1px;
}

.raspi-logo {
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-family: 'Press Start 2P', cursive;
    font-size: 6px;
    color: #fff;
}

@keyframes floatRaspi {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-20px) rotate(-3deg); }
}

/* Raspberry Pi Zero */
.raspi-zero {
    animation: floatPiZero 8s ease-in-out infinite;
}

.pizero-board {
    width: 55px;
    height: 25px;
    background: linear-gradient(180deg, #2d5016 0%, #1a3009 100%);
    border-radius: 3px;
    position: relative;
    box-shadow: 0 0 15px rgba(45, 80, 22, 0.5);
}

.pizero-chip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #222;
    border-radius: 2px;
}

.pizero-gpio {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 35px;
    height: 4px;
    background: repeating-linear-gradient(
        to right,
        #ffd700 0px,
        #ffd700 1px,
        transparent 1px,
        transparent 2px
    );
}

.pizero-ports {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pizero-hdmi {
    width: 8px;
    height: 4px;
    background: #444;
    border-radius: 1px;
}

.pizero-usb {
    width: 6px;
    height: 3px;
    background: #555;
    border-radius: 1px;
}

@keyframes floatPiZero {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-15px) rotate(-3deg); }
}

/* Mechanical Keyboard (floating) */
.mech-kb {
    animation: floatKb 10s ease-in-out infinite;
}

.kb-body {
    width: 70px;
    height: 45px;
    background: linear-gradient(180deg, #3a3040 0%, #2a2030 100%);
    border-radius: 4px;
    padding: 5px;
    box-shadow: 0 0 15px rgba(58, 48, 64, 0.5);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.kb-keys-row {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.kb-key {
    width: 12px;
    height: 10px;
    background: linear-gradient(180deg, #5a5060 0%, #4a4050 100%);
    border-radius: 2px;
    box-shadow: 0 2px 0 #2a2030;
}

.kb-key.wide {
    width: 20px;
}

.kb-key:nth-child(odd) {
    background: linear-gradient(180deg, var(--cyber-purple) 0%, #5a1f8f 100%);
}

@keyframes floatKb {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Mini Mechanical Keyboard */
.mech-kb-mini {
    animation: floatKbMini 7s ease-in-out infinite;
}

.kb-mini-body {
    width: 40px;
    height: 25px;
    background: linear-gradient(180deg, #2a2535 0%, #1a1520 100%);
    border-radius: 3px;
    padding: 4px;
    box-shadow: 0 0 15px rgba(42, 37, 53, 0.5);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kb-mini-row {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.kb-mini-key {
    width: 8px;
    height: 7px;
    background: linear-gradient(180deg, #4a4050 0%, #3a3040 100%);
    border-radius: 1px;
    box-shadow: 0 1px 0 #1a1520;
}

.kb-mini-key.lit {
    background: linear-gradient(180deg, var(--cyber-pink) 0%, #a020b0 100%);
    box-shadow: 0 1px 0 #601080, 0 0 8px var(--cyber-pink);
}

@keyframes floatKbMini {
    0%, 100% { transform: translateY(0) rotate(8deg); }
    50% { transform: translateY(-12px) rotate(-8deg); }
}

/* ESP32 Board */
.esp32 {
    animation: floatEsp 9s ease-in-out infinite;
}

.esp-board {
    width: 50px;
    height: 28px;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border-radius: 3px;
    position: relative;
    box-shadow: 0 0 15px rgba(26, 26, 46, 0.5);
}

.esp-chip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #333;
    border-radius: 2px;
}

.esp-antenna {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 10px;
    height: 6px;
    background: repeating-linear-gradient(
        45deg,
        #444 0px,
        #444 1px,
        transparent 1px,
        transparent 2px
    );
    border-radius: 1px;
}

.esp-pins {
    position: absolute;
    top: 3px;
    bottom: 3px;
    width: 3px;
    background: repeating-linear-gradient(
        to bottom,
        #ffd700 0px,
        #ffd700 2px,
        transparent 2px,
        transparent 4px
    );
}

.esp-pins.left { left: 2px; }
.esp-pins.right { right: 2px; }

.esp-usb {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 4px;
    background: #555;
    border-radius: 1px;
}

@keyframes floatEsp {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-18px) rotate(6deg); }
}

/* Breadboard */
.breadboard {
    animation: floatBb 12s ease-in-out infinite;
}

.bb-body {
    width: 60px;
    height: 35px;
    background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 2px;
    position: relative;
    box-shadow: 0 0 15px rgba(200, 200, 200, 0.5);
    padding: 3px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bb-rails {
    height: 4px;
    background: repeating-linear-gradient(
        to right,
        #333 0px,
        #333 2px,
        transparent 2px,
        transparent 4px
    );
}

.bb-rails.top {
    border-bottom: 1px solid #ff4444;
}

.bb-rails.bottom {
    border-top: 1px solid #4444ff;
}

.bb-holes {
    flex: 1;
    margin: 2px 0;
    background: repeating-linear-gradient(
        to right,
        #333 0px,
        #333 1px,
        transparent 1px,
        transparent 3px
    );
}

@keyframes floatBb {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(-2deg); }
}

/* Arduino Nano variant */
.arduino-board.nano {
    width: 40px;
    height: 18px;
}

.arduino-board.nano .arduino-usb {
    width: 6px;
    height: 4px;
}

.arduino-board.nano .arduino-chip {
    width: 12px;
    height: 8px;
}

/* Smaller chip variant */
.chip-body.small {
    width: 20px;
    height: 10px;
}

/* Microchip */
.chip {
    animation: floatChip 6s ease-in-out infinite;
}

.chip-body {
    width: 35px;
    height: 20px;
    background: #1a1a1a;
    border-radius: 2px;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

.chip-pins.left {
    position: absolute;
    left: -4px;
    top: 2px;
    bottom: 2px;
    width: 4px;
    background: repeating-linear-gradient(
        to bottom,
        #c0c0c0 0px,
        #c0c0c0 2px,
        transparent 2px,
        transparent 4px
    );
}

.chip-pins.right {
    position: absolute;
    right: -4px;
    top: 2px;
    bottom: 2px;
    width: 4px;
    background: repeating-linear-gradient(
        to bottom,
        #c0c0c0 0px,
        #c0c0c0 2px,
        transparent 2px,
        transparent 4px
    );
}

.chip-dot {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
}

@keyframes floatChip {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(5deg); }
    75% { transform: translateY(-5px) rotate(-5deg); }
}

/* LED Blink Animation */
@keyframes ledBlink {
    0%, 100% { opacity: 1; box-shadow: 0 0 5px #0f0; }
    50% { opacity: 0.3; box-shadow: none; }
}

/* Light theme adjustments */
[data-theme="light"] .hw-item {
    opacity: 0.1;
}

[data-theme="light"] .hw-item:hover {
    opacity: 0.2;
}
