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

:root {
    --bg: #f7f5f0;
    --surface: #ffffff;
    --text: #111;
    --text-mid: #444;
    --text-light: #636363;
    --indigo: #4433ff;
    --indigo-glow: rgba(68,51,255,.08);
    --coral: #ff6b4a;
    --border: #e0ddd5;
    --radius: 16px;
}

html { scroll-behavior: smooth; }

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
a { color: inherit; text-decoration: none; }

/* === Animated gradient mesh BG === */
.mesh-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.mesh-bg .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .3;
    animation: drift 20s ease-in-out infinite alternate;
}

.mesh-bg .blob-1 {
    width: 600px; height: 600px;
    background: #c4b5fd;
    top: -15%; left: -10%;
}

.mesh-bg .blob-2 {
    width: 500px; height: 500px;
    background: #fca5a5;
    bottom: -10%; right: -10%;
    animation-delay: -7s;
    animation-direction: alternate-reverse;
}

.mesh-bg .blob-3 {
    width: 400px; height: 400px;
    background: #93c5fd;
    top: 50%; left: 60%;
    animation-delay: -12s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.05); }
    100% { transform: translate(-20px, 20px) scale(.95); }
}

body > *:not(.mesh-bg) { position: relative; z-index: 1; }

/* === Header === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 245, 240, .7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.logo em {
    font-style: italic;
    color: var(--indigo);
}

.nav { display: flex; gap: 32px; }

.nav a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-mid);
    letter-spacing: 0.02em;
    transition: color .2s;
}

.nav a:hover { color: var(--indigo); }

/* === Hero === */
.hero {
    padding: 100px 0 80px;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 64px;
    align-items: center;
}

.hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--coral);
    margin-bottom: 20px;
}

.hero h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero h1 em {
    font-style: italic;
    color: var(--indigo);
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-mid);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 480px;
}

.btn-row { display: flex; gap: 16px; align-items: center; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: var(--indigo);
    padding: 14px 30px;
    border-radius: 100px;
    transition: transform .2s, box-shadow .3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(68,51,255,.25);
}

.btn-ghost {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-mid);
    padding: 14px 24px;
    border-radius: 100px;
    border: 1.5px solid var(--border);
    transition: border-color .2s, color .2s;
}

.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }

/* === Hero visual: isometric blocks === */
.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-visual svg { width: 100%; max-width: 400px; }

/* === Section divider === */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

/* === Projects === */
.projects { padding: 100px 0; }

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--coral);
    margin-bottom: 12px;
}

.projects h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 48px;
}

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

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 30px;
    transition: all .35s cubic-bezier(.25,.8,.25,1);
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--indigo), var(--coral));
    opacity: 0;
    transition: opacity .3s;
}

.project-card:hover::before { opacity: 1; }

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,.08);
    border-color: transparent;
}

.card-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #16a34a;
    margin-bottom: 20px;
}

.card-status .dot {
    width: 7px;
    height: 7px;
    background: #16a34a;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

.card-icon-wrap {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: var(--indigo-glow);
    border-radius: 14px;
    margin-bottom: 20px;
}

.project-card h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 10px;
}

.project-card p {
    font-size: 0.92rem;
    color: var(--text-mid);
    flex: 1;
    line-height: 1.7;
    margin-bottom: 20px;
}

.card-url {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--indigo);
    transition: color .2s;
}

/* === About === */
.about {
    padding: 100px 0;
    background: var(--surface);
    border-top: 1.5px solid var(--border);
    border-bottom: 1.5px solid var(--border);
}

.about-inner {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 40px;
    align-items: start;
}

.about-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 2rem;
    color: #fff;
    flex-shrink: 0;
}

.about h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 16px;
}

.about-role {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--coral);
    margin-bottom: 16px;
}

.about-text p {
    font-size: 1.02rem;
    color: var(--text-mid);
    margin-bottom: 14px;
    max-width: 560px;
    line-height: 1.75;
}

.about-text strong { color: var(--text); }

.about-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--indigo);
    margin-top: 12px;
    font-size: 0.95rem;
    transition: gap .2s;
}

.about-link:hover { gap: 10px; }

/* === Footer === */
.footer { padding: 40px 0; }

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

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

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

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-light);
    transition: color .2s;
}

.footer-links a:hover { color: var(--indigo); }

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    .mesh-bg .blob { animation: none; }
    .card-status .dot { animation: none; }
    .project-card, .btn-primary, .btn-ghost { transition: none; }
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero { padding: 64px 0 48px; min-height: auto; }
    .hero-layout { grid-template-columns: 1fr; gap: 48px; }
    .hero-visual { order: -1; }
    .hero-visual svg { max-width: 280px; }
    .projects, .about { padding: 64px 0; }
    .about-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-avatar { margin: 0 auto; }
    .about-text p { margin-left: auto; margin-right: auto; }
    .btn-row { flex-direction: column; }
    .btn-primary, .btn-ghost { width: 100%; justify-content: center; text-align: center; }
    .footer-inner { flex-direction: column; text-align: center; }
}
