/* ===================================
   MIT Media Lab Style
   Sidebar + Grid Layout
   =================================== */

:root {
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-gray: #666666;
    --color-light-gray: #f5f5f5;
    --color-accent: purple;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-white);
    color: var(--color-black);
    line-height: 1.47;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===================================
   Top Bar - Apple Style
   =================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px;
    height: 44px;
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar-brand {
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.02em;
    color: var(--color-black);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.topbar-nav a {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-black);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.topbar-nav a:hover {
    opacity: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-black);
    display: flex;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
}

.topbar-icon:hover {
    opacity: 1;
}

.topbar-icon svg {
    width: 16px;
    height: 16px;
}

.mobile-menu {
    display: none;
}

/* ===================================
   Hero Banner
   =================================== */
.hero-banner {
    background: var(--color-black);
    color: var(--color-white);
    min-height: 480px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Hero Info Badge */
.hero-info-badge {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0;
    background: transparent;
    border: none;
    border-radius: 50px;
    padding: 8px;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-white);
    overflow: hidden;
    max-width: 30px;
    opacity: 0.5;
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                gap 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    animation: infoPulse 130s ease-in-out infinite;
}

.hero-info-badge:hover {
    max-width: 250px;
    gap: 8px;
    padding: 8px 12px 8px 8px;
    opacity: 0.7;
    animation: none;
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.info-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-white);
    opacity: 0.8;
}

.info-text {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-info-badge:hover .info-text {
    opacity: 1;
}

/* Auto pulse animation - 130s total: ~10s expanded, ~120s contracted */
@keyframes infoPulse {
    0%, 1% {
        max-width: 30px;
        gap: 0;
        padding: 8px;
    }
    2%, 9% {
        max-width: 230px;
        gap: 8px;
        padding: 8px 12px 8px 8px;
    }
    10%, 100% {
        max-width: 30px;
        gap: 0;
        padding: 8px;
    }
}

.hero-info-badge:not(:hover) .info-text {
    animation: textPulse 130s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 1%, 10%, 100% {
        opacity: 0;
    }
    3%, 8% {
        opacity: 1;
    }
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.hero-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at bottom left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 40%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-photo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.2);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% center;
    z-index: 0;
}

.hero-art {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    animation: heroArtCycle 145s ease-in-out infinite;
}

.hero-shape {
    position: absolute;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 50%;
}

.hero-shape.s1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: 10%;
    animation: float 8s ease-in-out infinite;
}

.hero-shape.s2 {
    width: 250px;
    height: 250px;
    top: 50%;
    right: 25%;
    animation: float 6s ease-in-out infinite reverse;
}

.hero-shape.s3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    right: 5%;
    animation: float 7s ease-in-out infinite;
}

.hero-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.hero-line.hl1 {
    width: 60%;
    top: 30%;
    left: 20%;
    transform: rotate(-5deg);
}

.hero-line.hl2 {
    width: 40%;
    top: 55%;
    left: 35%;
    transform: rotate(8deg);
}

.hero-line.hl3 {
    width: 50%;
    top: 75%;
    left: 10%;
    transform: rotate(-3deg);
}

.hero-dot {
    position: absolute;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
}

.hero-dot.d1 { width: 6px; height: 6px; top: 25%; right: 30%; }
.hero-dot.d2 { width: 8px; height: 8px; top: 45%; right: 15%; }
.hero-dot.d3 { width: 5px; height: 5px; top: 60%; right: 40%; }
.hero-dot.d4 { width: 7px; height: 7px; top: 35%; right: 50%; }

/* Angle Measurements */
.hero-angle {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid transparent;
    border-top-color: rgba(255,255,255,0.45);
    border-left-color: rgba(255,255,255,0.45);
    border-radius: 50%;
    opacity: 0;
    animation: angleAppear 7s ease-out infinite;
}

.hero-angle span {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    opacity: 0;
    animation: labelFade 7s ease-out infinite;
}

.hero-angle.a1 {
    top: 24%;
    left: 38%;
    transform: rotate(30deg);
    animation-delay: 0s;
    animation-duration: 8s;
}
.hero-angle.a1 span { animation-delay: 0s; animation-duration: 8s; }

