/* =========================
   GLOBAL VARIABLES
========================= */

:root {
    --primary: #635bff;
    --primary-dark: #5048d8;
    --secondary: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --white: #ffffff;
    --success: #22c55e;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    --radius: 18px;
    --transition: 0.3s ease;
}

/* =========================
   DARK MODE VARIABLES
========================= */

body.dark-mode {
    --secondary: #f8fafc;
    --text: #cbd5e1;
    --muted: #94a3b8;
    --background: #0f172a;
    --surface: #111c31;
    --border: #26344d;
    --white: #0f172a;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* =========================
   RESET
========================= */

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

/* Enable smooth scrolling. */
html {
    scroll-behavior: smooth;
}

/* Global body styles. */
body {
    font-family: "Inter", sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
}

/* Remove default link decoration. */
a {
    color: inherit;
    text-decoration: none;
}

/* Make images responsive. */
img {
    max-width: 100%;
    display: block;
}

/* Remove button font mismatch. */
button,
input,
textarea {
    font: inherit;
}

/* Container used across the website. */
.container {
    width: min(1120px, 90%);
    margin: 0 auto;
}

/* Common section spacing. */
.section {
    padding: 110px 0;
}

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

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.dark-mode .header {
    background: rgba(15, 23, 42, 0.88);
}

/* Header after scrolling. */
.header.scrolled {
    border-color: var(--border);
    box-shadow: 0 5px 25px rgba(15, 23, 42, 0.05);
}

/* Navigation container. */
.nav-container {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo. */
.logo {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--secondary);
}

.logo span {
    color: var(--primary);
}

/* Navigation links container. */
.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Navigation links. */
.nav-link {
    position: relative;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    transition: var(--transition);
}

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

/* Navigation underline. */
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

/* Show navigation underline. */
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Header actions. */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Theme button. */
.theme-toggle,
.menu-toggle,
.nav-close {
    border: 0;
    background: transparent;
    color: var(--secondary);
    cursor: pointer;
}

/* Theme button size. */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

/* Theme button hover. */
.theme-toggle:hover {
    background: var(--surface);
    color: var(--primary);
}

/* Mobile buttons hidden on desktop. */
.menu-toggle,
.nav-close {
    display: none;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

/* Button hover. */
.btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Small button. */
.btn-small {
    padding: 10px 18px;
}

/* Outline button. */
.btn-outline {
    background: transparent;
    color: var(--primary);
}

/* Outline button hover. */
.btn-outline:hover {
    color: #ffffff;
}

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

.hero {
    min-height: 100vh;
    padding-top: 150px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Hero layout. */
.hero-container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 70px;
    align-items: center;
}

/* Hero status label. */
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 13px;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Green availability dot. */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

/* Hero heading. */
.hero h1 {
    max-width: 700px;
    margin-bottom: 25px;
    color: var(--secondary);
    font-size: clamp(2.7rem, 5vw, 4.7rem);
    line-height: 1.08;
    letter-spacing: -3px;
}

/* Highlighted heading text. */
.hero h1 span,
.section-heading h2 span,
.cta h2 span,
.contact-info h2 span {
    color: var(--primary);
}

/* Hero paragraph. */
.hero-content > p {
    max-width: 600px;
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 1.05rem;
}

/* Hero buttons. */
.hero-buttons {
    display: flex;
    gap: 14px;
    margin-bottom: 35px;
}

/* Social links. */
.social-links {
    display: flex;
    gap: 12px;
}

/* Social icon. */
.social-links a,
.footer-social a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    transition: var(--transition);
}

/* Social hover. */
.social-links a:hover,
.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-3px);
}

/* Hero visual. */
.hero-visual {
    min-height: 530px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Decorative circle. */
.hero-circle {
    position: absolute;
    width: 430px;
    height: 430px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(99, 91, 255, 0.15),
        rgba(99, 91, 255, 0.02)
    );
}

/* Developer card. */
.developer-card {
    position: relative;
    z-index: 2;
    width: 300px;
    padding: 35px;
    border: 1px solid var(--border);
    border-radius: 25px;
    background: var(--background);
    box-shadow: var(--shadow);
    text-align: center;
}

