/* ==========================================================================
   Anthony Nguyen — Minimalist Personal Page
   Aesthetic: Soft Warm Editorial (No harsh pure black / pure white)
   Smooth Entrance & Scroll Reveal Animations
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
    /* Backgrounds: Warm, Soft & Natural */
    --bg-page: #F4F3EE;
    --bg-surface: #FAF9F5;          /* Soft porcelain */
    --bg-surface-hover: #F2F0E8;
    --bg-pill: #E6E4DD;
    --bg-pill-hover: #DDDBCF;
    
    /* Dark Elements: Soft Warm Charcoal */
    --bg-dark: #23252B;             /* Deep warm graphite charcoal */
    --bg-dark-surface: #2C2E36;     /* Slate charcoal surface */
    --bg-dark-hover: #353742;
    
    /* Text Colors: Mellow & Legible */
    --text-primary: #23242A;        /* Deep charcoal */
    --text-secondary: #585B66;      /* Slate gray */
    --text-muted: #888B97;
    
    /* Inverse Text: Warm Soft Ivory */
    --text-inverse: #F2F1EC;        /* Soft warm ivory */
    --text-inverse-muted: #AFB2BE;
    
    /* Subtle Borders */
    --border-color: rgba(35, 37, 43, 0.08);
    --border-subtle: rgba(35, 37, 43, 0.05);
    --border-hover: rgba(35, 37, 43, 0.18);
    --border-dark-subtle: rgba(242, 241, 236, 0.08);
    
    /* Accent */
    --accent-emerald: #10B981;
    --accent-emerald-soft: #34D399;
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
    padding: 36px 20px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Page Container (1 Column Centered) */
.page-container {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    gap: 52px;
    margin-top: 10px;
}

/* ==========================================================================
   1. PILL NAVBAR (Ảnh Mẫu 1 - Non-sticky)
   ========================================================================== */
.top-nav-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 60px;
    position: relative;
    z-index: 10;
}

.pill-nav {
    display: inline-flex;
    align-items: center;
    background-color: var(--bg-pill);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 8px 24px;
    gap: 24px;
    box-shadow: 0 2px 8px rgba(35, 37, 43, 0.03);
    transition: var(--transition);
}

.pill-nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}

.pill-nav-link:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   2. HERO SECTION (Avatar, Title, Repeating Brush Underline, Pill Badge)
   ========================================================================== */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 6px 0 10px;
}

/* Prominent Large Avatar */
.avatar-outer-ring {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    padding: 6px;
    background-color: var(--bg-surface);
    box-shadow: 0 14px 32px -8px rgba(35, 37, 43, 0.09),
                0 0 0 1px var(--border-color);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.avatar-outer-ring:hover {
    transform: scale(1.04);
    box-shadow: 0 18px 38px -10px rgba(35, 37, 43, 0.13),
                0 0 0 1px rgba(35, 37, 43, 0.12);
}

.avatar-inner-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background-color: #DFDDD5;
}

.avatar-large-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Hero Title with Animated Hand-drawn Underline */
.hero-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 3.8vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Wrapper for Name & SVG Underline Curve */
.hero-name-wrapper {
    position: relative;
    display: inline-block;
    cursor: default;
}

.hero-name-serif {
    font-family: var(--font-serif);
    font-weight: 700;
    font-style: normal;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

/* Vector Hand-drawn Brush Underline (Lặp lại mỗi 3.5 giây) */
.hand-drawn-underline {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 14px;
    pointer-events: none;
    overflow: visible;
    z-index: 0;
}

.underline-path {
    stroke: var(--text-primary);
    stroke-dasharray: 280;
    stroke-dashoffset: 280;
    animation: draw-brush-loop 3.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
    opacity: 0.8;
}

@keyframes draw-brush-loop {
    0% {
        stroke-dashoffset: 280;
        opacity: 0;
    }
    4% {
        opacity: 0.8;
        stroke-dashoffset: 280;
    }
    30% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
    82% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
    94% {
        opacity: 0;
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: 280;
        opacity: 0;
    }
}

/* Modern Sparkle Star Icon */
.modern-sparkle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    margin-left: 2px;
    cursor: default;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modern-sparkle-icon:hover {
    transform: rotate(90deg) scale(1.25);
}

/* Original Light Pill Badge with Live Green Dot (Ảnh Mẫu 2) */
.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-pill);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 7px 18px;
    margin: 4px 0 2px;
    max-width: 100%;
    white-space: nowrap;
    transition: var(--transition);
}