.hero-angle.a2 {
    top: 35%;
    left: 55%;
    width: 40px;
    height: 40px;
    transform: rotate(-20deg);
    animation-delay: 2.5s;
    animation-duration: 9s;
}
.hero-angle.a2 span { animation-delay: 2.5s; animation-duration: 9s; }

.hero-angle.a3 {
    top: 50%;
    left: 38%;
    width: 35px;
    height: 35px;
    transform: rotate(30deg);
    animation-delay: 4s;
    animation-duration: 6s;
}
.hero-angle.a3 span { animation-delay: 4s; animation-duration: 6s; }

.hero-angle.a4 {
    top: 38%;
    left: 62%;
    width: 45px;
    height: 45px;
    transform: rotate(70deg);
    animation-delay: 1s;
    animation-duration: 10s;
}
.hero-angle.a4 span { animation-delay: 1s; animation-duration: 10s; }

.hero-angle.a5 {
    top: 30%;
    left: 48%;
    width: 32px;
    height: 32px;
    transform: rotate(40deg);
    animation-delay: 5.5s;
    animation-duration: 7s;
}
.hero-angle.a5 span { animation-delay: 5.5s; animation-duration: 7s; }

@keyframes angleAppear {
    0% { opacity: 0; }
    8% { opacity: 0; }
    12% { opacity: 0.8; }
    35% { opacity: 0.8; }
    45% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes labelFade {
    0%, 10% { opacity: 0; transform: translateX(-50%) translateY(4px); }
    15%, 38% { opacity: 0.85; transform: translateX(-50%) translateY(0); }
    48%, 100% { opacity: 0; transform: translateX(-50%) translateY(-2px); }
}

/* Length Measurements */
.hero-measure {
    position: absolute;
}

.hero-measure .measure-line {
    height: 1px;
    background: rgba(255,255,255,0.4);
    width: 0;
    animation: drawLine 8s ease-out infinite;
}

.hero-measure .measure-cap {
    position: absolute;
    width: 1px;
    height: 0;
    background: rgba(255,255,255,0.4);
    top: 0;
    transform: translateY(-50%);
}

.hero-measure .measure-cap.left { 
    left: 0; 
    animation: drawCapLeft 8s ease-out infinite;
}
.hero-measure .measure-cap.right { 
    right: 0; 
    animation: drawCapRight 8s ease-out infinite;
}

.hero-measure span {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    opacity: 0;
    animation: measureLabel 8s ease-out infinite;
}

.hero-measure.m1 {
    top: 42%;
    left: 44%;
    width: 90px;
}
.hero-measure.m1 .measure-line { animation-delay: 1.5s; animation-duration: 9s; }
.hero-measure.m1 .measure-cap.left { animation-delay: 1.5s; animation-duration: 9s; }
.hero-measure.m1 .measure-cap.right { animation-delay: 1.5s; animation-duration: 9s; }
.hero-measure.m1 span { animation-delay: 1.5s; animation-duration: 9s; }

.hero-measure.m2 {
    top: 58%;
    left: 48%;
    width: 120px;
    transform: rotate(-12deg);
}
.hero-measure.m2 .measure-line { animation-delay: 4.5s; animation-duration: 7s; }
.hero-measure.m2 .measure-cap.left { animation-delay: 4.5s; animation-duration: 7s; }
.hero-measure.m2 .measure-cap.right { animation-delay: 4.5s; animation-duration: 7s; }
.hero-measure.m2 span { animation-delay: 4.5s; animation-duration: 7s; }

@keyframes drawLine {
    0%, 5% { width: 0; opacity: 0; }
    10% { width: 0; opacity: 1; }
    25% { width: 100%; opacity: 1; }
    50% { width: 100%; opacity: 1; }
    60% { width: 100%; opacity: 0; }
    100% { width: 0; opacity: 0; }
}

@keyframes drawCapLeft {
    0%, 5% { height: 0; opacity: 0; }
    10% { height: 10px; opacity: 1; }
    50% { height: 10px; opacity: 1; }
    60% { height: 10px; opacity: 0; }
    100% { height: 0; opacity: 0; }
}

@keyframes drawCapRight {
    0%, 22% { height: 0; opacity: 0; }
    28% { height: 10px; opacity: 1; }
    50% { height: 10px; opacity: 1; }
    60% { height: 10px; opacity: 0; }
    100% { height: 0; opacity: 0; }
}

@keyframes measureLabel {
    0%, 26% { opacity: 0; transform: translateX(-50%) translateY(4px); }
    32%, 48% { opacity: 0.9; transform: translateX(-50%) translateY(0); }
    58%, 100% { opacity: 0; transform: translateX(-50%) translateY(-2px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Hero art visibility cycle: 20s visible, 120s hidden (140s total) */
@keyframes heroArtCycle {
    /* ON: Start immediately */
    0% { opacity: 1; }
    
    /* ON: Stay visible for the first 25 seconds (17.24% of 145s) */
    17.24% { opacity: 1; }
    
    /* OFF: Fade out quickly (or snap off) and stay off */
    17.5% { opacity: 0; }
    100% { opacity: 0; }
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 40px 30px 80px 30px;
}

.hero-content p {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    max-width: 700px;
}

/* ===================================
   Main Grid - Sidebar + Cards
   =================================== */
.main-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

/* ===================================
   Sidebar (Grid Element - 1x1) - Pulled Up
   =================================== */
.sidebar {
    grid-column: 1;
    grid-row: span 1;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-right: 1px solid #eee;
    position: relative;
    z-index: 10;
    margin-top: -60px;
    padding-top: 100px;
}

/* Sidebar Mobile - Hidden on desktop */
.sidebar-mobile {
    display: none;
}

.sidebar-logo {
    margin-bottom: 50px;
}

.sidebar-logo svg {
    display: block;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nav-link {
    text-decoration: none;
    color: var(--color-black);
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-accent);
}

.nav-link.active {
    color: var(--color-accent);
}

.sidebar-social {
    margin-top: auto;
    display: flex;
    gap: 12px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.sidebar-social a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.sidebar-social a:hover {
    color: var(--color-black);
}

/* ===================================
   Grid Card (Image + Cutout + Text)
   =================================== */
.grid-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.card-image {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Dark overlay on hover */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    z-index: 1;
}

.grid-card:hover .card-overlay {
    background: rgba(0,0,0,0.6);
}

/* Group label appears on hover */
.card-group-label {
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-transform: lowercase;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    text-align: center;
    letter-spacing: 0.05em;
}

.grid-card:hover .card-group-label {
    opacity: 1;
}

/* ===================================
   Cutout Shapes (MIT Media Lab Style)
   =================================== */
.card-cutout {
    position: relative;
    z-index: 3;
    margin-left: 20px;
    background: var(--color-white);
}

/* Square cutout */
.cutout-square .card-cutout {
    width: 40px;
    height: 40px;
    margin-top: -21px;
    border-radius: 51%;
}

/* Triangle cutout */
.cutout-triangle .card-cutout {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 40px solid var(--color-white);
    background: transparent;
    margin-top: -24px;
}

/* Semicircle cutout */
.cutout-semicircle .card-cutout {
    width: 60px;
    height: 30px;
    border-radius: 50px 50px 0 0;
    margin-top: -22px;
}

/* ===================================
   Card Content (Text below image)
   =================================== */
.card-content {
    padding: 10px 20px 28px;
    background: var(--color-white);
    position: relative;
    margin-bottom: 55px;
}

.card-content h3 {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--color-black);
    transition: color 0.2s ease;
}

.grid-card:hover .card-content h3 {
    color: var(--color-accent);
}

.card-content p {
    font-size: 15px;
    color: var(--color-gray);
    line-height: 1.55;
    margin-bottom: 14px;
    transition: color 0.2s ease;
}

.grid-card:hover .card-content p {
    color: var(--color-accent);
}

.card-meta {
    font-size: 13px;
    color: #999;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ===================================
   Bio Banner (spans across grid, excluding sidebar)
   =================================== */
.first-row-content {
    grid-column: 2 / -1;
    display: flex;
    flex-direction: column;
}

.bio-banner {
    padding: 24px 30px;
    background: var(--color-light-gray);
    border-bottom: 1px solid #eee;
    padding-bottom: 46px;
}

.bio-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 33px;
}

.bio-email {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-gray);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
    color: green;
}

.bio-email:hover {
    color: var(--color-black);
    border-bottom-color: var(--color-black);
}

.cv-download {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    color: var(--color-gray);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.cv-download:hover {
    color: var(--color-black);
    border-bottom-color: var(--color-black);
}

.cv-download svg {
    width: 14px;
    height: 14px;
}

.first-row-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.bio-banner p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-gray);
    max-width: 900px;
}

.bio-banner p + p {
    margin-top: 12px;
}

.bio-banner a:not(.bio-email):not(.cv-download) {
    color: var(--color-black);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--color-black);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.bio-banner a:not(.bio-email):not(.cv-download):hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* ===================================
   About Section
   =================================== */
.about-section {
    display: grid;
    grid-template-columns: 2fr 4fr;
    padding: 60px 30px;
    background: var(--color-light-gray);
}

.about-section::before {
    content: '';
}

.about-content {
    max-width: 700px;
}

.about-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-lead {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 12px;
    line-height: 1.4;
}

.about-content p {
    font-size: 15px;
    color: var(--color-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    background: var(--color-white);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-black);
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.skill-tags span:hover {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

/* ===================================
   Contact Section
   =================================== */
.contact-section {
    display: grid;
    grid-template-columns: 2fr 4fr;
    padding: 60px 30px;
    border-top: 1px solid #eee;
}

.contact-section::before {
    content: '';
}

.contact-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.contact-section p {
    font-size: 15px;
    color: var(--color-gray);
    margin-bottom: 16px;
}

.contact-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
}

.contact-link:hover {
    text-decoration: underline;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: 40px 30px;
    margin-top: auto;
    border-top: 1px solid #333;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-left p {
    font-size: 13px;
    color: #999;
    margin: 0;
}

.footer-center {
    display: flex;
    justify-content: center;
}

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-nav a {
    font-size: 13px;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--color-white);
}

.footer-right {
    display: flex;
    justify-content: flex-end;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--color-white);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .footer-center,
    .footer-right {
        justify-content: center;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 12px;
    }
}

/* ===================================
   Mobile Sidebar
   =================================== */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-white);
    z-index: 200;
    transition: left 0.3s ease;
    padding: 20px;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
}

