/* =============================================
   CSS Custom Properties (Variables)
   ============================================= */
:root {
    /* Colors - Strict black & white dark theme */
    --primary-color: #FFFFFF; /* accents / gradients */
    --primary-dark: #f0f0f0;
    --primary-light: #ffffff;
    --secondary-color: #FFFFFF;
    --secondary-dark: #f0f0f0;
    --secondary-light: #ffffff;

    --accent-gradient: linear-gradient(135deg, #FFFFFF 0%, #DDDDDD 100%);

    --text-primary: #FFFFFF;
    --text-secondary: rgba(255,255,255,0.85);
    --text-light: rgba(255,255,255,0.7);

    --bg-primary: #000000; /* site background */
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;

    --border-color: #222222;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', var(--font-primary);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Layout */
    --container-width: 1200px;
    --nav-height: 70px;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}
ul {
    list-style: none;
}

button {
    font-family: inherit;
    border: none;
    cursor: pointer;
    background: none;
}

input, textarea {
    font-family: inherit;
}

/* =============================================
   Utility Classes
   ============================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    transition: all var(--transition-base);
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-gradient);
    /* Post-theme: make CTA text black so it reads on light accent */
    color: var(--bg-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.nav.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-svg {
    flex-shrink: 0;
    color: transparent;
    background: var(--accent-gradient);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><g stroke="black" stroke-width="4" stroke-linecap="round" stroke-linejoin="miter" fill="none"><line x1="10" y1="54" x2="10" y2="10"/><line x1="10" y1="10" x2="22" y2="38"/><line x1="32" y1="54" x2="32" y2="10"/><line x1="32" y1="10" x2="44" y2="38"/><line x1="54" y1="54" x2="54" y2="10"/></g></svg>');
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><g stroke="black" stroke-width="4" stroke-linecap="round" stroke-linejoin="miter" fill="none"><line x1="10" y1="54" x2="10" y2="10"/><line x1="10" y1="10" x2="22" y2="38"/><line x1="32" y1="54" x2="32" y2="10"/><line x1="32" y1="10" x2="44" y2="38"/><line x1="54" y1="54" x2="54" y2="10"/></g></svg>');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    position: relative;
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + var(--spacing-2xl)) var(--spacing-md) var(--spacing-2xl);
    /* hero (first page) uses a custom deep color as requested */
    background: #101A21;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 0;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    /* subtle radial highlight in monochrome theme */
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: fadeInUp 1s ease;
}

.hero-greeting {
    display: block;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.hero-name {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

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

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-lg);
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.hero-scroll {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-down {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    position: relative;
    cursor: pointer;
    opacity: 0.8;
}

.scroll-down span {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDown 2s infinite;
}

.scroll-down span:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-down span:nth-child(3) {
    animation-delay: 0.4s;
}

/* =============================================
   About Section
   ============================================= */
.about {
    padding: var(--spacing-3xl) 0;
    background-color: var(--bg-primary);
    scroll-margin-top: var(--nav-height);
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    /* Single centered column so the About text sits directly under the
       section header (we removed the secondary image). */
    grid-template-columns: 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    justify-items: center;
}

.about-image {
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius-lg);
    z-index: -1;
    opacity: 0.6;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.about-text {
    animation: fadeIn 1s ease;
}

/* Center all text inside the About section */
.about-text {
    text-align: center;
}

.about-info {
    /* keep the top/bottom borders but center the info items */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin: var(--spacing-sm) 0;
}

.info-label {
    font-weight: 600;
    color: var(--text-primary);
    /* remove fixed min-width so labels center nicely */
    min-width: auto;
}

.about-buttons {
    justify-content: center;
}

/* Make the main About heading and paragraphs explicitly centered and
   constrain the width for better readability on wide screens. */
.about-text {
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

.about-heading,
.about-description {
    text-align: center;
}

.about-heading {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.about-description {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.about-info {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
}

.info-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
}

.info-value {
    color: var(--text-secondary);
}

.info-value:hover {
    color: var(--primary-color);
}

.about-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* =============================================
   Skills Section
   ============================================= */
.skills {
    padding: var(--spacing-3xl) 0;
    /* Skills section uses the deep page color requested */
    background-color: #101A21;
    scroll-margin-top: var(--nav-height);
    position: relative;
    z-index: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.skill-card {
    background-color: var(--bg-primary);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid transparent;
    /* center content inside each skill card */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.skill-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    background: var(--accent-gradient);
    color: white;
    margin-bottom: var(--spacing-md);
}

/* Make SVG strokes inside skill icons black to match requested theme */
.skills .skill-icon svg,
.skill-card .skill-icon svg {
    color: var(--bg-primary);
    stroke: var(--bg-primary);
}

/* Ensure child paths/lines inherit stroke when they use currentColor */
.skills .skill-icon svg *,
.skill-card .skill-icon svg * {
    stroke: var(--bg-primary) !important;
}

.skill-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.skill-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.skill-tags li {
    background-color: var(--bg-tertiary);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* =============================================
   Portfolio Section
   ============================================= */
.portfolio {
    padding: var(--spacing-3xl) 0;
    background-color: var(--bg-primary);
    scroll-margin-top: var(--nav-height);
    position: relative;
    z-index: 1;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.portfolio-item {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), filter var(--transition-base);
    filter: grayscale(100%);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use the requested deep color on hover for featured work overlays */
    background: rgba(16, 26, 33, 0.95); /* #101A21 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity var(--transition-base), background 200ms ease;
    text-align: center;
    color: white;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.portfolio-overlay p {
    font-size: 0.95rem;
}

.portfolio-info {
    padding: var(--spacing-lg);
}

.portfolio-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.portfolio-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.portfolio-tags span {
    background-color: var(--bg-tertiary);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.813rem;
    color: var(--primary-color);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* =============================================
   Contact Section
   ============================================= */
.contact {
    padding: var(--spacing-3xl) 0;
    /* match hero: use the same deep color for the Let's Work Together / contact page */
    background: #101A21;
    scroll-margin-top: var(--nav-height);
    position: relative;
    z-index: 1;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-3xl);
    align-items: start;
}

.contact-info h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.contact-info > p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-xl);
}

.contact-details {
    margin-bottom: var(--spacing-xl);
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.contact-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-item h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.contact-item a:hover {
    color: var(--primary-color);
}

.contact-social {
    display: flex;
    gap: var(--spacing-md);
}

.contact-form {
    background-color: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all var(--transition-base);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(214, 90, 49, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    margin-top: var(--spacing-md);
}

/* =============================================
   Footer
   ============================================= */
.footer {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-logo {
    opacity: 0.9;
}

.footer-text {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes scrollDown {
    0% {
        top: 10px;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        top: 30px;
        opacity: 0;
    }
}

/* =============================================
   Responsive Design - Tablets
   ============================================= */
@media (max-width: 992px) {
    :root {
        --spacing-xl: 2.5rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 4rem;
    }
    
    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .hero-image {
        order: -1;
    }
    
    .hero-image-wrapper {
        max-width: 350px;
    }
    
    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* =============================================
   Responsive Design - Mobile
   ============================================= */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
        --spacing-3xl: 3rem;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: rgba(34, 40, 49, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--spacing-xl);
        gap: var(--spacing-md);
        transition: left var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .hero {
        padding-top: calc(var(--nav-height) + var(--spacing-xl));
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .about-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .about-buttons .btn {
        width: 100%;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        margin-bottom: var(--spacing-xl);
    }

    /* Hide the hero scroll indicator on small screens to avoid overlap
       with stacked CTA buttons. */
    .hero-scroll {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-image-wrapper {
        max-width: 280px;
    }
    
    .skill-card {
        padding: var(--spacing-md);
    }
    
    .contact-form {
        padding: var(--spacing-md);
    }
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
    .nav,
    .hero-scroll,
    .contact-form,
    .footer {
        display: none;
    }
    
    body {
        background: var(--bg-primary);
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* =============================================
   Preloader
   ============================================= */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-secondary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   Accessibility
   ============================================= */
.skip-link {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    z-index: 10001;
    border-radius: 0 0 0.5rem 0.5rem;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
