/* Homepage
   Layout styles for index.html. Loaded after main.css.
   ======================================================================== */

body {
    -webkit-user-select: text;
    user-select: text;
}

img {
    max-width: 100%;
    display: block;
    border-radius: 0;
    outline: none;
}

/* ===== GRID ===== */
.grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 2rem;
    padding: 0 8vw;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 4vw;
    max-width: none;
    margin-inline: 0;
    overflow: hidden;
}
.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.hero .grid { width: 100%; max-width: none; position: relative; z-index: 1; }
.hero__title-wrap {
    grid-column: 1 / -1;
    padding-left: calc(140px + 2rem);
}
.hero__title {
    font-size: 14vw;
    line-height: 0.88;
    font-weight: 900;
    letter-spacing: -0.04em;
    transform: translateY(110%);
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}
.hero__title.visible { transform: translateY(0); }
.hero__avatar {
    display: inline-block;
    width: 0.55em;
    height: auto;
    vertical-align: middle;
    margin-left: 0.05em;
    position: relative;
    top: -0.5em;
    z-index: 10;
    animation: heroFloat 4s ease-in-out infinite;
    transform-origin: center bottom;
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.hero__sub {
    grid-column: 1 / -1;
    font-size: 12vw;
    line-height: 0.88;
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-top: -1vw;
    transform: translateY(110%);
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1) 0.15s;
    padding-left: calc(140px + 2rem);
}
.hero__sub.visible { transform: translateY(0); }
.hero__scroll {
    grid-column: 1 / -1;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    margin-top: 3vw;
}
.hero__scroll:hover { opacity: 1; }
.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: var(--text-muted);
    position: relative;
    overflow: hidden;
}
.hero__scroll-line::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text);
    animation: scrollDown 1.5s ease-in-out infinite;
}
@keyframes scrollDown {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

/* ===== ABOUT ===== */
.about {
    padding: 8vw 0;
}
.about__label {
    font-size: 1.05rem;
    font-weight: 400;
    padding-top: 0.3vw;
}
.about__text {
    font-size: 1.4vw;
    line-height: 1.55;
    font-weight: 400;
    max-width: 70ch;
}
.about__text .word {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}
.about__text .word.visible { transform: translateY(0); opacity: 1; }

/* ===== WORK ===== */
.work {
    padding: 2vw 0 8vw;
}
.work__label {
    font-size: 1.05rem;
    font-weight: 400;
    padding-top: 2vw;
}
.work__list {
    grid-column: 2 / -1;
}
.work__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2vw 0;
    cursor: pointer;
    position: relative;
    transition: opacity 0.4s ease;
    border-bottom: 1px solid var(--border);
}
.work__item:hover {
    opacity: 1 !important;
    border-bottom: 1px solid var(--text);
}
.work__item:last-child {
    border-bottom: none;
}
.work__item__title {
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: -0.01em;
    line-height: 1.4;
    overflow: hidden;
    margin-top: 0.15rem;
}
.work__item__title .word,
.work__item__subtitle .word {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);
}
.work__item__title .word.visible,
.work__item__subtitle .word.visible { transform: translateY(0); }
.work__item__tag {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border-medium);
    border-radius: 50px;
    padding: 0.25rem 0.75rem;
    letter-spacing: 0.02em;
    line-height: 1.5;
}
.work__item__tag.visible { transform: translateY(0); }
.work__item__year {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    border: 1px solid var(--border-medium);
    border-radius: 50px;
    padding: 0.35rem 0.75rem;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.work__item__subtitle {
    font-size: clamp(3rem, 8vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text);
    overflow: hidden;
    padding-bottom: 0.15em;
}
.work__item__tags {
    display: flex;
    gap: 0.4rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
    overflow: hidden;
}
.work__item:hover .work__item__title .word,
.work__item:hover .work__item__subtitle .word,
.work__item:hover .work__item__tag { color: var(--text); }
.work__item:hover .work__item__year {
    border-color: var(--text);
    color: var(--text);
}
.work__item__img {
    position: absolute;
    width: 36vw;
    height: 24vw;
    object-fit: cover;
    border-radius: 0;
    pointer-events: none;
    opacity: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 50;
}
.work__item:hover .work__item__img {
    opacity: 1;
    transform: scale(1);
}

/* ===== INFO ===== */
.info {
    padding: 6vw 0;
}
.info .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3vw;
}
.info__skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2vw;
}
.info__skills-col {
    display: flex;
    flex-direction: column;
}
.info__label {
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 1.5vw;
    padding-bottom: 1vw;
    border-bottom: 1px solid var(--border);
}
.info__item {
    padding: 0.8vw 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-light);
}
.info__item:last-child { border-bottom: none; }
.info__item-left {
    display: flex;
    flex-direction: column;
    gap: 0.2vw;
}
.info__item-title {
    font-weight: 600;
    font-size: 0.9vw;
}
.info__item-country {
    font-weight: 400;
    color: var(--text-muted);
}
.info__item-role {
    font-size: 0.8vw;
    color: var(--text-muted);
}
.info__item-period {
    font-size: 0.8vw;
    color: var(--text-muted);
    white-space: nowrap;
}
.info__skill {
    font-size: 0.9vw;
    padding: 0.4vw 0;
    border-bottom: 1px solid var(--border-light);
}
.info__skill:last-child { border-bottom: none; }
.info__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text);
    margin-top: 1rem;
    transition: color 0.3s ease;
}
.info__link:hover { color: var(--text); }
.info__link svg { transition: transform 0.3s ease; }
.info__link:hover svg { transform: translateX(2px); }

/* ===== CUSTOM CURSOR ===== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--text);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
.custom-cursor.visible { opacity: 1; }
.custom-cursor.hover {
    width: 80px;
    height: 80px;
}
@media (min-width: 1025px) {
    .custom-cursor { display: block; }
}
@media (max-width: 1024px) {
    .custom-cursor { display: none; }
}

/* ===== CLIENTS MARQUEE ===== */
.clients {
    padding: 0 8vw;
}
.clients__heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
}
.clients__heading::before,
.clients__heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--border);
}
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 70s linear infinite;
}
.marquee__group {
    display: flex;
    gap: 2.5rem;
}
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.clients__logo {
    display: block;
    flex-shrink: 0;
    width: 9rem;
    height: 9rem;
    background-color: #8a8a8a;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}
@media (prefers-reduced-motion: reduce) {
    .marquee__track { animation: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; gap: 1rem; padding: 0 5vw; }
    .info .grid { grid-template-columns: 1fr; gap: 2rem; }
    .info__skills-grid { grid-template-columns: 1fr; }
    .about__label, .work__label { margin-bottom: 0.5rem; }
    .hero__title { font-size: 13vw; padding-left: 0; }
    .hero__sub { font-size: 11vw; padding-left: 0; }
    .work__item__title { font-size: 1rem; }
    .work__item__subtitle { font-size: 2.5rem; display: none; }
    .work__item__tags { display: none; }
    .work__item__img { display: none; }
    .info__item { flex-direction: column; gap: 0.25rem; }
    .info__item-period { text-align: left; }
    .clients { padding: 0 5vw; }
    .footer { padding: 3vw 5vw; }
}
