/* =============================================
   Thmanyah-Style Design System
   ============================================= */

@font-face {
    font-family: 'Lyon Arabic Display';
    src: url('fonts/COMM - Lyon Arabic Display Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* =============================================
   Dark Mode (Default)
   ============================================= */
:root {
    --bg: #000000;
    --bg-alt: rgba(239, 237, 232, 0.02);
    --text: #efede8;
    --text-secondary: #888888;
    --text-muted: #555555;
    --red: #db2b00;
    --red-hover: #c12500;
    --border: rgba(239, 237, 232, 0.12);
    --border-hover: rgba(239, 237, 232, 0.25);
    --card-bg: rgba(239, 237, 232, 0.04);
    --nav-bg: rgba(0, 0, 0, 0.9);
    --img-blur-color: 0, 0, 0;

    --font-body: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
    --font-heading: 'Lyon Arabic Display', 'Georgia', 'Times New Roman', serif;

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --dur: 0.3s;
}

/* =============================================
   Light Mode
   ============================================= */
body.light {
    --bg: #efede8;
    --bg-alt: rgba(0, 0, 0, 0.02);
    --text: #000000;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.2);
    --card-bg: rgba(0, 0, 0, 0.03);
    --nav-bg: rgba(239, 237, 232, 0.9);
    --img-blur-color: 239, 237, 232;
}

/* =============================================
   Reset
   ============================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--dur) var(--ease);
}

a:hover {
    color: var(--red);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: var(--red);
    color: #efede8;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   Navigation
   ============================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: all 0.4s var(--ease);
}

.nav.scrolled {
    background: rgba(var(--img-blur-color), 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.nav__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav__logo {
    display: flex;
    align-items: center;
}

.nav__logo img {
    height: 32px;
    width: auto;
    transition: opacity var(--dur) var(--ease), filter var(--dur) var(--ease);
    filter: invert(1);
}

.nav__logo:hover img {
    opacity: 0.7;
}

body.light .nav__logo img {
    filter: none;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav__menu-footer {
    display: none;
}

.nav__link {
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--dur) var(--ease);
    position: relative;
}

.nav__link:hover,
.nav__link.active {
    color: var(--text);
}

.nav__link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 14px;
    left: 14px;
    height: 1px;
    background: var(--red);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle — Pill Slider */
.theme-toggle {
    width: 68px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: all var(--dur) var(--ease);
    outline: none;
    direction: ltr;
}

.theme-toggle:focus-visible {
    border-color: var(--red);
}

.theme-toggle__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    z-index: 1;
    position: relative;
}

.theme-toggle__icon i {
    font-size: 0.8rem;
    transition: color var(--dur) var(--ease);
}

/* Dark mode (default): thumb on MOON (right), moon = orange, sun = muted */
.theme-toggle__icon--sun i {
    color: var(--text-muted);
}

.theme-toggle__icon--moon i {
    color: var(--red);
}

/* Light mode: thumb on SUN (left), sun = orange, moon = muted */
body.light .theme-toggle__icon--sun i {
    color: var(--red);
}

body.light .theme-toggle__icon--moon i {
    color: var(--text-muted);
}

.theme-toggle__thumb {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 28px;
    height: 28px;
    background: var(--text);
    border-radius: 50%;
    transition: all 0.35s var(--ease);
    z-index: 0;
}

body.light .theme-toggle__thumb {
    right: calc(100% - 31px);
}

body.light .theme-toggle {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    border-color: var(--border-hover);
}

.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 36px;
}

.nav__hamburger span {
    height: 1.5px;
    background: var(--text);
    transition: all var(--dur) var(--ease);
    display: block;
}

.nav__hamburger.active span:first-child {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav__hamburger.active span:last-child {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* =============================================
   Hero
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 64px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    transition: background var(--dur) var(--ease);
}

.hero__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero__tag {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--red);
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    color: var(--text);
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--red);
    min-height: 1.8em;
    margin-bottom: 16px;
}

.hero__subtitle::after {
    content: '|';
    animation: blink 0.7s step-end infinite;
    color: var(--red);
    margin-right: 3px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero__desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    max-width: 520px;
    margin-bottom: 48px;
}

