/*
Theme Name: Debao Huang Portfolio
Theme URI: https://debaohuang.com/
Author: Debao Huang
Description: WordPress presentation of Debao Huang's academic portfolio.
Version: 1.9.17
Text Domain: debao-portfolio
*/

        :root {
            --bg-color: #ffffff;
            --card-bg: #ffffff;
            --card-border: #d1d5db;
            --text-main: #111827;
            --text-light: #4b5563;
            --accent: #2563eb;
            --accent-gradient: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            --radius: 16px;
        }

        [data-theme="dark"] {
            --bg-color: #0f172a;
            --card-bg: #1e293b;
            --card-border: #334155;
            --text-main: #f8fafc;
            --text-light: #94a3b8;
            --accent: #38bdf8;
            --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
        }

        :root {
            color-scheme: light dark;
            --font-sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        /* Skip-to-content link for keyboard users */
        .skip-link {
            position: absolute;
            top: -100px;
            left: 16px;
            z-index: 2000;
            background: var(--accent);
            color: #fff;
            padding: 10px 16px;
            border-radius: 8px;
            font-weight: 600;
            transition: top 0.2s ease;
        }
        .skip-link:focus { top: 16px; }

        * { box-sizing: border-box; margin: 0; padding: 0; }
        html { scroll-behavior: smooth; }
        
        body {
            font-family: var(--font-sans);
            background-color: var(--bg-color);
            color: var(--text-main);
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* Typography & Links */
        a {
            color: var(--accent);
            text-decoration: none;
            position: relative;
            transition: color 0.3s;
        }
        
        /* Fancy Link Underline Effect */
        .paper-links a::after, .nav-links a::after {
            content: '';
            position: absolute;
            width: 100%;
            transform: scaleX(0);
            height: 2px;
            bottom: -2px;
            left: 0;
            background: var(--accent-gradient);
            transform-origin: bottom right;
            transition: transform 0.25s ease-out;
        }
        
        .paper-links a:hover::after, .nav-links a:hover::after {
            transform: scaleX(1);
            transform-origin: bottom left;
        }

        .container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 0 24px;
            padding-left: max(24px, env(safe-area-inset-left));
            padding-right: max(24px, env(safe-area-inset-right));
        }

        nav {
            position: sticky;
            top: 20px;
            z-index: 1000;
            margin: 0 auto;
            width: 90%;
            max-width: 1000px;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 50px;
            box-shadow: var(--shadow-md);
            transition: border-radius 0.3s ease, background 0.3s ease;
        }

        .nav-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 24px;
            flex-wrap: wrap; /* Allows menu to drop down */
        }

        .nav-logo {
            font-weight: 700;
            font-size: 1.1rem;
            letter-spacing: -0.5px;
            color: var(--text-main);
        }

        .nav-links { 
            display: flex; 
            gap: 24px; 
            align-items: center;
        }
        
        .nav-links a { 
            font-size: 0.9rem; 
            font-weight: 500; 
            color: var(--text-main); 
        }

        /* Group for Hamburger toggle */
        .mobile-menu-btn {
            background: none;
            border: none;
            color: var(--text-main);
            cursor: pointer;
            font-size: 1.2rem;
            display: none; /* Hidden on desktop */
            align-items: center;
            justify-content: center;
            transition: color 0.3s;
            padding: 0;
            min-width: 44px;
            min-height: 44px;
            -webkit-tap-highlight-color: transparent;
        }

        .mobile-menu-btn:hover {
            color: var(--accent);
        }

        /* Theme Toggle Styling */
        .theme-toggle {
            background: none;
            border: none;
            color: var(--text-main);
            cursor: pointer;
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.3s;
            padding: 0;
            margin-left: 10px;
            min-width: 44px;
            min-height: 44px;
            -webkit-tap-highlight-color: transparent;
        }

        .theme-toggle:hover {
            color: var(--accent);
        }

        .theme-text {
            display: none; /* Hidden on desktop */
            margin-left: 8px;
            font-size: 0.9rem;
            font-weight: 500;
        }

        /* Scroll Reveal Animation Classes */
        .reveal {
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
        }
        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        /* Section Styling */
        section {
            padding: 20px 0;
        }

        /* Hero Section */
        .hero {
            padding-top: 140px;
            padding-bottom: 100px;
            display: flex;
            align-items: center;
            gap: 50px;
        }

        .hero-name {
            font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
            font-weight: 700;
            line-height: 1.1;
            margin-bottom: 16px;
            letter-spacing: -1px;
            color: var(--text-main);
        }

        .hero-text p { font-size: 1.05rem; margin-bottom: 16px; }

        .hero-image { position: relative; }
        
        .hero-image img {
            width: 200px;
            height: 200px;
            object-fit: cover;
            border-radius: 50%;
            box-shadow: var(--shadow-md);
        }

        /* Social Buttons */
        .social-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
        
        .social-btn {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            padding: 10px 20px;
            min-height: 44px;
            border-radius: 50px;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-main);
            box-shadow: var(--shadow-sm);
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
            -webkit-tap-highlight-color: transparent;
        }

        .social-btn:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
            background: var(--accent);
            color: white;
            border-color: var(--accent);
        }

        .hardware-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 20px;
        }

        .hardware-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: var(--radius);
            overflow: hidden;
            box-shadow: var(--shadow-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            height: 400px;
        }

        .hardware-card img {
            width: 100%;
            height: 100%;
            object-fit: contain; 
        }

        /* Headings */
        h2 {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 50px;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        h2::before {
            content: '';
            display: block;
            width: 6px;
            height: 32px;
            background: var(--accent-gradient);
            border-radius: 4px;
        }

        /* Cards (Research & News) */
        .paper-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: var(--radius);
            padding: 0;
            margin-bottom: 32px;
            box-shadow: var(--shadow-sm);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: grid;
            grid-template-columns: 300px 1fr;
            overflow: hidden;
            height: auto;
            min-height: 260px;
        }

        .paper-card:hover {
            transform: translateY(-5px) scale(1.01);
            box-shadow: var(--shadow-lg);
            border-color: rgba(37, 99, 235, 0.3);
        }

        .paper-img {
            background: var(--card-bg);
            position: relative;
            overflow: hidden;
            height: 100%;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .paper-img img,
        .paper-img video {
            width: 100%;
            height: 100%;
            object-fit: contain;
            transition: transform 0.5s ease;
            display: block;
        }

        .paper-card:hover .paper-img img {
            transform: scale(1.05);
        }

        .venue-badge {
            position: absolute;
            top: 12px;
            left: 12px;
            background: var(--accent);
            color: #fff;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            box-shadow: 0 2px 6px rgba(0,0,0,0.2);
            z-index: 1;
        }

        .paper-content { 
            padding: 24px 28px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .paper-title {
            font-size: 1.2rem;
            font-weight: 700;
            line-height: 1.3;
            margin-bottom: 6px;
            display: block;
            color: var(--text-main);
        }
        
        .paper-title:hover {
            color: var(--accent);
        }

        .paper-authors {
            color: var(--text-light);
            font-size: 0.9rem;
            margin-bottom: 6px;
            line-height: 1.4;
            word-wrap: break-word;
        }

        .demo-block { margin-bottom: 32px; }
        .demo-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-main);
        }
        .demo-grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .paper-venue {
            font-style: italic;
            color: var(--accent);
            font-size: 0.85rem;
            margin-bottom: 12px;
        }

        .paper-desc {
            font-size: 0.95rem;
            color: var(--text-light);
            margin-top: 10px;
        }

        /* Scrollable News Section */
        .news-scroll-wrapper {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: var(--radius);
            padding: 24px;
            max-height: 300px;
            overflow-y: auto;
            box-shadow: inset 0 -10px 20px -10px rgba(0,0,0,0.05);
        }

        .news-scroll-wrapper::-webkit-scrollbar { width: 8px; }
        .news-scroll-wrapper::-webkit-scrollbar-track { background: transparent; }
        .news-scroll-wrapper::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 4px; }
        .news-scroll-wrapper::-webkit-scrollbar-thumb:hover { background: var(--accent); }

        .news-list {
            list-style: none;
            position: relative;
            padding-left: 20px;
        }
        
        .news-list::before {
            content: '';
            position: absolute;
            left: 0;
            top: 5px;
            bottom: 5px;
            width: 2px;
            background: rgba(0,0,0,0.1);
        }

        .news-item {
            margin-bottom: 24px;
            position: relative;
        }

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

        .news-item::after {
            content: '';
            position: absolute;
            left: -24px;
            top: 6px;
            width: 8px;
            height: 8px;
            background: var(--bg-color);
            border: 2px solid var(--accent);
            border-radius: 50%;
            box-shadow: 0 0 0 2px var(--bg-color);
        }

        .news-date {
            display: inline-block;
            background: rgba(37, 99, 235, 0.1);
            color: var(--accent);
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 700;
            margin-bottom: 6px;
        }

        /* Video Containers for Demos */
        .video-container {
            border-radius: var(--radius);
            overflow: hidden;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--card-border);
            background: #000;
        }
        
        .video-container video {
            width: 100%;
            height: auto;
            display: block;
        }

        .service-grid {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-top: 20px;
        }

        .service-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: var(--radius);
            padding: 30px;
            box-shadow: var(--shadow-sm);
        }

        .visitor-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: var(--radius);
            padding: 32px;
            box-shadow: var(--shadow-sm);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 18px;
            width: 100%;
            margin-top: 24px;
        }

        .visitor-label {
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--text-light);
        }

        .visitor-counter img {
            display: block;
            height: 22px;
        }

        /* Footer */
        footer {
            margin-top: 100px;
            padding: 40px 0;
            text-align: center;
            font-size: 0.9rem;
            color: var(--text-light);
            border-top: 1px solid var(--card-border);
        }

        /* Mobile Optimization */
        @media (max-width: 768px) {
            .mobile-menu-btn { display: flex; } /* Show hamburger */
            
            .nav-links { 
                display: none; /* Hide links initially */
                flex-basis: 100%; /* Force to a new row */
                flex-direction: column; 
                align-items: center; /* Center everything in the menu */
                gap: 16px; 
                padding-top: 16px;
                padding-bottom: 8px;
                margin-top: 10px;
                border-top: 1px solid var(--card-border);
            }
            
            .nav-links.active {
                display: flex; /* Show when toggled */
            }

            .nav-links a { font-size: 1rem; }

            /* Adjust Theme Toggle for Mobile Menu */
            .theme-toggle {
                margin: 10px 0 0 0;
                padding: 10px 20px;
                background: rgba(128, 128, 128, 0.1);
                border-radius: 20px;
                justify-content: center;
            }
            .theme-text {
                display: inline; /* Show label text next to icon in mobile menu */
            }
            
            .hero { flex-direction: column-reverse; text-align: center; }
            .paper-card { grid-template-columns: 1fr; height: auto; }
            .paper-img { height: 220px; }
            section { padding: 80px 0; }
            .paper-title, .paper-desc { -webkit-line-clamp: unset; line-clamp: unset; }
            .hardware-grid { grid-template-columns: 1fr; }
            .demo-grid-2 { grid-template-columns: 1fr; }
        }

        /* Tablet (iPad portrait, small laptops) — 769px to 1024px */
        @media (min-width: 769px) and (max-width: 1024px) {
            .paper-card { grid-template-columns: 240px 1fr; min-height: 220px; }
            .hero { gap: 32px; }
            .hero-image img { width: 200px; height: 200px; }
            .hardware-card { height: 320px; }
        }

        /* Small phones — ≤480px */
        @media (max-width: 480px) {
            .hero { padding-top: 110px; padding-bottom: 60px; gap: 30px; }
            .hero-image img { width: 180px; height: 180px; }
            h2 { font-size: 1.6rem; margin-bottom: 32px; }
            .container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
            section { padding: 60px 0 !important; }
            .paper-content { padding: 20px; }
            .news-scroll-wrapper { padding: 18px; }
        }

        /* Respect users who prefer reduced motion */
        @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;
            }
            .reveal { opacity: 1; transform: none; }
            .paper-card:hover { transform: none; }
            .social-btn:hover { transform: none; }
        }
    
