:root {
    /* Color Palette */
    --bg-color: #0b0f14;
    --surface-color: #11161c;
    --surface-hover: #161d25;
    --primary-color: #10B981;
    --primary-glow: rgba(16, 185, 129, 0.4);
    --text-main: #F9FAFB;
    --text-muted: #9CA3AF;
    --border-color: #232a34;
    
    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Spacing */
    --section-padding: 120px 20px;
    --container-width: 1200px;
    
    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    /* scroll-behavior: smooth; - Removed to prevent conflict with Lenis */
}

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

/* Lenis Recommended CSS */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

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

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.content-section {
    padding: var(--section-padding);
    position: relative;
}

/* Background Effects */
.liquid-ether-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.back-home {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-main);
    background: rgba(11, 15, 20, 0.6);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

.back-home:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.lang-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 80;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-main);
    background: rgba(11, 15, 20, 0.6);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 0;
    z-index: 100;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 5, 0.5);
    border-bottom: 1px solid transparent;
}

.main-nav.scrolled {
    padding: 16px 0;
    background: rgba(5, 5, 5, 0.8);
    border-bottom: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    background: transparent;
}

.greeting {
    font-size: clamp(40px, 8vw, 80px);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
}

.name-highlight {
    background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-top: 10px;
}

.job-title {
    font-size: clamp(18px, 4vw, 24px);
    color: var(--primary-color);
    margin-bottom: 32px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.intro {
    max-width: 600px;
    margin: 0 auto 48px;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
}

/* Common Section Titles */
.section-title {
    font-size: 32px;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    margin: 16px auto 0;
    border-radius: 2px;
}

.section-intro {
    max-width: 960px;
    margin: 24px auto 40px;
    padding: 26px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 16, 22, 0.7);
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 28px;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
}

.section-intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(240px 140px at 12% 0%, rgba(16, 185, 129, 0.18), transparent 60%),
        radial-gradient(260px 160px at 90% 0%, rgba(114, 91, 255, 0.18), transparent 60%);
    opacity: 0.6;
    pointer-events: none;
}

.section-intro > * {
    position: relative;
    z-index: 1;
}

.section-intro--single {
    grid-template-columns: 1fr;
}

.intro-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.intro-kicker {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.section-intro .intro-line {
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.8;
    margin: 0;
}

.page-note {
    margin: 24px auto 0;
    max-width: 720px;
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
}

.products-page {
    padding-top: 104px;
}

.products-shell {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.products-hero {
    max-width: 780px;
}

.products-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #dcfff1;
    border: 1px solid rgba(16, 185, 129, 0.42);
    background: rgba(16, 185, 129, 0.12);
}

.products-title {
    margin: 14px 0 0;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.products-lead {
    margin-top: 16px;
    color: rgba(219, 227, 236, 0.88);
    font-size: 17px;
    line-height: 1.9;
    max-width: 700px;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.product-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    background: linear-gradient(130deg, rgba(11, 15, 21, 0.98), rgba(18, 24, 33, 0.92));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    position: relative;
    isolation: isolate;
}

.product-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(360px 240px at 6% 8%, rgba(16, 185, 129, 0.2), transparent 70%),
        radial-gradient(320px 220px at 95% 20%, rgba(62, 88, 255, 0.18), transparent 68%);
    pointer-events: none;
}

.product-showcase--pbti {
    background: linear-gradient(130deg, rgba(13, 19, 16, 0.98), rgba(27, 34, 25, 0.92));
}

.product-showcase--pbti::before {
    background:
        radial-gradient(360px 240px at 6% 8%, rgba(134, 210, 151, 0.24), transparent 70%),
        radial-gradient(320px 220px at 96% 12%, rgba(238, 201, 128, 0.18), transparent 68%);
}

.product-visual {
    position: relative;
    min-height: 520px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.product-visual--pbti {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(230, 245, 224, 0.22), transparent 58%),
        linear-gradient(150deg, rgba(242, 248, 239, 0.12), rgba(18, 29, 23, 0.2));
}

.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.08) contrast(1.05);
}

.product-thumb--contain {
    width: min(76%, 430px);
    height: auto;
    max-height: 78%;
    object-fit: contain;
    border-radius: 22px;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
}

.product-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(5, 10, 16, 0.72) 0%, rgba(5, 10, 16, 0.15) 46%, rgba(5, 10, 16, 0) 100%);
    pointer-events: none;
}