.hero__actions {
    display: flex;
    gap: 16px;
}

/* Hero Image — Large with Blur Edges */
.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image {
    width: 420px;
    height: 520px;
    overflow: hidden;
    position: relative;
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.hero__image-blur {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to top, rgba(var(--img-blur-color), 1) 0%, rgba(var(--img-blur-color), 0) 30%),
        linear-gradient(to right, rgba(var(--img-blur-color), 1) 0%, rgba(var(--img-blur-color), 0) 15%),
        linear-gradient(to left, rgba(var(--img-blur-color), 1) 0%, rgba(var(--img-blur-color), 0) 15%);
    z-index: 1;
    transition: background var(--dur) var(--ease);
}

.hero__social {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 12px;
    align-items: center;
}

.hero__social a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.hero__social a:hover {
    color: var(--red);
    transform: scale(1.15);
}

/* =============================================
   Buttons
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    border: none;
    outline: none;
    border-radius: 100px;
}

.btn--primary {
    background: var(--red);
    color: #efede8;
}

.btn--primary:hover {
    background: var(--red-hover);
    color: #efede8;
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-hover);
}

.btn--ghost:hover {
    border-color: var(--red);
    color: var(--red);
}

.btn--full {
    width: 100%;
}

/* =============================================
   Sections
   ============================================= */
.section {
    padding: 120px 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    transition: background var(--dur) var(--ease);
}

.section--alt {
    background: var(--bg-alt);
}

.section__tag {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 80px;
}

/* =============================================
   About
   ============================================= */
.about {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 80px;
    align-items: start;
}

.about__image {
    width: 340px;
    height: 430px;
    overflow: hidden;
    position: sticky;
    position: -webkit-sticky;
    top: 100px;
    z-index: 0;
}

.about__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.about__image-blur {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to top, rgba(var(--img-blur-color), 1) 0%, rgba(var(--img-blur-color), 0) 25%),
        linear-gradient(to right, rgba(var(--img-blur-color), 1) 0%, rgba(var(--img-blur-color), 0) 12%),
        linear-gradient(to left, rgba(var(--img-blur-color), 1) 0%, rgba(var(--img-blur-color), 0) 12%);
    z-index: 1;
}

.about__text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 24px;
}

.about__text strong {
    font-weight: 700;
    color: rgba(239, 237, 232, 0.78);
}

body.light .about__text strong {
    color: rgba(0, 0, 0, 0.7);
}

.about__stats {
    display: flex;
    gap: 48px;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat__number {
    font-family: 'Inter', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text);
    display: inline;
    line-height: 1;
}

.stat__plus {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--red);
}

.stat__label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* =============================================
   Timeline
   ============================================= */
.timeline {
    max-width: 700px;
}

.timeline__item {
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
}

.timeline__item:first-child {
    padding-top: 0;
}

.timeline__item:last-child {
    border-bottom: none;
}

.timeline__date {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--red);
    letter-spacing: 0.02em;
    display: inline-block;
    margin-bottom: 16px;
}

.timeline__heading {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.3;
}

.timeline__text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

/* =============================================
   Skills
   ============================================= */
.skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.skill-card {
    padding: 48px;
    border: 1px solid var(--border);
    transition: border-color var(--dur) var(--ease);
    border-radius: 16px;
}

.skill-card:hover {
    border-color: var(--border-hover);
}

.skill-card__title {
    font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 24px;
}

.skill-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 8px 18px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--dur) var(--ease);
    cursor: default;
    border-radius: 100px;
}

.tag:hover {
    border-color: var(--red);
    color: var(--text);
}

.tag--featured {
    border-color: var(--red);
    color: var(--red);
    font-weight: 600;
}

