:root {
    --bg: #0d0d0f;
    --bg-alt: #141418;
    --surface: #1a1a1f;
    --border: #2a2a32;
    --text: #e8e8ed;
    --text-muted: #8b8b9a;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --success: #22c55e;
    --nav-bg: rgba(13, 13, 15, 0.9);
    --hero-glow: rgba(99, 102, 241, 0.15);
    --slides-bg-tint: rgba(20, 20, 24, 0.6);
    --font-sans: 'Outfit', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--accent);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

.nav-cv {
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white !important;
    border-radius: var(--radius);
}

.nav-cv:hover {
    background: var(--accent-hover);
}

.nav-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.nav-settings-btn:hover {
    color: var(--text);
    border-color: var(--accent);
}

.nav-settings-btn[aria-expanded="true"] {
    color: var(--accent);
    border-color: var(--accent);
}

.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    width: 100%;
    max-width: 360px;
    pointer-events: none;
    visibility: hidden;
    transition: visibility var(--transition);
}

.settings-panel.is-open {
    pointer-events: auto;
    visibility: visible;
}

.settings-panel.is-open .settings-panel-inner {
    transform: translateX(0);
}

.settings-panel.is-open .settings-panel-backdrop {
    opacity: 1;
}

.settings-panel-inner {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 360px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.settings-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.settings-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.settings-panel-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.settings-panel-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.settings-panel-close:hover {
    color: var(--text);
    border-color: var(--accent);
}

.settings-section h4 {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.settings-lang-btns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.settings-lang-btn {
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.settings-lang-btn:hover {
    color: var(--text);
    border-color: var(--accent);
}

.settings-lang-btn[data-active] {
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}

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

.settings-theme-grid button {
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.settings-theme-grid button:hover {
    color: var(--text);
    border-color: var(--accent);
}

.settings-theme-grid button[data-active] {
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}

.settings-theme-more {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    color: var(--accent);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
}

.settings-theme-more:hover {
    color: var(--text);
    border-color: var(--border);
}

.settings-theme-extra {
    display: none;
    margin-top: 0.5rem;
}

.settings-theme-extra.is-open {
    display: block;
}

.settings-theme-extra .settings-theme-grid {
    margin-top: 0;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 5rem 1.5rem 3rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(600px, 100vw);
    height: min(600px, 100vw);
    background: radial-gradient(circle, var(--hero-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.hero-name {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-role {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.hero-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.hero-stack span {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

.btn-outline:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--border), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.section {
    padding: 3rem 1.5rem;
}

#projects {
    overflow-x: hidden;
}

.section-alt {
    background: var(--bg-alt);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.container-narrow {
    max-width: 700px;
}

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

.section-header-row .section-title {
    margin-bottom: 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.project-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.project-filters-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.project-filters-extra {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.35s ease;
}

.project-filters-extra:not(.is-open) {
    margin-bottom: 0;
    min-height: 0;
}

.project-filters-extra.is-open {
    grid-template-rows: 1fr;
}

.project-filters-extra-inner {
    min-height: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-filters-extra.is-open .project-filters-extra-inner {
    opacity: 1;
}

.filter-more-btn {
    padding: 0.5rem 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.filter-more-btn:hover {
    color: var(--text);
    border-color: var(--accent);
}

.filter-btn {
    padding: 0.5rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--accent);
}

.filter-btn.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

.projects-pet-wrap {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.projects-pet-btn {
    align-self: center;
    margin-top: 1.25rem;
    padding: 0.6rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--accent);
    background: transparent;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.projects-pet-btn:hover {
    color: var(--bg);
    background: var(--accent);
}

.projects-pet-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.projects-pet-extra {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.35s ease;
    min-height: 0;
}

.projects-pet-extra:not(.is-open) {
    margin-top: 0;
    margin-bottom: 0;
}

.projects-pet-extra.is-open {
    grid-template-rows: 1fr;
}

.projects-pet-extra > .projects-row {
    min-height: 0;
    margin-top: 0;
    overflow: hidden;
}

.projects-pet-extra:not(.is-open) > .projects-row {
    max-height: 0;
    padding: 0;
    border: none;
}

.projects-pet-extra.is-open > .projects-row {
    max-height: none;
    margin-top: 1rem;
}

.projects-pet-empty {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
    padding: 1rem 0;
}

.projects-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to right, black 0%, black calc(100% - 5rem), transparent 100%);
    mask-image: linear-gradient(to right, black 0%, black calc(100% - 5rem), transparent 100%);
}

.projects-row::-webkit-scrollbar {
    display: none;
}

.project-card {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition: flex-basis 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94), min-width 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94), max-width 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94), margin 0.4s ease, border-color var(--transition), opacity 0.3s ease, transform 0.3s ease;
}

.project-card.hidden {
    display: none !important;
}

.project-card:hover {
    border-color: var(--accent);
}

.project-card.expanded {
    flex: 0 0 520px;
    min-width: 520px;
    max-width: 520px;
}

.project-preview {
    display: flex;
    flex-direction: column;
}

.project-media {
    aspect-ratio: 16/9;
    margin: 5%;
    background: var(--bg-alt);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.project-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, var(--bg-alt) 0%, transparent 12%, transparent 88%, var(--bg-alt) 100%),
                linear-gradient(180deg, var(--bg-alt) 0%, transparent 12%, transparent 88%, var(--bg-alt) 100%);
}

.project-media-slides {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-alt);
}

.project-media-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.project-media-arrow:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.project-media-arrow:focus {
    outline: 2px solid var(--accent, #6b9fff);
    outline-offset: 2px;
}

.project-media-arrow-prev {
    left: 0.5rem;
}

.project-media-arrow-next {
    right: 0.5rem;
}

.project-card.expanded .project-media-arrow {
    opacity: 0.85;
}

.project-media.project-media-arrows-hidden .project-media-arrow {
    display: none;
}

.project-media-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background-image: url("../images/bg.png");
    background-size: cover;
    background-position: center;
}

.project-media-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--surface) 0%, transparent 40%, var(--bg-alt) 100%);
    opacity: 0.85;
    pointer-events: none;
    z-index: 0;
}

.project-media-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, var(--bg-alt) 0%, transparent 12%, transparent 88%, var(--bg-alt) 100%),
                linear-gradient(180deg, var(--bg-alt) 0%, transparent 12%, transparent 88%, var(--bg-alt) 100%);
    z-index: 0;
}

