/* ============================================
   DESIGN SYSTEM — Cyber-Industrial Theme
   Muhammad Ahmad — DevOps & Cloud Portfolio
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
    /* Backgrounds */
    --bg-primary: #050508;
    --bg-secondary: #0a0e17;
    --bg-tertiary: #111827;
    --bg-card: #0d1220;
    --bg-elevated: #151d2e;

    /* Accent Colors */
    --cyan: #00e5ff;
    --cyan-dim: rgba(0, 229, 255, 0.15);
    --cyan-glow: rgba(0, 229, 255, 0.3);
    --cyan-ultra-dim: rgba(0, 229, 255, 0.06);
    --blue-deep: #0a2540;
    --green: #00ff88;
    --green-dim: rgba(0, 255, 136, 0.15);
    --amber: #ffb800;
    --amber-dim: rgba(255, 184, 0, 0.15);
    --red: #ff4757;
    --purple: #a855f7;

    /* Text */
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --text-tertiary: #484f58;
    --text-cyan: var(--cyan);

    /* Borders */
    --border: rgba(48, 54, 61, 0.6);
    --border-cyan: rgba(0, 229, 255, 0.2);

    /* Effects */
    --glow-sm: 0 0 10px rgba(0, 229, 255, 0.2);
    --glow-md: 0 0 20px rgba(0, 229, 255, 0.3);
    --glow-lg: 0 0 40px rgba(0, 229, 255, 0.2), 0 0 80px rgba(0, 229, 255, 0.1);
    --glow-green: 0 0 10px rgba(0, 255, 136, 0.3);

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-padding: 120px 0;
    --container-width: 1200px;
    --container-padding: 0 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

/* Selection */
::selection {
    background: var(--cyan-dim);
    color: var(--cyan);
}

/* ---- Typography Scale ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 65ch;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    text-shadow: var(--glow-sm);
}

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

section {
    padding: var(--section-padding);
    position: relative;
}

/* ---- Utility Classes ---- */
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-secondary { color: var(--text-secondary); }
.font-mono { font-family: var(--font-mono); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ---- Section Header ---- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    padding: 6px 16px;
    background: var(--cyan-ultra-dim);
    border: 1px solid var(--border-cyan);
    border-radius: 100px;
}

.section-label::before {
    content: '//';
    opacity: 0.5;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ---- Scanline overlay for cards ---- */
.scanline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 229, 255, 0.015) 2px,
        rgba(0, 229, 255, 0.015) 4px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
    border-radius: inherit;
    z-index: 1;
}

/* ---- Glow dot pulse ---- */
@keyframes pulse-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px currentColor; }
    50% { opacity: 0.6; box-shadow: 0 0 12px currentColor; }
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ---- Scroll reveal animation ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive breakpoints ---- */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --container-padding: 0 16px;
    }
    .section-header {
        margin-bottom: 40px;
    }
}
