/* ============================================
   Danny Li - Personal Website Styles
   Inspired by visualpoet.in & anulikajoy.com
   Clean, elegant, professional
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1d1e1f;
    --color-text-secondary: #5a5c61;
    --color-text-muted: #8a8d93;
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-accent-light: rgba(37, 99, 235, 0.08);
    --color-border: #e8e8ea;
    --color-dark-bg: #0f1117;
    --color-dark-text: #e4e4e7;

    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    --max-width: 1200px;
    --section-padding: clamp(80px, 12vw, 140px);
    --nav-height: 72px;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition-fast: 0.2s ease;
    --transition-base: 0.35s ease;
    --transition-slow: 0.6s ease;
}

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

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

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
}

/* --- Typography --- */
.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text);
    margin-bottom: 48px;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(48px, 6vw, 80px);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--color-border);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 0.02em;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--color-accent);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 600;
}

.nav-cta:hover {
    background: var(--color-accent-hover);
}

.nav-cta::after {
    display: none;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) clamp(20px, 4vw, 48px) 80px;
    position: relative;
    overflow: hidden;
    background: var(--color-bg);
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -15%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
    max-width: var(--max-width);
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Hero photo */
.hero-photo-wrapper {
    display: flex;
    justify-content: center;
}

.hero-photo-frame {
    width: clamp(220px, 22vw, 340px);
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(100%);
}

.hero-content {
    max-width: 640px;
}

.hero-greeting {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 80px);
    font-weight: 700;
    line-height: 1.05;
    color: var(--color-text);
    margin-bottom: 20px;
}

.accent-underline {
    position: relative;
    display: inline-block;
}

.accent-underline::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--color-accent);
    border-radius: 3px;
    opacity: 0.5;
}

.hero-tagline {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: clamp(15px, 1.6vw, 17px);
    color: var(--color-text-secondary);
    max-width: 540px;
    margin: 0 0 36px;
    line-height: 1.75;
}

.hero-cta {
    display: inline-block;
    padding: 16px 40px;
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 100px;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.hero-cta:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    width: 28px;
    height: 44px;
    border: 2px solid var(--color-border);
    border-radius: 14px;
    position: relative;
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: var(--color-text-muted);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { top: 8px; opacity: 1; }
    50% { top: 20px; opacity: 0.3; }
}

/* --- About Section --- */
.about {
    padding: var(--section-padding) 0;
    background: var(--color-surface);
}

.about-grid {
    max-width: 640px;
    margin: 0 auto;
}

.about-text .section-title {
    margin-bottom: 28px;
}

.about-intro {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 16px;
    line-height: 1.75;
}

.about-text p:not(.about-intro):not(.about-personal) {
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.about-divider {
    width: 48px;
    height: 2px;
    background: var(--color-accent);
    margin: 28px 0;
    opacity: 0.5;
}

.about-personal {
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    font-style: italic;
    position: relative;
    padding-left: 16px;
    border-left: 2px solid var(--color-accent);
}

.about-details {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.detail-icon {
    color: var(--color-accent);
    font-size: 8px;
}

/* --- Journey / Timeline Section --- */
.journey {
    padding: var(--section-padding) 0;
    background: var(--color-bg);
}

.timeline {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    padding-left: 72px;
    padding-bottom: clamp(40px, 5vw, 64px);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 16px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 3px solid var(--color-accent);
    z-index: 1;
}

.timeline-content {
    background: var(--color-surface);
    padding: clamp(24px, 3vw, 36px);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 700;
    margin: 8px 0 4px;
    color: var(--color-text);
}

.timeline-company {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.timeline-content p {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: 100px;
    letter-spacing: 0.02em;
}

/* --- Expertise Section --- */
.expertise {
    padding: var(--section-padding) 0;
    background: var(--color-dark-bg);
    color: var(--color-dark-text);
}

.expertise .section-label {
    color: rgba(255, 255, 255, 0.5);
}

.expertise .section-title {
    color: #fff;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.expertise-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: clamp(28px, 3vw, 40px);
    transition: all var(--transition-base);
}

.expertise-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.expertise-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.expertise-card p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Impact Section --- */
.impact {
    padding: var(--section-padding) 0;
    background: var(--color-surface);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(24px, 3vw, 40px);
}

.impact-item {
    text-align: center;
    padding: clamp(32px, 4vw, 48px) 24px;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.impact-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.impact-number {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1.1;
    margin-bottom: 12px;
}

.impact-label {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

/* --- Contact Section --- */
.contact {
    padding: var(--section-padding) 0;
    background: var(--color-bg);
    text-align: center;
}

.contact-wrapper {
    max-width: 640px;
    margin: 0 auto;
}

.contact-text {
    font-size: 17px;
    color: var(--color-text-secondary);
    line-height: 1.75;
    margin-bottom: 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    padding: 14px 28px;
    border: 2px solid var(--color-border);
    border-radius: 100px;
    transition: all var(--transition-base);
}

.contact-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.link-icon {
    font-size: 18px;
}

/* --- Footer --- */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.footer p {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.25s; }
.fade-in:nth-child(3) { animation-delay: 0.4s; }
.fade-in:nth-child(4) { animation-delay: 0.55s; }
.fade-in:nth-child(5) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }

    .expertise-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }

    .hero-photo-frame {
        width: clamp(180px, 50vw, 260px);
        margin: 0 auto;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        font-size: 20px;
    }

    .hero-name {
        font-size: clamp(40px, 12vw, 72px);
    }

    .timeline::before {
        left: 16px;
    }

    .timeline-item {
        padding-left: 56px;
    }

    .timeline-marker {
        left: 8px;
    }

    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .impact-grid {
        grid-template-columns: 1fr;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }
}
