/* ==========================================================================
   Ulwazi Mapukata — Personal Portfolio
   Dark-first design system
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
    --bg-primary: #0b0f1a;
    --bg-secondary: #111827;
    --bg-elevated: #1a2238;
    --accent: #c8933a;
    --highlight: #e8b05a;
    --text-primary: #f5f0e8;
    --text-secondary: #a0a8b8;
    --text-muted: #6b7280;
    --border-subtle: rgba(200, 147, 58, 0.15);
    --border-medium: rgba(200, 147, 58, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --max-width: 1200px;
    --nav-height: 72px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--highlight);
}

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

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

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
    max-width: 68ch;
}

.text-accent {
    color: var(--accent);
}

.text-highlight {
    color: var(--highlight);
}

/* ---------- Utility ---------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: block;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

.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.75rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--highlight);
    border-color: var(--highlight);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(200, 147, 58, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-outline:hover {
    background: rgba(200, 147, 58, 0.1);
    color: var(--highlight);
    border-color: var(--highlight);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn svg, .btn img {
    width: 16px;
    height: 16px;
}

/* ---------- Navigation ---------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(11, 15, 26, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    transition: background var(--transition-base);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-brand .brand-accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
    border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at 70% 30%, rgba(200, 147, 58, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 4rem;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.hero-content {
    max-width: 640px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: block;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-title .accent-line {
    color: var(--accent);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.75rem;
    max-width: 560px;
}

.hero-identity {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.hero-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.hero-role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-location {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hero-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.hero-social a:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-social svg {
    width: 18px;
    height: 18px;
}

.hero-social svg:not(.icon-outline) {
    fill: currentColor;
}

.hero-social svg.icon-outline {
    fill: none;
    stroke: currentColor;
}

.hero-photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-photo-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
}

.hero-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-photo-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(200, 147, 58, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ---------- About ---------- */
.about {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.about-content {
    max-width: 800px;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

/* ---------- Experience Timeline ---------- */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.35rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    transform: translateX(-50%);
    margin-left: 0.5px;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.timeline-role {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-details {
    list-style: none;
    padding: 0;
}

.timeline-details li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.timeline-details li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ---------- Projects ---------- */
.project-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-category {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.project-name {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    background: rgba(200, 147, 58, 0.08);
    border: 1px solid rgba(200, 147, 58, 0.15);
    border-radius: 4px;
    color: var(--accent);
}

.project-highlights {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.5rem;
}

.project-highlights h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.project-highlights ul {
    list-style: none;
    padding: 0;
}

.project-highlights li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.project-highlights li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.project-card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.btn-case-study {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.65rem 1.25rem;
}

/* ---------- Case Study Modal ---------- */
body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 26, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(200, 147, 58, 0.15);
    width: 100%;
    max-width: 820px;
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform var(--transition-base);
}

.modal-overlay.is-open .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.75rem 2rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.modal-header-text {
    flex-grow: 1;
}

.modal-category {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

.modal-title {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

.modal-close-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    padding: 0;
}

.modal-close-btn:hover, .modal-close-btn:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(200, 147, 58, 0.08);
    outline: none;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.modal-section-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.modal-section p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.modal-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-section li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-section li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.modal-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.modal-tech-badge {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    background: rgba(200, 147, 58, 0.08);
    border: 1px solid rgba(200, 147, 58, 0.2);
    border-radius: 4px;
    color: var(--accent);
}

.modal-disclaimer {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .modal-overlay {
        padding: 0.5rem;
    }

    .modal-container {
        max-height: calc(100vh - 1rem);
        border-radius: var(--radius-sm);
    }

    .modal-header {
        padding: 1.25rem 1.25rem 1rem;
    }

    .modal-body {
        padding: 1.25rem;
        gap: 1.25rem;
    }
}

/* ---------- Skills ---------- */
.skills-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-group {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.75rem;
}

.skill-group-title {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tags span {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(245, 240, 232, 0.08);
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.skill-tags span:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Certifications ---------- */
.certs-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.cert-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.cert-item:hover {
    border-color: var(--border-medium);
}

.cert-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(200, 147, 58, 0.1);
    color: var(--accent);
    font-size: 1rem;
}

.cert-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.cert-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Contact ---------- */
.contact {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-links li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-links svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-links svg:not(.icon-outline) {
    fill: var(--accent);
}

.contact-links svg.icon-outline {
    fill: none;
    stroke: var(--accent);
}

.contact-links a {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.contact-links a:hover {
    color: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-primary);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

/* ---------- Scroll Animations ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Custom 404 ---------- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.error-page h2 {
    margin-bottom: 1rem;
}

.error-page p {
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Responsive: Tablet (<=900px) ---------- */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .hero-photo {
        order: -1;
    }

    .hero-photo-wrapper {
        width: 240px;
        height: 240px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Responsive: Mobile (<=640px) ---------- */
@media (max-width: 640px) {
    .section {
        padding: 4rem 0;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(11, 15, 26, 0.97);
        backdrop-filter: blur(16px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-height) + 2rem);
        padding-bottom: 3rem;
    }

    .hero-photo-wrapper {
        width: 180px;
        height: 180px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .hero-ctas .btn {
        width: 100%;
        justify-content: center;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .certs-list {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