.mobile-sidebar.open {
    left: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.mobile-sidebar-header span {
    font-weight: 700;
    font-size: 18px;
}

.mobile-sidebar-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav a {
    text-decoration: none;
    color: var(--color-black);
    font-size: 16px;
    font-weight: 700;
}

.mobile-nav a:hover {
    color: var(--color-accent);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sidebar {
        grid-column: span 1;
    }
    
    .first-row-content {
        grid-column: 2 / -1;
    }
    
    .first-row-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-section,
    .contact-section {
        grid-template-columns: 1fr;
    }
    
    .about-section::before,
    .contact-section::before {
        display: none;
    }
}

@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar {
        display: none;
    }

    .sidebar-mobile {
        display: block;
        grid-column: 1 / -1;
        padding: 30px 20px;
        background-color: #fafafa;
        margin-top: 40px;
    }
    
    .first-row-content {
        grid-column: 1 / -1;
    }
    
    .first-row-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-menu {
        display: flex;
    }
    
    .topbar-nav a {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .first-row-content {
        grid-column: 1 / -1;
    }
    
    .first-row-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bio-banner {
        padding: 20px;
    }
    
    .bio-banner p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .card-content h3 {
        font-size: 18px;
    }
    
    .card-content p {
        font-size: 14px;
    }
    
    .hero-banner {
        min-height: 350px;
    }
    
    .hero-content p {
        font-size: 24px;
    }
    
    .hero-shape.s1 {
        width: 250px;
        height: 250px;
    }
    
    .hero-shape.s2 {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .first-row-content {
        grid-column: 1;
    }
    
    .first-row-cards {
        grid-template-columns: 1fr;
    }
    
    .bio-banner {
        padding: 16px;
    }
    
    .bio-banner p {
        font-size: 13px;
    }
    
    .topbar {
        padding: 0 15px;
    }
    
    .topbar-brand {
        font-size: 15px;
    }
    
    .hero-banner {
        padding: 40px 20px;
    }
    
    .about-section,
    .contact-section {
        padding: 40px 20px;
    }
}

/* ===================================
   Page Detail Layout (uses original sidebar)
   =================================== */

/* Back Button */
.sidebar-back {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-black);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    margin-bottom: 15px;
    transition: color 0.2s;
}

.sidebar-back:hover {
    color: var(--color-accent);
}

.sidebar-back svg {
    flex-shrink: 0;
}

/* Sidebar Meta Sections */
.sidebar-meta-section {
    padding: 10px 0;
}

.sidebar-meta-source {
    font-size: 13px;
    color: #999;
    display: block;
}

.sidebar-meta-date {
    font-size: 13px;
    color: #666;
    display: block;
    margin-top: 2px;
}

.sidebar-meta-title {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 5px 0;
}

/* Sidebar Tags */
.sidebar-tags {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-tag {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-tag:hover {
    color: var(--color-accent);
}

/* Sidebar People */
.sidebar-people {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-person {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-decoration: none;
    padding: 4px 0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.sidebar-person:hover {
    background-color: rgba(0,0,0,0.03);
}

.person-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-black);
}

.sidebar-person:hover .person-name {
    color: var(--color-accent);
}

.person-role {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

/* Sidebar Groups */
.sidebar-groups {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 2px 0;
}

.group-logo svg {
    display: block;
}

.group-name {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.group-theme {
    font-size: 11px;
    color: #999;
    line-height: 1.3;
}

/* Sidebar Share */
.sidebar-share {
    display: flex;
    gap: 8px;
}

.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.share-link:hover {
    color: var(--color-black);
    background-color: rgba(0,0,0,0.05);
}

/* Article Banner (in bio-banner position) */
.article-banner {
    padding: 24px;
}

.article-group-label {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.article-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    color: #111;
}

.article-lead {
    font-size: 18px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 28px;
    font-weight: 400;
}

/* Article Image */
.article-image {
    margin-bottom: 24px;
    border-radius: 6px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Body */
.article-body {
    font-size: 16px;
    line-height: 1.85;
    color: #333;
    font-weight: 400;
}

.article-body p {
    margin-bottom: 24px;
}

.article-body p:first-of-type {
    font-size: 17px;
    color: #444;
}

.article-body h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: #111;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.article-body a {
    color: #333;
    text-decoration: underline;
    text-decoration-color: #ccc;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.article-body a:hover {
    text-decoration-color: #333;
}

.article-body blockquote {
    border-left: 3px solid #ddd;
    padding-left: 20px;
    margin: 28px 0;
    font-style: italic;
    color: #555;
}

/* Page Detail Responsive */
@media (max-width: 768px) {
    .article-title {
        font-size: 22px;
    }
    
    .article-lead {
        font-size: 14px;
    }
    
    .article-body {
        font-size: 14px;
    }
}

/* ===================================
   Hero Clean (No animations)
   =================================== */
.hero-banner.hero-clean {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner.hero-clean .hero-visual {
    position: relative;
}

.hero-banner.hero-clean .hero-visual::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    pointer-events: none;
    border-radius: 8px;
}

.hero-banner.hero-clean .hero-photo {
    max-height: 350px;
    width: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ===================================
   Medium Button
   =================================== */
.medium-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    background: none;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 20px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #ddd;
}

.medium-button:hover {
    color: #666;
    border-bottom-color: #999;
}

.medium-button svg {
    flex-shrink: 0;
}

.medium-button span {
    letter-spacing: 0.02em;
}

/* ===================================
   Video Embed
   =================================== */
.video-embed {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    margin-top: 20px;
}

.video-embed iframe {
    width: 100%;
    height: 100%;
}

/* ===================================
   Sliding Gallery
   =================================== */
.gallery-section {
    grid-column: 1 / -1;
    overflow: hidden;
    padding: 40px 0;
    background: #fafafa;
    margin-top: 40px;
}

.gallery-track {
    display: flex;
    gap: 0;
    animation: gallery-slide 60s linear infinite;
    width: max-content;
}

.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-item {
    flex-shrink: 0;
    width: 400px;
    height: 280px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

@keyframes gallery-slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Gallery Responsive */
@media (max-width: 768px) {
    .gallery-item {
        width: 320px;
        height: 220px;
    }
    
    .video-embed {
        margin-top: 15px;
    }
}
