
/* =====================================================
   MOSTAFA MOHAMED - ENGINEERING PORTFOLIO
   Color Identity: Black / Blue / Red
===================================================== */

/* ================= ROOT ================= */

:root {
    --black: #101014;
    --black-light: #17171e;
    --black-card: #1c1c25;
    --black-soft: #23232d;

    --blue: #1769AA;
    --blue-light: #2589d4;
    --blue-soft: rgba(23, 105, 170, 0.15);

    --red: #D62839;
    --red-light: #ef4051;
    --red-soft: rgba(214, 40, 57, 0.15);

    --white: #ffffff;
    --text: #eeeeF2;
    --text-muted: #a4a4b2;
    --border: rgba(255, 255, 255, 0.09);

    --gradient: linear-gradient(135deg, var(--blue), var(--red));
    --gradient-dark: linear-gradient(135deg, #121820, #24151b);

    --shadow: 0 15px 45px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --transition: 0.3s ease;
}

/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 100px;
}

body {
    background: var(--black);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--red);
    color: white;
}

[hidden] {
    display: none !important;
}

/* ================= SCROLLBAR ================= */

::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--blue), var(--red));
    border-radius: 20px;
}

/* ================= ACCESSIBILITY ================= */

.skip-link {
    position: fixed;
    top: -100px;
    right: 20px;
    z-index: 9999;
    padding: 12px 20px;
    background: var(--red);
    color: white;
    border-radius: 8px;
}

.skip-link:focus {
    top: 15px;
}

/* ================= NAVBAR ================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;
    min-height: 82px;
    padding: 15px 7%;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;

    background: rgba(16, 16, 20, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(15px);
}

.logo {
    font-size: 23px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: -1px;
}

.logo span {
    color: var(--blue-light);
}

.logo-dot {
    color: var(--red);
    font-size: 30px;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.menu a {
    position: relative;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.menu a::after {
    content: "";
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: var(--transition);
}

.menu a:hover {
    color: white;
}

.menu a:hover::after {
    width: 100%;
}

.language-btn {
    padding: 9px 17px;
    border: 1px solid var(--blue);
    border-radius: 8px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.language-btn:hover {
    background: var(--blue);
    border-color: var(--blue);
}

/* ================= HERO ================= */

.hero {
    position: relative;
    min-height: 680px;
    padding: 100px 9% 90px;

    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 50px;

    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;

    background:
        radial-gradient(
            circle at 15% 30%,
            rgba(23, 105, 170, 0.17),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(214, 40, 57, 0.12),
            transparent 35%
        );
}

.hero-text {
    max-width: 680px;
    animation: fadeUp 0.8s ease both;
}

.eyebrow {
    display: inline-block;
    padding: 8px 15px;
    margin-bottom: 25px;

    color: var(--blue-light);
    background: var(--blue-soft);
    border-right: 3px solid var(--red);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.welcome {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 5px;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 70px);
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 18px;
    letter-spacing: -2px;
}

.hero h1 span {
    background: linear-gradient(
        90deg,
        var(--white),
        var(--blue-light),
        var(--red)
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero h2 {
    color: var(--red-light);
    font-size: clamp(17px, 2vw, 23px);
    margin-bottom: 22px;
    line-height: 1.5;
}

.hero-description {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 2;
    max-width: 650px;
    margin-bottom: 25px;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-highlights span {
    padding: 8px 13px;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: 7px;

    color: var(--text);
    font-size: 12px;
    transition: var(--transition);
}

.hero-highlights span:hover {
    border-color: var(--blue);
    transform: translateY(-3px);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.main-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 49px;
    padding: 12px 25px;

    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;

    transition: var(--transition);
}

.main-btn {
    background: var(--red);
    color: white;
    border: 1px solid var(--red);
}

.main-btn:hover {
    background: var(--red-light);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(214, 40, 57, 0.25);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--blue);
    color: white;
}

.secondary-btn:hover {
    background: var(--blue);
    transform: translateY(-4px);
}

/* ================= HERO VISUAL ================= */

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 480px;
    justify-self: center;
}

.visual-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-stage::before {
    content: "";
    position: absolute;
    width: 75%;
    height: 75%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(23, 105, 170, 0.2),
        transparent 70%
    );
    filter: blur(15px);
}

