/*
 * base.css — Reset, Typography, Global
 * Esthyak Ahmmed Siyam Portfolio
 * ==========================================
 */

/* ── Reset ─────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

ol,
ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* ── Skip to content (accessibility) ────────── */

.skip-link {
    position: fixed;
    top: -100%;
    left: var(--space-4);
    z-index: 9999;
    padding: var(--space-3) var(--space-6);
    background: var(--accent);
    color: var(--bg-void);
    font-weight: 700;
    border-radius: var(--radius);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* ── Typography Scale ─────────────────────── */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Display — hero name */

.text-display {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.8rem, 8vw, 7rem);
    line-height: 1.0;
    letter-spacing: -0.03em;
}

/* Headline — section titles */

.text-headline {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    line-height: 1.18;
    letter-spacing: -0.025em;
}

/* Sub-headline — card titles, case study headers */

.text-subheadline {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.3;
}

/* Eyebrow / section label — mono small caps */

.text-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

/* Body */

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

/* Lead — hero sub-copy */

.text-lead {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Caption / metadata */

.text-caption {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

/* ── Selection ────────────────────────────── */

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

/* ── Focus styles ─────────────────────────── */

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ── Scroll reveal — progressive enhancement ── */

/* Visible by default if JS is disabled */

.reveal {
    opacity: 1;
    transform: none;
}

/* Hidden initial state when JS is running */

.js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 80ms;
}

.reveal-delay-2 {
    transition-delay: 160ms;
}

.reveal-delay-3 {
    transition-delay: 240ms;
}

.reveal-delay-4 {
    transition-delay: 320ms;
}

.reveal-delay-5 {
    transition-delay: 400ms;
}