/* === BASE RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === VARIABLES === */
:root {
    --bg: #0a0a0b;
    --bg-alt: #111113;
    --bg-card: #161618;
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --text-dim: #8a8a94;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-cyan: #06b6d4;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --success: #22c55e;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --radius: 12px;
    --radius-lg: 24px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --transition: 0.2s ease;
    --focus-ring: 2px solid var(--accent);
}

/* === GLOBAL === */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .section-label {
    font-family: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
}

::selection {
    background: var(--accent);
    color: white;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

ul, ol {
    list-style: none;
}

/* === FOCUS STYLES (Accessibility) === */
:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
    border-radius: 4px;
}

.btn:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

/* === UTILITIES === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2.5rem;
    }
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    z-index: 9999;
    border-radius: 0 0 var(--radius) 0;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
    outline: 2px solid white;
    outline-offset: -2px;
}

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 10px;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-hover);
}

.btn-ghost:hover {
    background: var(--bg-alt);
    border-color: var(--text-dim);
}

/* === SECTIONS === */
.section {
    padding: 6rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-label {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.0625rem;
    max-width: 600px;
    margin: 0 auto;
}

.gradient {
    background: linear-gradient(135deg, var(--accent), var(--accent-light), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === ANIMATIONS === */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-content > * {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeUp 0.4s ease forwards;
    }

    .hero-badge { animation-delay: 0.05s; }
    .hero h1 { animation-delay: 0.1s; }
    .hero-lead { animation-delay: 0.15s; }
    .hero-proof { animation-delay: 0.2s; }
    .hero-cta { animation-delay: 0.25s; }
    .hero-tags { animation-delay: 0.3s; }
}

@media (prefers-reduced-motion: reduce) {
    .about-photo__ring,
    .about-photo__glow,
    .about-photo__frame,
    .about-photo__tag {
        animation: none !important;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* === PERFORMANCE: below-fold sections === */
#experience,
#skills,
#projects,
#education,
#faq,
#contact {
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}

/* === RESPONSIVE BASE === */
@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
}