/* Profile placeholder. */
.profile-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--primary),
        #9b94ff
    );
    color: #ffffff;
    font-size: 4rem;
}

/* Profile name. */
.profile-info h3 {
    margin-bottom: 3px;
    color: var(--secondary);
}

/* Profile job. */
.profile-info p {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Availability status. */
.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Status indicator. */
.profile-status span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

/* Floating technology card. */
.floating-card {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 17px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--background);
    box-shadow: var(--shadow);
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Floating card icon. */
.floating-card i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Floating card positions. */
.card-one {
    top: 75px;
    right: 20px;
}

.card-two {
    bottom: 95px;
    left: 0;
}

.card-three {
    top: 220px;
    right: -15px;
}

/* =========================
   STATS
========================= */

.stats {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

/* Stats grid. */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

/* Individual statistic. */
.stat-item {
    padding: 35px 20px;
    text-align: center;
    border-right: 1px solid var(--border);
}

/* Remove last border. */
.stat-item:last-child {
    border-right: 0;
}

/* Number. */
.stat-item strong {
    display: block;
    color: var(--secondary);
    font-size: 2rem;
}

/* Number suffix. */
.stat-item strong::after {
    content: "+";
    color: var(--primary);
}

/* Statistic description. */
.stat-item span {
    color: var(--muted);
    font-size: 0.8rem;
}

/* =========================
   SECTION HEADINGS
========================= */

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

/* Center section heading. */
.section-heading.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Small section label. */
.section-label {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Section heading. */
.section-heading h2 {
    margin-bottom: 15px;
    color: var(--secondary);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.15;
    letter-spacing: -1.5px;
}

/* Section description. */
.section-heading p {
    color: var(--muted);
}

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

.about {
    background: var(--background);
}

/* About grid. */
.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 90px;
    align-items: center;
}

/* About visual. */
.about-image {
    position: relative;
    min-height: 430px;
}

/* Experience badge. */
.experience-card {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-radius: 15px;
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow);
}

/* Experience number. */
.experience-card strong {
    font-size: 2rem;
}

/* Experience text. */
.experience-card span {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Code window. */
.code-window {
    position: absolute;
    top: 45px;
    left: 45px;
    width: calc(100% - 45px);
    border-radius: 18px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

/* Code window header. */
.window-header {
    display: flex;
    gap: 6px;
    padding: 14px 18px;
    background: #1e293b;
}

/* Window circles. */
.window-header span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #64748b;
}

/* Code area. */
.code-content {
    padding: 35px 30px;
    color: #cbd5e1;
    font-family: monospace;
    font-size: 0.78rem;
    line-height: 2;
}

/* Code indentation. */
.indent {
    padding-left: 25px;
}

/* Code colors. */
.code-purple {
    color: #c084fc;
}

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

.code-blue {
    color: #67e8f9;
}

/* About content. */
.about-content .lead {
    margin-bottom: 18px;
    color: var(--secondary);
    font-size: 1.25rem;
    font-weight: 600;
}

/* About paragraphs. */
.about-content > p:not(.lead) {
    margin-bottom: 16px;
    color: var(--muted);
}

/* Skills list. */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 25px 0;
}

/* Skill badge. */
.skills span {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Text link. */
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
}

/* Text link hover. */
.text-link:hover i {
    transform: translateX(5px);
}

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

.services {
    background: var(--surface);
}

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

/* Service card. */
.service-card {
    position: relative;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    overflow: hidden;
    transition: var(--transition);
}

/* Service card hover. */
.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

/* Service icon. */
.service-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(99, 91, 255, 0.1);
    color: var(--primary);
    font-size: 1.2rem;
}

/* Service number. */
.service-number {
    position: absolute;
    top: 25px;
    right: 25px;
    color: var(--border);
    font-size: 1.5rem;
    font-weight: 800;
}

/* Service heading. */
.service-card h3 {
    margin-bottom: 12px;
    color: var(--secondary);
}

/* Service description. */
.service-card p {
    min-height: 100px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Service link. */
.service-card a {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
}

/* =========================
   PORTFOLIO
========================= */

.portfolio {
    background: var(--background);
}

/* Portfolio header. */
.portfolio-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Portfolio filters. */
.portfolio-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 35px;
}

