:root {
    --bg: #0d0e10;
    --bg-darker: #0a0b0c;
    --bg-card: rgba(13, 14, 16, 0.92);
    --bg-accent: rgba(241, 245, 249, 0.02);
    --bg-accent-hover: rgba(241, 245, 249, 0.05);
    --bg-glass: rgba(18, 20, 24, 0.7);
    --text: #e8eaed;
    --text-dim: #9aa0a8;
    --text-muted: #6b7280;
    --text-ghost: #4b5563;
    --line: rgba(148, 163, 184, 0.12);
    --line-dim: rgba(148, 163, 184, 0.06);
    --line-glow: rgba(226, 232, 240, 0.2);
    --accent: #e8eaed;
    --accent-subtle: #d1d5db;
    --accent-glow: rgba(255, 255, 255, 0.06);
    --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-subtle: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.02), 0 0 8px rgba(255, 255, 255, 0.01);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --container-max: 1140px;
    --container-padding: 2rem;
    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg-darker);
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.7;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 30%, rgba(8, 9, 10, 0.5) 100%);
    pointer-events: none;
    z-index: 9999;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: overlay;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
    color: var(--text);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 {
    font-family: var(--font-sans);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
}

h3 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

h4 {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

p {
    margin: 0;
    line-height: 1.75;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: fixed;
    top: -60px;
    left: 1rem;
    z-index: 2000;
    background: var(--text);
    color: var(--bg-darker);
    text-decoration: none;
    padding: 0.6rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid var(--text);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Enhanced focus indicators for accessibility */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* High contrast focus for interactive elements */
.nav-links a:focus-visible,
.contact-list a:focus-visible,
.work-card a:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

/* Canvas */
#boids-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
    touch-action: none;
}

/* Canvas instructions for accessibility */
.canvas-instructions {
    display: none;
}



/* Layout */
.layout,
.footer {
    position: relative;
    z-index: 1;
}

.layout {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
    padding-top: 4rem;
}

/* Section base */
.section {
    scroll-margin-top: 100px;
    margin-bottom: 3rem;
}

.section:last-child {
    margin-bottom: 0;
}

/* Hero section */
.hero-shell {
    background: var(--bg-card);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-shell {
        display: grid;
        grid-template-columns: 1fr auto;
        flex-direction: unset;
    }
}

.hero-shell::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--line);
    border-left: 2px solid var(--line);
    pointer-events: none;
}

.hero-shell::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px dashed var(--line-dim);
    margin: 4px;
    pointer-events: none;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.015) 0%, transparent 40%);
}

.hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-main h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.05;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
    font-weight: 500;
}

.hero-main h1 span {
    display: inline-block;
    position: relative;
}

.hero-main h1 span::before,
.hero-main h1 span::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-main h1 span::before {
    color: rgba(255, 120, 120, 0.6);
    z-index: -1;
}

.hero-main h1 span::after {
    color: rgba(120, 180, 255, 0.6);
    z-index: -2;
}

.hero-main h1:hover span::before {
    opacity: 1;
    transform: translate(-2px, -1px);
}

.hero-main h1:hover span::after {
    opacity: 1;
    transform: translate(2px, 1px);
}

.hero-main .tagline {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 1rem;
}

.hero-main .tagline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--text-muted), transparent);
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    position: relative;
}

.hero-actions::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--line), transparent);
}

.hero-links {
    display: flex;
    gap: 0.5rem;
}

.hero-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--line-dim);
    transition: all 0.2s ease;
    font-size: 1rem;
    position: relative;
}

.hero-links a::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.hero-links a:hover {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.hero-links a:hover::before {
    border-color: var(--line-dim);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.4s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: rgba(120, 180, 255, 0.15);
    /* Accent tint */
    border-color: rgba(120, 180, 255, 0.4);
    color: #fff;
}

.btn-primary:hover {
    background: rgba(120, 180, 255, 0.25);
    box-shadow: 0 0 15px rgba(120, 180, 255, 0.2);
    border-color: rgba(120, 180, 255, 0.6);
}

.btn-secondary {
    color: var(--text-dim);
    border-color: var(--line-dim);
}

.btn-secondary:hover {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px var(--bg-darker), 0 0 0 2px var(--text);
}

/* Hero side */
.hero-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-container {
    position: relative;
    margin-bottom: 1rem;
}

.avatar-main {
    width: 260px;
    height: 260px;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.05);
    border-radius: 4px;
    border: 1px solid var(--line);
    position: relative;
    z-index: 1;
    transition: filter 0.4s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.avatar-main:hover {
    filter: grayscale(0%) contrast(1.05);
    /* Bring back full color */
    transform: scale(1.05) translateY(-5px);
    /* Lift and grow */
    box-shadow: var(--shadow-subtle), 0 0 20px rgba(120, 180, 255, 0.15);
    /* Add glow */
    border-color: rgba(120, 180, 255, 0.4);
    /* Highlight border */
}

.avatar-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    background:
        linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
    z-index: 2;
    pointer-events: none;
    border-radius: 4px;
}

.avatar-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px);
    z-index: 3;
    pointer-events: none;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-container:hover::after {
    opacity: 1;
}

.avatar-meta {
    text-align: center;
}

.avatar-meta .avatar-name {
    display: none;
}

.avatar-meta .avatar-role {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Dynamic Sections */
.dynamic-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.dynamic-section.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Removed empty .currently-shell */

.currently-grid {
    display: grid;
    gap: 1rem;
}

.current-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-dim);
    transition: all 0.2s ease;
    position: relative;
}

