@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Montserrat:wght@300;400;600&display=swap');

:root {
    --bg-base: #080809;
    --bg-surface: #101012;
    --bg-elevated: #17171b;
    --bg-glass: rgba(16, 16, 18, 0.82);
    --bg-overlay: rgba(8, 8, 9, 0.94);

    --border: #222226;
    --border-mid: #30303a;
    --border-accent: #3e3e4a;
    --border-glass: rgba(255, 255, 255, 0.06);

    --text-primary: #ededf0;
    --text-secondary: #8e8ea0;
    --text-muted: #4e4e5e;

    --accent: #d0d0de;
    --accent-mid: #8888a0;
    --accent-soft: rgba(208, 208, 222, 0.08);
    --accent-border: rgba(208, 208, 222, 0.16);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 40px 100px rgba(0, 0, 0, 0.7);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 36px;
    --radius-full: 9999px;

    color-scheme: dark;
}

[data-theme='light'] {
    --bg-base: #f4f4f5;
    --bg-surface: #ffffff;
    --bg-elevated: #eaeaec;
    --bg-glass: rgba(255, 255, 255, 0.78);
    --bg-overlay: rgba(244, 244, 245, 0.92);

    --border: #d9d9dc;
    --border-mid: #b8b8be;
    --border-accent: #a0a0a8;
    --border-glass: rgba(0, 0, 0, 0.07);

    --text-primary: #0b0b0d;
    --text-secondary: #4a4a56;
    --text-muted: #8d8d9e;

    --accent: #242430;
    --accent-mid: #56566a;
    --accent-soft: rgba(36, 36, 48, 0.08);
    --accent-border: rgba(36, 36, 48, 0.18);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 40px 100px rgba(0, 0, 0, 0.12);

    color-scheme: light;
}

*,
*::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: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.65;
    transition: background-color 0.35s ease, color 0.35s ease;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.container {
    width: min(1140px, calc(100% - 56px));
    margin-inline: auto;
}

.page-container {
    min-height: 100vh;
    padding-top: 84px;
}

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border-glass);
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
    transform: translateY(-3px);
}

.section {
    padding: 84px 0;
}

.section-soft {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    max-width: 760px;
    margin-bottom: 48px;
}

.label {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.display-lg {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.heading-xl {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.heading-lg {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.heading-md {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(1.05rem, 2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

.body-lg {
    font-size: 1.04rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.body-md {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.meta-note {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-full);
    padding: 4px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--accent-mid);
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    white-space: nowrap;
}

.badge-matte {
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-full);
    padding: 3px 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.btn-primary,
.btn-outline,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-md);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
    padding: 12px 30px;
    border: none;
    background: var(--accent);
    color: var(--bg-surface);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    opacity: 0.88;
}

.btn-outline {
    padding: 11px 30px;
    border: 1.5px solid var(--border-accent);
    background: transparent;
    color: var(--text-primary);
}

.btn-outline:hover {
    transform: translateY(-2px);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.btn-ghost {
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
}

.btn-ghost:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
}

.divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 260;
    padding: 0 28px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
    background: var(--bg-overlay);
    border-bottom: 1px solid var(--border-glass);
}

.nav-shell {
    margin-top: 12px;
    min-height: 64px;
    border-radius: var(--radius-full);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 14px 0 10px;
    box-shadow: var(--shadow-sm);
    transition: margin-top 0.25s ease;
}

.site-header.is-scrolled .nav-shell {
    margin-top: 8px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--bg-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.78rem;
}

.brand-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.08;
}

.brand-name {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
}

.brand-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.main-nav {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px;
    background: var(--bg-elevated);
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav a.active,
.main-nav a:hover {
    background: var(--accent);
    color: var(--bg-surface);
}

.footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82em;
    line-height: 1;
    opacity: 0.85;
}

.footer-link:hover .footer-icon {
    opacity: 1;
}

.nav-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle,
.menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    line-height: 1;
    cursor: pointer;
}

.theme-toggle {
    font-size: 1rem;
}

.menu-btn {
    display: none;
}

.opening-scene {
    position: relative;
    min-height: 100svh;
    width: 100%;
    overflow: hidden;
    font-family: 'Montserrat', 'Inter', sans-serif;
    background-color: #111;
    color: #fff;
}

.opening-background-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #2c2c30 0%, #161618 60%, #0d0d0f 100%);
    z-index: 0;
}

