/* ============================================================
   ZIGLA ABOUBAKAR — Portfolio CSS
   Version améliorée & responsive
   ============================================================ */

/* ── VARIABLES ── */
:root {
    --orange:       #ff7a00;
    --orange-dark:  #d96500;
    --orange-light: #ff9a3c;
    --black:        #111111;
    --dark:         #1a1a1a;
    --gray-dark:    #333333;
    --gray:         #666666;
    --gray-light:   #f2f2f2;
    --white:        #ffffff;
    --border:       #e5e5e5;

    --font-head:    'Crete Round', serif;
    --font-body:    'Poppins', sans-serif;

    --shadow-sm:    0 2px 8px rgba(0,0,0,0.08);
    --shadow-md:    0 6px 20px rgba(0,0,0,0.1);
    --shadow-lg:    0 12px 40px rgba(0,0,0,0.14);

    --radius-sm:    6px;
    --radius-md:    12px;
    --radius-lg:    20px;
    --radius-full:  9999px;

    --transition:   0.3s ease;

    --header-h:     72px;
}

/* ── RESET ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--gray-dark);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

ul { list-style: none; }

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

/* ── UTILITIES ── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.btn-primary:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,122,0,0.35);
}

.btn-outline {
  background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.btn-outline:hover {
   background: var(--orange-dark);
    border-color: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,122,0,0.35);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ── SECTION HEADERS ── */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--black);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-title span { color: var(--orange); }

.title-line {
    width: 50px;
    height: 4px;
    background: var(--orange);
    border-radius: var(--radius-full);
    margin: 0 auto;
}

.section-desc {
    margin-top: 16px;
    font-size: 1rem;
    color: var(--gray);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ── REVEAL ANIMATIONS ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================================
   HEADER
   ============================================================ */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-h);
    background: var(--black);
    transition: box-shadow var(--transition);
}

#header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    font-family: var(--font-head);
    font-size: 1.4rem;
    color: var(--white);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

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

/* Desktop nav */
.nav-desktop ul {
    display: flex;
    gap: 4px;
}

.nav-desktop .nav-link {
    display: block;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-desktop .nav-link:hover,
.nav-desktop .nav-link.active {
    background: var(--orange);
    color: var(--white);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.hamburger:hover { background: rgba(255,255,255,0.1); }

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: var(--radius-full);
    transition: transform 0.3s, opacity 0.3s;
    display: block;
}

/* Hamburger open animation */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 999;
    padding: 12px 0;
    box-shadow: var(--shadow-lg);
}

.nav-mobile.open { display: block; }

.nav-mobile ul { padding: 0; }

.nav-mobile li {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-link-mobile {
    display: block;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--transition), padding-left var(--transition);
}

.nav-link-mobile:hover {
    color: var(--orange);
    padding-left: 32px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    min-height: 100vh;
    padding: calc(var(--header-h) + 60px) 8% 80px;
    background: linear-gradient(135deg, #0f0f0f 0%, #1c1c1c 60%, #2a1500 100%);
    position: relative;
    overflow: hidden;
}

/* Background grid */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,122,0,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,122,0,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.hero-content {
    max-width: 580px;
    position: relative;
    z-index: 1;
    animation: heroFadeUp 0.8s ease both;
}

.hero-tag {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
    font-weight: 400;
}

.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2.8rem, 6vw, 5rem);
    color: var(--white);
    line-height: 1.05;
    margin-bottom: 8px;
}

.hero-title span { color: var(--orange); }

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: rgba(255,255,255,0.55);
    font-weight: 400;
    margin-bottom: 24px;
    font-family: var(--font-body);
}

.hero-subtitle span { color: var(--orange-light); font-weight: 600; }

.hero-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.75;
    max-width: 480px;
    margin-bottom: 36px;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

/* Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-family: var(--font-head);
    font-size: 1.9rem;
    color: var(--orange);
    line-height: 1;
}

.stat span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

.stat-sep {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.12);
}

/* Hero image */
.hero-image {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    animation: heroFadeLeft 0.9s 0.2s ease both;
}

.hero-img-wrap {
    position: relative;
    width: 320px;
    height: 320px;
}

.hero-img-wrap img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--orange);
    box-shadow: 0 0 0 8px rgba(255,122,0,0.12), var(--shadow-lg);
}

.hero-img-badge {
    position: absolute;
    bottom: 20px;
    right: -10px;
    background: var(--black);
    border: 2px solid var(--orange);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: var(--shadow-md);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
    padding: 100px 0;
    background: var(--gray-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: center;
}

/* Image col */
.about-img-wrap {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
}

.about-img-wrap img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--orange);
}

.about-img-deco {
    position: absolute;
    inset: -12px;
    border: 2px dashed rgba(255,122,0,0.3);
    border-radius: calc(var(--radius-lg) + 4px);
    pointer-events: none;
}

/* Text col */
.about-text-col p {
    font-size: 0.97rem;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 18px;
}

.about-text-col p strong { color: var(--gray-dark); font-weight: 600; }

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 32px;
}

.tag {
    padding: 5px 14px;
    background: rgba(255,122,0,0.1);
    color: var(--orange);
    border: 1px solid rgba(255,122,0,0.25);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects {
    padding: 100px 0;
    background: var(--white);
}

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

.project-card {
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

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

.project-card:hover::before { transform: scaleX(1); }

.project-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.project-name {
    font-family: var(--font-head);
    font-size: 1.2rem;
    color: var(--black);
    margin-bottom: 12px;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 24px;
}

.project-tags span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--orange);
    background: rgba(255,122,0,0.1);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,122,0,0.2);
}

.project-btn {
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 22px;
    font-size: 0.85rem;
}



