/* ===================================================================
   DESIGN TOKENS & RESET
   =================================================================== */
:root {
    --nav: #16c7b7;
    --nav-hover: #0d9f98;
    --nav-text: #ffffff;
    --ink: #f4f8ff;
    --muted: #b7c8d9;
    --accent: #ffb86b;
    --panel: #111b2a;
    --bg-dark: #10151e;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-pill: 50px;
    --transition-fast: 180ms ease;
    --transition-med: 280ms ease;
    --section-px: clamp(16px, 5vw, 120px);
    --section-py: clamp(56px, 8vh, 96px);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html,
body {
    min-height: 100vh;
    overflow-x: clip;
}

main,
section,
.about-card,
.contact-layout,
.skills-grid,
.service-grid,
.contact-form {
    min-width: 0;
}

body,
main,
section,
header,
footer {
    width: 100%;
    max-width: 100%;
}

body {
    color: var(--ink);
    background: var(--bg-dark);
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-break: break-word;
    overflow-wrap: anywhere;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
}

/* ===================================================================
   HEADER — MOBILE FIRST
   =================================================================== */
.head {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background:
        radial-gradient(circle at 78% 48%, rgba(22, 199, 183, 0.18), transparent 28%),
        linear-gradient(120deg, #0c1320 0%, #16263a 58%, #073d63 100%);
    backdrop-filter: blur(12px);
}

.header-content {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 60px;
    padding: 0 var(--section-px);
}

.logo {
    display: inline-flex;
    align-items: center;
    z-index: 1001;
}

.logo-text {
    color: var(--nav-text);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* --- Hamburger button (mobile-first: visible) --- */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--nav-text);
    border-radius: 4px;
    transition: transform 280ms ease, opacity 200ms ease;
    transform-origin: center;
}

/* Hamburger → X animation */
.hamburger.is-active .hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.hamburger.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* --- Mobile nav overlay --- */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(80vw, 320px);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 80px 24px 32px;
    background: linear-gradient(180deg, #0c1320 0%, #16263a 100%);
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
}

.navbar.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.nav-link {
    display: block;
    width: 100%;
    padding: 14px 16px;
    color: var(--nav-text);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(22, 199, 183, 0.12);
    color: var(--nav);
}

.nav-link.is-active {
    color: var(--nav);
    background: rgba(22, 199, 183, 0.08);
}

/* Mobile overlay backdrop */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms ease;
}

.nav-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ===================================================================
   HERO — MOBILE FIRST
   =================================================================== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 5vw, 48px);
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
    padding: clamp(40px, 6vh, 72px) var(--section-px);
    text-align: center;
    background:
        radial-gradient(circle at 78% 48%, rgba(22, 199, 183, 0.18), transparent 28%),
        linear-gradient(120deg, #0c1320 0%, #16263a 58%, #073d63 100%);
}

.hero-image-wrap {
    display: grid;
    place-items: center;
    width: clamp(180px, 45vw, 310px);
    aspect-ratio: 1;
    border: 4px solid #58bfff;
    border-radius: 50%;
    box-shadow:
        0 0 12px #58bfff,
        0 0 30px rgba(0, 132, 255, 0.7),
        0 0 60px rgba(0, 132, 255, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.82) contrast(1.12) saturate(0.8);
}

.hero-content {
    width: 100%;
    max-width: 590px;
    min-width: 0;
}

.hero-kicker {
    color: var(--ink);
    font-size: clamp(1rem, 3vw, 1.6rem);
    font-weight: 700;
    line-height: 1.3;
}

