/*
 * Global Stylesheet for the personal portfolio website.
 * This CSS defines the variables, layout, animations and responsive
 * behavior for the entire page. Adjust the values in the :root
 * section to change colors, shadows or other design tokens.
 */

:root {
    --bg: #f7f5f2;
    --surface: #ffffff;
    --text: #2d2d2d;
    --text-light: #707070;
    --accent: #b69063;
    --radius: 26px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .07);
    --transition: .35s ease;
    --container: 1180px;
}

/* Reset and base typography */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
video {
    display: block;
    width: 100%;
}

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

.container {
    width: min(92%, var(--container));
    margin: 0 auto;
}

/* Sections fade in as you scroll */
.section {
    padding: 90px 0;
    opacity: 0;
    transform: translateY(45px);
    transition: opacity .8s ease, transform .8s ease;
}

.section.show {
    opacity: 1;
    transform: none;
}

/* Hero section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url("assets/avatar.jpg");
    background-position: center;
    background-size: cover;
    animation: kenburns 18s ease-in-out infinite alternate;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .60), rgba(0, 0, 0, .28), rgba(0, 0, 0, .12));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(92%, var(--container));
    margin: 0 auto;
    padding-bottom: 85px;
    color: #fff;
}

.hero-label {
    font-size: .82rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: .8;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(48px, 9vw, 88px);
    line-height: 1.05;
    font-weight: 300;
    margin-bottom: 28px;
}

/* Hero tagline: smaller font for better hierarchy */
.hero-text {
    max-width: 520px;
    font-size: 1rem;
    opacity: .92;
    font-weight: 400;
}

.hero-links {
    margin-top: 42px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-links span {
    opacity: .5;
}

.hero-links a {
    position: relative;
}

.hero-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: white;
    transition: var(--transition);
}

.hero-links a:hover::after {
    width: 100%;
}

/* Scroll indicator */
.scroll-down {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.scroll-down span {
    width: 26px;
    height: 42px;
    display: block;
    border: 2px solid rgba(255, 255, 255, .8);
    border-radius: 30px;
    position: relative;
}

.scroll-down span::after {
    content: "";
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    animation: wheel 2s infinite;
}

/* About section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 70px;
    align-items: center;
}

.about-text {
    font-size: 1.08rem;
}

.about-text p {
    margin-bottom: 10px;
}

.signature {
    margin-top: 42px;
    font-size: 2rem;
    color: var(--accent);
    font-weight: 300;
}

.video-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Make the video horizontal (16:9) instead of vertical */
.video-card video {
    width:100%;
    aspect-ratio: 9 / 12;
    object-fit: cover;
    display:block;
}

.video-caption {
    padding: 7px 7px;
    text-align: center;
    font-size: 1rem;
}

.video-caption span {
    color: var(--text-light);
}

/* Contacts section */
.contacts {
    padding-top: 40px;
}

.section-title {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 42px;
    letter-spacing: -0.02em;
}

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

.card {
    background: var(--surface);
    border-radius: 24px;
    padding: 24px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .10);
}

.card-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #222;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.card h3 {
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.card p {
    color: var(--text-light);
    font-size: .95rem;
}

.arrow {
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform var(--transition);
}

.card:hover .arrow {
    transform: translateX(6px);
}

/* New contact table layout: rows with two columns (personal and channel) */
.contact-table {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Each contact row now contains two equal-width items */
.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background: var(--surface);
    border-radius: 24px;
    padding: 20px 22px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.contact-row:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .10);
}

/* Individual contact item: icon + label */
.contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.contact-item a {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .04em;
    position: relative;
    overflow: hidden;
    transition: background var(--transition);
}

.contact-item a:hover {
    background: var(--accent);
}

.contact-item .label {
    margin-left: 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
}

/* Empty contact items (no channel) still occupy space but are invisible */
.contact-item:empty {
    visibility: hidden;
}

/* Ripple effect */
/* Ripple effect: apply globally to any element that appends a .ripple span */
.ripple {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(182, 144, 99, .18);
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    animation: ripple .6s ease-out;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(22);
        opacity: 0;
    }
}

/* Animations */
@keyframes wheel {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 16px);
    }
}

@keyframes kenburns {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.08);
    }
}

/* Responsive adjustments */
@media (max-width: 920px) {
    .section {
        padding: 80px 0;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 46px;
    }
    .video-card {
        position: relative;
        width: 100%;
        max-width:360px;
        margin:0 auto;
        border-radius:24;
        overflow hidden;
    }
}

@media (max-width: 640px) {
    .hero-content {
        padding-bottom: 92px;
    }
    .hero h1 {
        font-size: 3.15rem;
    }
    .hero-text {
        font-size: 1rem;
    }
    .hero-links {
        margin-top: 34px;
        font-size: .96rem;
    }
    .section {
        padding: 68px 0;
    }
    .about-text {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    .card {
        padding: 20px;
        border-radius: 22px;
    }
    .card:active {
        transform: scale(.985);
    }
    .icon {
        width: 50px;
        height: 50px;
        font-size: .82rem;
    }
    .arrow {
        font-size: 1.3rem;
    }
}

@media (min-width: 1440px) {
    .hero-content {
        padding-bottom: 110px;
    }
    .section {
        padding: 120px 0;
    }
}