.visual-ring {
    position: absolute;
    width: 75%;
    height: 75%;
    border: 1px solid rgba(23, 137, 212, 0.4);
    border-radius: 50%;
}

.ring-one {
    transform: rotateX(65deg) rotateZ(-25deg);
    animation: rotateRing 18s linear infinite;
}

.ring-two {
    width: 90%;
    height: 90%;
    border-color: rgba(214, 40, 57, 0.35);
    transform: rotateX(65deg) rotateZ(30deg);
    animation: rotateRing 25s linear infinite reverse;
}

.mechanical-object {
    position: relative;
    width: 190px;
    height: 190px;
    transform: rotate(-30deg);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
    animation: floatObject 5s ease-in-out infinite;
}

.object-back {
    position: absolute;
    inset: 10px;
    border: 12px solid #174a70;
    background: #101e2c;
    transform: translate(25px, 20px);
    border-radius: 20px;
}

.object-main {
    position: absolute;
    inset: 0;
    border: 14px solid var(--blue);
    border-radius: 22px;
    background: linear-gradient(145deg, #26394a, #111820);
    box-shadow:
        inset 0 0 30px rgba(23, 137, 212, 0.2),
        0 0 35px rgba(23, 105, 170, 0.25);
}

.object-inner {
    position: absolute;
    inset: 20px;
    border: 8px solid var(--red);
    border-radius: 50%;
    background: #121219;
}

.object-center {
    position: absolute;
    width: 35px;
    height: 35px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--blue-light);
    border-radius: 50%;
    box-shadow: 0 0 25px var(--blue);
}

.object-side {
    position: absolute;
    right: -32px;
    top: 40px;
    width: 35px;
    height: 110px;
    background: var(--red);
    border-radius: 5px;
    transform: skewY(-25deg);
}

.floating-object {
    position: absolute;
    border-radius: 7px;
    animation: floatObject 4s ease-in-out infinite;
}

.object-small-one {
    width: 32px;
    height: 32px;
    top: 18%;
    right: 13%;
    background: var(--red);
    box-shadow: 0 0 25px rgba(214, 40, 57, 0.5);
}

.object-small-two {
    width: 23px;
    height: 23px;
    bottom: 15%;
    left: 12%;
    background: var(--blue-light);
    box-shadow: 0 0 25px rgba(23, 105, 170, 0.5);
    animation-delay: 1s;
}

.visual-label {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.visual-label-top {
    padding: 0 15px;
}

.visual-label-bottom {
    justify-content: center;
    margin-top: 5px;
    color: var(--blue-light);
}

/* ================= STATS ================= */

.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;

    padding: 30px 9%;
    background: var(--black-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-card {
    padding: 20px;
    text-align: center;
    border-left: 1px solid var(--border);
}

.stat-card:last-child {
    border-left: none;
}

.stat-card strong {
    display: block;
    font-size: 32px;
    font-weight: 900;
    color: var(--blue-light);
    margin-bottom: 5px;
}

.stat-card:nth-child(2) strong,
.stat-card:nth-child(4) strong {
    color: var(--red);
}

.stat-card span {
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= GENERAL SECTIONS ================= */

.section {
    position: relative;
    padding: 100px 9%;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 55px;
    text-align: center;
}

.section-number {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
}

.section-heading h2 {
    color: var(--white);
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 900;
    margin-bottom: 12px;
}

.section-heading > p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.9;
}

/* ================= ABOUT ================= */

.about {
    background: var(--black);
}

.about-container {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 65px;
    align-items: center;
    max-width: 1150px;
    margin: auto;
}

.about-image {
    max-width: 360px;
    width: 100%;
    margin: auto;
}

.profile-frame {
    position: relative;
    padding: 12px;
    background: linear-gradient(135deg, var(--blue), var(--red));
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.profile-frame::before {
    content: "";
    position: absolute;
    inset: 20px -15px -15px 20px;
    border: 2px solid var(--red);
    border-radius: 20px;
    z-index: -1;
}

.profile-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 12px;
    background: var(--black-card);
}

.profile-caption {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

.profile-caption span:first-child {
    color: var(--blue-light);
    font-weight: 700;
}

.about-content h3 {
    font-size: 27px;
    margin-bottom: 20px;
    color: var(--white);
}

.about-content > p {
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 2;
    font-size: 15px;
}

.personal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.personal-details > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: var(--transition);
}

.personal-details > div:hover {
    border-color: var(--blue);
    transform: translateY(-3px);
}

.personal-details span {
    color: var(--red-light);
    font-size: 12px;
}

.personal-details strong {
    color: var(--white);
    font-size: 13px;
    overflow-wrap: anywhere;
}

/* ================= SKILLS ================= */

.skills {
    background: var(--black-light);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}

.skill-card {
    position: relative;
    padding: 30px;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.skill-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--gradient);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: rgba(23, 105, 170, 0.6);
    box-shadow: var(--shadow);
}

.skill-card:hover::before {
    width: 100%;
}

.skill-index {
    position: absolute;
    top: 20px;
    left: 20px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 900;
}

.skill-symbol {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 55px;
    height: 55px;
    margin-bottom: 22px;

    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--blue-light);
    font-size: 23px;
    font-weight: 900;
}