.product-floating {
    position: absolute;
    left: 22px;
    bottom: 22px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-pill {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(8, 14, 20, 0.66);
    backdrop-filter: blur(6px);
    color: rgba(238, 244, 250, 0.92);
    font-size: 12px;
    letter-spacing: 0.03em;
}

.product-body {
    padding: 30px 30px 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.product-tag {
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(240, 255, 250, 0.88);
    font-size: 12px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.product-name {
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.product-desc {
    color: rgba(218, 226, 235, 0.85);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 18px;
}

.product-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.metric-item {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 11px 10px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 74px;
}

.metric-value {
    color: #e9fff5;
    font-size: 21px;
    line-height: 1;
    font-weight: 700;
}

.metric-label {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.product-highlights {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.product-highlights li {
    color: rgba(236, 241, 247, 0.92);
    font-size: 14px;
    line-height: 1.62;
    padding-left: 20px;
    position: relative;
}

.product-highlights li::before {
    content: '\2022';
    position: absolute;
    left: 4px;
    top: 0;
    color: var(--primary-color);
}

.product-link {
    align-self: flex-start;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #eafcf4;
    background: rgba(16, 185, 129, 0.15);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: var(--transition-fast);
}

.product-link:hover {
    transform: translateY(-1px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.framepilot-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.framepilot-panel {
    padding: 26px 28px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(13, 18, 25, 0.84);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.framepilot-panel h3 {
    font-size: 22px;
    margin-bottom: 14px;
}

.framepilot-list,
.framepilot-guide-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.framepilot-list li,
.framepilot-guide-list li {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.framepilot-flow {
    list-style: none;
    counter-reset: fp-step;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.framepilot-flow li {
    counter-increment: fp-step;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    padding-left: 44px;
    position: relative;
}

.framepilot-flow li::before {
    content: counter(fp-step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #e9fff6;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.framepilot-guide {
    margin-top: 24px;
}

.framepilot-repo {
    margin-top: 24px;
}

.framepilot-repo-desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.framepilot-repo-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.42);
    background: rgba(16, 185, 129, 0.12);
    color: #e9fff5;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-all;
    transition: var(--transition-fast);
}

.framepilot-repo-link:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.22);
    transform: translateY(-1px);
}

.inline-code {
    display: block;
    margin-top: 8px;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 14, 20, 0.8);
    color: #f6f7f9;
    font-size: 13px;
    line-height: 1.55;
    white-space: nowrap;
    overflow-x: auto;
}

.framepilot-shots {
    margin-top: 26px;
}

.framepilot-shots-title {
    font-size: 28px;
    margin-bottom: 18px;
    text-align: center;
}

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

.framepilot-shot {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(12, 17, 24, 0.92);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.framepilot-shot img {
    display: block;
    width: 100%;
    height: auto;
}

.framepilot-shot figcaption {
    padding: 14px 14px 16px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.intro-tools {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.intro-label {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.tool-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.tool-chip {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    background: rgba(17, 22, 28, 0.6);
    transition: var(--transition-fast);
}

.tool-chip:hover {
    border-color: var(--primary-color);
    color: #fff;
}

@media (max-width: 768px) {
    .section-intro {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .intro-tools {
        align-items: center;
    }

    .tool-list {
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .products-page {
        padding-top: 92px;
    }

    .products-title {
        font-size: clamp(34px, 10vw, 52px);
    }

    .product-showcase {
        grid-template-columns: 1fr;
    }

    .product-visual {
        min-height: 320px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .product-body {
        padding: 22px;
    }

    .product-name {
        font-size: 32px;
    }

    .framepilot-layout {
        grid-template-columns: 1fr;
    }

    .framepilot-shot-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .products-lead {
        font-size: 15px;
        line-height: 1.75;
    }

    .product-name {
        font-size: 28px;
    }

    .product-metrics {
        grid-template-columns: 1fr;
    }
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.about-info, .education, .personal-traits {
    background: var(--surface-color);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.about-info:hover, .education:hover, .personal-traits:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.about-content h3 {
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-content p, .about-content li {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 15px;
}

/* Timeline / Experience */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    margin-left: 32px;
    margin-bottom: 48px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    transition: var(--transition-fast);
}

.timeline-item:hover::before {
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.timeline-content {
    background: var(--surface-color);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-content {
    border-color: var(--primary-color);
}

.company-name {
    font-size: 20px;
    margin-bottom: 8px;
}

.period {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 4px;
    font-family: monospace;
}

.position {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-fast);
    margin-top: 12px;
}

.toggle-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.responsibilities {
    margin-top: 20px;
    padding-left: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.responsibilities li {
    list-style-type: disc;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 14px;
}

/* Projects */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.project-item {
    background: var(--surface-color);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.project-details {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-name {
    font-size: 22px;
    margin-bottom: 12px;
}

.project-meta {
    margin-bottom: 16px;
}

.project-role {
    font-size: 14px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-tools {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-family: monospace;
}

.project-description {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px;
    flex-grow: 1;
}

.project-responsibilities {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.project-responsibilities li {
    list-style-type: none;
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.project-responsibilities li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Portfolio */
.portfolio-archive {
    padding-top: 80px;
}

.portfolio-hero {
    max-width: 1120px;
    margin: 0 auto 52px;
    padding: 36px 38px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(920px 360px at 95% -30%, rgba(16, 185, 129, 0.22), transparent 56%),
        radial-gradient(760px 260px at -12% 0%, rgba(87, 120, 255, 0.2), transparent 50%),
        linear-gradient(145deg, rgba(9, 14, 22, 0.95), rgba(5, 10, 16, 0.88));
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        -35deg,
        rgba(255, 255, 255, 0.035) 0,
        rgba(255, 255, 255, 0.035) 1px,
        transparent 1px,
        transparent 14px
    );
    opacity: 0.35;
}

.portfolio-hero > * {
    position: relative;
    z-index: 1;
}

.portfolio-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 22px;
    align-items: stretch;
}

.portfolio-hero-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portfolio-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.1);
    color: #c6ffec;
    font-size: 10px;
    letter-spacing: 0.16em;
    font-weight: 600;
    text-transform: uppercase;
}

.portfolio-hero .section-title {
    left: auto;
    transform: none;
    display: block;
    text-align: left;
    margin: 2px 0 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 0.95;
}

.portfolio-hero .section-title::after {
    margin: 18px 0 0;
    width: 68px;
    height: 5px;
    border-radius: 999px;
}

.portfolio-lead {
    max-width: 760px;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.85;
}

.portfolio-hint {
    margin-top: 2px;
    padding: 11px 14px;
    width: fit-content;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(8, 14, 20, 0.62);
    color: #ced8e3;
    font-size: 13px;
}

.portfolio-backup-note {
    margin-top: 2px;
    padding: 12px 14px;
    width: fit-content;
    max-width: 780px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(7, 12, 18, 0.74);
    color: #d4dee8;
    font-size: 13px;
    line-height: 1.7;
}

.portfolio-backup-note a {
    color: #9ff7d5;
    text-decoration: underline;
    text-decoration-color: rgba(159, 247, 213, 0.45);
}

.portfolio-backup-note a:hover {
    color: #c8ffea;
}

.portfolio-hero-aside {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(6, 10, 16, 0.72);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    backdrop-filter: blur(8px);
}

.portfolio-aside-title {
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.portfolio-metrics {
    display: grid;
    gap: 10px;
}

.portfolio-metric-card {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.portfolio-metric-value {
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    color: #f2fff9;
}

.portfolio-metric-label {
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.portfolio-anchor-nav {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.portfolio-anchor-nav a {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.portfolio-anchor-nav a:hover {
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-2px);
}

.portfolio-anchor-name {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
}

.portfolio-anchor-meta {
    color: var(--text-muted);
    font-size: 12px;
}

.collection-section {
    margin-bottom: 32px;
    padding: 30px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background: rgba(12, 17, 24, 0.72);
    backdrop-filter: blur(8px);
}

.collection-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.collection-title {
    font-size: 30px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.collection-desc {
    color: var(--text-muted);
    font-size: 15px;
}

.collection-meta {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(9, 13, 19, 0.75);
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 980px) {
    .portfolio-hero-grid {
        grid-template-columns: 1fr;
    }

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

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

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

.media-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: #080c12;
    aspect-ratio: 16 / 10;
    cursor: zoom-in;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.media-card:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.9);
    outline-offset: 2px;
}

.media-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.25) 38%, rgba(0, 0, 0, 0));
    z-index: 1;
    pointer-events: none;
}

.media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.media-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.7);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
}

.media-card:hover img {
    transform: scale(1.04);
}

.media-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
}

.media-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.media-subtitle {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.84);
    font-size: 11px;
    letter-spacing: 0.06em;
}

.media-action {
    border: 1px solid rgba(16, 185, 129, 0.7);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #e8fff7;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 9px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.media-action:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--primary-color);
}


.portfolio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 140;
    padding: 24px;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.portfolio-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.portfolio-lightbox-dialog {
    width: min(960px, 95vw);
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(4, 7, 11, 0.95);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
    position: relative;
}

.lightbox-close {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.lightbox-title {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 36px 10px 4px;
}

.lightbox-video {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #000;
    max-height: 78vh;
}

.lightbox-image {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #000;
    max-height: 78vh;
    object-fit: contain;
}

body.lightbox-open {
    overflow: hidden;
}

/* Footer */
.footer {
    padding: 80px 20px 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.contact-info {
    margin-bottom: 32px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Simplification for now, mobile menu could be added */
    }
    
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item {
        margin-left: 48px;
    }
    
    .timeline-item::before {
        left: -35px;
    }

    .greeting {
        font-size: 40px;
    }

    .portfolio-hero {
        padding: 24px 20px;
        margin-bottom: 30px;
        border-radius: 22px;
    }

    .portfolio-hero-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .portfolio-hero .section-title {
        font-size: 40px;
    }

    .portfolio-lead {
        font-size: 15px;
        line-height: 1.75;
    }

    .portfolio-hint {
        width: 100%;
    }

    .portfolio-backup-note {
        width: 100%;
    }

    .portfolio-anchor-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .collection-section {
        padding: 22px;
    }

    .collection-title {
        font-size: 24px;
    }

    .media-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .media-caption {
        padding: 12px;
    }

    .portfolio-lightbox {
        padding: 14px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Page Container for sub-pages */
.page-container {
    padding-top: 100px;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* ScrollStack Styles - Refined for React Bits Fidelity */
.scroll-stack-inner {
    padding: 0;
    margin: 0;
    width: 100%;
    /* Reduced padding to match shorter scroll distance */
    padding-bottom: 20vh; 
    position: relative;
    z-index: 10;
}

.scroll-stack-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    /* Height matches card height to ensure continuous stacking without gaps */
    height: 400px; 
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    /* Remove padding/margin that causes gaps */
    padding: 0;
}

.scroll-stack-card {
    transform-origin: top center;
    will-change: transform, filter;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    
    /* Dimensions matching reference visual weight */
    height: 400px; 
    width: 100%;
    
    /* Default fallback background */
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    
    /* Layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: box-shadow 0.3s ease, filter 0.3s ease;
    /* padding: 3rem; */ /* Moved to specific selector or keep */
    padding: 3rem;
    box-sizing: border-box;
    margin: 0; /* Ensure no margin on card itself */
}

/* Colorful Card Variants */
.scroll-stack-card-wrapper:nth-of-type(1) .scroll-stack-card {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5253 100%);
    box-shadow: 0 20px 60px rgba(238, 82, 83, 0.3);
}

.scroll-stack-card-wrapper:nth-of-type(2) .scroll-stack-card {
    background: linear-gradient(135deg, #4834d4 0%, #686de0 100%);
    box-shadow: 0 20px 60px rgba(104, 109, 224, 0.3);
}

.scroll-stack-card-wrapper:nth-of-type(3) .scroll-stack-card {
    background: linear-gradient(135deg, #6ab04c 0%, #badc58 100%);
    box-shadow: 0 20px 60px rgba(106, 176, 76, 0.3);
}

.scroll-stack-card-wrapper:nth-of-type(4) .scroll-stack-card {
    background: linear-gradient(135deg, #f59e0b 0%, #fcd34d 100%);
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.35);
}

.scroll-stack-card:hover {
    filter: brightness(1.1);
}

.scroll-stack-card h2 {
    font-size: 48px;
    margin-bottom: 16px;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.scroll-stack-card p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    max-width: 80%;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
    font-weight: 500;
}

.scroll-stack-end {
    width: 100%;
    height: 1px;
    margin-top: 10vh;
}

/* Hide original nav cards */
.hero-nav-cards {
    display: none;
}