.project-media-slide .project-placeholder {
    width: 100%;
    height: 100%;
}

.project-media-slide img,
.project-media-slide video,
.project-media-slide iframe {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease;
}

.project-media-slide iframe {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    border: 0;
    aspect-ratio: 16/9;
}

.project-media-slide.slide-cover img,
.project-media-slide.slide-cover video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

.project-media-slide.slide-cover iframe {
    max-width: none;
    max-height: none;
}

.project-card.expanded .project-media-slide.active.slide-pops-out img,
.project-card.expanded .project-media-slide.active.slide-pops-out video,
.project-card.expanded .project-media-slide.active.slide-pops-out iframe {
    transform: scale(1.15);
    z-index: 2;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 2px 12px rgba(0, 0, 0, 0.25);
}

.project-media-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.project-card.expanded .project-media {
    cursor: pointer;
    overflow: visible;
}

.project-media-hint {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-card.expanded .project-media-hint {
    opacity: 1;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--surface) 0%, var(--bg-alt) 100%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.project-head {
    padding: 1rem 1.25rem;
}

.project-head h3 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.project-role {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
}

.project-details {
    display: grid;
    grid-template-rows: 0fr;
    padding: 0 1.25rem;
    overflow: hidden;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-details-inner {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
}

.project-card.expanded .project-details {
    grid-template-rows: 1fr;
}

.project-platform {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.project-tech li {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: var(--bg);
    border-radius: 4px;
    color: var(--text-muted);
}

.project-did {
    margin: 0;
}

.project-did li {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.25rem;
}

.project-did li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--accent);
}

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

.project-links a {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
}

.project-links a:hover {
    text-decoration: underline;
}

.skills-toggle {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.skills-toggle:hover {
    color: var(--bg);
    background: var(--accent);
}

.skills-grid-wrapper {
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.skills-grid-wrapper.collapsed {
    max-height: 200px;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
}
.skills-grid-wrapper:not(.collapsed) {
    max-height: 3000px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.skills-category h4 {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skills-category ul li {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
}

.skills-category ul li:last-child {
    border-bottom: none;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.experience-item {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.experience-header h3 {
    font-size: 1.25rem;
}

.experience-period {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.experience-role {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.experience-item ul li {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.experience-item ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.about-content p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all var(--transition);
}

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

.contact-icon {
    font-size: 1.25rem;
}

.contact-cv {
    text-align: center;
}

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

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

/* 404 / error page */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem 2rem;
    text-align: center;
}

.error-page-content {
    max-width: 420px;
}

.error-code {
    font-family: var(--font-mono);
    font-size: clamp(4rem, 15vw, 7rem);
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.error-message {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.error-page .btn {
    display: inline-block;
}

@media (max-width: 900px) {
    .project-card {
        min-width: 240px;
        max-width: 240px;
    }

    .project-card.expanded {
        flex: 0 0 400px;
        min-width: 400px;
        max-width: 400px;
    }
}

@media (max-width: 600px) {
    .project-card {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
    }

    .project-card.expanded {
        flex: 0 0 min(520px, calc(100vw - 2rem));
        min-width: min(520px, calc(100vw - 2rem));
        max-width: min(520px, calc(100vw - 2rem));
    }
}

@media (max-width: 480px) {
    .settings-panel-inner {
        max-width: 100%;
    }

    .settings-theme-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        flex: 0 0 180px;
        min-width: 180px;
        max-width: 180px;
    }

    .project-card.expanded {
        flex: 0 0 min(400px, calc(100vw - 2rem));
        min-width: min(400px, calc(100vw - 2rem));
        max-width: min(400px, calc(100vw - 2rem));
    }

    .projects-row {
        padding-left: 1rem;
        padding-right: 1rem;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 4rem 1rem 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section {
        padding: 3rem 1rem;
    }
}