.skill-card:nth-child(even) .skill-symbol {
    background: var(--red-soft);
    color: var(--red-light);
}

.skill-card h3 {
    color: var(--white);
    font-size: 19px;
    margin-bottom: 12px;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
}

/* ================= SERVICES ================= */

.services {
    background: var(--black);
}

.services-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}

.service-card {
    padding: 32px 27px;
    background: linear-gradient(145deg, var(--black-card), #15151c);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-7px);
    border-color: var(--red);
    box-shadow: 0 15px 35px rgba(214, 40, 57, 0.08);
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 22px;
    background: var(--red-soft);
    color: var(--red-light);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 900;
}

.service-card:nth-child(even) .service-icon {
    background: var(--blue-soft);
    color: var(--blue-light);
}

.service-card h3 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
}

/* ================= PROJECTS ================= */

.projects {
    background:
        radial-gradient(
            circle at 90% 20%,
            rgba(23, 105, 170, 0.08),
            transparent 35%
        ),
        var(--black-light);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: auto;
}

.project-card {
    overflow: hidden;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--blue);
    box-shadow: var(--shadow);
}

.project-card.featured-project {
    border-color: rgba(214, 40, 57, 0.5);
}

.project-visual {
    position: relative;
    min-height: 235px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-visual::before,
.project-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.project-visual::before {
    width: 280px;
    height: 280px;
}

.project-visual::after {
    width: 190px;
    height: 190px;
}

.conveyor-visual {
    background:
        radial-gradient(circle at center, rgba(23, 105, 170, 0.45), transparent 65%),
        #101c29;
}

.shock-visual {
    background:
        radial-gradient(circle at center, rgba(214, 40, 57, 0.3), transparent 65%),
        #20151a;
}

.ai-visual {
    background:
        radial-gradient(circle at center, rgba(23, 105, 170, 0.4), transparent 65%),
        #131b25;
}

.automation-visual {
    background:
        radial-gradient(circle at center, rgba(214, 40, 57, 0.25), transparent 65%),
        #20171c;
}

.project-category {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;

    padding: 6px 10px;
    background: rgba(16, 16, 20, 0.8);
    border: 1px solid var(--border);
    border-radius: 5px;

    color: var(--text);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.project-placeholder {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.project-placeholder span {
    font-size: 55px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 900;
}

.project-placeholder strong {
    color: white;
    font-size: 20px;
    letter-spacing: 2px;
    text-align: center;
}

.project-info {
    padding: 27px;
}

.project-tag {
    display: inline-block;
    margin-bottom: 13px;
    color: var(--red-light);
    font-size: 12px;
    font-weight: 700;
}

.project-info h3 {
    color: white;
    font-size: 21px;
    margin-bottom: 12px;
}

.project-info p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
}

.project-result {
    display: inline-block;
    margin-top: 17px;
    padding: 7px 12px;
    border-radius: 6px;
    color: var(--blue-light);
    background: var(--blue-soft);
    font-size: 12px;
    font-weight: 700;
}

/* Future projects empty state */

.projects-empty {
    max-width: 700px;
    margin: 35px auto;
    padding: 45px 25px;
    text-align: center;
    background: var(--black-card);
    border: 1px dashed rgba(23, 105, 170, 0.6);
    border-radius: var(--radius);
}

.empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    margin-bottom: 15px;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red-light);
    font-size: 35px;
}