.skill-card__cert {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skill-card__cert i {
    color: var(--red);
    font-size: 1rem;
}

/* =============================================
   Projects — Tall Image Cards
   ============================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.project-card {
    display: flex;
    flex-direction: column;
    color: var(--text);
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.project-card:hover {
    color: var(--text);
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.project-card__image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.project-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.project-card:hover .project-card__image img {
    transform: scale(1.03);
}

.project-card__title {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
    padding: 16px 16px 8px;
}

.project-card__cat {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 16px 16px;
}

/* =============================================
   Testimonials
   ============================================= */
.testimonials {
    max-width: 650px;
    position: relative;
    min-height: 260px;
}

.testimonial {
    padding: 48px;
    border: 1px solid var(--border);
    border-radius: 16px;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.5s var(--ease);
    pointer-events: none;
}

.testimonial.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    pointer-events: all;
}

.testimonial__text {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 24px;
}

.testimonial__author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.testimonial__avatar {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.testimonial__author h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}

.testimonial__author p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.testimonials__dots {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.dot {
    width: 10px;
    height: 10px;
    border: 1px solid var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    padding: 0;
    border-radius: 50%;
}

.dot.active {
    background: var(--red);
    border-color: var(--red);
}

.dot:hover {
    border-color: var(--red);
}

/* =============================================
   FAQ
   ============================================= */
.faq {
    max-width: 700px;
}

.faq__item {
    border-bottom: 1px solid var(--border);
}

.faq__item:first-child {
    border-top: 1px solid var(--border);
}

.faq__question {
    width: 100%;
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: color var(--dur) var(--ease);
    text-align: right;
}

.faq__question:hover {
    color: var(--red);
}

.faq__icon {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
    line-height: 1;
}

.faq__item.open .faq__icon {
    transform: rotate(45deg);
    color: var(--red);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
}

.faq__item.open .faq__answer {
    max-height: 200px;
    padding-bottom: 24px;
}

.faq__answer p {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.9;
}

/* =============================================
   Contact
   ============================================= */
.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact__info {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 48px;
}

body.light .contact__info {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.contact__lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 48px;
}

.contact__methods {
    display: flex;
    flex-direction: column;
}

.contact__method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    transition: all var(--dur) var(--ease);
    color: var(--text);
}

.contact__method:first-child {
    border-top: 1px solid var(--border);
}

.contact__method:hover {
    color: var(--text);
    padding-right: 8px;
}

.contact__method i {
    font-size: 1rem;
    color: var(--text-secondary);
    width: 24px;
    text-align: center;
    transition: color var(--dur) var(--ease);
}

.contact__method:hover i {
    color: var(--red);
}

.contact__method span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact__method strong {
    font-weight: 600;
    font-size: 1rem;
}

.contact__form {
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 20px;
}

body.light .contact__form {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.form__group {
    margin-bottom: 16px;
}

.form__group input,
.form__group select,
.form__group textarea {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: border-color var(--dur) var(--ease);
    outline: none;
    border-radius: 0;
}

.form__group input::placeholder,
.form__group textarea::placeholder {
    color: var(--text-muted);
}

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
    border-bottom-color: var(--red);
}

.form__group select {
    appearance: none;
    cursor: pointer;
    color: var(--text-muted);
}

.form__group select:valid {
    color: var(--text);
}

.form__group select option {
    background: var(--bg);
    color: var(--text);
}

.form__group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn--full {
    margin-top: 24px;
}

/* =============================================
   Footer
   ============================================= */
.footer {
    border-top: 1px solid var(--border);
    padding: 80px 0 0;
    background: var(--bg);
    transition: background var(--dur) var(--ease);
}

.footer__top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.footer__logo {
    display: inline-block;
    margin-bottom: 8px;
}

.footer__logo img {
    height: 108px;
    width: auto;
    transition: opacity var(--dur) var(--ease), filter var(--dur) var(--ease);
    filter: invert(1);
}

.footer__logo:hover img {
    opacity: 0.7;
}

body.light .footer__logo img {
    filter: none;
}

.footer__brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer__location {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 4px;
}

.footer__links {
    display: flex;
    gap: 80px;
}

.footer__col h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.footer__col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 4px 0;
}

.footer__col a:hover {
    color: var(--text);
}

.footer__bottom {
    padding: 24px 0;
}

