﻿/* Sadaf Portfolio — editorial premium layer
   Loaded after main.css to refine the public-facing visual system. */

:root {
    --bg-primary: #080a0e;
    --bg-secondary: #0c1016;
    --bg-card: #10151d;
    --bg-card-hover: #141b25;
    --bg-elevated: #171e29;
    --border: rgba(235, 240, 247, 0.09);
    --border-subtle: rgba(235, 240, 247, 0.055);
    --border-focus: rgba(99, 102, 241, 0.42);
    --border-hover: rgba(99, 102, 241, 0.26);
    --text-primary: #f3f1eb;
    --text-secondary: #a2a9b5;
    --text-muted: #68717f;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-light: rgba(99, 102, 241, 0.09);
    --accent-glow: rgba(99, 102, 241, 0.16);
    --accent-glow-lg: rgba(99, 102, 241, 0.24);
    --accent2: #06b6d4;
    --accent2-glow: rgba(6, 182, 212, 0.14);
    --gradient-hero: linear-gradient(110deg, #f4f1e9 0%, #c7d2fe 48%, #6366f1 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.008));
    --gradient-shine: linear-gradient(125deg, rgba(255, 255, 255, 0.055), transparent 45%);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 16px 42px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.34);
    --shadow-glow: 0 16px 38px rgba(0, 0, 0, 0.25);
    --shadow-glow-lg: 0 32px 90px rgba(0, 0, 0, 0.38);
    --radius-xs: 7px;
    --radius-sm: 11px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-xl: 38px;
    --nav-height: 64px;
}

[data-theme="light"] {
    --bg-primary: #f5f3ee;
    --bg-secondary: #ebe9e3;
    --bg-card: #fbfaf7;
    --bg-card-hover: #ffffff;
    --bg-elevated: #e5e2db;
    --border: rgba(24, 30, 37, 0.11);
    --border-subtle: rgba(24, 30, 37, 0.065);
    --border-focus: rgba(99, 102, 241, 0.38);
    --border-hover: rgba(99, 102, 241, 0.25);
    --text-primary: #171b21;
    --text-secondary: #59616b;
    --text-muted: #8b929b;
    --accent: #4f46e5;
    --accent-hover: #6366f1;
    --accent-light: rgba(79, 70, 229, 0.08);
    --accent-glow: rgba(79, 70, 229, 0.12);
    --accent2: #06b6d4;
    --gradient-hero: linear-gradient(110deg, #171b21 0%, #4f46e5 54%, #06b6d4 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.2));
    --shadow-sm: 0 8px 24px rgba(35, 39, 44, 0.06);
    --shadow-md: 0 18px 46px rgba(35, 39, 44, 0.09);
    --shadow-lg: 0 30px 78px rgba(35, 39, 44, 0.12);
}

html {
    scroll-padding-top: 96px;
}

body {
    background:
        radial-gradient(circle at 12% 5%, rgba(159, 140, 255, 0.075), transparent 30rem),
        radial-gradient(circle at 88% 18%, rgba(6, 182, 212, 0.055), transparent 34rem),
        var(--bg-primary);
    font-feature-settings: "ss01", "ss02", "kern";
    letter-spacing: -0.012em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

.container {
    max-width: 1240px;
    padding-inline: 34px;
}

.section {
    padding-block: clamp(96px, 10vw, 150px);
    position: relative;
}

.services,
.projects,
.process,
.pricing,
.contact {
    border-block: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent);
}

.section-header {
    text-align: start;
    margin-bottom: clamp(48px, 6vw, 76px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 30px;
    position: relative;
}

.section-header::after {
    content: "";
    width: clamp(90px, 12vw, 170px);
    height: 1px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, var(--border-focus), transparent);
}

html[dir="rtl"] .section-header::after {
    background: linear-gradient(-90deg, var(--border-focus), transparent);
}

.section-tag {
    grid-column: 1;
    justify-self: start;
    margin-bottom: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-family: var(--font-en);
    font-size: 0.68rem;
    letter-spacing: 0.19em;
    color: var(--accent);
}

.section-tag::before {
    width: 18px;
    height: 1px;
    border-radius: 0;
    box-shadow: none;
}

.section-header h2 {
    grid-column: 1;
    font-size: clamp(2.4rem, 5.5vw, 4.7rem);
    font-weight: 750;
    line-height: 0.98;
    letter-spacing: -0.055em;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text-primary);
}