.hero-pill-badge:hover {
    background-color: var(--bg-pill-hover);
    border-color: rgba(35, 37, 43, 0.14);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 6px var(--accent-emerald);
    flex-shrink: 0;
}

.pill-badge-text {
    font-family: var(--font-sans);
    font-size: clamp(0.58rem, 2.35vw, 0.86rem);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.pipe-sep {
    color: var(--text-muted);
    font-weight: 300;
    margin: 0 clamp(2px, 0.45vw, 4px);
}

/* 4 Circular Social Icon Buttons under Avatar */
.hero-social-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
}

.hero-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(35, 37, 43, 0.03);
    transition: var(--transition);
}

.hero-icon-btn:hover {
    background-color: var(--bg-dark);
    color: var(--text-inverse);
    border-color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(35, 37, 43, 0.1);
}

/* ==========================================================================
   3. CONTENT SECTIONS (TYPOGRAPHY & HEADINGS)
   ========================================================================== */
.content-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-tag-label {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-serif-heading {
    font-family: var(--font-serif);
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.main-section-title {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    margin-top: -4px;
}

.section-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.section-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   4. WHAT I DO SECTION (2-Card Grid)
   ========================================================================== */
.what-i-do-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 6px;
}

.feature-card {
    background-color: var(--bg-surface);
    border-radius: 20px;
    padding: 28px 24px 22px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 3px 16px rgba(35, 37, 43, 0.03);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(35, 37, 43, 0.06);
}

.card-icon-box {
    width: 38px;
    height: 38px;
    background-color: var(--bg-dark);
    color: var(--text-inverse);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.card-serif-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-desc {
    font-family: var(--font-sans);
    font-size: 0.94rem;
    color: var(--text-secondary);
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 22px;
}

.card-footer-meta {
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

/* ==========================================================================
   5. HOW I WORK (THE WIN-WIN CULTURE - SHOWCASE)
   ========================================================================== */
.how-i-work-showcase {
    background-color: var(--bg-dark);
    color: var(--text-inverse);
    border-radius: 26px;
    padding: 38px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 14px 34px -8px rgba(35, 37, 43, 0.16);
    border: 1px solid var(--border-dark-subtle);
    position: relative;
    overflow: hidden;
}

/* Decorative Soft Glow in Card */
.how-i-work-showcase::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(35, 37, 43, 0) 70%);
    pointer-events: none;
}

.showcase-badge-bar {
    display: flex;
    align-items: center;
}

.showcase-tag-label {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-emerald-soft);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.showcase-heading {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-inverse);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-top: -6px;
}

.showcase-lead-box {
    border-left: 2px solid rgba(242, 241, 236, 0.18);
    padding-left: 16px;
    margin: 2px 0 10px;
}

.showcase-lead-text {
    font-family: var(--font-serif);
    font-size: 1.06rem;
    font-style: italic;
    color: rgba(242, 241, 236, 0.88);
    line-height: 1.6;
}

/* 3 Numbered Principles */
.showcase-principles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.showcase-item {
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: baseline;
    padding: 16px 18px;
    border-radius: 16px;
    background-color: var(--bg-dark-surface);
    border: 1px solid var(--border-dark-subtle);
    transition: var(--transition);
}

.showcase-item:hover {
    background-color: var(--bg-dark-hover);
    border-color: rgba(242, 241, 236, 0.14);
    transform: translateX(4px);
}

.item-num-col {
    display: flex;
    align-items: center;
}

.item-serial {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 600;
    color: var(--accent-emerald-soft);
    line-height: 1;
}

.item-body-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-title {
    font-family: var(--font-sans);
    font-size: 1.04rem;
    font-weight: 700;
    color: var(--text-inverse);
    letter-spacing: -0.01em;
}

