/* =========================================================
   RICH TECHNOLOGY PORTFOLIO
   ========================================================= */

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

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --surface-dark: #0f172a;

    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #64748b;

    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #dbeafe;

    --border: #e2e8f0;
    --success: #22c55e;
    --danger: #dc2626;

    --shadow-sm: 0 8px 25px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 20px 50px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.15);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;

    --container: 1180px;
    --header-height: 78px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    transition:
        background 0.25s ease,
        color 0.25s ease;
}

body.dark {
    --bg: #020617;
    --surface: #0f172a;
    --surface-soft: #111c30;
    --surface-dark: #020617;

    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;

    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-soft: rgba(59, 130, 246, 0.15);

    --border: #1e293b;

    --shadow-sm: 0 8px 25px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 20px 50px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.4);
}

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

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

button,
input,
textarea {
    font: inherit;
}

button {
    border: 0;
}

.container {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.dark .site-header {
    background: rgba(2, 6, 23, 0.88);
}

.navbar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #ffffff;
    font-family: monospace;
    font-size: 0.9rem;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

.nav-links a {
    position: relative;
    color: var(--text-soft);
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

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

.nav-links a:hover::after {
    transform: scaleX(1);
}

.theme-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

#theme-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--text);
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

main {
    overflow: hidden;
}

.section {
    padding: 110px 0;
}

.section-alt {
    background: var(--surface-soft);
}

.section-dark {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at top right,
            rgba(37, 99, 235, 0.25),
            transparent 35%
        ),
        #0f172a;
    color: #ffffff;
}

.section-heading {
    max-width: 740px;
    margin-bottom: 55px;
}

.section-heading.centered {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.section-heading h2 {
    margin-top: 0.8rem;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.section-heading > p:last-child {
    margin-top: 1.25rem;
    color: var(--text-soft);
    font-size: 1.05rem;
}

.section-dark .section-heading > p:last-child {
    color: #cbd5e1;
}

.eyebrow {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.45rem;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 0.95rem;
    font-weight: 750;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.36);
}

.btn-secondary {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

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

/* =========================================================
   HERO
   ========================================================= */

.hero-section {
    position: relative;
    min-height: 100vh;
    padding: 150px 0 90px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(37, 99, 235, 0.15),
            transparent 30%
        ),
        radial-gradient(
            circle at 15% 70%,
            rgba(124, 58, 237, 0.1),
            transparent 30%
        );
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
    align-items: center;
    gap: 70px;
}

.hero-content h1 {
    max-width: 800px;
    margin-top: 1rem;
    font-size: clamp(2.8rem, 6.2vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-description {
    max-width: 690px;
    margin-top: 1.75rem;
    color: var(--text-soft);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 2.2rem;
    margin-top: 3rem;
}

.hero-highlights div {
    display: flex;
    flex-direction: column;
}

.hero-highlights strong {
    color: var(--text);
    font-size: 1.1rem;
}

.hero-highlights span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.hero-visual {
    position: relative;
    min-height: 820px;

}

.profile-frame {
    position: absolute;
    top: 0;
    right: 0;
    width: min(400px, 100%);
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
}

body.dark .profile-frame {
    background: rgba(15, 23, 42, 0.75);
}

.profile-image {
    width: 100%;
    height: 440px;
    border-radius: 27px;
    object-fit: cover;
    object-position: center top;
}

.availability-badge {
    position: absolute;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.16);
}


.code-card {
    position: absolute;
    top: 520px;
    right: -10px;
    bottom: auto;

    width: 320px;

    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 20px;
    background: #0b1120;
    color: #e2e8f0;
    box-shadow: var(--shadow-lg);

    transform: rotate(-3deg);

    z-index: 5;
}


.code-card-header {
    display: flex;
    gap: 7px;
    padding: 14px 17px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.code-card-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-card-header span:nth-child(1) {
    background: #f87171;
}

.code-card-header span:nth-child(2) {
    background: #fbbf24;
}

.code-card-header span:nth-child(3) {
    background: #4ade80;
}

.code-card pre {
    overflow-x: auto;
    padding: 1.5rem;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.79rem;
    line-height: 1.8;
}

.code-purple {
    color: #c084fc;
}

.code-blue {
    color: #60a5fa;
}

.code-green {
    color: #86efac;
}

/* =========================================================
   ABOUT
   ========================================================= */

.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 80px;
    align-items: start;
}

.about-grid .section-heading {
    margin-bottom: 0;
}

.about-content {
    padding-left: 40px;
    border-left: 1px solid var(--border);
}

.about-content p {
    color: var(--text-soft);
    font-size: 1.05rem;
}

.about-content p + p {
    margin-top: 1.4rem;
}

/* =========================================================
   TECH STACK
   ========================================================= */

.stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stack-card {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.stack-card:hover {
    transform: translateY(-7px);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: var(--shadow-md);
}

.stack-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 1.3rem;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 800;
}

.stack-card h3 {
    font-size: 1.1rem;
}

.stack-card p {
    margin-top: 0.7rem;
    color: var(--text-soft);
    font-size: 0.93rem;
}

/* =========================================================
   PROJECTS
   ========================================================= */

.projects-list {
    display: grid;
    gap: 28px;
}

.project-card {
    position: relative;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) minmax(300px, 0.78fr);
    gap: 32px;
    align-items: center;
    overflow: hidden;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: var(--shadow-md);
}

.project-number {
    align-self: start;
    color: var(--primary);
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 800;
}

.project-type {
    display: inline-block;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.project-content h3 {
    margin-top: 0.65rem;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.035em;
}

.project-content > p {
    margin-top: 1rem;
    color: var(--text-soft);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1.4rem;
}

.project-tags span {
    padding: 0.38rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 700;
}

.project-links {
    margin-top: 1.4rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 800;
}

.project-link span {
    transition: transform 0.2s ease;
}

.project-link:hover span {
    transform: translate(3px, -3px);
}

.project-preview {
    min-height: 250px;
    overflow: hidden;
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            rgba(37, 99, 235, 0.16),
            rgba(124, 58, 237, 0.14)
        );
}

/* BAS preview */


.screenshot-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.screenshot-browser {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.screenshot-topbar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.screenshot-topbar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.screenshot-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    transition: transform 0.35s ease;
}

.project-card:hover .screenshot-image {
    transform: scale(1.025);
}

.finance-preview {
    display: grid;
    place-items: center;
    padding: 25px;
}

.preview-window {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
    transform: rotate(2deg);
}

.preview-topbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.preview-topbar span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
}

.dashboard-preview {
    display: grid;
    grid-template-columns: 55px 1fr;
    min-height: 170px;
}

.preview-sidebar {
    background: #0f172a;
}

.preview-main {
    padding: 18px;
    background: #f8fafc;
}

.preview-heading {
    width: 45%;
    height: 8px;
    border-radius: 999px;
    background: #94a3b8;
}

.preview-balance {
    width: 100%;
    height: 58px;
    margin-top: 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.preview-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 13px;
}

.preview-row div {
    height: 42px;
    border-radius: 8px;
    background: #e2e8f0;
}

/* API preview */

.api-preview {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 28px;
    background: #0b1120;
}

.api-line {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-family: monospace;
    font-size: 0.76rem;
}

.method {
    min-width: 42px;
    font-weight: 900;
}

.method.get {
    color: #4ade80;
}

.method.post {
    color: #60a5fa;
}

/* Restaurant preview */

.restaurant-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 30px;
    background:
        radial-gradient(
            circle at 30% 50%,
            rgba(249, 115, 22, 0.22),
            transparent 42%
        ),
        #fff7ed;
}