.section-subtitle {
    margin: 16px 0 0;
    max-width: 600px;
    font-size: 1rem;
    line-height: 1.9;
}

/* Navigation */
.navbar {
    top: 16px;
    left: 50%;
    right: auto;
    width: min(calc(100% - 34px), 1180px);
    height: 64px;
    padding: 0 18px 0 14px;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 18px;
    background: rgba(10, 13, 18, 0.68);
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
    box-shadow: 0 12px 42px rgba(0, 0, 0, 0.18);
}

.navbar.scrolled {
    top: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(10, 13, 18, 0.88);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

[data-theme="light"] .navbar,
[data-theme="light"] .navbar.scrolled {
    background: rgba(250, 249, 246, 0.86);
}

.nav-logo {
    height: 31px;
    filter: none;
}

.nav-logo:hover {
    filter: none;
    transform: translateY(-1px);
}

.nav-links {
    gap: 2px;
}

.nav-links a {
    padding: 8px 11px;
    color: var(--text-secondary);
    font-size: 0.81rem;
}

.nav-links a.active::after {
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 1px;
    background: var(--accent);
}

.nav-links a.nav-cta {
    padding: 9px 18px;
    border: 1px solid var(--accent);
    border-radius: 11px;
    background: var(--accent);
    color: #07110f !important;
    box-shadow: none;
}

.nav-links a.nav-cta:hover {
    transform: none;
    background: var(--accent-hover);
    box-shadow: none;
}

.btn-theme,
.btn-lang {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: transparent;
}

/* Hero */
.hero {
    width: min(100%, 1440px);
    min-height: 100svh;
    margin-inline: auto;
    padding: 150px max(40px, calc((100vw - 1240px) / 2)) 100px;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
    gap: clamp(54px, 7vw, 110px);
}

.hero-grid {
    opacity: 0.48;
    background-size: 80px 80px;
    mask-image: linear-gradient(to bottom, #000 8%, transparent 84%);
}

.hero-glow {
    filter: blur(150px);
    opacity: 0.15;
    animation: none !important;
}

.hero-glow.glow-1 {
    width: 520px;
    height: 520px;
    top: -210px;
    left: 10%;
}

.hero-glow.glow-2 {
    width: 380px;
    height: 380px;
    right: 3%;
    bottom: 2%;
}

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

.hero-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    color: var(--text-muted);
    font-family: var(--font-en);
    font-size: 0.65rem;
    font-weight: 650;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-kicker-line {
    width: 38px;
    height: 1px;
    background: var(--border-focus);
}

.hero-badge {
    margin-bottom: 30px;
    padding: 8px 13px;
    border-color: var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    box-shadow: none;
    font-size: 0.75rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.hero-title {
    margin-bottom: 20px;
    font-size: clamp(3.3rem, 6.7vw, 6.3rem);
    font-weight: 780;
    line-height: 0.97;
    letter-spacing: -0.065em;
}

html[dir="rtl"] .hero-title {
    letter-spacing: -0.052em;
}

.hero-title .highlight {
    display: block;
    width: fit-content;
    margin-top: 8px;
}

.glitch::before,
.glitch::after {
    display: none !important;
}

.hero-subtitle {
    min-height: 2rem;
    margin-bottom: 18px;
    color: var(--text-primary);
    font-size: clamp(1rem, 1.9vw, 1.28rem);
    font-weight: 520;
}

.hero-desc {
    max-width: 610px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.95;
}

.hero-stats {
    gap: 0;
    margin-bottom: 32px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hero-stats .stat {
    min-width: 110px;
    align-items: flex-start;
    padding-inline: 22px;
    border-inline-end: 1px solid var(--border);
}

.hero-stats .stat:first-child {
    padding-inline-start: 0;
}

.hero-stats .stat:last-child {
    border-inline-end: 0;
}

.stat-num {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: var(--font-en);
    font-size: 1.65rem;
    font-weight: 650;
}

.stat-label {
    margin-top: 6px;
    color: var(--text-muted);
}

.hero-cta {
    gap: 10px;
}

.btn {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 11px;
    font-size: 0.84rem;
    font-weight: 650;
    box-shadow: none;
}

.btn-primary {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #07110f;
    box-shadow: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--accent-hover);
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.14);
}

.btn-outline,
.btn-book-call {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-outline:hover,
.btn-book-call:hover {
    transform: translateY(-2px);
    border-color: var(--border-focus);
    background: var(--accent-light);
    color: var(--accent-hover);
    box-shadow: none;
}

.btn-book-call::before {
    display: none;
}

.btn-text {
    padding-inline: 10px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
}

.btn-text:hover {
    color: var(--text-primary);
}

.hero-socials {
    gap: 4px;
    margin-top: 24px;
    padding-top: 18px;
    border-top-color: var(--border-subtle);
}

.hero-social-btn,
.about-socials a,
.footer-social-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border) !important;
    border-radius: 10px;
    background: transparent !important;
    color: var(--text-secondary);
    box-shadow: none;
}

.hero-social-btn:hover,
.about-socials a:hover,
.footer-social-btn:hover {
    transform: translateY(-2px);
    border-color: var(--border-focus) !important;
    background: var(--accent-light) !important;
    color: var(--accent-hover);
    box-shadow: none;
    filter: none;
}

.hero-visual {
    display: block;
    align-self: center;
}

.social-fixed,
.social-sidebar {
    display: none;
}

.code-card {
    overflow: visible;
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(14, 19, 26, 0.88);
    box-shadow: var(--shadow-lg);
    transform: rotate(-1.8deg);
}

html[dir="rtl"] .code-card {
    transform: rotate(1.8deg);
}

.code-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 18px -18px -18px 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
}