.hero h1 {
    margin-top: 4px;
    color: var(--ink);
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.hero h2 {
    margin-top: 8px;
    color: var(--ink);
    font-size: clamp(1.1rem, 3.5vw, 2rem);
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.typing-role {
    display: inline-block;
    max-width: 100%;
    width: 0;
    overflow: hidden;
    color: var(--nav);
    white-space: nowrap;
    vertical-align: bottom;
    border-right: 3px solid var(--nav);
    animation:
        typing 4s steps(18, end) infinite,
        blink 700ms step-end infinite;
}

@keyframes typing {
    0%, 15% { width: 0; }
    60%, 85% { width: 18ch; }
    100% { width: 0; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.hero-description {
    max-width: 560px;
    margin: 16px auto 0;
    color: #b7c5d8;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    line-height: 1.65;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    padding: 3px;
    border: 2px solid var(--nav);
    border-radius: 50%;
    overflow: hidden;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.social-links a:hover,
.social-links a:focus-visible {
    background: var(--nav);
    transform: translateY(-2px);
    outline: none;
}

.social-links a img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.cv-button {
    display: inline-block;
    margin-top: 20px;
    padding: clamp(10px, 1.5vw, 14px) clamp(20px, 3vw, 32px);
    border-radius: var(--radius-pill);
    color: #ffffff;
    background: linear-gradient(135deg, var(--nav), #087fba);
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.cv-button:hover,
.cv-button:focus-visible {
    background: var(--nav-hover);
    transform: translateY(-2px);
    outline: none;
}

/* ===================================================================
   ABOUT — MOBILE FIRST
   =================================================================== */
.about {
    display: block;
    padding: var(--section-py) var(--section-px);
    color: var(--ink);
   background:
        radial-gradient(circle at 78% 48%, rgba(22, 199, 183, 0.18), transparent 28%),
        linear-gradient(120deg, #0c1320 0%, #16263a 58%, #073d63 100%);
}

.about-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(32px, 7vw, 96px);
    padding: clamp(28px, 5vw, 64px);
    border: 1px solid rgba(142, 92, 255, 0.72);
     background:
        radial-gradient(circle at 78% 48%, rgba(22, 199, 183, 0.18), transparent 28%),
        linear-gradient(120deg, #0c1320 0%, #16263a 58%, #073d63 100%);
    box-shadow: 0 0 0 1px rgba(111, 66, 220, 0.18), 0 0 24px rgba(124, 92, 255, 0.26), inset 0 0 42px rgba(124, 92, 255, 0.05);
    border-radius: 18px;
    overflow: hidden;
    animation: about-card-in 800ms ease both;
}

.about-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.07) 48%, transparent 72%);
    transform: translateX(-100%);
    animation: about-sheen 7s ease-in-out 1.2s infinite;
}

.about-content {
    width: 100%;
    max-width: 680px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.about h2 {
    color: var(--ink);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
}

.about h2 span,
.about h3 span {
    color: #9b7bff;
}

.about h3 {
    margin-top: 8px;
    color: var(--ink);
    font-size: clamp(1.1rem, 3vw, 2rem);
    font-weight: 600;
}

.about-description {
    max-width: 600px;
    margin: 18px 0 0;
    color: #b0b7c9;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    line-height: 1.65;
}

.about-button {
    display: inline-block;
    width: fit-content;
    min-height: 44px;
    margin-top: 16px;
    padding: 10px 18px;
    border: 1px solid rgba(155, 123, 255, 0.75);
    border-radius: 10px;
    color: #ffffff;
    background: rgba(124, 92, 255, 0.16);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.4;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: clamp(28px, 4vw, 48px);
}

.about-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.about-stat strong {
    color: #f5f3ff;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1;
    white-space: nowrap;
}

.about-stat strong span {
    color: #9b7bff;
}

.about-stat > span,
.about-note {
    color: #8f98ad;
    font-size: clamp(0.72rem, 1.2vw, 0.86rem);
}

.about-note {
    margin-top: 22px;
}

.about-button:hover,
.about-button:focus-visible {
    background: #7c5cff;
    border-color: #a891ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 92, 255, 0.3);
    outline: 3px solid rgba(168, 145, 255, 0.35);
    outline-offset: 3px;
}

.about-image-wrap {
    position: relative;
    justify-self: center;
    width: min(100%, 320px);
    min-height: clamp(300px, 32vw, 350px);
    flex-shrink: 0;
    z-index: 1;
}

.hanging-photo {
    position: absolute;
    top: 78px;
    left: 50%;
    width: min(88%, 270px);
    aspect-ratio: 0.78;
    padding: 9px;
    border: 1px solid rgba(164, 139, 255, 0.72);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(124, 92, 255, 0.3), rgba(18, 18, 34, 0.92));
    box-shadow: 0 0 22px rgba(124, 92, 255, 0.32), 12px 15px 0 rgba(124, 92, 255, 0.08);
    overflow: hidden;
    transform: translateX(-50%) rotate(5deg);
    transform-origin: 50% -78px;
}

.hanging-photo img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    object-position: center 20%;
    filter: saturate(0.8) contrast(1.08) brightness(0.86);
}

@keyframes about-card-in {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes about-sheen {
    0%, 58%, 100% { transform: translateX(-100%); }
    72% { transform: translateX(100%); }
}

/* ===================================================================
   SKILLS & TECHNOLOGIES — MOBILE FIRST
   =================================================================== */
.skills {
    padding: var(--section-py) var(--section-px);
    background:
        radial-gradient(circle at 50% 12%, rgba(56, 189, 248, 0.08), transparent 45%),
        linear-gradient(135deg, #090e17 0%, #10192a 50%, #0b1220 100%);
    position: relative;
    overflow: hidden;
}

.skills-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.skills-badge {
    display: inline-block;
    padding: 6px 18px;
    font-size: clamp(0.72rem, 1.1vw, 0.8rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-pill);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.16);
    margin-bottom: 14px;
}

.skills-title {
    color: #ffffff;
    font-size: clamp(2rem, 5.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.skills-title span {
    color: #38bdf8;
    background: linear-gradient(135deg, #38bdf8 0%, #60a5fa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skills-subtitle {
    margin-top: 12px;
    color: #94a3b8;
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    line-height: 1.6;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.skills-divider {
    width: 52px;
    height: 3.5px;
    background: #38bdf8;
    border-radius: 9999px;
    margin: 18px auto 0;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 1120px;
    margin: clamp(28px, 4.5vw, 48px) auto 0;
    width: 100%;
}

.skills-card {
    padding: 0 8px;
    background: transparent;
    border: 0;
    transition: transform 260ms ease;
    min-width: 0;
}

.skills-card:hover {
    transform: translateY(-5px);
}

.skills-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.skills-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.28);
    display: grid;
    place-items: center;
    color: #38bdf8;
    flex-shrink: 0;
}

.skill-icon-svg {
    display: block;
    color: #38bdf8;
}

.skills-card-header h3 {
    color: #ffffff;
    font-size: clamp(1.1rem, 1.8vw, 1.32rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skill-item {
    width: 100%;
}

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

.skill-name {
    color: #e2e8f0;
    font-size: clamp(0.88rem, 1.2vw, 0.96rem);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.skill-percentage {
    color: #94a3b8;
    font-size: clamp(0.84rem, 1.1vw, 0.92rem);
    font-weight: 600;
}

.skill-bar-track {
    width: 100%;
    height: 7px;
    background: #192336;
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.fill-html,
.fill-css,
.fill-js,
.fill-react,
.fill-tailwind,
.fill-git {
    background: linear-gradient(90deg, #7c5cff, #8b79ff);
    box-shadow: 0 0 10px rgba(124, 92, 255, 0.45);
}

.fill-react,
.fill-tailwind,
.fill-git {
    background: linear-gradient(90deg, #704dff, #927dff);
}

.skill-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 9999px;
    transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Specific Skill Colors matching reference */
.fill-html {
    background: linear-gradient(90deg, #ea580c, #f97316);
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
}

.fill-css {
    background: linear-gradient(90deg, #0284c7, #06b6d4);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.fill-js {
    background: linear-gradient(90deg, #d97706, #f59e0b);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.fill-node {
    background: linear-gradient(90deg, #16a34a, #22c55e);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.fill-express {
    background: linear-gradient(90deg, #94a3b8, #e2e8f0);
    box-shadow: 0 0 10px rgba(226, 232, 240, 0.35);
}

.fill-apis {
    background: linear-gradient(90deg, #6366f1, #a855f7);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

/* ===================================================================
   SERVICES — MOBILE FIRST
   =================================================================== */
.services {
    padding: var(--section-py) var(--section-px);
    color: #102125;
    background: #f4ffff;
}

.section-heading {
    text-align: center;
}

.section-kicker {
    color: var(--nav);
    font-size: clamp(0.7rem, 1.2vw, 0.82rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin-top: 6px;
    color: #101820;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
}

.section-heading h2 span {
    color: var(--nav);
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1160px;
    margin: clamp(24px, 4vw, 42px) auto 0;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(24px, 3vw, 32px) clamp(16px, 2.5vw, 24px);
    border: 1px solid rgba(22, 157, 148, 0.28);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 78% 48%, rgba(22, 199, 183, 0.18), transparent 28%),
        linear-gradient(120deg, #0c1320 0%, #16263a 58%, #073d63 100%);
    box-shadow: 0 10px 24px rgba(9, 109, 101, 0.08), inset 0 1px rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    text-align: center;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
    min-width: 0;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(22, 157, 148, 0.58);
    box-shadow: 0 18px 34px rgba(9, 109, 101, 0.16), inset 0 1px rgba(255, 255, 255, 0.9);
}

.service-icon {
    display: grid;
    place-items: center;
    min-height: 48px;
    color: #d3d9d8;
    font-size: clamp(2rem, 4vw, 2.55rem);
    font-weight: 700;
    line-height: 1;
    transition: transform 220ms ease;
}

.service-card:hover .service-icon {
    transform: translateY(-3px) scale(1.06);
}

.service-card h3 {
    margin-top: 12px;
    color: #dfe2e5;
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    font-weight: 700;
    line-height: 1.3;
}

.service-card p {
    max-width: 320px;
    margin-top: 8px;
    color: #e1e5e6;
    font-size: clamp(0.82rem, 1.2vw, 0.9rem);
    line-height: 1.5;
}

.service-button {
    margin-top: auto;
    padding: clamp(8px, 1vw, 10px) clamp(18px, 2vw, 24px);
    border-radius: var(--radius-pill);
    color: #ffffff;
    background: #118f83;
    font-size: clamp(0.78rem, 1vw, 0.85rem);
    font-weight: 700;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.service-button:hover,
.service-button:focus-visible {
    background: #08766d;
    transform: translateY(-2px);
    outline: none;
}

/* ===================================================================
   TESTIMONIALS — MOBILE FIRST
   =================================================================== */
.testimonials {
    position: relative;
    padding: var(--section-py) var(--section-px);
    overflow: hidden;
    color: #eaf5f5;
    background:
        radial-gradient(circle at 12% 14%, rgba(22, 199, 183, 0.17), transparent 25%),
        linear-gradient(135deg, #0c1320 0%, #16263a 58%, #073d63 100%);
}

.testimonials-heading h2 {
    color: var(--ink);
}

.section-subtitle {
    max-width: 520px;
    margin: 12px auto 0;
    color: var(--muted);
    font-size: clamp(0.85rem, 1.3vw, 0.98rem);
    line-height: 1.6;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1160px;
    margin: clamp(24px, 4vw, 44px) auto 0;
}

.testimonial-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(22px, 3vw, 30px) clamp(18px, 2.5vw, 26px);
    border: 1px solid rgba(88, 191, 255, 0.18);
    border-radius: var(--radius-md);
    background: rgba(18, 31, 47, 0.88);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms ease, border-color 220ms ease, box-shadow 220ms ease;
    min-width: 0;
}

.testimonial-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:nth-child(2) { transition-delay: 80ms; }
.testimonial-card:nth-child(3) { transition-delay: 160ms; }
.testimonial-card:nth-child(4) { transition-delay: 240ms; }

.testimonial-card:hover {
    border-color: rgba(22, 199, 183, 0.72);
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.28), 0 0 24px rgba(22, 199, 183, 0.1);
    transform: translateY(-6px);
}

.quote-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    color: rgba(22, 199, 183, 0.7);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.testimonial-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-person img {
    width: clamp(44px, 6vw, 56px);
    height: clamp(44px, 6vw, 56px);
    border: 2px solid var(--nav);
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.testimonial-person h3 {
    color: var(--ink);
    font-size: clamp(0.95rem, 1.3vw, 1.06rem);
    font-weight: 700;
}

.testimonial-person p {
    margin-top: 2px;
    color: #8fb4c7;
    font-size: clamp(0.72rem, 1vw, 0.8rem);
}

.rating {
    margin-top: 16px;
    color: var(--accent);
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    letter-spacing: 0.16em;
}

.testimonial-card blockquote {
    margin-top: 12px;
    color: #c8d7df;
    font-size: clamp(0.82rem, 1.2vw, 0.9rem);
    line-height: 1.6;
}

/* ===================================================================
   CONTACT — MOBILE FIRST
   =================================================================== */
.contact-section {
    position: relative;
    padding: var(--section-py) var(--section-px);
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 18%, rgba(124, 92, 255, 0.16), transparent 30%),
        linear-gradient(135deg, #050811 0%, #0b1020 52%, #090c18 100%);
}

.contact-header {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.contact-kicker {
    color: #9b7bff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.contact-section h2 {
    margin-top: 8px;
    color: #ffffff;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
}

.contact-section h2 span {
    color: #9b7bff;
}

.contact-header > p:last-child {
    margin-top: 14px;
    color: #a5aec2;
    font-size: clamp(0.92rem, 1.4vw, 1.08rem);
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: clamp(40px, 9vw, 140px);
    width: min(100%, 1080px);
    margin: clamp(48px, 7vw, 80px) auto 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding-top: 6px;
}

.contact-detail h3,
.contact-form-wrap > h3 {
    color: #a992ff;
    font-size: clamp(0.96rem, 1.5vw, 1.1rem);
    font-weight: 700;
}

.contact-detail a {
    display: inline-block;
    margin-top: 9px;
    color: #dce1ed;
    font-size: 0.86rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.contact-detail a:hover,
.contact-detail a:focus-visible,
.contact-socials a:hover,
.contact-socials a:focus-visible {
    color: #b5a3ff;
    transform: translateX(3px);
    outline: none;
}

.contact-socials {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 9px;
}

.contact-socials a {
    margin: 0;
    color: #dce1ed;
    font-size: 0.86rem;
}

.contact-socials a span {
    margin-left: 5px;
    color: #ffffff;
}

.contact-form-wrap {
    min-width: 0;
}

.contact-form-wrap > h3 {
    margin-bottom: 18px;
}

.contact-form {
    width: 100%;
    max-width: none;
    margin: 0;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.field {
    display: block;
    min-width: 0;
}

.field input,
.field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
    color: #ffffff;
    font-family: inherit;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    line-height: 1.4;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.field input {
    height: clamp(46px, 5vw, 52px);
    padding: 0 14px;
}

.field textarea {
    min-height: clamp(140px, 20vw, 212px);
    resize: vertical;
    padding: 14px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgba(255, 255, 255, 0.65);
    opacity: 1;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(155, 123, 255, 0.14);
    border-color: #9b7bff;
}

.send-button {
    display: inline-block;
    width: auto;
    margin-top: 20px;
    padding: clamp(12px, 1.5vw, 16px) 24px;
    border: none;
    border-radius: 7px;
    background: linear-gradient(135deg, #7c5cff, #6242cf);
    color: #fff;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    font-weight: 700;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
    min-height: 48px;
}

.send-button:hover,
.send-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(124, 92, 255, 0.3);
    filter: brightness(1.04);
    outline: none;
}

.send-button.is-sent {
    background: linear-gradient(135deg, #9b7bff, #7c5cff);
}

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
    padding: clamp(20px, 3vw, 32px) var(--section-px);
    text-align: center;
    color: var(--muted);
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    background: #0a0f16;
    border-top: 1px solid rgba(88, 191, 255, 0.1);
}

/* ===================================================================
   REVEAL ANIMATIONS
   =================================================================== */
.service-card,
.about-content,
.about-image-wrap,
.contact-form,
.skills-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease var(--reveal-delay, 0ms),
                transform 600ms ease var(--reveal-delay, 0ms);
}

.service-card.is-visible,
.about-content.is-visible,
.about-image-wrap.is-visible,
.contact-form.is-visible,
.skills-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================================
   BREAKPOINTS — PROGRESSIVE ENHANCEMENT
   =================================================================== */

/* ---- 480px+ : Wider phones ---- */
@media (min-width: 480px) {
    .field-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .send-button {
        width: auto;
        margin-left: 0;
        margin-right: 0;
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* ---- Up to 479px : Compact phone layout ---- */
@media (max-width: 479px) {
    :root {
        --section-px: 16px;
        --section-py: 48px;
    }

    .header-content {
        min-height: 56px;
    }

    .hero {
        min-height: calc(100svh - 56px);
        padding-top: 36px;
        padding-bottom: 48px;
    }

    .hero h2 {
        font-size: 1.05rem;
    }

    .about-card {
        padding: 28px 20px;
    }

    .about-stats {
        gap: 12px;
    }

    .about-stat strong {
        font-size: clamp(1.45rem, 7vw, 1.8rem);
    }

    .about-stat strong span {
        font-size: 0.68em;
    }

    .about-stat:nth-child(3) strong {
        font-size: 1.15rem;
    }

    .about-stat:nth-child(3) strong span {
        font-size: 0.62em;
    }

    .typing-role {
        max-width: 100%;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .send-button {
        width: 100%;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .contact-layout {
        padding-inline: clamp(0px, 3vw, 24px);
    }

    .about-card {
        padding: clamp(24px, 6vw, 48px);
    }
}

/* ---- 600px+ : Large phones / Small tablets ---- */
@media (min-width: 600px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .testimonial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

/* ---- 768px+ : Tablets ---- */
@media (max-width: 767px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 42px;
        margin-top: 40px;
    }

    .contact-details {
        gap: 28px;
    }

    .about-card {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .about-image-wrap {
        width: min(78vw, 300px);
        justify-self: center;
    }
}

@media (min-width: 768px) {
    .hero {
        flex-direction: row;
        gap: clamp(56px, 9vw, 140px);
        text-align: left;
    }

    .hero-image-wrap {
        width: clamp(220px, 25vw, 310px);
    }

    .hero-content {
        flex: 1 1 0;
    }

    .hero-description {
        margin-left: 0;
        margin-right: 0;
    }

    .social-links {
        justify-content: flex-start;
    }

    .about-image-wrap {
        width: clamp(220px, 25vw, 310px);
    }

    .about-description {
        margin-left: 0;
        margin-right: 0;
    }

    .contact-form {
        max-width: min(100%, 680px);
    }

    .skills-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(20px, 4vw, 52px);
    }
}

/* ---- 1024px+ : Desktop — HIDE HAMBURGER, SHOW FULL NAV ---- */
@media (min-width: 1024px) {
    .hamburger {
        display: none;
    }

    .navbar {
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 4px;
        padding: 0;
        background: transparent;
        transform: none;
        box-shadow: none;
        overflow: visible;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-link {
        width: auto;
        padding: 10px 14px;
        font-size: clamp(0.78rem, 0.9vw, 0.88rem);
        border-radius: 8px;
        position: relative;
    }

    .nav-link::after {
        content: "";
        position: absolute;
        right: 14px;
        bottom: 4px;
        left: 14px;
        height: 2px;
        background: var(--accent);
        transform: scaleX(0);
        transform-origin: center;
        transition: transform 180ms ease;
    }

    .nav-link:hover::after,
    .nav-link:focus-visible::after {
        transform: scaleX(1);
    }

    .nav-link:hover,
    .nav-link:focus-visible {
        background: transparent;
    }

    .nav-overlay {
        display: none !important;
    }

    .hero-image-wrap {
        width: clamp(250px, 22vw, 310px);
    }

    .about-image-wrap {
        width: clamp(250px, 22vw, 310px);
    }

    .service-card:last-child {
        grid-column: 1 / -1;
    }

    .testimonial-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero,
    .about,
    .skills {
        max-width: 1440px;
        margin-inline: auto;
    }
}

/* ---- 1440px+ : Large desktop ---- */
@media (min-width: 1440px) {
    :root {
        --section-px: clamp(80px, 8vw, 200px);
    }

    .service-grid,
    .testimonial-grid {
        max-width: 1280px;
    }

    .contact-form {
        max-width: min(100%, 600px);
    }
}

/* ===================================================================
   REDUCED MOTION
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
    .about-card,
    .about-card::before,
    .about-image-wrap,
    .hanging-photo {
        animation: none !important;
    }

    .typing-role {
        width: auto;
        border-right: 0;
        animation: none;
    }

    .testimonial-card,
    .service-card,
    .about-content,
    .about-image-wrap,
    .contact-form,
    .skills-card {
        opacity: 1;
        transform: none;
        transition: border-color 220ms ease, box-shadow 220ms ease;
    }

    .skill-bar-fill {
        transition: none !important;
        width: var(--target-pct, 100%) !important;
    }
}