/* =========================
   RESET & BASE STYLES
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
    text-decoration: none;
    background: none;
    -webkit-font-smoothing: antialiased;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
}

/* =========================
   FIXED NAV OFFSET, DO NOT TOUCH HEADER
========================= */
:root {
    /* default, JS will update to the real header height */
    --header-h: 72px;
}

/* Reserve space for the fixed header using the measured height */
body {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)) !important;
}

/* Smooth in-page anchor jumps, header height plus a little buffer */
[id] {
    scroll-margin-top: calc(var(--header-h) + 12px);
}

/* =========================
   HERO SECTION
========================= */
.hero {
    margin-top: 0 !important; /* prevent double offset */
    padding: 24px clamp(12px, 4vw, 32px) clamp(28px, 5vh, 48px);
}

/* tablet */
@media (max-width: 1024px) {
    .hero { padding: 16px 16px 28px; }
}

/* phone */
@media (max-width: 600px) {
    .hero { padding: 10px 16px 24px; }
}

.hero-inner {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: clamp(30px, 5vw, 60px);
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
}

.hero2 {
    flex: 1;
    max-width: 700px;
    position: relative;
}
.bg {
    background: #ffffff;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}
.img {
    width: 100%;
    height: auto;
    position: relative;
    display: block;
}

.content {
    flex: 1;
    max-width: 700px;
    position: relative;
}
.content2 {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3vw, 36px);
    align-items: flex-start;
}

/* =========================
   TEXT
========================= */
.text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(8px, 1.6vw, 14px);
}

.hi-i-m-samaneh-vajdi {
    font-size: clamp(48px, 7vw, 102px);
    line-height: clamp(52px, 6.8vw, 90px);
    text-transform: uppercase;
}

.hi-i-m-samaneh-vajdi-span {
    color: #000;
    font-weight: 400;
}

.hi-i-m-samaneh-vajdi-span2 {
    background: #000000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 400;
}

.hi-i-m-samaneh-vajdi-span3 {
    color: #398fba;
    font-weight: 700;
}

.ui-ux-designer-web-developer-based-in-vancouver {
    font-size: clamp(18px, 3.2vw, 32px);
    line-height: 1.3;
    letter-spacing: -0.03em;
    color: #000;
    font-weight: 400;
}

.ui-ux-designer-web-developer-based-in-vancouver-span4 {
    background: linear-gradient(-89.84deg, #ff6c63 52%, #398fba 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* optional long description line */
.description {
    font-size: clamp(16px, 2.2vw, 22px);
    line-height: 1.6;
    color: #000;
    font-weight: 400;
}

/* =========================
   HERO BUTTONS
========================= */
.contact-btn {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.button2,
.button4 {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    padding: 14px 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 600;
    z-index: 0;
}
.button2 {
    background: #398fba;
    color: #fff;
    border: 3px solid #398fba;
}
.button4 {
    background: #fff;
    border: 3px solid #398fba;
    color: #398fba;
}

.button2::before,
.button4::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: scaleX(0);
    transition: transform 0.25s ease;
    z-index: 0;
}
.button2::before { background-color: #fff; }
.button4::before { background-color: #ff6c63; }

.let-s-talk-with-me,
.resume {
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}

@media (hover: hover) {
    .button2:hover::before,
    .button4:hover::before {
        transform: scaleX(1);
    }
    .button2:hover {
        color: #398fba;
    }
    .button4:hover {
        color: #fff;
        background-color: #ff6c63;
        border-color: #ff6c63;
    }
    .button2:hover .let-s-talk-with-me {
        transform: translateX(4px);
    }
    .button4:hover .resume {
        transform: translateX(-4px);
    }
}

/* ============================================================
   CONNECT SECTION
============================================================ */
@keyframes connectStripes {
    to {
        background-position: 180% 180%;
    }
}
@keyframes floaty {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}
@keyframes bgGlowDrift {
    0% {
        transform: translate3d(0, 0, 0) rotate(0);
    }
    100% {
        transform: translate3d(2%, -2%, 0) rotate(6deg);
    }
}
@keyframes cardShine {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(120%);
    }
}

.connect {
    --pink-1: #ffd2cf;
    --pink-2: #ffa6a1;
    --ink-blue: #165c7d;
    --btn-blue: #398fba;
    background: linear-gradient(
        270deg,
        rgba(57, 143, 186, 0.1) 20.37%,
        rgba(255, 108, 99, 0.1) 57.73%
    );
    color: var(--ink-blue);
    padding: clamp(48px, 8vw, 92px) clamp(20px, 5vw, 50px);
    position: relative;
    overflow: hidden;
}
.connect::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.03) 0 18px,
        rgba(255, 255, 255, 0) 18px 48px
    );
    opacity: 0.1;
    background-size: 200% 200%;
    animation: connectStripes 22s linear infinite;
    pointer-events: none;
    z-index: 0;
}
.connect::before {
    content: "";
    position: absolute;
    inset: -10%;
    background: radial-gradient(
            40% 35% at 18% 22%,
            rgba(255, 255, 255, 0.25),
            rgba(255, 255, 255, 0) 60%
        ),
        radial-gradient(
            36% 32% at 90% 80%,
            rgba(255, 255, 255, 0.18),
            rgba(255, 255, 255, 0) 60%
        );
    mix-blend-mode: soft-light;
    filter: blur(2px);
    z-index: 0;
    pointer-events: none;
    animation: bgGlowDrift 40s ease-in-out infinite alternate;
}
.connect-rail {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: clamp(24px, 5vw, 64px);
    position: relative;
    z-index: 1;
}
.connect .content-text {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2.2vw, 24px);
    width: 100%;
    max-width: 680px;
    font-size: clamp(16px, 1.45vw, 18px);
    line-height: 1.7;
    font-weight: 400;
    color: var(--ink-blue);
}
.connect .content-text strong {
    font-weight: 700;
}