.current-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--text-muted), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.current-item:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(3px);
}

.current-item:hover::before {
    opacity: 1;
}

.current-item>i {
    font-size: 1.25rem;
    color: var(--text-muted);
    padding-top: 0.2rem;
}

.current-item-content h4 {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.3rem;
    letter-spacing: 0;
}

.current-item-content p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.item-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-dim);
    color: var(--text-ghost);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Removed empty .thoughts-shell */

.thoughts-list {
    display: grid;
    gap: 1rem;
}

.thought-item {
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--text-muted);
    position: relative;
}

.thought-item::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 2rem;
    color: var(--line);
    font-family: var(--font-serif);
    line-height: 1;
}

.thought-item p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.thought-item cite {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-ghost);
    font-style: normal;
    padding-left: 1rem;
}

/* Removed empty .links-shell */

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.link-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-dim);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-muted), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(120, 180, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.link-item:hover::before {
    opacity: 1;
}

.link-content h4 {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.3rem;
    letter-spacing: 0;
}

.link-content p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.link-item>i {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.link-item:hover>i {
    transform: translate(2px, -2px);
}

/* Panel sections */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.panel-id::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--text-muted), transparent);
    margin-left: 0.75rem;
    vertical-align: middle;
}

.panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px dashed var(--line-dim);
    margin: 3px;
    pointer-events: none;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    pointer-events: none;
}

.panel-id {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-ghost);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.panel h2 {
    margin-bottom: 0.75rem;
    line-height: 1.35;
    color: var(--text);
}

/* Removed empty .about-shell */

.about-shell p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.experience-entry {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-dim);
    border-left: 2px solid var(--text-muted);
    transition: all 0.2s ease;
    position: relative;
}

.experience-entry::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--line);
    border-right: 2px solid var(--line);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.experience-entry::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 12px;
    height: 12px;
    border-bottom: 2px solid var(--line);
    border-left: 2px solid var(--line);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.experience-entry:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: var(--text);
}

.experience-entry:hover::before,
.experience-entry:hover::after {
    opacity: 1;
}

.experience-duration {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding-top: 0.2rem;
}

.experience-details h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.experience-details p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Removed empty .stack-shell */

.stack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stack-card {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-dim);
    transition: all 0.2s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.stack-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--text-muted), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stack-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(2px);
}

.stack-card:hover::before {
    opacity: 0.5;
}

.stack-card h3 {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.stack-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Removed empty .projects-shell */

.projects-shell h2 {
    margin-bottom: 1.25rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.project-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-dim);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(120, 180, 255, 0.3);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-header>i {
    font-size: 1.5rem;
    color: var(--text-muted);
    position: relative;
}

.project-header>i::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 4px 4px;
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

.project-links a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--line-dim);
    transition: all 0.2s ease;
}

.project-links a:hover {
    color: var(--text);
    border-color: var(--line);
}

.project-card h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.project-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tags .tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-dim);
    color: var(--text-muted);
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Removed empty .contact-shell */

.contact-shell h2 {
    margin-bottom: 0.5rem;
}

.contact-intro {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-list a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-dim);
    transition: all 0.2s ease;
    position: relative;
}

.contact-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: var(--text-muted);
    transition: width 0.2s ease;
}

.contact-list a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    padding-left: 1.25rem;
}

.contact-list a:hover::before {
    width: 3px;
}

.contact-list a i {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.footer {
    position: relative;
    z-index: 1;
    padding: 2.5rem var(--container-padding) 3rem;
    border-top: 1px solid var(--line-dim);
    margin-top: 3rem;
    background:
        linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.01));
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-dim), transparent);
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-section h4 {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-ghost);
    margin-bottom: 1rem;
}

.footer-section p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    max-width: var(--container-max);
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-ghost);
    letter-spacing: 0.02em;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--line-dim);
    transition: all 0.2s ease;
}

.footer-social a:hover {
    color: var(--text);
    border-color: var(--line);
}

/* Status indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-dim);
    margin-bottom: 1rem;
    position: relative;
}

.status-indicator::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, transparent 50%, rgba(255, 255, 255, 0.02) 50%);
    background-size: 4px 4px;
    pointer-events: none;
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4a7c4e;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 4px rgba(74, 124, 78, 0.5);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Section animations */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

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

.hero-shell.visible {
    animation: slideIn 0.6s var(--ease-out-expo);
}

.panel.visible {
    animation: fadeSlide 0.5s var(--ease-out-expo);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 1024px) {
    :root {
        --container-padding: 1.5rem;
    }

    .hero-shell {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-main {
        align-items: center;
    }

    .hero-side {
        order: -1;
    }

    .avatar-main {
        width: 200px;
        height: 200px;
    }

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

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

    .experience-entry {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }

    .layout {
        padding-top: 3rem;
    }

    .hero-main h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .hero-links {
        justify-content: center;
    }

    .panel {
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 1rem;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

@media (max-width: 480px) {
    .hero-shell {
        padding: 2rem 1.25rem;
        gap: 1.5rem;
    }

    .hero-main h1 {
        font-size: 2rem;
    }

    .avatar-main {
        width: 140px;
        height: 140px;
    }

    .panel {
        padding: 1.25rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {

    #boids-canvas,
    body::before {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    .panel,
    .hero-shell {
        background: #fff;
        border-color: #ccc;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(120, 180, 255, 0.15);
    color: var(--text);
    border-color: rgba(120, 180, 255, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}