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

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #71717a;
    --accent: #10b981;
    --accent-subtle: rgba(16, 185, 129, 0.1);
    --border: rgba(255, 255, 255, 0.06);
    --transition: 0.25s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #020B08 0%, #042c22 50%, #083e39 100%);
    background-attachment: fixed;
    color: #dadee6;
    position: relative;
    overflow-x: hidden;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Subtle green glow overlay */
body::before {
    content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(
      circle at 0 0,
      rgba(255,255,255,0.015),
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 2px
    );
  mix-blend-mode: overlay;
  opacity: 0.6;
  z-index: 0;
}

main {
    position: relative;
    z-index: 2;
}

/* Language Toggle */
.lang-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
    z-index: 100;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color var(--transition);
    font-weight: 500;
    font-family: inherit;
}

.tools-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 0;
}

.tool-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.03);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.tool-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tool-item:hover {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.tool-item:hover::before {
    transform: scaleX(1);
}

.tool-item:hover .tool-arrow {
    transform: translateX(4px);
    opacity: 1;
}

.tool-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    color: var(--accent);
    transition: all 0.3s ease;
}

.tool-item:hover .tool-icon-wrapper {
    background: rgba(16, 185, 129, 0.2);
    transform: scale(1.05);
}

.tool-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.tool-content {
    flex: 1;
}

.tool-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

.tool-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.tool-arrow {
    position: absolute;
    bottom: 1.75rem;
    right: 1.75rem;
    font-size: 1.25rem;
    color: var(--accent);
    opacity: 0.6;
    transition: all 0.3s ease;
    font-weight: 300;
}

.lang-btn:hover {
    color: var(--text-secondary);
}

.lang-btn.active {
    color: var(--accent);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4rem 2rem;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, #d1d5db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 25px rgba(16, 185, 129, 0.4));
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-weight: 400;
}

.hero-meta {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 2.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-cta {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.cta-link {
    position: relative;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

.cta-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.hero-status {
    flex: 0.5;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: fit-content;
    position: relative;
    overflow: hidden;
}

.hero-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

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

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50px;
    width: fit-content;
    transition: all 0.3s ease;
}

.status-badge:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
        box-shadow: 0 0 12px rgba(16, 185, 129, 0.9);
    }
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.status-quote {
    position: relative;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
}

.quote-icon {
    position: absolute;
    top: 0.5rem;
    left: 0;
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
    font-weight: 400;
}

.quote-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    margin: 0;
    padding-left: 1.5rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.quote-text.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

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

.status-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Sections */
.section {
    padding: 5rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    letter-spacing: -0.01em;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.section-body {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.statement {
    margin-bottom: 2rem;
}

.statement strong {
    color: var(--text-primary);
    font-weight: 600;
}

.section-body p {
    margin-bottom: 1.5rem;
}

.section-body p strong {
    color: var(--text-primary);
}

/* Focus Grid */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.focus-item {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-subtle) 0%, transparent 100%);
    transition: all var(--transition);
}

.focus-item:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
}

.focus-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.focus-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Experiments List */
.experiments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.exp-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    transition: all var(--transition);
}

.exp-item:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--accent);
}

.exp-marker {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.25rem;
    animation: pulse 2s ease-in-out infinite;
}

.exp-content {
    flex: 1;
}

.exp-item h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
    font-size: 0.9rem;
}

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

/* Electronics Toolkit */
.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    transition: all var(--transition);
}

.tool-card:hover {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.03);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.tool-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.tool-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.tool-input-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.tool-input-group input,
.tool-input-group select {
    padding: 0.625rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.tool-input-group input:focus,
.tool-input-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.tool-input-group input::placeholder {
    color: var(--text-tertiary);
}

.tool-result {
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-subtle) 0%, transparent 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 4px;
    color: var(--accent);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.95rem;
    font-weight: 500;
    min-height: 2rem;
    display: flex;
    align-items: center;
    word-break: break-all;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        min-height: auto;
        padding: 3rem 1.5rem;
        gap: 2rem;
    }

    .hero-status {
        flex: 1;
        width: 100%;
        padding: 1.5rem;
    }

    .quote-text {
        font-size: 0.85rem;
        min-height: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-link {
        display: block;
        text-align: left;
    }

    .section {
        padding: 3rem 1.5rem;
    }

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

    .lang-toggle {
        top: 1rem;
        right: 1rem;
    }
}