.projects-empty h3 {
    color: white;
    margin-bottom: 10px;
}

.projects-empty p {
    color: var(--text-muted);
    font-size: 14px;
}

.projects-note {
    text-align: center;
    margin-top: 35px;
    color: var(--blue-light);
    font-size: 13px;
}

/* ================= EDUCATION ================= */

.education {
    background: var(--black);
}

.timeline {
    position: relative;
    max-width: 850px;
    margin: auto;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: 90px;
    width: 2px;
    background: linear-gradient(var(--blue), var(--red));
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 30px;
    margin-bottom: 35px;
}

.timeline-date {
    color: var(--blue-light);
    font-size: 17px;
    font-weight: 900;
    padding-top: 25px;
}

.timeline-content {
    position: relative;
    padding: 25px;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.timeline-content::before {
    content: "";
    position: absolute;
    top: 28px;
    right: -37px;
    width: 13px;
    height: 13px;
    background: var(--red);
    border: 4px solid var(--black);
    border-radius: 50%;
    z-index: 1;
}

.timeline-type {
    color: var(--red-light);
    font-size: 12px;
    font-weight: 700;
}

.timeline-content h3 {
    margin: 8px 0;
    color: white;
    font-size: 19px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 14px;
}

.timeline-content > span:last-child {
    display: inline-block;
    margin-top: 12px;
    color: var(--blue-light);
    font-size: 12px;
}

/* ================= TRAINING ================= */

.training {
    background: var(--black-light);
}

.training-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: auto;
}

.training-card {
    position: relative;
    padding: 35px;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.training-card:hover {
    border-color: var(--blue);
    transform: translateY(-5px);
}

.training-number {
    position: absolute;
    top: 20px;
    left: 25px;
    color: rgba(255, 255, 255, 0.12);
    font-size: 35px;
    font-weight: 900;
}

.training-date {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--red-light);
    font-size: 12px;
    font-weight: 700;
}

.training-card h3 {
    color: white;
    font-size: 22px;
    margin-bottom: 5px;
}

.training-card h4 {
    color: var(--blue-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.training-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 2;
}

/* ================= AI COURSES ================= */

.ai-training {
    background: var(--black);
}

.ai-courses-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1150px;
    margin: auto;
}

.course-card {
    padding: 25px;
    min-height: 175px;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.course-card:hover {
    border-color: var(--red);
    transform: translateY(-5px);
}

.course-card > span {
    color: var(--blue-light);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}

.course-card h3 {
    color: white;
    font-size: 17px;
    margin: 17px 0 8px;
}

.course-card p {
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= LANGUAGES ================= */

.languages {
    background: var(--black-light);
}

.language-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 700px;
    margin: auto;
}

.language-card {
    padding: 30px;
    text-align: center;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.language-card:hover {
    border-color: var(--blue);
    transform: translateY(-5px);
}

.language-card h3 {
    color: white;
    font-size: 22px;
    margin-bottom: 10px;
}

.language-card span {
    color: var(--blue-light);
    font-size: 13px;
}

/* ================= CONTACT ================= */

.contact {
    background:
        radial-gradient(
            circle at center,
            rgba(23, 105, 170, 0.12),
            transparent 65%
        ),
        var(--black);
}

.contact-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 35px;
}

.contact-detail {
    min-width: 260px;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: var(--transition);
}

.contact-detail:hover {
    border-color: var(--blue);
    transform: translateY(-3px);
}

.contact-detail span {
    color: var(--red-light);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
}

.contact-detail strong {
    color: white;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
}

.large-btn {
    min-width: 230px;
    min-height: 65px;
    padding: 12px 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    border-radius: 10px;
    color: white;
    font-weight: 700;
    transition: var(--transition);
}

.large-btn span:first-child {
    font-size: 18px;
}

.large-btn span:last-child {
    font-size: 12px;
}

.whatsapp-btn {
    background: #167d4a;
    border: 1px solid #249b61;
}

.whatsapp-btn:hover {
    background: #1c995b;
    transform: translateY(-5px);
}

.telegram-btn {
    background: #1769AA;
    border: 1px solid #2589d4;
}

.telegram-btn:hover {
    background: #2589d4;
    transform: translateY(-5px);
}

/* ================= FOOTER ================= */

.footer {
    padding: 40px 20px;
    text-align: center;
    background: #0a0a0e;
    border-top: 1px solid var(--border);
}

.footer-logo {
    display: inline-block;
    color: white;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
}

.footer > p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.footer > span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
}