.plate {
    display: grid;
    place-items: center;
    width: 145px;
    height: 145px;
    border: 12px solid #ffffff;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            #f59e0b 0 20%,
            #ef4444 21% 34%,
            #22c55e 35% 46%,
            #fde68a 47% 100%
        );
    box-shadow: 0 18px 40px rgba(124, 45, 18, 0.18);
}

.plate span {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #7c2d12;
}

.menu-lines {
    width: 34%;
}

.menu-lines span {
    display: block;
    height: 8px;
    margin: 15px 0;
    border-radius: 999px;
    background: #fdba74;
}

.menu-lines span:nth-child(2) {
    width: 70%;
}

.menu-lines span:nth-child(3) {
    width: 45%;
}

/* Portfolio preview */

.portfolio-preview {
    display: grid;
    place-items: center;
    align-content: center;
    background:
        radial-gradient(
            circle at top right,
            rgba(96, 165, 250, 0.35),
            transparent 40%
        ),
        #0f172a;
    color: #ffffff;
}

.portfolio-preview span {
    font-family: monospace;
    font-size: 3rem;
    font-weight: 900;
}

.portfolio-preview p {
    margin-top: 0.6rem;
    color: #94a3b8;
}

/* =========================================================
   DEPLOYMENT
   ========================================================= */

.deployment-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 90px;
    align-items: start;
}

.deployment-grid .section-heading {
    position: sticky;
    top: 120px;
    margin-bottom: 0;
}