.contact-button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border-radius: 10px;
    background: var(--btn-blue);
    color: #fff;
    font-size: clamp(16px, 1.6vw, 18px);
    font-weight: 600;
    padding: 14px 28px;
    width: fit-content;
    border: 3px solid var(--btn-blue);
    cursor: pointer;
    transition: color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.contact-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
    z-index: 0;
}
.contact-button * {
    position: relative;
    z-index: 1;
}
@media (hover: hover) {
    .contact-button:hover::before {
        transform: scaleX(1);
    }
    .contact-button:hover {
        color: var(--btn-blue);
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    }
}
.connect-art {
    position: relative;
    z-index: 1;
    padding: clamp(18px, 2.8vw, 28px);
    border-radius: 10px;
    background: linear-gradient(180deg, #86969e 0%, #398fba 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.connect-art img {
    width: min(520px, 100%);
    height: auto;
    border-radius: 10px;
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.18));
    animation: floaty 6s ease-in-out infinite;
}
@media (hover: hover) {
    .connect-art:hover img {
        transform: perspective(900px) rotateX(3deg) rotateY(-5deg)
            translateY(-4px) scale(1.02);
        filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.22));
    }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
    .hero-inner {
        gap: clamp(24px, 4vw, 40px);
    }
}
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column;
        gap: 30px;
        max-width: 760px;
    }
    .hero2,
    .content {
        max-width: 100%;
    }
    .connect-rail {
        grid-template-columns: 1fr;
    }
}

