:root {
    --bg: #0f1724;
    --bg-2: #071020;
    --card: #0b1220;
    --text: #e6eef8;
    --muted: #94a3b8;
    --accent: #06b6d4;
    --accent-2: #7c3aed;

    --max-width: 1100px;
    --container-padding: 24px;

    --border: rgba(255, 255, 255, 0.04);
    --border-weak: rgba(255, 255, 255, 0.03);
    --card-gradient: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    --btn-text: #04202a;
}

* {
    box-sizing:  border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
    background: var(--bg-2); /* Fallback solid color */
}

body {
    margin: 0;
    min-height: 100%; /* Changed from implicit height */
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: linear-gradient(180deg, var(--bg), var(--bg-2)) fixed; /* Added 'fixed' */
    color: var(--text);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

.site-header {
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    margin: 0;
}

.main-nav a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 16px;
}

.hero {
    padding: 40px 0;
}

.role {
    margin: 0;
    font-size: 1.5rem;
    color: var(--accent);
}

.lead {
    color: var(--muted);
    max-width: 60ch;
}

.about,
.projects,
.skills,
.contact {
    padding: 28px 0;
    border-top: 1px solid var(--border-weak);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.project-card {
    background: var(--card-gradient);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-weak);
}

.project-card h4 {
    margin: 0 0 8px 0;
}

.btn {
    display: inline-block;
    padding: 8px 12px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: var(--btn-text);
    text-decoration: none;
    border-radius: 6px;
    font-weight:  600;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.skill-list li {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--border-weak);
    padding: 16px 0;
    margin-top: 32px;
    text-align:  center;
    color: var(--muted);
}

/* Prevent mobile "tap highlight" / bright flash while scrolling or tapping */
html,
body {
    -webkit-tap-highlight-color: transparent; /* iOS/Safari */
    -webkit-touch-callout: none;              /* disable long-press menu on iOS */
    touch-action: manipulation;               /* reduce pointer delay/behavior */
    -ms-touch-action:  manipulation;
}

/* Also apply to common interactive elements */
a,
button,
.btn,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

:active {
    outline:  none;
    -webkit-tap-highlight-color: transparent;
}

:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid rgba(6, 182, 212, 0.22);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (max-width:  700px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        margin-top:  8px;
    }
}