/* WordPress block layout adaptation */
body { margin: 0; }
body.admin-bar nav { top: 52px; }
body.admin-bar .skip-link:focus { top: 52px; }
main.container { padding-top: 1px; }
main.container > .wp-block-heading { margin-top: 60px; scroll-margin-top: 110px; }
.wp-block-group { max-width: none !important; }
.wp-block-group > .wp-block-group__inner-container { max-width: none !important; }
.debao-hero { padding: 130px 0 75px; }
.debao-hero .wp-block-columns { align-items: center !important; gap: 50px; margin: 0; }
.debao-hero .wp-block-column:first-child { flex-basis: 75%; }
.debao-hero .wp-block-column:last-child { flex-basis: 25%; }
.debao-hero h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); line-height: 1.1; letter-spacing: -1px; margin: 0 0 16px; }
.debao-hero p { font-size: 1.05rem; margin: 0 0 16px; }
.debao-hero p:last-child { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.debao-hero p:last-child a { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 18px; border: 1px solid var(--card-border); border-radius: 50px; color: var(--text-main); font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.debao-hero p:last-child a:hover { background: var(--accent); color: #fff; }
.debao-hero figure { margin: 0; }
.debao-hero img { width: 200px; height: 200px; max-width: none; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow-md); }
.debao-news { border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; max-height: 300px; overflow-y: auto; box-shadow: var(--shadow-sm); }
.debao-news p { position: relative; border-left: 2px solid var(--card-border); padding: 0 0 22px 22px; margin: 0; }
.debao-news p:last-child { padding-bottom: 0; }
.debao-news p::before { content: ''; position: absolute; left: -5px; top: 8px; width: 7px; height: 7px; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg-color); }
.debao-news strong:first-child { display: inline-block; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); border-radius: 6px; padding: 3px 8px; font-size: .82rem; }
.debao-paper { margin: 0 0 32px; border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s; }
.debao-paper:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.debao-paper > .wp-block-columns { gap: 0; align-items: stretch !important; margin: 0; min-height: 250px; }
.debao-paper .wp-block-column:first-child { flex-basis: 300px; flex-grow: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.debao-paper .wp-block-column:last-child { padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; }
.debao-paper figure { margin: 0; width: 100%; height: 100%; }
.debao-paper img, .debao-paper video { width: 100%; height: 100%; max-height: 280px; object-fit: contain; display: block; }
.debao-paper h3 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 6px; }
.debao-paper h3 a { color: var(--text-main); }
.debao-paper h3 a:hover { color: var(--accent); }
.debao-paper p { margin: 0 0 7px; color: var(--text-light); font-size: .91rem; }
.debao-paper p:nth-of-type(2) { color: var(--accent); font-style: italic; }
.debao-paper p:last-child { margin-top: 9px; }
.debao-demo { margin-bottom: 40px; }
.debao-demo h3, .debao-service h3 { font-size: 1.1rem; margin: 0 0 10px; }
.debao-demo .wp-block-columns { gap: 20px; }
.debao-demo figure.wp-block-video { margin: 12px 0; border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-md); }
.debao-demo video { display: block; width: 100%; }
.debao-demo figure.wp-block-image img { max-height: 400px; object-fit: contain; border: 1px solid var(--card-border); border-radius: var(--radius); }
.debao-service { padding: 30px; border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
main.container > p:last-child { text-align: center; color: var(--text-light); font-size: .9rem; border-top: 1px solid var(--card-border); padding: 40px 0; margin-top: 90px; }
@media (max-width: 768px) {
  .debao-hero { padding: 100px 0 55px; }
  .debao-hero .wp-block-columns { flex-direction: column-reverse; text-align: center; gap: 30px; }
  .debao-hero .wp-block-column { flex-basis: auto !important; }
  .debao-hero img { width: 180px; height: 180px; margin: auto; }
  .debao-hero p:last-child { justify-content: center; }
  .debao-paper > .wp-block-columns { display: block; }
  .debao-paper .wp-block-column:first-child { height: 220px; }
  .debao-paper .wp-block-column:last-child { padding: 20px; }
  main.container > .wp-block-heading { margin-top: 50px; }
}

/* Compact, text-only publication cards */
.debao-paper { padding: 24px 28px; min-height: 0; }
.debao-paper h3 { margin: 0 0 8px; }
.debao-paper p { margin: 0 0 7px; }
@media (max-width: 768px) { .debao-paper { padding: 20px; } }

/* Dark editorial presentation inspired by spatial engineering sites. */
:root, html[data-theme="dark"] {
  --bg-color: #0b0b0d;
  --card-bg: #111317;
  --card-border: #35383e;
  --text-main: #f3f1ee;
  --text-light: #aeb1b9;
  --accent: #b6c9ff;
  --accent-gradient: linear-gradient(140deg, #b1dfff, #7b82ee 50%, #e0a6b8);
  --shadow-sm: 0 4px 22px rgba(0,0,0,.1);
  --shadow-md: 0 12px 30px rgba(0,0,0,.18);
  --shadow-lg: 0 25px 55px rgba(0,0,0,.28);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg-color: #fff;
  --card-bg: #fff;
  --card-border: #d1d5db;
  --text-main: #111827;
  --text-light: #4b5563;
  --accent: #2563eb;
  --accent-gradient: linear-gradient(135deg, #2563eb, #9333ea);
  color-scheme: light;
}
body { background: var(--bg-color); }
nav { top: 0; width: 100%; max-width: none; border: 0; border-bottom: 1px solid var(--card-border); border-radius: 0; box-shadow: none; background: color-mix(in srgb, var(--bg-color) 87%, transparent); backdrop-filter: blur(16px); }
body.admin-bar nav { top: 32px; }
.nav-container { max-width: 1280px; margin: auto; padding: 22px 40px; }
.nav-logo { font-family: Georgia, 'Times New Roman', serif; font-size: 1.35rem; letter-spacing: -.03em; }
.nav-links { gap: 28px; }
.nav-links a { color: var(--text-light); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.nav-links a:hover { color: var(--text-main); }
main.container { max-width: 1200px; }
.debao-hero { position: relative; isolation: isolate; min-height: min(860px, 92vh); display: flex; align-items: center; padding: 100px 0 125px; }
.debao-hero::before { content: ''; position: absolute; z-index: -1; inset: 0 -15vw; background: radial-gradient(ellipse at 78% 55%, rgba(65,72,82,.56), transparent 52%), radial-gradient(ellipse at 45% 110%, rgba(52,44,74,.25), transparent 60%); pointer-events: none; }
.debao-hero::after { content: ''; position: absolute; bottom: 0; left: -15vw; right: -15vw; height: 3px; background: linear-gradient(105deg,#99d9ff,#286eea 12%,#4940ad 22%,#ddd9ff 29%,#fffdf5 32%,#ab65be 37%,#cc6743 46%,#ffc475 56%,#fff7df 61%,#b48045 68%,#6599e7 80%,#d9f3ff 87%,#6550af 94%,#eaa56c); background-size: 200% 100%; animation: debao-heat 12s ease-in-out infinite alternate; }
@keyframes debao-heat { to { background-position: 100% 0; } }
.debao-hero .wp-block-columns { width: 100%; gap: 72px; }
.debao-hero h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: clamp(4rem, 8vw, 8.5rem); line-height: .96; letter-spacing: -.065em; margin-bottom: 45px; }
.debao-hero p { max-width: 750px; color: var(--text-light); font-size: 1.04rem; line-height: 1.65; }
.debao-hero p strong { color: var(--text-main); font-weight: 500; }
.debao-hero img { width: min(225px, 22vw); height: min(225px, 22vw); filter: grayscale(28%); border: 1px solid var(--card-border); box-shadow: 0 25px 70px rgba(0,0,0,.3); }
.debao-hero p:last-child a { background: rgba(255,255,255,.02); color: var(--text-main); box-shadow: none; border-radius: 3px; padding: 9px 15px; font-size: .8rem; letter-spacing: .04em; }
.debao-hero p:last-child a:hover { background: var(--text-main); color: var(--bg-color); }
main.container > .wp-block-heading { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.6rem, 5vw, 4.8rem); font-weight: 400; letter-spacing: -.045em; margin: 110px 0 34px; }
main.container > .wp-block-heading::before { width: 36px; height: 2px; background: var(--accent-gradient); align-self: center; }
.debao-news, .debao-paper, .debao-service { background: var(--card-bg); border-radius: 4px; box-shadow: none; }
.debao-paper:hover { transform: translateY(-3px); border-color: #7f8eac; box-shadow: 0 20px 40px rgba(0,0,0,.15); }
.debao-paper h3 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.55rem; font-weight: 400; line-height: 1.2; }
.debao-paper p { color: var(--text-light); }
.debao-news strong:first-child { background: rgba(154,171,221,.13); }
.debao-service p { margin-bottom: 8px; }
@media (max-width: 768px) {
  .nav-container { padding: 14px 20px; }
  .nav-links { background: var(--bg-color); }
  .debao-hero { min-height: 0; padding: 86px 0 90px; }
  .debao-hero .wp-block-columns { gap: 36px; }
  .debao-hero h1 { font-size: clamp(3.6rem, 14vw, 5.5rem); margin-bottom: 28px; }
  .debao-hero img { width: 170px; height: 170px; }
  main.container > .wp-block-heading { margin-top: 72px; }
}
@media (prefers-reduced-motion: no-preference) {
  .has-motion .debao-paper, .has-motion .debao-news, .has-motion .debao-service, .has-motion main.container > .wp-block-heading { opacity: 0; transform: translateY(22px); transition: opacity .75s ease, transform .75s ease, border-color .3s ease; }
  .has-motion .is-visible { opacity: 1 !important; transform: translateY(0) !important; }
}
@media (prefers-reduced-motion: reduce) { .debao-hero::after { animation: none; } }

/* Radiant steel inspired presentation, retaining editable WordPress content. */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg-color: #0b0b0d;
  --card-bg: #151619;
  --card-border: #33353a;
  --text-main: #edeae5;
  --text-light: #aaa8aa;
  --accent: #bed9f3;
  --accent-gradient: linear-gradient(105deg, #99d9ff, #286eea 16%, #4940ad 28%, #ddd9ff 38%, #fffcf2 50%, #cc6743 64%, #ffc475 76%, #d9f3ff 92%);
}
html { background: #0b0b0d; }
body { background: #0b0b0d; color: var(--text-main); font-family: "DM Sans", sans-serif; }
a { color: #d5d1cc; }
a:hover { color: #fff; }
nav, body.admin-bar nav { position: sticky; top: 0; width: 100%; max-width: none; border: 0; border-bottom: 1px solid #33353a; border-radius: 0; box-shadow: none; background: rgba(11,11,13,.88); backdrop-filter: blur(18px); }
body.admin-bar nav { top: 32px; }
.nav-container { max-width: 1280px; margin: auto; min-height: 74px; padding: 14px 36px; }
.nav-logo { color: #edeae5; font-family: "Gilda Display", Georgia, serif; font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; }
.nav-links a { color: #bebdc0; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; }
.nav-links a:hover { color: #fff; }
.theme-toggle { display: none; }
main.container { max-width: 1160px; padding: 0 36px; }
.debao-hero { position: relative; isolation: isolate; min-height: min(850px, calc(100svh - 74px)); display: flex; align-items: center; padding: 90px 0 120px; }
.debao-hero::before { content: ''; position: absolute; z-index: -1; inset: 0 calc((1160px - 100vw)/2); pointer-events: none; background: radial-gradient(ellipse at 78% 52%, rgba(57,61,69,.67) 0%, rgba(11,11,13,0) 55%), radial-gradient(ellipse at 60% 90%, rgba(28,29,34,.35), transparent 55%); }
.debao-hero::after { content: ''; position: absolute; left: calc((1160px - 100vw)/2); right: calc((1160px - 100vw)/2); bottom: 0; height: 3px; background: var(--accent-gradient); background-size: 220% 100%; box-shadow: 0 0 28px rgba(148,146,195,.4); animation: spectral-glow 14s ease-in-out infinite alternate; }
@keyframes spectral-glow { to { background-position: 100% 0; } }
.debao-hero .wp-block-columns { gap: 7vw; }
.debao-hero .wp-block-column:first-child { flex-basis: 72%; }
.debao-hero .wp-block-column:last-child { flex-basis: 28%; }
.debao-hero h1 { font-family: "Gilda Display", Georgia, serif; font-size: clamp(5.5rem, 9.8vw, 10rem); font-weight: 400; line-height: .89; letter-spacing: -.055em; margin: 0 0 54px; }
.debao-hero p { color: #c4c1c0; font-family: "Gilda Display", Georgia, serif; font-size: clamp(1.35rem, 1.75vw, 1.7rem); line-height: 1.35; max-width: 690px; margin-bottom: 21px; }
.debao-hero p strong { color: #f3f0e9; font-weight: 600; }
.debao-hero p:nth-last-child(2) { font-family: "DM Sans", sans-serif; font-size: .87rem; line-height: 1.7; color: #9e9ca1; margin-top: 30px; }
.debao-hero p:last-child { gap: 18px; margin-top: 35px; }
.debao-hero p:last-child a { border: 0; border-radius: 0; padding: 0 0 4px; min-height: 30px; color: #d4d1d0; box-shadow: none; border-bottom: 1px solid #77757a; font-family: "DM Sans", sans-serif; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.debao-hero p:last-child a:hover { background: transparent; color: white; border-color: white; transform: none; }
.debao-hero img { width: min(22vw, 275px); height: min(22vw, 275px); border-radius: 2px; filter: none; box-shadow: 16px 18px 50px rgba(0,0,0,.4); opacity: .88; }
main.container > .wp-block-heading { color: #f0ede9; font-family: "Gilda Display", Georgia, serif; font-size: clamp(3.2rem, 5.5vw, 5.5rem); font-weight: 400; line-height: 1.05; letter-spacing: -.04em; margin: 130px 0 42px; scroll-margin-top: 100px; }
main.container > .wp-block-heading::before { display: none; }
.debao-news { background: #111215; border: 1px solid #37383b; border-radius: 2px; max-height: 410px; padding: 28px 36px; box-shadow: none; }
.debao-news p { color: #c3c1c0; border-color: #3e4046; font-size: .94rem; }
.debao-news strong:first-child { color: #d7d2c9; background: #27292d; font-family: "DM Sans", sans-serif; font-size: .73rem; letter-spacing: .04em; }
.debao-news p::before { background: #b6c9da; border-color: #b6c9da; }
.debao-paper { background: transparent; border: 0; border-top: 1px solid #34353a; border-radius: 0; padding: 28px 0 36px; margin-bottom: 0; box-shadow: none; transition: background .3s, padding .3s; }
.debao-paper:last-of-type { border-bottom: 1px solid #34353a; }
.debao-paper:hover { transform: none; background: rgba(255,255,255,.025); box-shadow: none; }
.debao-paper h3 { font-family: "Gilda Display", Georgia, serif; font-size: clamp(1.8rem, 2.6vw, 2.5rem); font-weight: 500; line-height: 1.1; max-width: 800px; margin-bottom: 14px; }
.debao-paper h3 a { color: #efede9; }
.debao-paper p { color: #a5a4a6; font-size: .86rem; max-width: 820px; line-height: 1.65; }
.debao-paper p:nth-of-type(2) { color: #bdc1c9; }
.debao-service { background: transparent; border: 1px solid #34353a; border-radius: 2px; padding: 30px 36px; box-shadow: none; }
.debao-service p { color: #c2c0bf; margin: 0 0 8px; }
main.container > p:last-child { color: #8f8d91; border-color: #34353a; margin-top: 140px; }
body.js-motion main.container > .wp-block-heading, body.js-motion .debao-paper, body.js-motion .debao-news, body.js-motion .debao-service { opacity: 0; transform: translateY(22px); transition: opacity .75s ease, transform .75s ease; }
body.js-motion .is-visible { opacity: 1 !important; transform: translateY(0) !important; }
@media (max-width: 768px) {
  body.admin-bar nav { top: 46px; }
  .nav-container { padding: 12px 20px; }
  .nav-links.active { background: #111215; }
  main.container { padding: 0 20px; }
  .debao-hero { min-height: 0; padding: 100px 0 100px; }
  .debao-hero::before { inset: 0 -20px; background: radial-gradient(ellipse at 80% 50%, #303238, transparent 65%); }
  .debao-hero::after { left: -20px; right: -20px; }
  .debao-hero .wp-block-columns { flex-direction: column-reverse; text-align: left; }
  .debao-hero img { width: 130px; height: 130px; margin: 0; }
  .debao-hero h1 { font-size: clamp(4.7rem, 18vw, 7rem); margin: 0 0 30px; }
  .debao-hero p { font-size: 1.32rem; }
  main.container > .wp-block-heading { margin-top: 85px; }
  .debao-news { padding: 22px; }
  .debao-paper { padding: 25px 0; }
}
@media (prefers-reduced-motion: reduce) { .debao-hero::after { animation: none; } body.js-motion main.container > .wp-block-heading, body.js-motion .debao-paper, body.js-motion .debao-news, body.js-motion .debao-service { opacity: 1; transform: none; } }

.debao-paper p a { display: inline-flex; align-items: center; gap: 5px; margin-right: 16px; color: #d4d2d1; border-bottom: 1px solid #6e7077; padding-bottom: 2px; white-space: nowrap; }
.debao-paper p a:hover { color: #fff; border-color: #fff; }
.debao-paper p a svg { width: 15px; height: 15px; flex: none; }

/* Editorial section rhythm informed by the World Labs reference. */
main.container > .wp-block-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  border-top: 1px solid #37383d;
  padding-top: 36px;
  margin-top: 145px;
  margin-bottom: 46px;
}
main.container > .wp-block-heading::after {
  color: #96969c;
  font-family: "DM Sans", sans-serif;
  font-size: .69rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-bottom: 8px;
}
#news.wp-block-heading { border-top: 0; padding-top: 0; }
#news.wp-block-heading::after { content: '01 / Updates'; }
#research.wp-block-heading::after { content: '02 / Publications'; }
#honors.wp-block-heading::after { content: '03 / Recognition'; }
#review.wp-block-heading::after { content: '04 / Community'; }
.debao-paper { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 22px; padding: 37px 0 43px; counter-increment: publication; }
main.container { counter-reset: publication; }
.debao-paper::before { content: counter(publication, decimal-leading-zero); grid-row: 1 / span 5; color: #85858b; font: 500 .72rem/1.5 "DM Sans", sans-serif; letter-spacing: .1em; padding-top: 9px; }
.debao-paper h3, .debao-paper p { grid-column: 2; }
.debao-paper h3 { max-width: 820px; font-size: clamp(2rem, 3vw, 2.75rem); }
.debao-paper p:last-child { max-width: 770px; margin-top: 18px; }
.debao-service { padding: 44px 48px; }
@media (max-width: 768px) {
  main.container > .wp-block-heading { margin-top: 100px; padding-top: 28px; align-items: baseline; }
  main.container > .wp-block-heading::after { font-size: .58rem; letter-spacing: .08em; white-space: normal; text-align: right; }
  .debao-paper { grid-template-columns: 35px minmax(0,1fr); column-gap: 12px; padding: 30px 0; }
  .debao-paper::before { font-size: .63rem; padding-top: 7px; }
  .debao-service { padding: 26px; }
}

/* Narrow-screen refinements from both reference sites' mobile rules. */
@media (max-width: 700px) {
  .nav-container { min-height: 64px; padding: 10px 24px; }
  .nav-logo { font-size: 1.35rem; }
  .mobile-menu-btn { font-size: 1.25rem; }
  .nav-links { width: 100%; flex-basis: 100%; padding: 20px 0 12px; gap: 0; align-items: stretch; }
  .nav-links a { display: block; padding: 12px 4px; border-bottom: 1px solid #33353a; font-size: .84rem; }
  main.container { padding-left: 24px; padding-right: 24px; }
  .debao-hero { padding: 64px 0 84px; }
  .debao-hero::before { inset: 0 -24px; }
  .debao-hero::after { left: -24px; right: -24px; }
  .debao-hero .wp-block-columns { gap: 26px; }
  .debao-hero img { width: 110px; height: 110px; }
  .debao-hero h1 { font-size: clamp(3.3rem, 12vw, 4.4rem); letter-spacing: -.052em; line-height: .95; margin-bottom: 30px; overflow-wrap: normal; }
  .debao-hero p { font-size: 1.22rem; line-height: 1.38; overflow-wrap: anywhere; }
  .debao-hero p:nth-last-child(2) { font-size: .77rem; }
  .debao-hero p:last-child { gap: 13px; }
  .debao-hero p:last-child a { font-size: .69rem; }
  main.container > .wp-block-heading { flex-direction: column; align-items: flex-start; gap: 9px; font-size: clamp(2.8rem, 11vw, 4.2rem); line-height: 1; margin-top: 86px; margin-bottom: 29px; }
  main.container > .wp-block-heading::after { order: -1; padding: 0; font-size: .62rem; letter-spacing: .14em; }
  .debao-news { padding: 20px 18px; max-height: 370px; }
  .debao-news p { font-size: .87rem; line-height: 1.55; padding-left: 17px; }
  .debao-paper { grid-template-columns: 28px minmax(0,1fr); column-gap: 9px; }
  .debao-paper h3 { font-size: clamp(1.7rem, 7vw, 2.25rem); line-height: 1.12; overflow-wrap: anywhere; }
  .debao-paper p { font-size: .79rem; overflow-wrap: anywhere; }
  .debao-paper p a { margin: 0 13px 8px 0; }
  .debao-service { padding: 24px 20px; }
  main.container > p:last-child { margin-top: 90px; }
}
@media (max-width: 390px) {
  main.container { padding-left: 18px; padding-right: 18px; }
  .nav-container { padding-left: 18px; padding-right: 18px; }
  .debao-hero::before { inset: 0 -18px; }
  .debao-hero::after { left: -18px; right: -18px; }
  .debao-hero h1 { font-size: clamp(3rem, 11.5vw, 3.5rem); }
}

/* World Labs typography: Gilda Display headings with a licensed sans fallback. */
.nav-logo, .debao-hero h1, main.container > .wp-block-heading, .debao-paper h3 { font-weight: 400; }
.debao-hero h1 { letter-spacing: -.05em; }
.debao-hero p { letter-spacing: -.01em; }
.debao-paper h3 { letter-spacing: -.035em; }

/* Requested typography and link cleanup. */
.debao-hero h1 { white-space: nowrap; font-size: clamp(3.25rem, 7.8vw, 6.8rem); }
.debao-hero p:last-child a, .debao-hero p:last-child a:hover,
.debao-hero p:last-child a:active {
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  padding: 0; min-height: 32px; text-decoration: none;
}
.debao-hero p:last-child a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
main.container > .wp-block-heading::after { content: none; display: none; }
@media (max-width: 768px) {
  .debao-hero h1 { font-size: clamp(1.8rem, 11vw, 4.6rem); white-space: nowrap; }
}

/* Decorative cursor-reactive field; never blocks text links or touch gestures. */
.debao-flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.debao-hero::after { display: none; }
@media (max-width: 700px) { .debao-flow { opacity: .5; } }

/* More compact content headings and unmistakable text links. */
main.container > .wp-block-heading { font-size: clamp(2rem, 3.8vw, 3.25rem); }
.debao-paper h3 { font-size: clamp(1.35rem, 2.1vw, 1.85rem); line-height: 1.22; letter-spacing: -.025em; }
main.container p a { color: #ddd1ff; text-decoration: underline; text-decoration-color: #aa91d7; text-decoration-thickness: 1px; text-underline-offset: 4px; }
main.container p a:hover, main.container p a:focus-visible,
.debao-paper h3 a:hover, .debao-paper h3 a:focus-visible { color: #fff; text-decoration: underline; text-decoration-color: #fff; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.debao-hero p:last-child a { color: #ddd1ff; text-decoration: underline; text-decoration-color: #aa91d7; text-underline-offset: 5px; }
main.container a:focus-visible { outline: 2px solid #cdb6ff; outline-offset: 5px; }
@media (max-width: 700px) {
 main.container > .wp-block-heading { font-size: 2.35rem; }
 .debao-paper h3 { font-size: 1.4rem; }
}

/* Wave ribbons belong to the page footer, after all academic content. */
.debao-footer-waves { overflow: hidden; width: 100%; height: 110px; margin-top: 20px; pointer-events: none; }
.debao-footer-waves svg { width: 110%; height: 100%; animation: footer-wave-drift 12s ease-in-out infinite alternate; }
@keyframes footer-wave-drift { from { transform: translateX(-4%) scaleY(.8); } to { transform: translateX(-1%) scaleY(1.15); } }
@media (prefers-reduced-motion: reduce) { .debao-footer-waves svg { animation: none; } }

/* Interactive footer ribbons, directly above the copyright. */
main.container > .debao-footer-waves { margin-top: 84px; margin-bottom: 22px; height: 110px; pointer-events: auto; }
.debao-footer-waves svg { width: 100%; animation: none; transform: none; }
main.container > .debao-footer-waves + p:last-child { margin-top: 0; padding-top: 22px; }
@media (max-width: 700px) { main.container > .debao-footer-waves { margin-top: 48px; } }

/* Neutral links with clear underlines rather than colored highlights. */
main.container p a, .debao-hero p:last-child a { color: #e5e2dc; text-decoration-color: #8d8b87; }
main.container p a:hover, main.container p a:focus-visible,
.debao-hero p:last-child a:hover { color: #fff; text-decoration-color: #fff; }
main.container a:focus-visible { outline-color: #e5e2dc; }

/* Fade every hero background layer into the shared page background. */
.debao-hero::before, .debao-flow {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 62%, transparent 100%);
}
.debao-hero { background: transparent; border-bottom: 0; }

.debao-flow { transition: opacity .3s ease; }

/* Portrait stays beside the name; geometry has the right side to itself. */
.debao-hero .debao-identity { display: flex; align-items: center; gap: 26px; margin-bottom: 42px; }
.debao-identity figure { margin: 0; flex: 0 0 94px; }
.debao-identity img { width: 94px; height: 94px; object-fit: cover; opacity: 1; box-shadow: none; border-radius: 4px; }
.debao-hero .debao-identity h1 { margin: 0; font-size: clamp(3rem,5.3vw,5rem); line-height: 1; }
.debao-hero .debao-portrait-column { display: none; }
.debao-hero .wp-block-column:first-child { flex: 0 1 68%; }
@media (max-width: 768px) {
 .debao-hero .wp-block-column:first-child { flex-basis: 100%; }
 .debao-hero .debao-identity { flex-direction: column; align-items: flex-start; gap: 22px; margin-bottom: 30px; }
 .debao-identity figure { flex-basis: auto; }
 .debao-identity img { width: 84px; height: 84px; }
 .debao-hero .debao-identity h1 { font-size: clamp(1.8rem,11vw,4.6rem); }
}
/* Use the full hero width after relocating the portrait. */
.debao-hero > .wp-block-columns { max-width: none !important; }
.debao-hero .wp-block-column:first-child { flex: 0 0 60%; }
@media (max-width: 768px) { .debao-hero .wp-block-column:first-child { flex-basis: 100%; } }
/* Keep the biography readable across desktop, tablet, and phone widths. */
.debao-hero > .wp-block-columns { max-width: none !important; width: 100%; }
.debao-hero .wp-block-column:first-child { flex: 0 1 720px; max-width: 100%; }
.debao-hero p { font-size: clamp(1.1rem, 1.55vw, 1.4rem); line-height: 1.5; }
.debao-hero p:nth-last-child(2) { font-size: .8rem; }
.debao-hero p:last-child { font-family: 'DM Sans', sans-serif; font-size: .8rem; }
.debao-hero::before { inset: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); }
.debao-flow {
 -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 62%, transparent), linear-gradient(to right, transparent, #000 18%, #000 78%, transparent);
 -webkit-mask-composite: source-in;
 mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 62%, transparent), linear-gradient(to right, transparent, #000 18%, #000 78%, transparent);
 mask-composite: intersect;
}
@media (max-width: 1100px) {
 .debao-hero .wp-block-column:first-child { flex-basis: 100%; max-width: 720px; }
 .debao-flow { opacity: .35; }
 .debao-hero::before { background: radial-gradient(ellipse at 80% 45%, rgba(57,61,69,.3), transparent 65%); }
}
@media (max-width: 768px) {
 .debao-hero p { font-size: 1.12rem; line-height: 1.5; }
 .debao-hero p:nth-last-child(2) { font-size: .77rem; }
 .debao-hero p:last-child { font-size: .75rem; }
 .debao-flow { opacity: .2; }
}
/* Avoid including the browser scrollbar in narrow-screen background width. */
@media (max-width: 768px) { .debao-hero::before { left: -20px; right: -20px; } }
@media (max-width: 700px) { .debao-hero::before { left: -24px; right: -24px; } }
@media (max-width: 390px) { .debao-hero::before { left: -18px; right: -18px; } }

/* Warm white presentation, with neutral typography and blueprint geometry. */
:root, [data-theme="light"], [data-theme="dark"] {
 color-scheme: light; --bg-color: #faf9f6; --card-bg: #fff; --card-border: #d6d3cd;
 --text-main: #252728; --text-light: #616466; --accent: #343b3f;
 --accent-gradient: linear-gradient(135deg,#737c81,#a49a87);
}
html, body { background: #faf9f6; color: #252728; }
nav, body.admin-bar nav { background: rgba(250,249,246,.94); border-bottom-color: #ddd9d2; }
.nav-logo, .nav-links a:hover, .mobile-menu-btn { color: #252728; }
.nav-links a { color: #626568; }
.debao-hero h1, main.container > .wp-block-heading, .debao-paper h3 a { color: #252728; }
.debao-hero p { color: #505456; }
.debao-hero p strong, main.container p strong { color: #303436; }
.debao-hero p:nth-last-child(2), main.container > p:last-child { color: #737674; }
.debao-hero::before { background: radial-gradient(ellipse at 80% 48%,rgba(133,155,170,.12),transparent 65%); }
main.container p a, .debao-hero p:last-child a { color: #30393d; text-decoration-color: #989b98; border-bottom-color: #989b98; }
main.container p a:hover, main.container p a:focus-visible, .debao-hero p:last-child a:hover,
.debao-paper h3 a:hover, .debao-paper h3 a:focus-visible { color: #111; text-decoration-color: #111; border-bottom-color: #111; }
main.container a:focus-visible { outline-color: #647078; }
main.container > .wp-block-heading, .debao-paper, .debao-paper:last-of-type,
.debao-service, main.container > p:last-child { border-color: #d6d3cd; }
.debao-news { background: #f2f1ed; border-color: #d6d3cd; }
.debao-news p { color: #505456; border-color: #c9cccd; }
.debao-news strong:first-child { color: #535c61; background: #e4e6e4; }
.debao-news p::before { background: #85939b; border-color: #85939b; }
.debao-paper p, .debao-paper p:nth-of-type(2), .debao-service p { color: #616668; }
.debao-paper p strong { color: #303436; }
.debao-paper::before { color: #8a8f91; }
.debao-paper:hover { background: rgba(40,60,70,.025); }
.debao-identity img { border-color: #d6d3cd; }
.debao-news { scrollbar-color: #c6c8c4 #efeeea; }
.debao-news::-webkit-scrollbar-thumb { background: #c6c8c4; }
.debao-news::-webkit-scrollbar-track { background: #efeeea; }
.debao-flow { transition: opacity .35s ease; }
@media (max-width: 1100px) { .debao-hero::before { background: radial-gradient(ellipse at 80% 45%,rgba(133,155,170,.08),transparent 65%); } }
@media (max-width: 700px) { .nav-links a { border-color: #dedbd4; } }

/* Give models a dedicated stage so they never overlap or clip the biography. */
.debao-hero { min-height: 0; }
.debao-hero > .wp-block-columns { width: 62%; }
.debao-hero .wp-block-column:first-child { flex-basis: 100%; }
.debao-geometry-stage { position: absolute; right: 0; top: 170px; width: 34%; height: 430px; }
.debao-geometry-stage .debao-flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 1; mask-image: none; -webkit-mask-image: none; }
@media (max-width: 1100px) {
 .debao-hero > .wp-block-columns { width: 100%; }
 .debao-geometry-stage { position: relative; top: auto; right: auto; width: 100%; max-width: 480px; height: 280px; margin: 30px auto 0; }
 .debao-hero { padding-bottom: 65px; }
}
@media (max-width: 700px) { .debao-geometry-stage { height: 230px; margin-top: 28px; } }

/* WordPress adds an inner group wrapper; size that wrapper, not just columns. */
.debao-hero { display: block; }
.debao-hero > .wp-block-group__inner-container { width: 62%; }
.debao-hero .wp-block-columns { width: 100% !important; max-width: none !important; }
.debao-hero::before { left: 0; right: 0; }
@media (max-width: 1100px) {
 .debao-hero > .wp-block-group__inner-container { width: 100%; }
 .debao-geometry-stage { flex: none; width: 100%; }
}

.nav-logo:hover, .nav-logo:focus-visible { color: #252728; text-decoration: underline; text-decoration-color: #667078; text-underline-offset: 5px; }

/* Spectral-style background framing adapts without shrinking into a thumbnail. */
.debao-hero { isolation: isolate; overflow: hidden; }
.debao-hero > .wp-block-group__inner-container { position: relative; z-index: 1; }
.debao-geometry-stage {
 position: absolute; top: 0; bottom: 0; right: -12%; width: 82%; height: 100%; max-width: none; margin: 0;
 z-index: -1; opacity: .72; pointer-events: none;
 -webkit-mask-image: linear-gradient(to right, transparent 0%,rgba(0,0,0,.12) 32%,#000 62%);
 mask-image: linear-gradient(to right, transparent 0%,rgba(0,0,0,.12) 32%,#000 62%);
}
@media (max-width: 1100px) {
 .debao-geometry-stage { position: absolute; top: 0; right: -22%; width: 100%; height: 100%; margin: 0; opacity: .32; }
}
@media (max-width: 700px) {
 .debao-geometry-stage { right: -25%; width: 125%; opacity: .3; }
 .debao-hero { padding-bottom: 84px; }
}
/* Publication links use one underline, including hover and keyboard focus. */
.debao-paper a, .debao-paper p a, .debao-paper p a:hover, .debao-paper p a:focus-visible {
 border-bottom: 0; text-decoration-line: underline; text-decoration-color: #8e9598;
 text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.debao-paper a:hover, .debao-paper a:focus-visible { text-decoration-color: #30393d; }
.debao-paper h3 a { text-decoration: none; }
.debao-paper h3 a:hover, .debao-paper h3 a:focus-visible { text-decoration-line: underline; }

/* Fade to the shared page color before every background boundary. */
.debao-geometry-stage {
 right: 0; width: 74%;
 -webkit-mask-image: linear-gradient(to right,transparent 0%,rgba(0,0,0,.12) 30%,#000 58%,#000 78%,transparent 100%),linear-gradient(to bottom,transparent 0%,#000 15%,#000 82%,transparent 100%);
 -webkit-mask-composite: source-in;
 mask-image: linear-gradient(to right,transparent 0%,rgba(0,0,0,.12) 30%,#000 58%,#000 78%,transparent 100%),linear-gradient(to bottom,transparent 0%,#000 15%,#000 82%,transparent 100%);
 mask-composite: intersect;
}
.debao-hero::before {
 -webkit-mask-image: linear-gradient(to right,transparent,#000 20%,#000 75%,transparent),linear-gradient(to bottom,transparent,#000 16%,#000 62%,transparent);
 -webkit-mask-composite: source-in;
 mask-image: linear-gradient(to right,transparent,#000 20%,#000 75%,transparent),linear-gradient(to bottom,transparent,#000 16%,#000 62%,transparent);
 mask-composite: intersect;
}
@media (max-width: 1100px) { .debao-geometry-stage { right: 0; width: 100%; } }

.debao-geometry-stage { opacity: .95; }
@media (max-width: 1100px) { .debao-geometry-stage { opacity: .38; } }

/* A canvas reaching the viewport edge, with no renderer swap or right-hand panel. */
html, body { overflow-x: clip; }
.debao-hero { overflow: visible; }
.debao-geometry-stage {
 right: calc(-1 * var(--debao-right-bleed,0px)); width: calc(84% + var(--debao-right-bleed,0px));
 opacity: .9;
 -webkit-mask-image: linear-gradient(to right,transparent,rgba(0,0,0,.12) 30%,#000 58%),linear-gradient(to bottom,transparent,#000 15%,#000 85%,transparent);
 mask-image: linear-gradient(to right,transparent,rgba(0,0,0,.12) 30%,#000 58%),linear-gradient(to bottom,transparent,#000 15%,#000 85%,transparent);
}
@media (max-width:1100px) { .debao-geometry-stage { width: calc(100% + var(--debao-right-bleed,0px)); opacity: .4; } }

/* A single font scale prevents a size jump when the identity stacks. */
.debao-hero .debao-identity h1 { font-size: clamp(2rem,5.3vw,5rem); }
@media (max-width:768px) {
 .debao-hero .debao-identity { align-items: center; text-align: center; }
 .debao-identity figure { margin-left: auto; margin-right: auto; }
}
/* Small initial views skip geometry initialization; resized views fade the existing stage. */
.debao-geometry-stage { visibility: visible; transition: opacity .5s ease,visibility 0s; }
.debao-hero::before { transition: opacity .5s ease; }
@media (max-width:899px) {
 .debao-geometry-stage { opacity: 0; visibility: hidden; transition: opacity .5s ease,visibility 0s .5s; }
 .debao-hero::before { opacity: 0; }
}
@media (prefers-reduced-motion:reduce) { .debao-geometry-stage,.debao-hero::before { transition: none; } }

/* Expanded mobile navigation uses the light palette too. */
@media (max-width:768px) {
 .nav-links, .nav-links.active { background: #faf9f6; border-color: #dedbd4; }
 .nav-links a { color: #626568; border-color: #dedbd4; }
 .nav-links a:hover,.nav-links a:focus-visible { color: #252728; background: #efeee9; }
}

/* Visitor-controlled dark appearance */
.nav-container > .theme-toggle { display:flex; order:3; flex-shrink:0; margin:0 0 0 20px; width:44px; height:44px; min-width:44px; min-height:44px; border:1px solid #d6d3cd; border-radius:50%; font:22px/1 sans-serif; background:transparent; color:#39464d; }
.nav-container > .nav-links { order:2; }
.theme-toggle .theme-text { display:none; }
.theme-toggle:focus-visible { outline:2px solid #647078; outline-offset:3px; }
html[data-theme="dark"] { color-scheme:dark; --bg-color:#181b1c; --card-bg:#202526; --card-border:#3a4143; --text-main:#eeeae2; --text-light:#bdc3c4; --accent:#d0dcdf; }
html[data-theme="dark"],html[data-theme="dark"] body { background:#181b1c; color:#eeeae2; }
html[data-theme="dark"] nav,html[data-theme="dark"] body.admin-bar nav { background:rgba(24,27,28,.96); border-color:#3a4143; }
html[data-theme="dark"] .nav-logo,html[data-theme="dark"] .mobile-menu-btn,html[data-theme="dark"] .nav-links a,html[data-theme="dark"] .theme-toggle { color:#deded6; }
html[data-theme="dark"] .theme-toggle { border-color:#596164; }
html[data-theme="dark"] .nav-links a::after { background:#bccbd0; }
html[data-theme="dark"] .debao-hero h1,html[data-theme="dark"] main.container > .wp-block-heading,html[data-theme="dark"] .debao-paper h3 a,html[data-theme="dark"] main.container p strong { color:#eeeae2; }
html[data-theme="dark"] .debao-hero p,html[data-theme="dark"] .debao-paper p,html[data-theme="dark"] .debao-paper p:nth-of-type(2),html[data-theme="dark"] .debao-service p,html[data-theme="dark"] main.container > p:last-child { color:#bdc3c4; }
html[data-theme="dark"] main.container a,html[data-theme="dark"] .debao-hero p:last-child a { color:#d0dcdf; text-decoration-color:#8c9ca2; border-bottom-color:#8c9ca2; }
html[data-theme="dark"] main.container a:hover,html[data-theme="dark"] main.container a:focus-visible { color:#fff; text-decoration-color:#fff; }
html[data-theme="dark"] main.container > .wp-block-heading,html[data-theme="dark"] .debao-paper,html[data-theme="dark"] main.container > p:last-child { border-color:#3a4143; }
html[data-theme="dark"] .debao-news { background:#202526; scrollbar-color:#75848b #2d3436; }
html[data-theme="dark"] .debao-news p { color:#cbd0cf; border-color:#576469; }
html[data-theme="dark"] .debao-news strong:first-child { background:#333e41; color:#d0dcdf; }
html[data-theme="dark"] .debao-news p::before { background:#9bafb7; border-color:#9bafb7; }
html[data-theme="dark"] .debao-news::-webkit-scrollbar-track { background:#2d3436; }
html[data-theme="dark"] .debao-news::-webkit-scrollbar-thumb { background:#75848b; }
html[data-theme="dark"] .debao-paper:hover { background:rgba(195,215,220,.035); }
html[data-theme="dark"] .debao-hero::before { background:radial-gradient(ellipse at 80% 48%,rgba(120,155,170,.08),transparent 65%); }
html[data-theme="dark"] .debao-footer-waves { filter:brightness(1.8); }
@media(max-width:768px) {
.nav-container > .theme-toggle { order:2; margin-left:auto; margin-right:12px; }
.nav-container > .mobile-menu-btn { order:3; }
.nav-container > .nav-links { order:4; }
html[data-theme="dark"] .nav-links,html[data-theme="dark"] .nav-links.active { background:#181b1c; border-color:#3a4143; }
html[data-theme="dark"] .nav-links a { border-color:#3a4143; }
html[data-theme="dark"] .nav-links a:hover { background:#252b2d; color:#fff; }
}

/* Theme control follows the navigation typography */
.nav-links > .theme-toggle { display:inline-flex; align-items:center; gap:7px; border:0; border-radius:0; padding:0; margin:0 0 0 8px; background:transparent; color:#626568; font:400 11px/1.5 "DM Sans",sans-serif; text-transform:uppercase; letter-spacing:.1em; min-height:44px; min-width:44px; cursor:pointer; }
.nav-links .theme-text { display:inline; }
html[data-theme="dark"] .nav-links > .theme-toggle { color:#deded6; }
@media(max-width:768px) { .nav-links > .theme-toggle { width:100%; margin:0; padding:12px 4px; font-size:.84rem; justify-content:flex-start; } }

/* Outline theme icon immediately before the mobile menu */
.nav-container > .theme-toggle { display:flex; border:0; border-radius:0; background:transparent; color:#626568; width:44px; height:44px; margin-left:18px; padding:10px; }
.theme-toggle svg { width:20px; height:20px; display:block; }
html[data-theme="dark"] .nav-container > .theme-toggle { color:#deded6; border:0; }
@media(max-width:768px) { .nav-container > .theme-toggle { order:2; margin-left:auto; margin-right:8px; } }

/* Keep reconstructed geometry visible against the dark theme. */
@media (min-width:900px) { html[data-theme="dark"] .debao-geometry-stage { opacity:1; } }
@media (min-width:900px) and (max-width:1100px) { html[data-theme="dark"] .debao-geometry-stage { opacity:.7; } }

/* Keep the saved identity group in the same layout before and after scripts load. */
.debao-identity > .wp-block-group__inner-container { display: contents; }