/* Buttons full width on phones */
@media (max-width: 600px) {
    .contact-btn {
        justify-content: center;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch;
        justify-items: stretch;
    }
    .contact-btn .button2,
    .contact-btn .button4 {
        width: 100%;
        min-width: 0;
        padding: 14px 20px;
        border-radius: 12px;
        flex: 1 1 auto;
    }
    .contact-button {
        display: block;
        width: 100%;
        text-align: center;
        border-radius: 12px;
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* =========================
   Hero Image Unique FX
========================= */
.hero2 {
    position: relative;
    perspective: 1200px;
    isolation: isolate;
}
.hero2 .img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.25));
    transform-style: preserve-3d;
    animation: heroFloat 7s ease-in-out infinite;
}
/* Halo */
.hero2::before {
    content: "";
    position: absolute;
    inset: -12%;
    border-radius: 24px;
    filter: blur(28px);
    z-index: 1;
    animation: prismSpin 18s linear infinite;
}
/* Shine */
.hero2 .img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        75deg,
        transparent 20%,
        rgba(255, 255, 255, 0.25) 45%,
        transparent 70%
    );
    background-size: 200% 100%;
    transform: translateX(-100%);
    animation: sweepShine 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 3;
}
@media (hover: hover) {
    .hero2:hover .img {
        transform: scale(1.02) translateY(-6px) rotateX(2deg) rotateY(-3deg);
        filter: drop-shadow(0 32px 70px rgba(0, 0, 0, 0.28));
    }
}
/* Keyframes */
@keyframes heroFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
@keyframes prismSpin {
    from {
        transform: rotate(0);
    }
    to {
        transform: rotate(1turn);
    }
}
@keyframes sweepShine {
    0%,
    80% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(120%);
    }
}

/* =========================
   Legacy UI/UX line animations
========================= */
.ui-ux-designer-web-developer-based-in-vancouver {
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
}
.ui-ux-designer-web-developer-based-in-vancouver
    .ui-ux-designer-web-developer-based-in-vancouver-span {
    --letters: 28;
    --type-speed: 1.8s;
    --type-delay: 0.2s;
    position: relative;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    clip-path: inset(0 100% 0 0);
    animation: type-reveal var(--type-speed) steps(var(--letters))
        var(--type-delay) forwards;
}
.ui-ux-designer-web-developer-based-in-vancouver
    .ui-ux-designer-web-developer-based-in-vancouver-span::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 2px;
    background: currentColor;
    opacity: 0.7;
    animation: caret-blink 0.9s linear infinite;
}
.ui-ux-designer-web-developer-based-in-vancouver::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 0%;
    border-radius: 2px;
    background: linear-gradient(90deg, #398fba, #ff6c63);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: underline-grow 0.5s ease-out
        calc(var(--type-speed) + var(--type-delay) + 0.1s) forwards;
}
@keyframes type-reveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}
@keyframes caret-blink {
    0%,
    49% {
        opacity: 0.7;
    }
    50%,
    100% {
        opacity: 0;
    }
}
@keyframes underline-grow {
    to {
        width: 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .ui-ux-designer-web-developer-based-in-vancouver
        .ui-ux-designer-web-developer-based-in-vancouver-span {
        animation: fade-in 0.3s ease-out 0.2s both;
        clip-path: none;
    }
    .ui-ux-designer-web-developer-based-in-vancouver
        .ui-ux-designer-web-developer-based-in-vancouver-span::after {
        display: none;
    }
    .ui-ux-designer-web-developer-based-in-vancouver::after {
        animation: none;
        width: 100%;
    }
}
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* =========================
   Preferred updated UI/UX line animations
========================= */
.role-typed {
    --letters: 32;
    --type-speed: 1.8s;
    --type-delay: 0.2s;
    position: relative;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(0 100% 0 0);
    animation: type-reveal var(--type-speed) steps(var(--letters))
        var(--type-delay) forwards;
}
.role-typed::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 2px;
    background: currentColor;
    opacity: 0.7;
    animation: caret-blink 0.9s linear infinite;
}
.based-in {
    display: inline;
}

/* Mobile tweaks for the updated line */
@media (max-width: 600px) {
    .role-typed {
        white-space: normal;
        display: inline;
        padding-right: 4px;
    }
    .role-typed::after {
        right: auto;
        left: 100%;
        margin-left: 2px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .role-typed {
        animation: fade-in 0.3s ease-out 0.2s both;
        clip-path: none;
    }
    .role-typed::after {
        display: none;
    }
}

/* Keep phrases tidy across breakpoints */
.ui-ux-designer-web-developer-based-in-vancouver {
    white-space: normal;
}
.role-typed {
    display: inline;
    white-space: nowrap;
    vertical-align: baseline;
}
.based-in,
.based-wrap {
    white-space: nowrap;
    display: inline;
}
.ui-ux-designer-web-developer-based-in-vancouver-span4 {
    display: inline;
}