.opening-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center;
    opacity: 0.8;
    z-index: 1;
    pointer-events: none;
}

.opening-canvas-container {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.opening-canvas-container canvas {
    filter: saturate(1.06) contrast(1.04);
}

.opening-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    pointer-events: none;
    z-index: 10;
}

.opening-title {
    margin: 0;
    padding: 0 24px;
    font-size: clamp(2.4rem, 6.8vw, 4.5rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    background: linear-gradient(110deg, #fcfdff 12%, #c7cedd 42%, #ffffff 54%, #afb7c7 80%);
    background-size: 210% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 42px rgba(220, 226, 242, 0.32);
}

.opening-subtitle {
    margin-top: 1rem;
    padding: 0 24px;
    font-size: clamp(0.72rem, 1.8vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    color: #a0a0a5;
    text-transform: uppercase;
}

.opening-divider {
    margin-top: 0.85rem;
    width: clamp(56px, 9vw, 92px);
    height: 1px;
    border-radius: 9999px;
    background: linear-gradient(90deg, rgba(183, 192, 213, 0) 0%, rgba(183, 192, 213, 0.78) 50%, rgba(183, 192, 213, 0) 100%);
    box-shadow: 0 0 14px rgba(183, 192, 213, 0.35);
}

.opening-kicker {
    margin-top: 1rem;
    padding: 0 24px;
    max-width: min(92vw, 760px);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 500;
    font-size: clamp(0.72rem, 1.2vw, 0.92rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d2d8e6;
    text-shadow: 0 0 28px rgba(191, 198, 215, 0.28);
}

.opening-kicker-wrap {
    margin-top: 80px;
    max-width: 88vw;
}

.opening-scene:not(.js-enabled) .opening-title {
    animation: title-shimmer 8s linear infinite, title-breathe 3.8s ease-in-out infinite;
}

.opening-scene.js-enabled .opening-title {
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.95);
    transition: opacity 1.25s ease-out, filter 1.45s ease-out, transform 1.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.opening-scene.js-enabled .opening-subtitle {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(20px);
    transition: opacity 1.25s ease-out 0.35s, filter 1.25s ease-out 0.35s, transform 1.6s cubic-bezier(0.2, 1, 0.3, 1) 0.35s;
}

.opening-scene.js-enabled .opening-divider {
    opacity: 0;
    transform: scaleX(0.65);
    transform-origin: center;
    transition: opacity 0.9s ease-out 0.54s, transform 1.05s cubic-bezier(0.2, 1, 0.3, 1) 0.54s;
}

.opening-scene.js-enabled .opening-kicker {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(14px);
    transition: opacity 1.05s ease-out 0.72s, filter 1.05s ease-out 0.72s, transform 1.35s cubic-bezier(0.2, 1, 0.3, 1) 0.72s;
}

.opening-scene.js-enabled .opening-hero-content.reveal .opening-title {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
    animation: title-shimmer 8s linear infinite, title-breathe 3.8s ease-in-out infinite;
}

.opening-scene.js-enabled .opening-hero-content.reveal .opening-subtitle,
.opening-scene.js-enabled .opening-hero-content.reveal .opening-divider,
.opening-scene.js-enabled .opening-hero-content.reveal .opening-kicker {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

@keyframes title-shimmer {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 210% 50%;
    }
}

@keyframes title-breathe {
    0%,
    100% {
        text-shadow: 0 0 28px rgba(223, 230, 244, 0.22);
    }
    50% {
        text-shadow: 0 0 58px rgba(223, 230, 244, 0.42);
    }
}

.grid-2,
.grid-3,
.grid-auto {
    display: grid;
    gap: 24px;
}

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

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cta-row {
    margin-top: 42px;
    border-top: 1px solid var(--border);
    padding-top: 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.link-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.link-card-arrow {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.link-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.banner {
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 80px 0 64px;
}

.banner .section-header {
    margin-bottom: 0;
}

.about-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: center;
}

.portrait-frame {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-lg);
}

.timeline {
    position: relative;
    padding-left: 36px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom, var(--border-accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 16px 20px;
}

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

.timeline-node {
    position: absolute;
    left: -24px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--accent);
    border: 2px solid var(--bg-surface);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.status-pill {
    display: inline-flex;
    margin-bottom: 8px;
    border-radius: var(--radius-full);
    padding: 2px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: var(--border);
}

.tiny-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.cert-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 20px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.cert-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}

.cert-issuer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 7px;
}

.experience-card {
    padding: 28px;
    height: 100%;
}

.experience-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.experience-list {
    list-style: none;
    display: grid;
    gap: 8px;
}

.experience-list li {
    color: var(--text-secondary);
    font-size: 0.86rem;
    display: flex;
    gap: 8px;
}

.experience-list li::before {
    content: '-';
    color: var(--border-accent);
}

.filter-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 14px 0;
}

.filter-btn {
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 18px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.84rem;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent);
    color: var(--bg-surface);
}

.project-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.project-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.project-top-line {
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--border-accent));
}