/* Filter buttons. */
.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
}

/* Active filter. */
.filter-btn.active,
.filter-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

/* Portfolio grid. */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Project card. */
.project-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--background);
    transition: var(--transition);
}

/* Project hover. */
.project-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow);
}

/* Project image area. */
.project-image {
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Different project backgrounds. */
.project-one {
    background: #ede9fe;
}

.project-two {
    background: #dbeafe;
}

.project-three {
    background: #dcfce7;
}

/* Dark mode project backgrounds. */
.dark-mode .project-one {
    background: #292248;
}

.dark-mode .project-two {
    background: #172c49;
}

.dark-mode .project-three {
    background: #153428;
}

/* Project icon preview. */
.project-preview {
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--background);
    color: var(--primary);
    font-size: 2rem;
    box-shadow: var(--shadow);
}

/* Project content. */
.project-content {
    padding: 25px;
}

/* Project category. */
.project-content > span {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* Project heading. */
.project-content h3 {
    margin: 6px 0 8px;
    color: var(--secondary);
}

/* Project description. */
.project-content p {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.82rem;
}

/* Project link. */
.project-content a {
    display: inline-flex;
    gap: 7px;
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

/* =========================
   PROCESS
========================= */

.process {
    background: var(--surface);
}

/* Process grid. */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Process step. */
.process-step {
    position: relative;
    padding: 30px 0;
}

/* Connector line. */
.process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 57px;
    right: -12%;
    width: 25%;
    height: 1px;
    background: var(--border);
}

/* Step number. */
.step-number {
    width: 55px;
    height: 55px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary);
    border-radius: 50%;
    color: var(--primary);
    font-weight: 800;
}

/* Process title. */
.process-step h3 {
    margin-bottom: 10px;
    color: var(--secondary);
}

/* Process description. */
.process-step p {
    color: var(--muted);
    font-size: 0.85rem;
}

/* =========================
   TESTIMONIALS
========================= */

.testimonials {
    background: var(--background);
}

/* Testimonial grid. */
.testimonial-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* Testimonial card. */
.testimonial-card {
    padding: 35px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

/* Quote icon. */
.quote-icon {
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.5rem;
}

/* Testimonial text. */
.testimonial-card > p {
    margin-bottom: 25px;
    color: var(--secondary);
}

/* Client information. */
.client {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Client avatar. */
.client-avatar {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
}

/* Client name. */
.client strong {
    display: block;
    color: var(--secondary);
    font-size: 0.8rem;
}

/* Client role. */
.client span {
    color: var(--muted);
    font-size: 0.7rem;
}

/* =========================
   CTA
========================= */

.cta {
    padding: 100px 0;
    background: var(--secondary);
}

/* CTA content. */
.cta-content {
    max-width: 700px;
    text-align: center;
    margin: auto;
}

/* CTA heading. */
.cta h2 {
    margin-bottom: 18px;
    color: var(--background);
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.15;
}

/* CTA paragraph. */
.cta p {
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--muted);
}

/* CTA label. */
.cta .section-label {
    color: #a5a0ff;
}

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

.contact {
    background: var(--background);
}

/* Contact grid. */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 80px;
    align-items: start;
}