.deployment-list {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.deployment-item {
    display: grid;
    grid-template-columns: 55px 1fr;
    gap: 20px;
    padding: 27px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.deployment-item > span {
    color: #60a5fa;
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 800;
}

.deployment-item h3 {
    font-size: 1.08rem;
}

.deployment-item p {
    margin-top: 0.4rem;
    color: #94a3b8;
    font-size: 0.93rem;
}

/* =========================================================
   SERVICES
   ========================================================= */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.service-card {
    min-height: 240px;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
}

.service-card > span {
    color: var(--primary);
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 800;
}

.service-card h3 {
    margin-top: 2.8rem;
    font-size: 1.2rem;
}

.service-card p {
    margin-top: 0.75rem;
    color: var(--text-soft);
    font-size: 0.92rem;
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(37, 99, 235, 0.1),
            transparent 30%
        );
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 80px;
    align-items: start;
}

.contact-intro h2 {
    margin-top: 0.8rem;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.contact-intro > p:not(.eyebrow) {
    margin-top: 1.4rem;
    color: var(--text-soft);
}

.email-link {
    display: inline-block;
    margin-top: 1.7rem;
    color: var(--primary);
    font-weight: 800;
    word-break: break-word;
}

.contact-card {
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.contact-card h3 {
    font-size: 1.5rem;
}

.contact-card > p {
    margin-top: 0.45rem;
    color: var(--text-soft);
}

#contact-form {
    margin-top: 1.8rem;
}

.form-group + .form-group {
    margin-top: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 750;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: var(--bg);
    color: var(--text);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input {
    height: 51px;
    padding: 0 1rem;
}

.form-group textarea {
    min-height: 150px;
    padding: 1rem;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.submit-btn {
    width: 100%;
    margin-top: 1.4rem;
}

#form-status {
    min-height: 24px;
    margin-top: 1rem;
    font-size: 0.88rem;
    font-weight: 700;
}

#form-status.success {
    color: var(--success);
}

#form-status.error {
    color: var(--danger);
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 45px 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    gap: 40px;
    align-items: center;
}

.footer-content strong {
    font-size: 1rem;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

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

/* Users who prefer reduced motion */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

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

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {
    .nav-links {
        gap: 1rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 65px;
    }

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

    .hero-visual {
        position: relative;
        min-height: 860px;
    }

    .profile-frame {
        right: 40px;
    }

    .code-card {
        top: 520px;
        right: 20px;
        bottom: auto;
        left: auto;
    }

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

    .project-card {
        grid-template-columns: 55px 1fr;
    }

    .project-preview {
        grid-column: 2;
        width: 100%;
        min-height: 280px;
    }

    .deployment-grid,
    .contact-grid {
        gap: 50px;
    }
}

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

@media (max-width: 850px) {
    :root {
        --header-height: 70px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-wrapper {
        position: fixed;
        top: var(--header-height);
        right: 20px;
        left: 20px;
        display: block;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: var(--surface);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px);
        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;
    }

    .nav-wrapper.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links {
        display: block;
    }

    .nav-links li + li {
        margin-top: 0.25rem;
    }

    .nav-links a {
        display: block;
        padding: 0.85rem 0.75rem;
        border-radius: 10px;
    }

    .nav-links a:hover {
        background: var(--surface-soft);
    }

    .nav-links a::after {
        display: none;
    }

    .theme-toggle {
        width: 100%;
        height: 45px;
        margin-top: 0.7rem;
        border-radius: 10px;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

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

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .about-grid,
    .deployment-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        padding-top: 35px;
        padding-left: 0;
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .deployment-grid .section-heading {
        position: static;
    }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 640px) {
    .container {
        width: min(100% - 28px, var(--container));
    }

    .brand span:last-child {
        display: none;
    }

    .section {
        padding: 80px 0;
    }

    .hero-section {
        min-height: auto;
        padding: 120px 0 75px;
    }

    .hero-content h1 {
        font-size: clamp(2.45rem, 13vw, 4rem);
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-highlights {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.4rem;
    }

    .hero-visual {
        display: flex;
        flex-direction: column;
        gap: 24px;
        min-height: auto;
    }

    .profile-frame {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        transform: none;
    }

    .profile-image {
        height: 365px;
    }

    .availability-badge {
        right: 18px;
        bottom: 18px;
        font-size: 0.68rem;
    }

    .code-card {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
    
        width: 100%;
    
        transform: none;
    }

    .code-card pre {
        padding: 1.1rem;
        font-size: 0.67rem;
    }

    .stack-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        display: block;
        padding: 26px;
        border-radius: 22px;
    }

    .project-number {
        margin-bottom: 1.2rem;
    }

    .project-preview {
        margin-top: 1.8rem;
        min-height: 230px;
    }

    .restaurant-preview {
        padding: 20px;
    }

    .plate {
        width: 120px;
        height: 120px;
    }

    .contact-card {
        padding: 26px;
        border-radius: 22px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 18px;
        text-align: center;
    }
}