.project-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px 10px 0 0; /* arrondi en haut si la carte a des coins arrondis */
    margin-bottom: 1rem;
    background-color: #f0f0f0; /* couleur de fond pendant le chargement */
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.4s ease;
}

.project-card:hover .project-preview img {
    transform: scale(1.05); /* léger zoom au survol */
}
/* ============================================================
   SERVICES
   ============================================================ */
.services {
    padding: 100px 0;
    background: var(--white);
}

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

/* 5th card centered on last row */
.services-grid .service-card:last-child:nth-child(3n - 2) {
    grid-column: 2;
}

.service-card {
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--orange);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: rgba(255,122,0,0.1);
    border: 1px solid rgba(255,122,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: background var(--transition);
}

.service-card:hover .service-icon-wrap {
    background: var(--orange);
}

.service-icon { font-size: 1.6rem; }

.service-name {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--black);
    margin-bottom: 12px;
    line-height: 1.3;
}

.service-desc {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.75;
    flex: 1;
    margin-bottom: 20px;
}

.service-desc strong { color: var(--gray-dark); font-weight: 600; }

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.service-tags span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--orange);
    background: rgba(255,122,0,0.1);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,122,0,0.2);
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills {
    padding: 100px 0;
    background: var(--gray-light);
}

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

.skill-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 30px 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.skill-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.skill-card-icon { font-size: 1.5rem; }

.skill-card-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--black);
}

.skill-item {
    margin-bottom: 18px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}

.skill-info span:first-child {
    font-size: 0.88rem;
    color: var(--gray-dark);
    font-weight: 500;
}

.skill-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--orange);
}

.bar {
    width: 100%;
    height: 7px;
    background: var(--gray-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
    border-radius: var(--radius-full);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
    padding: 100px 0;
    background: var(--black);
}

.contact .section-title { color: var(--white); }
.contact .section-desc { color: rgba(255,255,255,0.5); }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 60px;
    align-items: start;
}

/* Info column */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    transition: border-color var(--transition);
}

.contact-info-item:hover {
    border-color: rgba(255,122,0,0.4);
}

.ci-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-info-item strong {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--orange);
    margin-bottom: 4px;
}

.contact-info-item a,
.contact-info-item span {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    word-break: break-all;
}

.contact-info-item a:hover { color: var(--orange); }

/* Socials */
.contact-socials {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
    transform: translateY(-2px);
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-field input,
.form-field textarea {
    padding: 13px 16px;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(255,255,255,0.25);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--orange);
    background: rgba(255,122,0,0.05);
}

.form-field textarea {
    min-height: 140px;
    resize: vertical;
}

.form-feedback {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0;
    transition: var(--transition);
}

.form-feedback.success { color: #22c55e; }
.form-feedback.error   { color: #f87171; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 32px 24px;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-brand {
    font-family: var(--font-head);
    font-size: 1.2rem;
    color: var(--white);
}

.footer-brand span { color: var(--orange); }

.footer-copy,
.footer-rights {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.35);
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    background: var(--orange);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s, background 0.2s;
    pointer-events: none;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top:hover { background: var(--orange-dark); }

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroFadeLeft {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid .service-card:last-child:nth-child(3n - 2) { grid-column: auto; }
    .skills-grid   { grid-template-columns: repeat(2, 1fr); }
    .contact-grid  { grid-template-columns: 1fr; gap: 40px; }
    .about-grid    { grid-template-columns: 1fr; gap: 40px; }
    .about-img-col { order: -1; }
    .about-img-wrap { max-width: 280px; }
    .hero { padding: calc(var(--header-h) + 40px) 6% 60px; gap: 36px; }
    .hero-img-wrap, .hero-img-wrap img { width: 260px; height: 260px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
    /* Nav */
    .nav-desktop { display: none; }
    .hamburger   { display: flex; }

    /* Hero */
    .hero {
        flex-direction: column;
        text-align: center;
        padding: calc(var(--header-h) + 40px) 5% 60px;
        gap: 40px;
    }
    .hero-content { max-width: 100%; }
    .hero-desc { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; gap: 16px; }
    .hero-image { order: -1; }
    .hero-img-wrap, .hero-img-wrap img { width: 200px; height: 200px; }
    .hero-img-badge { right: -4px; bottom: 8px; font-size: 0.72rem; padding: 6px 12px; }

    /* About */
    .about { padding: 70px 0; }
    .about-img-wrap { max-width: 220px; }

    /* Projects */
    .projects { padding: 70px 0; }
    .projects-grid { grid-template-columns: 1fr; }

    /* Services */
    .services { padding: 70px 0; }
    .services-grid { grid-template-columns: 1fr; }
    .services-grid .service-card:last-child:nth-child(3n - 2) { grid-column: auto; }

    /* Skills */
    .skills { padding: 70px 0; }
    .skills-grid { grid-template-columns: 1fr; }

    /* Contact */
    .contact { padding: 70px 0; }
    .form-row { grid-template-columns: 1fr; gap: 0; }

    /* Footer */
    .footer { padding: 24px 16px; }

    /* Scroll top */
    .scroll-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 1rem; }

    /* Sections */
    .section-header { margin-bottom: 40px; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
    .hero-title { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { gap: 12px; }
    .stat strong { font-size: 1.5rem; }
    .stat-sep { height: 28px; }
    .hero-img-wrap, .hero-img-wrap img { width: 170px; height: 170px; }

    .btn { padding: 12px 22px; font-size: 0.88rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; justify-content: center; }

    .about-tags { gap: 6px; }
    .tag { font-size: 0.72rem; }

    .project-card { padding: 24px 20px; }
    .skill-card   { padding: 22px 18px; }

    .contact-info-item { padding: 14px 16px; }
    .contact-info-item a,
    .contact-info-item span { font-size: 0.82rem; }
}
