/* ===== Design Tokens ===== */
:root {
    --bg-primary: #0f0d0a;
    --bg-secondary: #1a1714;
    --bg-card: #231f1a;
    --bg-card-hover: #2d2720;
    --bg-elevated: #302a22;

    --cream-100: #f5e6d3;
    --cream-200: #e8d5bd;
    --cream-300: #d4b896;

    --amber-200: #fcd49a;
    --amber-300: #f5b94e;
    --amber-400: #e8a020;
    --amber-500: #d4891a;
    --amber-600: #b86e14;

    --brown-400: #6b4226;
    --brown-500: #5a3520;
    --brown-600: #3d2314;
    --brown-700: #2a1810;

    --text-primary: #f5e6d3;
    --text-secondary: #b8a48e;
    --text-muted: #7a6b5a;
    --text-accent: #f5b94e;

    --border: rgba(245, 230, 211, 0.08);
    --border-hover: rgba(245, 185, 78, 0.2);

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--text-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber-200); }

.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ===== Particles ===== */
.particles {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px; height: 8px;
    background: var(--brown-400);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0;
    animation: particle-float linear infinite;
}

@keyframes particle-float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 1;
    padding: 60px 24px;
    background: radial-gradient(ellipse at 50% 80%, rgba(184, 110, 20, 0.08) 0%, transparent 60%);
}

.hero-inner {
    text-align: center;
    max-width: 700px;
    animation: fade-up 1s var(--ease-out) both;
}

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

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 40px;
    animation: fade-up 1s 0.1s var(--ease-out) both;
}

.badge-dot {
    width: 6px; height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

/* Coffee SVG */
.hero-coffee {
    width: 160px; height: 180px;
    margin: 0 auto 36px;
    animation: fade-up 1s 0.15s var(--ease-out) both;
}

.coffee-cup { width: 100%; height: 100%; }

.steam-path {
    animation: steam-rise 3s ease-in-out infinite;
}
.steam-2 { animation-delay: 0.5s; }
.steam-3 { animation-delay: 1s; }

@keyframes steam-rise {
    0% { opacity: 0; transform: translateY(0); }
    30% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Titles */
.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    animation: fade-up 1s 0.2s var(--ease-out) both;
}

.title-top {
    display: block;
    color: var(--text-secondary);
    font-size: 0.55em;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.title-bottom { display: block; }

.coffee-emoji {
    display: inline-block;
    animation: coffee-wobble 3s ease-in-out infinite;
}

@keyframes coffee-wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.7;
    animation: fade-up 1s 0.3s var(--ease-out) both;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s var(--ease-out);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    color: var(--brown-700);
    box-shadow: 0 4px 20px rgba(232, 160, 32, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 160, 32, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    color: var(--brown-700);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(245, 185, 78, 0.05);
}

.btn-large {
    width: 100%;
    justify-content: center;
    padding: 18px 32px;
    font-size: 1.15rem;
    border-radius: var(--radius-lg);
}

.btn-icon { font-size: 1.2em; }

.hero-cta {
    display: flex; gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fade-up 1s 0.4s var(--ease-out) both;
}

.hero-scroll-hint {
    margin-top: 60px;
    animation: fade-up 1s 0.6s var(--ease-out) both;
}

.scroll-line {
    width: 1px; height: 50px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    margin: 0 auto;
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* ===== Stats ===== */
.stats {
    padding: 80px 0;
    position: relative; z-index: 1;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 28px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.4s var(--ease-out);
    opacity: 0;
    transform: translateY(20px);
}

.stat-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-accent);
    line-height: 1;
}

.stat-plus {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-accent);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 8px;
}

.stat-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Section Common ===== */
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-accent);
    background: rgba(245, 185, 78, 0.1);
    border: 1px solid rgba(245, 185, 78, 0.15);
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 550px;
    margin-bottom: 40px;
}

/* ===== About ===== */
.about {
    padding: 100px 0;
    position: relative; z-index: 1;
}

.about-text h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 20px;
}

.about-text h2 em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-accent);
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-links {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-top: 24px;
}

.about-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.about-link:hover {
    border-color: var(--border-hover);
    color: var(--text-accent);
    background: var(--bg-card-hover);
}

/* ===== Projects ===== */
.projects {
    padding: 100px 0;
    position: relative; z-index: 1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.project-card {
    position: relative;
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    color: inherit;
}

.project-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--bg-card), rgba(245, 185, 78, 0.06));
    border-color: rgba(245, 185, 78, 0.15);
}

.project-tag {
    position: absolute; top: 16px; right: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-accent);
    background: rgba(245, 185, 78, 0.12);
    padding: 4px 10px;
    border-radius: 100px;
}

.project-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.project-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.project-tech {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
    font-weight: 500;
}

/* ===== Talks ===== */
.talks {
    padding: 100px 0;
    position: relative; z-index: 1;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.talks-list { display: flex; flex-direction: column; gap: 2px; }

.talk-item {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease-out);
    border: 1px solid transparent;
}

.talk-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateX(4px);
    color: inherit;
}

.talk-org {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-accent);
}

.talk-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.talk-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.talks-more {
    display: inline-block;
    margin-top: 24px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== Donate ===== */
.donate {
    padding: 100px 0 120px;
    position: relative; z-index: 1;
    background: radial-gradient(ellipse at 50% 0%, rgba(184, 110, 20, 0.06) 0%, transparent 50%);
}

.donate-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.donate-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    animation: coffee-wobble 3s ease-in-out infinite;
}

.donate-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.donate-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.donate-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.amount-btn {
    padding: 16px 8px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    font-family: var(--font-sans);
    text-align: center;
}

.amount-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.amount-btn.active {
    border-color: var(--amber-400);
    background: rgba(245, 185, 78, 0.1);
    box-shadow: 0 0 20px rgba(245, 185, 78, 0.1);
}

.amount-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.amount-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.amount-btn.active .amount-value { color: var(--text-accent); }
.amount-btn.active .amount-label { color: var(--text-secondary); }

.custom-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: left;
    margin-bottom: 8px;
    font-weight: 500;
}

.custom-input-wrap {
    position: relative;
    margin-bottom: 20px;
}

.custom-currency {
    position: absolute;
    left: 16px; top: 50%; transform: translateY(-50%);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.custom-input {
    width: 100%;
    padding: 14px 16px 14px 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    transition: border-color 0.2s;
    outline: none;
}

.custom-input:focus { border-color: var(--amber-400); }
.custom-input::placeholder { color: var(--text-muted); font-weight: 400; }

.donate-message { margin-bottom: 24px; }

.donate-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.donate-textarea:focus { border-color: var(--amber-400); }
.donate-textarea::placeholder { color: var(--text-muted); }

.donate-footnote {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 16px;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border);
    position: relative; z-index: 1;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.footer-links {
    display: flex; gap: 24px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: 1fr; }
    .project-featured { grid-column: 1; }
    .talk-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .talk-meta { display: none; }
    .donate-amounts { grid-template-columns: repeat(2, 1fr); }
    .donate-card { padding: 36px 24px; }
    .footer-inner { flex-direction: column; gap: 24px; }
    .footer-links { flex-wrap: wrap; gap: 16px; }
    .hero-coffee { width: 120px; height: 140px; margin-bottom: 24px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-number { font-size: 2rem; }
    .hero-badge { font-size: 0.7rem; padding: 6px 14px; }
}