.project-body {
    padding: 24px;
}

.project-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.project-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.project-card.expanded .project-details {
    max-height: 480px;
    opacity: 1;
}

.project-card.is-hidden {
    display: none;
}

.skills-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
}

.skill-row {
    margin-bottom: 20px;
}

.skill-row:last-child {
    margin-bottom: 0;
}

.skill-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.skill-track {
    width: 100%;
    height: 3px;
    border-radius: var(--radius-full);
    background: var(--border);
    overflow: hidden;
}

.skill-fill {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, var(--accent), var(--accent-mid));
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-fill.is-animated {
    transform: scaleX(var(--skill-level, 0));
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.soft-chip {
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 10px 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.subject-card {
    padding: 24px;
}

.subject-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.contact-stack {
    display: grid;
    gap: 12px;
}

.contact-item {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    padding: 16px 20px;
}

.contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
}

.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 48px 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-col {
    min-width: 180px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

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

.social-row {
    display: flex;
    gap: 8px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
}

.social-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
    background: var(--bg-surface);
}

.footer-bottom {
    padding-top: 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 980px) {
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-hero {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .portrait-frame {
        max-width: 320px;
    }

    .skills-columns {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 900px) {
    .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: min(280px, 92vw);
        padding: 12px;
        border-radius: var(--radius-lg);
        flex-direction: column;
        align-items: stretch;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        box-shadow: var(--shadow-lg);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .main-nav a {
        border-radius: var(--radius-md);
    }

    .site-header.nav-open .main-nav {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .menu-btn {
        display: inline-flex;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(1140px, calc(100% - 30px));
    }

    .section {
        padding: 68px 0;
    }

    .page-container {
        padding-top: 82px;
    }

    .opening-title {
        letter-spacing: 0.075em;
    }

    .opening-subtitle {
        letter-spacing: 0.16em;
    }

    .opening-kicker {
        margin-top: 1.05rem;
        letter-spacing: 0.085em;
        font-size: 0.72rem;
    }

    .opening-divider {
        margin-top: 0.72rem;
        width: 62px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .cta-row {
        padding-top: 28px;
    }
}

@media (max-width: 520px) {
    .brand-text {
        display: none;
    }

    .theme-toggle,
    .menu-btn {
        width: 36px;
        height: 36px;
        font-size: 0.7rem;
    }
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-accent);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-mid);
}