@import url('https://fonts.googleapis.com/css2?family=STIX+Two+Text:ital,wght@0,400..700;1,400..700&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg-color: #ffffff;
    --text-primary: #171717;
    --text-secondary: #737373;
    --accent-underline: #d4d4d4;
    --accent-hover: #a3a3a3;
    --font-serif: "STIX Two Text", serif;
    --font-sans: "Inter", sans-serif;
    --max-width: 650px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #111111;
        --text-primary: #ededed;
        --text-secondary: #a1a1a1;
        --accent-underline: #262626;
        --accent-hover: #404040;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-serif);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 20px 20px 40px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.underline-link {
    border-bottom: 1px solid var(--accent-underline);
    transition: border-color 0.2s ease;
}

.underline-link:hover {
    border-color: var(--accent-hover);
}

/* Hero Section */
.hero-name {
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hero-title {
    margin-top: 1rem;
}

/* Content Lists (Work/Blog) */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    display: flex;
    flex-direction: column;
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.list-item .title {
    font-family: var(--font-sans);
    font-weight: 500;
}

.list-item .meta {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.list-item .description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    margin-bottom: 0;
}

/* About / Now Sections */
.text-block {
    color: var(--text-primary);
}

.now-section ul {
    list-style: none;
    padding-left: 0;
}

.now-section li {
    margin-bottom: 0.75rem;
}

/* Contact / Socials */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.social-links a:hover {
    color: var(--text-primary);
}

/* Blog Internal Page Styles */
.blog-content {
    margin-top: 2rem;
}

.blog-content h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.blog-date {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 15px 15px 30px;
    }
}

/* Animated scan flow figure */
.scan-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin: 2rem 0;
    font-family: var(--font-sans);
}

.scan-flow .row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.scan-flow .node {
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--accent-underline);
    border-radius: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.scan-flow .arrow {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Nodes flash in sequence */
.scan-flow .node {
    animation: nodePulse 4s ease-in-out infinite;
}

.scan-flow .node.d1 { animation-delay: 0s; }
.scan-flow .node.d2 { animation-delay: 0.4s; }
.scan-flow .node.d3 { animation-delay: 0.8s; }
.scan-flow .node.d4 { animation-delay: 1.2s; }
.scan-flow .node.d5 { animation-delay: 1.6s; }
.scan-flow .node.d6 { animation-delay: 2.4s; }

@keyframes nodePulse {
    0%, 90%, 100% {
        color: var(--text-secondary);
        border-color: var(--accent-underline);
        background: transparent;
    }
    95% {
        color: var(--text-primary);
        border-color: var(--text-primary);
        background: var(--text-primary);
        color: var(--bg-color);
    }
}

.scan-flow .arrow {
    animation: arrowPulse 4s ease-in-out infinite;
}

.scan-flow .arrow.a1 { animation-delay: 1.0s; }
.scan-flow .arrow.a2 { animation-delay: 1.8s; }

@keyframes arrowPulse {
    0%, 90%, 100% { opacity: 0.4; transform: scale(1); }
    95% { opacity: 1; transform: scale(1.2); color: var(--text-primary); }
}