.code-card:hover,
html[dir="rtl"] .code-card:hover {
    transform: translateY(-6px) rotate(0);
    box-shadow: var(--shadow-glow-lg);
}

.code-header {
    padding: 16px 20px;
    border-radius: 24px 24px 0 0;
    background: rgba(255, 255, 255, 0.018);
}

.dot {
    width: 8px;
    height: 8px;
    opacity: 0.64;
}

.code-file {
    margin-inline-start: auto;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.code-body {
    padding: clamp(26px, 4vw, 42px);
    font-size: clamp(0.75rem, 1.1vw, 0.88rem);
    line-height: 2.05;
}

.c-keyword { color: #c7a9ff; }
.c-var { color: #8dd9ff; }
.c-class { color: #f2d28b; }
.c-str { color: #9de2c2; }
.c-num { color: #f3a995; }

.code-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.68rem;
}

.code-card-footer > span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-card-footer i {
    color: var(--accent);
    font-size: 0.42rem;
}

.code-card-status {
    color: var(--accent);
    font-weight: 650;
}

.scroll-indicator {
    opacity: 0.48;
}

/* Trust strip */
.stats-bar {
    padding: 38px 0;
    border-block: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.012);
}

.stats-bar::before,
.stats-bar::after {
    display: none;
}

.stats-bar-item {
    border-color: var(--border);
}

.sbi-num,
.sbi-suffix {
    color: var(--text-primary);
    -webkit-text-fill-color: currentColor;
    font-family: var(--font-en);
}

.sbi-label {
    color: var(--text-muted);
}

/* Editorial card system */
.about-grid {
    gap: clamp(48px, 8vw, 110px);
}

.about-image-frame {
    border-radius: 26px;
    border-color: var(--border);
    box-shadow: var(--shadow-lg);
}

.about-image-frame::before,
.about-image-frame::after {
    opacity: 0.35;
}

.about-text > p {
    font-size: 1rem;
    line-height: 2;
}

.highlight-item,
.skill-card,
.service-card,
.whyme-card,
.testi-card,
.pricing-card,
.blog-card,
.estimator-card,
.contact-form {
    border-color: var(--border);
    background: var(--gradient-card);
    box-shadow: none;
}

.service-card,
.whyme-card,
.testi-card,
.pricing-card,
.blog-card {
    border-radius: 20px;
}

.service-card::before,
.service-card::after,
.skill-card::before {
    display: none;
}

.service-card:hover,
.whyme-card:hover,
.testi-card:hover,
.pricing-card:hover,
.blog-card:hover,
.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-focus);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: var(--shadow-md);
}

.service-card-featured,
.pricing-card-featured {
    border-color: rgba(6, 182, 212, 0.34);
    box-shadow: inset 0 1px 0 rgba(6, 182, 212, 0.08);
}

.service-icon-wrap,
.whyme-icon,
.process-icon-wrap {
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: none;
}

.skills-grid {
    gap: 12px;
}

.skill-card {
    min-height: 0;
    padding: 18px;
    border-radius: 15px;
}

.skill-icon {
    filter: saturate(0.72);
}

.filter-btn {
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text-muted);
    background: transparent;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    box-shadow: none;
}

/* Projects */
.projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.projects-grid.reveal {
    opacity: 1;
    transform: none;
}

.project-card {
    min-width: 0;
    overflow: hidden;
    border-color: var(--border);
    border-radius: 22px;
    background: var(--gradient-card);
    box-shadow: none;
}

.project-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    border-color: rgba(6, 182, 212, 0.26);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-focus);
    box-shadow: var(--shadow-md);
}