.footer__bottom p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* =============================================
   Scroll Animations
   ============================================= */
.section__tag,
.section__title,
.about,
.about__content,
.skill-card,
.project-card,
.faq__item,
.contact__info,
.contact__form-wrap,
.timeline__item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.section__tag.visible,
.section__title.visible,
.about.visible,
.about__content.visible,
.skill-card.visible,
.project-card.visible,
.faq__item.visible,
.contact__info.visible,
.contact__form-wrap.visible,
.timeline__item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }

    .hero__content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero__desc {
        margin: 0 auto 48px;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__visual {
        order: -1;
    }

    .hero__image {
        width: 320px;
        height: 400px;
    }

    .hero__social {
        display: none;
    }

    .about {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 40px;
        overflow: hidden;
    }

    .about__image {
        position: relative !important;
        top: auto !important;
        width: 260px !important;
        height: 330px !important;
        margin: 0 auto;
        flex-shrink: 0;
    }

    .about__content {
        text-align: center;
        width: 100%;
        position: relative;
        z-index: 2;
    }

    .section__title {
        margin-bottom: 40px;
    }

    .about__stats {
        justify-content: center;
    }

    .skills {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .nav__links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(var(--img-blur-color), 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 24px 32px;
        gap: 0;
        transition: right var(--dur) var(--ease);
        z-index: 999;
    }

    .nav__links.open {
        right: 0;
    }

    .nav__links li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav__links li:first-child {
        border-top: 1px solid var(--border);
    }

    .nav__link {
        display: block;
        font-size: 1.05rem;
        width: 100%;
        padding: 20px 0;
        border-bottom: none;
    }

    .nav__link.active {
        color: var(--red);
    }

    .nav__link.active::after {
        display: none;
    }

    .nav__menu-footer {
        display: block;
        margin-top: auto;
        text-align: right;
        width: 100%;
        padding-top: 24px;
        border: none;
    }

    .nav__menu-footer span {
        display: block;
        font-family: var(--font-body);
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-muted);
        line-height: 1.6;
    }

    .nav__hamburger {
        display: flex;
        order: -1;
        z-index: 1000;
    }

    .hero {
        min-height: auto;
        padding: 100px 0 48px;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__image {
        width: 260px;
        height: 320px;
    }

    .hero__social {
        display: none;
    }

    .about__stats {
        flex-direction: column;
        gap: 24px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials {
        max-width: 100%;
        min-height: 320px;
    }

    .testimonial {
        padding: 28px;
    }

    .faq {
        max-width: 100%;
    }

    .timeline {
        max-width: 100%;
    }

    .contact__info {
        padding: 28px;
        border-radius: 16px;
    }

    .contact__form {
        padding: 28px;
        border-radius: 16px;
    }

    .footer__top {
        flex-direction: column;
        gap: 48px;
        text-align: right;
    }

    .footer__links {
        gap: 48px;
        justify-content: flex-start;
    }

    .footer__bottom {
        text-align: right;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1.1rem;
    }

    .hero__desc {
        font-size: 1rem;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hero__image {
        width: 220px;
        height: 280px;
    }

    .hero__social {
        display: none;
    }

    .about__image {
        width: 200px;
        height: 250px;
    }

    .section__title {
        font-size: 1.8rem;
    }

    .section__tag {
        font-size: 0.8rem;
    }

    .skill-card {
        padding: 24px;
    }

    .skill-card__title {
        font-size: 1.2rem;
    }

    .contact__info {
        padding: 20px;
        border-radius: 14px;
    }

    .contact__form {
        padding: 20px;
        border-radius: 14px;
    }

    .contact__lead {
        font-size: 1rem;
    }

    .project-card__image {
        height: 320px;
    }

    .project-card__title {
        font-size: 1rem;
    }

    .stat__number {
        font-size: 2.5rem;
    }

    .testimonial {
        padding: 20px;
    }

    .testimonial__text {
        font-size: 0.95rem;
    }

    .faq__question span {
        font-size: 0.95rem;
    }

    .footer__links {
        flex-direction: column;
        gap: 32px;
    }
}