/* ============================================================
   Pedro Lemos — Portfolio Landing Page
   Design system & styles derived from Figma spec
   ============================================================ */

/* ---------- Reset & Base ---------- */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f7f6f4;
    color: #474747;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

ul {
    list-style: none;
}

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

/* ---------- Landing Container ---------- */

.landing {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ---------- Portrait ---------- */

.portrait {
    position: absolute;
    top: 0;
    left: 0;
    width: 22.917%;          /* 440 / 1920 */
    height: 100%;
    z-index: 2;
    overflow: hidden;
}

.portrait__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    /* Subtle entrance animation */
    opacity: 0;
    animation: fadeIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

/* ---------- Background Lines ---------- */

.bg-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    animation: fadeIn 2s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

.bg-line {
    position: absolute;
}

/* Line 2 — left line, x=810, full height */
.bg-line--2 {
    left: 42.188%;                /* 810 / 1920 */
    top: 0;
    height: 100%;
    width: 0;
    border-left: 0.5px solid rgba(71, 71, 71, 0.5);
}

/* Line 3 — center line, x=1180, full height */
.bg-line--3 {
    left: 61.458%;                /* 1180 / 1920 */
    top: 0;
    height: 100%;
    width: 0;
    border-left: 0.5px solid rgba(71, 71, 71, 0.7);
}

/* Line 4 — right line, top segment, x=1550, y=0 → y=379 */
.bg-line--4-top {
    left: 80.729%;                /* 1550 / 1920 */
    top: 0;
    height: 17.74vw;              /* Shifted up by 2vw (was 19.74vw) */
    width: 0;
    border-left: 0.7px solid #222222;
}

/* Line 5 — right line, bottom segment, x=1550, scaled gap */
.bg-line--5-bottom {
    left: 80.729%;
    top: 44.415vw;                /* Shifted up to match the new shorter skills list height */
    bottom: 0;
    width: 0;
    border-left: 0.7px solid #222222;
}

/* ---------- Intro (Name + Label) ---------- */

.intro {
    position: absolute;
    /* Positioned from Figma: x=600, y=296 within 1920×1080 */
    left: 31.25%;             /* 600 / 1920 */
    top: 13.417vw;            /* Shifted up by 2vw (was 15.417vw) */
    z-index: 1;
}

.intro__label {
    position: relative;
    z-index: 2;
    font-weight: 300;
    font-size: clamp(1.25rem, 2.083vw, 2.5rem);  /* ~40px at 1920 */
    letter-spacing: 0;
    color: #474747;
    line-height: 1;
    margin-bottom: -10px; /* Decreased gap to Pedro Lemos */
    margin-left: 14px;    /* Visually align with the P of Pedro Lemos */
    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.intro__name {
    font-weight: 400;
    font-size: clamp(3.5rem, 9.375vw, 11.25rem);  /* 180px at 1920 */
    letter-spacing: -1.8px;
    color: #474747;
    line-height: normal;
    white-space: nowrap;
    /*
     * Knockout stroke — matches Figma's 48px outside stroke in #F7F6F4.
     * paint-order: stroke fill draws the stroke behind the fill,
     * so the inner half is covered. Using 96px (2×48) so the visible
     * outer portion matches the Figma 48px outside spec.
     */
    -webkit-text-stroke: 96px #F7F6F4;
    paint-order: stroke fill;
    /* Animation */
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

/* ---------- Skills List ---------- */

.skills {
    position: absolute;
    /* Positioned from Figma: x≈1454, y=562 within 1920×1080 */
    left: 75.72%;             /* 1454 / 1920 */
    top: 27.271vw;            /* Shifted up by 2vw (was 29.271vw) */
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.094vw;             /* 21 / 1920 — matches Figma 60px item pitch */
}

.skills__item {
    font-weight: 300;
    font-size: clamp(1rem, 2.083vw, 2.5rem);     /* ~40px at 1920 (was 48px) */
    line-height: 1;
    white-space: nowrap;
    /* Staggered entrance */
    opacity: 0;
    transform: translateX(20px);
    animation: slideLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Progressive opacity per Figma spec */
.skills__item--1 {
    color: #474747;           /* full opacity */
    animation-delay: 0.7s;
}

.skills__item--2 {
    color: rgba(71, 71, 71, 0.3);
    animation-delay: 0.85s;
}

.skills__item--3 {
    color: rgba(71, 71, 71, 0.2);
    animation-delay: 1.0s;
}

.skills__item--4 {
    color: rgba(71, 71, 71, 0.1);
    animation-delay: 1.15s;
}

.skills__item--5 {
    color: rgba(71, 71, 71, 0.08);
    animation-delay: 1.3s;
}

/* ---------- Animations ---------- */

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        /* Animate to the FINAL resting opacity defined by the color property */
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---------- Responsive: tablets & below ---------- */

@media (max-width: 1024px) {
    .landing {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    body {
        overflow: auto;
        height: auto;
    }

    .portrait {
        position: relative;
        width: 100%;
        height: 50vh;
    }

    .bg-lines {
        display: none;
    }

    .intro {
        position: relative;
        left: auto;
        top: auto;
        padding: 2rem 1.5rem 1rem;
    }

    .intro__name {
        white-space: normal;
    }

    .skills {
        position: relative;
        left: auto;
        top: auto;
        padding: 1rem 1.5rem 3rem;
    }
}

/* ---------- Scroll Indicator ---------- */

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 1px solid rgba(71, 71, 71, 0.5);
    border-radius: 20px;
    z-index: 5;
    /* Entrance animation */
    opacity: 0;
    animation: fadeIn 1.5s cubic-bezier(0.22, 1, 0.36, 1) 1.5s forwards;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background: #474747;
    border-radius: 2px;
    animation: scrollWheel 2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes scrollWheel {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}
