/* ============================================
   Technical Expertise Block — Frontend Styles
   ratnesh.dev
   ============================================ */

:root {
    --te-bg: #0a0a0f;
    --te-surface: #111118;
    --te-border: rgba(255, 255, 255, 0.07);
    --te-border-hover: rgba(99, 179, 237, 0.4);
    --te-accent: #63b3ed;
    --te-accent-dim: rgba(99, 179, 237, 0.12);
    --te-text-primary: #f0f4f8;
    --te-text-secondary: #8899aa;
    --te-text-muted: #556070;
    --te-tag-bg: rgba(99, 179, 237, 0.08);
    --te-tag-border: rgba(99, 179, 237, 0.2);
    --te-tag-text: #a8d4f5;
    --te-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --te-font-heading: 'DM Mono', 'Fira Code', 'Courier New', monospace;
    --te-font-body: 'Inter', system-ui, sans-serif;
    --te-radius: 12px;
    --te-radius-sm: 6px;
}

.te-block {
    background: var(--te-bg);
    padding: 72px 40px;
    font-family: var(--te-font-body);
    position: relative;
    overflow: hidden;
}

/* Subtle grid background */
.te-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 179, 237, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 179, 237, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Radial glow top-center */
.te-block::after {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(99, 179, 237, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.te-block__heading {
    font-family: var(--te-font-heading);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--te-accent);
    text-align: center;
    margin: 0 0 56px;
    position: relative;
}

.te-block__heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--te-accent);
    margin: 12px auto 0;
    opacity: 0.5;
}

/* 3-column grid */
.te-block__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

@media (max-width: 900px) {
    .te-block__grid {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
}

/* Category card */
.te-block__category {
    background: var(--te-surface);
    border: 1px solid var(--te-border);
    border-radius: var(--te-radius);
    padding: 28px 24px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    position: relative;
    overflow: hidden;
}

.te-block__category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--te-accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.te-block__category:hover {
    border-color: var(--te-border-hover);
    box-shadow: 0 8px 32px rgba(99, 179, 237, 0.08), var(--te-shadow);
    transform: translateY(-2px);
}

.te-block__category:hover::before {
    opacity: 1;
}

/* Category-specific accent colors */
.te-block__category[data-id="cloud"] { --cat-accent: #63b3ed; }
.te-block__category[data-id="devops"] { --cat-accent: #68d391; }
.te-block__category[data-id="observability"] { --cat-accent: #f6ad55; }

.te-block__category[data-id="devops"] .te-block__cat-title { color: #68d391; }
.te-block__category[data-id="devops"] .te-block__tag {
    color: #a8e6c1;
    background: rgba(104, 211, 145, 0.08);
    border-color: rgba(104, 211, 145, 0.2);
}
.te-block__category[data-id="devops"]:hover {
    border-color: rgba(104, 211, 145, 0.4);
    box-shadow: 0 8px 32px rgba(104, 211, 145, 0.06), var(--te-shadow);
}
.te-block__category[data-id="devops"]::before {
    background: linear-gradient(90deg, transparent, #68d391, transparent);
}

.te-block__category[data-id="observability"] .te-block__cat-title { color: #f6ad55; }
.te-block__category[data-id="observability"] .te-block__tag {
    color: #fbd38d;
    background: rgba(246, 173, 85, 0.08);
    border-color: rgba(246, 173, 85, 0.2);
}
.te-block__category[data-id="observability"]:hover {
    border-color: rgba(246, 173, 85, 0.4);
    box-shadow: 0 8px 32px rgba(246, 173, 85, 0.06), var(--te-shadow);
}
.te-block__category[data-id="observability"]::before {
    background: linear-gradient(90deg, transparent, #f6ad55, transparent);
}

/* Category header */
.te-block__cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.te-block__cat-icon {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.te-block__cat-title {
    font-family: var(--te-font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--te-accent);
    margin: 0;
    line-height: 1.3;
}

/* Tool tags */
.te-block__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.te-block__tag {
    display: inline-block;
    font-family: var(--te-font-heading);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--te-tag-text);
    background: var(--te-tag-bg);
    border: 1px solid var(--te-tag-border);
    border-radius: var(--te-radius-sm);
    padding: 4px 10px;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.te-block__tag:hover {
    background: rgba(99, 179, 237, 0.15);
    border-color: rgba(99, 179, 237, 0.4);
}

/* Scripting line */
.te-block__scripting {
    font-family: var(--te-font-heading);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--te-text-muted);
    text-align: center;
    margin: 36px auto 0;
    max-width: 500px;
    position: relative;
}

/* Entrance animations */
@keyframes te-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.te-block__heading {
    animation: te-fade-up 0.5s ease both;
}

.te-block__category {
    animation: te-fade-up 0.5s ease both;
}

.te-block__category:nth-child(1) { animation-delay: 0.1s; }
.te-block__category:nth-child(2) { animation-delay: 0.2s; }
.te-block__category:nth-child(3) { animation-delay: 0.3s; }

.te-block__scripting {
    animation: te-fade-up 0.5s ease 0.4s both;
}