.item-desc {
    font-family: var(--font-sans);
    font-size: 0.94rem;
    color: var(--text-inverse-muted);
    line-height: 1.6;
}

/* ==========================================================================
   6. SHARING (I THINK YOU'LL NEED THIS - RESOURCE CARDS)
   ========================================================================== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 6px;
}

.resource-card {
    background-color: var(--bg-surface);
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 3px 16px rgba(35, 37, 43, 0.03);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 26px rgba(35, 37, 43, 0.07);
}

.resource-thumb-wrapper {
    width: 100%;
    height: 190px;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-subtle);
}

.resource-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.resource-card:hover .resource-img {
    transform: scale(1.04);
}

.resource-body {
    padding: 24px 22px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.resource-title {
    font-family: var(--font-serif);
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.32;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.resource-desc {
    font-family: var(--font-sans);
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 22px;
    flex-grow: 1;
}

.resource-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--bg-dark);
    color: var(--text-inverse);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    padding: 11px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-dark-subtle);
    transition: var(--transition);
    width: 100%;
}

.resource-cta-btn:hover {
    background-color: var(--bg-dark-hover);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(35, 37, 43, 0.12);
}

.resource-cta-btn svg {
    transition: transform 0.2s ease;
}

.resource-cta-btn:hover svg {
    transform: translate(2px, -2px);
}

/* ==========================================================================
   7. LET'S CONNECT & CHANNELS LIST
   ========================================================================== */
.channels-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 2px;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
}

.contact-row:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 37, 43, 0.04);
}

.row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    margin-right: 14px;
    flex-shrink: 0;
}

.row-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    font-size: 0.96rem;
}

.row-main {
    color: var(--text-primary);
}

.row-hint {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.row-action {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-left: 12px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.contact-row:hover .row-action {
    color: var(--text-primary);
    transform: translateX(2px);
}

/* Direct mail and copy hint */
.row-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.direct-mail-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background-color: var(--bg-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.direct-mail-btn:hover {
    background-color: var(--bg-dark);
    color: var(--text-inverse);
}

.copy-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.contact-row:hover .copy-hint {
    color: var(--text-primary);
}

/* Closing Callout */
.closing-callout {
    padding-top: 10px;
    text-align: center;
}

.closing-text {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================================================
   7. TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-dark);
    color: var(--text-inverse);
    padding: 10px 18px;
    border-radius: 9999px;
    font-size: 0.86rem;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(35, 37, 43, 0.15);
    animation: toast-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-icon {
    width: 15px;
    height: 15px;
    color: var(--accent-emerald-soft);
}

@keyframes toast-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   8. ENTRANCE & SCROLL REVEAL ANIMATIONS (Hiệu ứng mượt mà khi load & scroll)
   ========================================================================== */

/* Navbar Fade Down */
.anim-fade-down {
    animation: animFadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes animFadeDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Avatar Pop In */
.anim-pop-in {
    animation: animPopIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes animPopIn {
    from {
        opacity: 0;
        transform: scale(0.88);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero Elements Slide Up */
.anim-slide-up {
    opacity: 0;
    animation: animSlideUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s) forwards;
}

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

/* Scroll-triggered Section Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Inner Stagger Items (Cards / Principles / Contacts) */
.scroll-reveal-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) var(--item-delay, 0s), 
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) var(--item-delay, 0s);
}

.scroll-reveal.is-revealed .scroll-reveal-item {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 900px) {
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 680px) {
    body {
        padding: 24px 16px 60px;
    }

    .top-nav-wrapper {
        margin-bottom: 30px;
    }

    .pill-nav {
        gap: 14px;
        padding: 7px 16px;
    }

    .pill-nav-link {
        font-size: 0.82rem;
    }

    .avatar-outer-ring {
        width: 140px;
        height: 140px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-pill-badge {
        padding: 5px 12px;
        gap: 6px;
    }

    .what-i-do-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .resource-body {
        padding: 20px 18px 18px;
    }

    .resource-title {
        font-size: 1.15rem;
    }

    .how-i-work-showcase {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .showcase-item {
        grid-template-columns: 36px 1fr;
        padding: 14px 14px;
    }

    .item-serial {
        font-size: 1.15rem;
    }
}