.admin-entry {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 15px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 11px;
    transition: var(--transition);
}

.admin-entry:hover {
    color: white;
    border-color: var(--red);
    background: var(--red-soft);
}

/* ================= ANIMATIONS ================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatObject {
    0%, 100% {
        transform: translateY(0) rotate(-30deg);
    }

    50% {
        transform: translateY(-15px) rotate(-25deg);
    }
}

@keyframes rotateRing {
    from {
        transform: rotateX(65deg) rotateZ(0deg);
    }

    to {
        transform: rotateX(65deg) rotateZ(360deg);
    }
}

/* ================= TABLET ================= */

@media (max-width: 1050px) {

    .navbar {
        padding: 15px 4%;
        gap: 15px;
    }

    .menu {
        gap: 14px;
    }

    .menu a {
        font-size: 12px;
    }

    .hero {
        padding: 80px 6%;
        gap: 25px;
    }

    .section {
        padding: 85px 6%;
    }

    .skills-container,
    .services-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-courses-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    html {
        scroll-padding-top: 145px;
    }

    .navbar {
        position: sticky;
        min-height: auto;
        padding: 13px 5%;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
    }

    .logo {
        font-size: 20px;
    }

    .language-btn {
        padding: 7px 12px;
        font-size: 12px;
    }

    .menu {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: flex-start;
        gap: 18px;
        overflow-x: auto;
        padding: 8px 0 10px;
        scrollbar-width: none;
    }

    .menu::-webkit-scrollbar {
        display: none;
    }

    .menu a {
        flex-shrink: 0;
        font-size: 12px;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 75px 7% 60px;
        text-align: center;
        gap: 45px;
    }

    .hero-text {
        margin: auto;
    }

    .eyebrow {
        font-size: 10px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-highlights,
    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        max-width: 350px;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        padding: 25px 5%;
        gap: 10px;
    }

    .stat-card {
        border-left: none;
        border-bottom: 1px solid var(--border);
        padding: 15px 5px;
    }

    .stat-card strong {
        font-size: 27px;
    }

    .section {
        padding: 75px 6%;
    }

    .section-heading {
        margin-bottom: 38px;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        max-width: 280px;
    }

    .about-content {
        text-align: center;
    }

    .personal-details {
        text-align: right;
    }

    .skills-container,
    .services-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 13px;
    }

    .skill-card,
    .service-card {
        padding: 22px 17px;
    }

    .skill-card h3,
    .service-card h3 {
        font-size: 16px;
    }

    .skill-card p,
    .service-card p {
        font-size: 12px;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .training-container {
        grid-template-columns: 1fr;
    }

    .ai-courses-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline::before {
        right: 58px;
    }

    .timeline-item {
        grid-template-columns: 58px 1fr;
        gap: 15px;
    }

    .timeline-date {
        font-size: 13px;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-content::before {
        right: -22px;
    }

    .contact-details {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-detail {
        min-width: 0;
    }
}

/* ================= SMALL MOBILE ================= */

@media (max-width: 480px) {

    .hero {
        padding: 60px 5% 45px;
    }

    .hero h1 {
        font-size: 39px;
    }

    .hero h2 {
        font-size: 16px;
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons a {
        width: 100%;
    }

    .hero-visual {
        max-width: 290px;
    }

    .mechanical-object {
        transform: scale(0.85) rotate(-30deg);
    }

    .stats-section {
        padding: 20px 4%;
    }

    .stat-card strong {
        font-size: 23px;
    }

    .stat-card span {
        font-size: 11px;
    }

    .section {
        padding: 65px 5%;
    }

    .section-heading h2 {
        font-size: 27px;
    }

    .section-heading > p {
        font-size: 13px;
    }

    .skills-container,
    .services-container {
        grid-template-columns: 1fr;
    }

    .skill-card,
    .service-card {
        padding: 25px;
    }

    .project-visual {
        min-height: 190px;
    }

    .project-info {
        padding: 22px;
    }

    .project-info h3 {
        font-size: 18px;
    }

    .personal-details {
        grid-template-columns: 1fr;
    }

    .ai-courses-container {
        grid-template-columns: 1fr;
    }

    .language-cards {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 48px 1fr;
        gap: 10px;
    }

    .timeline::before {
        right: 48px;
    }

    .timeline-content h3 {
        font-size: 16px;
    }

    .training-card {
        padding: 25px;
    }

    .contact-buttons {
        flex-direction: column;
    }

    .large-btn {
        width: 100%;
        min-width: 0;
    }

    .footer {
        padding: 35px 15px;
    }
}

/* ================= RTL / LTR SUPPORT ================= */

html[dir="rtl"] .eyebrow {
    border-right: 3px solid var(--red);
    border-left: none;
}

html[dir="ltr"] .eyebrow {
    border-left: 3px solid var(--red);
    border-right: none;
}

html[dir="ltr"] .timeline::before {
    right: auto;
    left: 90px;
}

html[dir="ltr"] .timeline-content::before {
    right: auto;
    left: -37px;
}

html[dir="ltr"] .timeline-item {
    direction: ltr;
}

html[dir="ltr"] .timeline-content {
    text-align: left;
}

@media (max-width: 768px) {

    html[dir="ltr"] .timeline::before {
        left: 58px;
    }

    html[dir="ltr"] .timeline-content::before {
        left: -22px;
    }
}

/* ================= REDUCED MOTION ================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   3D MECHANICAL GEAR ASSEMBLY
   Replace the old hero mechanical visual
========================================== */

.hero-visual {
    perspective: 1100px;
}

.visual-stage {
    perspective: 1100px;
    transform-style: preserve-3d;
}

.mechanical-object {
    position: relative;
    width: 210px;
    height: 210px;
    transform-style: preserve-3d;
    transform: rotateX(-22deg) rotateY(-28deg);
    animation: mechanicalFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 30px 25px rgba(0, 0, 0, .5));
}

/* Rear metallic base */

.object-back {
    position: absolute;
    inset: 8px;
    border: 12px solid #34404b;
    border-radius: 24px;
    background:
        radial-gradient(circle at 15% 15%, #9aa6b2 0 4px, transparent 5px),
        radial-gradient(circle at 85% 15%, #9aa6b2 0 4px, transparent 5px),
        radial-gradient(circle at 15% 85%, #9aa6b2 0 4px, transparent 5px),
        radial-gradient(circle at 85% 85%, #9aa6b2 0 4px, transparent 5px),
        linear-gradient(145deg, #263747, #10151b);
    box-shadow:
        12px 15px 0 #101820,
        18px 22px 25px rgba(0,0,0,.6);
    transform: translateZ(-35px) translate(12px, 12px);
}

/* Main mechanical gear */

.object-main {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    border: 5px solid #81909d;
    border-radius: 50%;

    background:
        radial-gradient(circle, transparent 0 35%, #34424e 36% 39%, transparent 40%),
        repeating-conic-gradient(
            from 0deg,
            #8d9aa4 0deg 9deg,
            #273541 9deg 15deg,
            #aab5bd 15deg 20deg,
            #34414c 20deg 30deg
        );

    clip-path: polygon(
        50% 0%, 57% 7%, 65% 2%, 70% 12%,
        80% 10%, 83% 20%, 93% 25%, 90% 35%,
        100% 43%, 93% 51%, 99% 60%, 89% 66%,
        92% 77%, 81% 80%, 77% 91%, 67% 87%,
        59% 99%, 51% 91%, 42% 99%, 35% 89%,
        24% 93%, 20% 82%, 10% 78%, 14% 67%,
        2% 60%, 9% 51%, 0% 42%, 10% 35%,
        7% 24%, 18% 20%, 22% 9%, 34% 13%,
        42% 2%
    );

    transform: translateZ(15px);
    box-shadow:
        inset 0 0 0 8px #34424e,
        inset 0 0 20px #111820,
        0 10px 20px rgba(0,0,0,.5);
}

/* Inner bearing ring */

.object-inner {
    position: absolute;
    inset: 27px;

    border: 12px solid #1769AA;
    border-radius: 50%;

    background:
        radial-gradient(circle, #101820 0 34%, transparent 36%),
        conic-gradient(
            #9aa9b4,
            #34414d,
            #d3dbe0,
            #34414d,
            #9aa9b4
        );

    box-shadow:
        0 0 0 5px #253440,
        inset 0 0 15px rgba(0,0,0,.7),
        0 0 25px rgba(23,105,170,.35);

    transform: translateZ(30px);
}

/* Central shaft */

.object-center {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 58px;
    height: 58px;

    transform: translate(-50%, -50%) translateZ(48px);

    border: 8px solid #c0c9d0;
    border-radius: 50%;

    background:
        radial-gradient(circle at 35% 30%, #ffffff, transparent 25%),
        linear-gradient(135deg, #d6e0e7, #53616d 55%, #202a33);

    box-shadow:
        0 0 0 7px #263642,
        0 8px 15px rgba(0,0,0,.65),
        0 0 25px rgba(23,137,212,.35);
}

/* Side metallic shaft housing */

.object-side {
    position: absolute;
    top: 39%;
    right: -53px;

    width: 70px;
    height: 48px;

    border: 5px solid #7e8b96;
    border-radius: 9px;

    background: linear-gradient(
        180deg,
        #d4dce1,
        #53616c 45%,
        #202b35
    );

    transform: translateZ(5px) rotateY(90deg);

    box-shadow:
        0 8px 12px rgba(0,0,0,.5),
        inset 0 3px 5px rgba(255,255,255,.3);
}

/* Floating metal components */

.floating-object {
    position: absolute;
    transform-style: preserve-3d;
    border-radius: 50%;
}

.object-small-one {
    top: 13%;
    right: 8%;

    width: 38px;
    height: 38px;

    background:
        radial-gradient(circle at 35% 30%, #fff, #d62839 35%, #64131d 75%);

    border: 4px solid #aeb9c2;
    box-shadow:
        0 0 20px rgba(214,40,57,.4),
        8px 10px 15px rgba(0,0,0,.5);

    animation: boltFloat 4s ease-in-out infinite;
}

.object-small-two {
    bottom: 12%;
    left: 8%;

    width: 30px;
    height: 30px;

    background:
        radial-gradient(circle at 35% 30%, #fff, #2589d4 40%, #123957 80%);

    border: 4px solid #aeb9c2;
    box-shadow:
        0 0 20px rgba(23,105,170,.4),
        6px 8px 12px rgba(0,0,0,.5);

    animation: boltFloat 5s ease-in-out infinite reverse;
}

/* Technical rings */

.visual-ring {
    border-style: dashed;
    transform-style: preserve-3d;
}

.ring-one {
    border-color: rgba(37,137,212,.55);
    box-shadow: 0 0 20px rgba(23,105,170,.12);
}

.ring-two {
    border-color: rgba(214,40,57,.45);
}

/* Mechanical movement */

@keyframes mechanicalFloat {
    0%, 100% {
        transform: rotateX(-22deg) rotateY(-28deg) translateY(0);
    }

    50% {
        transform: rotateX(-17deg) rotateY(-18deg) translateY(-12px);
    }
}

@keyframes boltFloat {
    0%, 100% {
        transform: translateY(0) translateZ(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) translateZ(15px) rotate(30deg);
    }
}

/* Mobile adjustment */

@media (max-width: 768px) {
    .mechanical-object {
        width: 180px;
        height: 180px;
    }

    .object-side {
        right: -42px;
        width: 58px;
    }
}

@media (max-width: 480px) {
    .mechanical-object {
        width: 155px;
        height: 155px;
    }

    .object-inner {
        inset: 22px;
        border-width: 9px;
    }

    .object-center {
        width: 45px;
        height: 45px;
    }
}