.project-img-wrap {
    aspect-ratio: 16 / 10;
    background: var(--bg-secondary);
}

.project-card.featured .project-img-wrap {
    min-height: 430px;
    aspect-ratio: auto;
}

.project-img-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 8, 12, 0.25), transparent 55%);
    pointer-events: none;
}

.project-img-wrap img {
    filter: saturate(0.82) contrast(1.02);
}

.project-card:hover .project-img-wrap img {
    transform: scale(1.025);
    filter: saturate(1) contrast(1.02);
}

.featured-badge {
    top: 16px;
    inset-inline-start: 16px;
    padding: 6px 10px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 8px;
    background: rgba(8, 10, 14, 0.74);
    color: var(--accent);
    backdrop-filter: blur(12px);
}

.project-body {
    display: flex;
    flex-direction: column;
    padding: 28px;
}

.project-card.featured .project-body {
    justify-content: center;
    padding: clamp(34px, 5vw, 62px);
}

.project-eyebrow {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    color: var(--text-muted);
    font-family: var(--font-en);
    font-size: 0.64rem;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.project-index {
    color: var(--accent);
}

.project-body h3 {
    margin-bottom: 12px;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    letter-spacing: -0.035em;
}

.project-body p {
    line-height: 1.85;
}

.tech-tags {
    gap: 6px;
    margin-block: 22px;
}

.tech-tag {
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.67rem;
}

.project-links {
    margin-top: auto;
    padding-top: 6px;
}

.project-links .btn {
    min-height: 38px;
    padding: 7px 12px;
}

/* Process, pricing and contact */
.process-line {
    background: var(--border);
}

.process-num {
    color: var(--text-muted);
    -webkit-text-fill-color: currentColor;
}

.pricing-badge,
.service-badge-top {
    border: 1px solid var(--border-focus);
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: none;
}

.contact-grid {
    gap: clamp(44px, 8vw, 100px);
    align-items: start;
}

.contact-info {
    position: sticky;
    top: 110px;
}

.contact-item {
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}

.contact-item i {
    color: var(--accent);
}

.social-pill {
    border: 1px solid var(--border) !important;
    border-radius: 9px;
    background: transparent !important;
    color: var(--text-secondary) !important;
    box-shadow: none !important;
}

.social-pill:hover {
    transform: translateY(-2px);
    border-color: var(--border-focus) !important;
    color: var(--accent-hover) !important;
}

.contact-form {
    padding: clamp(28px, 4vw, 44px);
    border-radius: 24px;
}

.form-group input,
.form-group textarea {
    border-color: var(--border);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.floating-cta .fab-btn {
    box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
    padding-top: 80px;
    border-top: 1px solid var(--border);
    background: #07090d;
}

.footer-grid {
    gap: 70px;
}

.footer-brand p {
    max-width: 510px;
    line-height: 1.95;
}

.footer-col h5 {
    color: var(--text-primary);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-links a::before {
    width: 10px;
    background: var(--accent);
}

.footer-bottom {
    border-top-color: var(--border);
}

/* Loader */
.page-loader {
    background: #080a0e;
}

.loader-rings {
    opacity: 0.55;
}

.loader-brand-text {
    letter-spacing: 0.12em;
}

/* Responsive */
@media (max-width: 1100px) {
    .navbar {
        width: calc(100% - 28px);
    }

    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
        padding-inline: 48px;
        gap: 52px;
    }

    .hero-title {
        font-size: clamp(3.2rem, 7.2vw, 5.2rem);
    }

    .project-card.featured {
        grid-template-columns: 1fr 0.85fr;
    }

    .project-card.featured .project-img-wrap {
        min-height: 380px;
    }
}

@media (max-width: 900px) {
    .container {
        padding-inline: 24px;
    }

    .navbar {
        top: 10px;
        height: 58px;
        padding-inline: 14px;
        border-radius: 15px;
    }

    .navbar.scrolled {
        top: 8px;
        border-radius: 15px;
    }

    .nav-links {
        top: 72px;
        left: 14px;
        right: 14px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(10, 13, 18, 0.96);
        box-shadow: var(--shadow-lg);
    }

    [data-theme="light"] .nav-links {
        background: rgba(250, 249, 246, 0.97);
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 132px 32px 92px;
        gap: 64px;
    }

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

    .hero-visual {
        display: block;
        width: min(100%, 620px);
        justify-self: center;
    }

    .code-card,
    html[dir="rtl"] .code-card {
        transform: none;
    }

    .section-header {
        grid-template-columns: 1fr;
    }

    .section-header::after {
        display: none;
    }

    .project-card.featured {
        display: block;
    }

    .project-card.featured .project-img-wrap {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .contact-info {
        position: static;
    }
}

@media (max-width: 720px) {
    .section {
        padding-block: 88px;
    }

    .section-header h2 {
        font-size: clamp(2.2rem, 12vw, 3.5rem);
    }

    .hero {
        padding: 118px 22px 76px;
    }

    .hero-kicker {
        font-size: 0.58rem;
        letter-spacing: 0.13em;
    }

    .hero-title {
        font-size: clamp(3rem, 15vw, 4.5rem);
    }

    .hero-badge {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .hero-stats {
        width: 100%;
    }

    .hero-stats .stat {
        flex: 1;
        min-width: 0;
        padding-inline: 12px;
    }

    .stat-num {
        font-size: 1.42rem;
    }

    .hero-cta .btn {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }

    .hero-cta .btn-text {
        flex-basis: 100%;
    }

    .code-card::after {
        inset: 10px -10px -10px 10px;
    }

    .code-body {
        overflow-x: auto;
        font-size: 0.7rem;
        white-space: pre;
    }

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

    .project-card.featured {
        grid-column: auto;
    }

    .project-body,
    .project-card.featured .project-body {
        padding: 24px;
    }

    .contact-form {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .navbar {
        width: calc(100% - 20px);
    }

    .nav-logo {
        height: 27px;
    }

    .hero {
        padding-inline: 18px;
    }

    .hero-title {
        font-size: clamp(2.72rem, 15vw, 3.8rem);
    }

    .hero-desc {
        font-size: 0.92rem;
    }

    .code-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-bar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar-item:nth-child(2) {
        border-inline-end: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-glow,
    .scroll-indicator,
    .brand-dot {
        animation: none !important;
    }
}