/* Contact heading. */
.contact-info h2 {
    margin-bottom: 20px;
    color: var(--secondary);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

/* Contact paragraph. */
.contact-info > p {
    margin-bottom: 30px;
    color: var(--muted);
}

/* Contact details. */
.contact-details {
    display: grid;
    gap: 18px;
}

/* Contact detail row. */
.contact-details a,
.contact-detail {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Contact icon. */
.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(99, 91, 255, 0.1);
    color: var(--primary);
}

/* Contact labels. */
.contact-details span {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
}

/* Contact values. */
.contact-details strong {
    display: block;
    color: var(--secondary);
    font-size: 0.85rem;
}

/* Contact form wrapper. */
.contact-form-wrapper {
    padding: 35px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

/* Form row. */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* Form group. */
.form-group {
    margin-bottom: 18px;
}

/* Form label. */
.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

/* Form inputs. */
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: var(--background);
    color: var(--secondary);
    transition: var(--transition);
}

/* Input focus. */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

/* Textarea resize. */
.form-group textarea {
    resize: vertical;
}

/* Form status message. */
.form-message {
    margin-top: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

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

/* Footer top. */
.footer-container {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 50px;
    align-items: center;
}

/* Footer brand paragraph. */
.footer-brand p {
    max-width: 300px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.8rem;
}

/* Footer links. */
.footer-links {
    display: flex;
    gap: 22px;
}

/* Footer link. */
.footer-links a {
    color: var(--muted);
    font-size: 0.8rem;
}

/* Footer link hover. */
.footer-links a:hover {
    color: var(--primary);
}

/* Footer social. */
.footer-social {
    display: flex;
    gap: 8px;
}

/* Copyright section. */
.copyright {
    margin-top: 45px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.7rem;
}

/* =========================
   BACK TO TOP
========================= */

.back-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 500;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

/* Visible back-to-top button. */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =========================
   SCROLL REVEAL
========================= */

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

/* Revealed elements. */
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 1000px) {

    /* Reduce hero columns. */
    .hero-container {
        gap: 35px;
    }

    /* Make services two columns. */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Make process two columns. */
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hide process connectors. */
    .process-step::after {
        display: none;
    }

    /* Reduce about gap. */
    .about-grid {
        gap: 50px;
    }

}

/* =========================
   RESPONSIVE MOBILE
========================= */

@media (max-width: 768px) {

    /* Reduce section spacing. */
    .section {
        padding: 80px 0;
    }

    /* Hide desktop navigation. */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        padding: 90px 30px 30px;
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
        background: var(--background);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
    }

    /* Show mobile navigation. */
    .nav.open {
        right: 0;
    }

    /* Show mobile close button. */
    .nav-close {
        position: absolute;
        top: 25px;
        right: 25px;
        display: block;
        font-size: 1.3rem;
    }

    /* Show mobile menu button. */
    .menu-toggle {
        display: block;
        font-size: 1.2rem;
    }

    /* Hide header CTA on mobile. */
    .nav-actions .btn-small {
        display: none;
    }

    /* Hero becomes one column. */
    .hero-container {
        grid-template-columns: 1fr;
    }

    /* Center hero content. */
    .hero-content {
        text-align: center;
    }

    /* Center hero label. */
    .hero-label {
        display: inline-flex;
    }

    /* Center hero paragraph. */
    .hero-content > p {
        margin-left: auto;
        margin-right: auto;
    }

    /* Center hero buttons. */
    .hero-buttons {
        justify-content: center;
    }

    /* Center social links. */
    .social-links {
        justify-content: center;
    }

    /* Reduce hero visual height. */
    .hero-visual {
        min-height: 420px;
    }

    /* Reduce circle size. */
    .hero-circle {
        width: 330px;
        height: 330px;
    }

    /* Adjust floating card. */
    .card-one {
        right: 0;
    }

    .card-three {
        right: -5px;
    }

    /* Stats become two columns. */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stats border correction. */
    .stat-item:nth-child(2) {
        border-right: 0;
    }

    .stat-item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }

    /* About becomes one column. */
    .about-grid {
        grid-template-columns: 1fr;
    }

    /* Portfolio header stacks. */
    .portfolio-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    /* Portfolio becomes one column. */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    /* Testimonials become one column. */
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    /* Contact becomes one column. */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    /* Footer stacks. */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Copyright stacks. */
    .copyright {
        flex-direction: column;
        gap: 8px;
    }

}

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

@media (max-width: 500px) {

    /* Reduce hero heading spacing. */
    .hero h1 {
        letter-spacing: -2px;
    }

    /* Stack hero buttons. */
    .hero-buttons {
        flex-direction: column;
    }

    /* Full width hero buttons. */
    .hero-buttons .btn {
        width: 100%;
    }

    /* Services become one column. */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Process becomes one column. */
    .process-grid {
        grid-template-columns: 1fr;
    }

    /* Form becomes one column. */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Reduce form padding. */
    .contact-form-wrapper {
        padding: 25px;
    }

    /* Hide secondary floating cards. */
    .card-two,
    .card-three {
        display: none;
    }

    /* Make code window smaller. */
    .code-content {
        padding: 25px 18px;
        font-size: 0.65rem;
    }

}
