/* ---------- Global / Base ---------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #222;
    line-height: 1.65;
}

a {
    color: #0077cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 60px 24px;
}

/* ---------- Navigation ---------- */

header {
    border-bottom: 1px solid #eee;
    margin-bottom: 24px;
}

.nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #111;
}

.nav-links a {
    margin-left: 18px;
    font-size: 0.98rem;
    color: #444;
}

.nav-links a:hover {
    text-decoration: none; /* keep nav clean */
}

.nav-links a.active {
    color: #0077cc;
}

/* ---------- Homepage Hero ---------- */

.hero {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.hero img {
    width: 290px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-text {
    flex: 1;
    min-width: 280px;
}

.hero-text h1 {
    font-size: 2.2rem;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.hero-text h1 span {
    color: #4aa3ff;
}

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

/* ---------- Generic Headings / Sections ---------- */

h2 {
    font-size: 1.7rem;
    margin: 0 0 16px 0;
    font-weight: 600;
}

h3 {
    font-size: 1.2rem;
    margin: 24px 0 10px 0;
    font-weight: 550;
}

.page-section p {
    font-size: 1.02rem;
    margin-bottom: 14px;
}

/* ---------- Card Grid (Projects & Experience) ---------- */

/* shared grid layout */
.projects-grid,
.experience-grid {
    display: grid;
    gap: 28px;
    margin-top: 10px;
}

/* Mobile: 1 per row */
@media (max-width: 767px) {
    .projects-grid,
    .experience-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet: 2 per row */
@media (min-width: 768px) and (max-width: 1023px) {
    .projects-grid,
    .experience-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Desktop: 3 per row */
@media (min-width: 1024px) {
    .projects-grid,
    .experience-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* base card style */
.project-card {
    background: #111;
    color: #fafafa;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* thumbnail image */
.project-thumb {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

/* text block (default = projects) */
.project-info {
    padding: 16px 18px 18px 18px;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-subtitle {
    font-size: 0.92rem;
    opacity: 0.8;
}

/* hover overlay (used for both projects & experience) */
.project-hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 22px;
    opacity: 0;
    transition: opacity 0.22s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.4;
}

.project-card:hover .project-hover {
    opacity: 1;
}

/* ---------- Experience-specific tweaks ---------- */

/* for experience cards, put title/meta on top of image with gradient */
.experience-card .project-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px 16px 16px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9),
        rgba(0, 0, 0, 0.45),
        rgba(0, 0, 0, 0)
    );
}

.experience-card .project-title {
    font-size: 1.05rem;
    margin-bottom: 3px;
}

.experience-card .project-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ---------- Project Detail Pages (if ever used) ---------- */

.project-page-hero {
    max-width: 800px;
}

.project-page-hero img {
    width: 100%;
    border-radius: 12px;
    margin: 16px 0 18px 0;
    object-fit: cover;
}

.back-link {
    font-size: 0.95rem;
    margin-bottom: 18px;
    display: inline-block;
}

/* ---------- Responsive Tweaks ---------- */

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero img {
        width: 100%;
        max-width: 320px;
    }

    .nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nav-links a {
        margin-left: 0;
        margin-right: 16px;
    }
}

.research-intro {
    font-size: 1.05rem;
    max-width: 48rem;
    margin-bottom: 26px;
}

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

.research-card {
    background: #fafafa;
    border-radius: 18px;
    border: 1px solid #ededed;
    padding: 14px 14px 18px 14px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

/* thumbnail at top of each card */
.research-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 12px;
}

.research-body {
    padding: 2px 4px 0 4px;
}

.research-card h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.research-tag {
    font-size: 0.86rem;
    color: #777;
    margin-bottom: 10px;
}

.research-card p {
    font-size: 0.96rem;
    margin-bottom: 10px;
}

.research-methods {
    font-size: 0.9rem;
    color: #555;
    margin-top: 6px;
}
/* --- PERSONAL NOTE FIXES --- */

.page-section {
    max-width: 760px !important;
    margin: 0 auto !important;
}

/* Keep text readable + prevent overflow */
.about-body {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Prevent ANY image from blowing out layout */
.about-body img,
.about-image img {
    width: 100% !important;
    max-width: 650px !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* Center image + space it correctly */
.about-image {
    margin: 2rem 0;
    text-align: center;
    overflow: hidden; /* KEY FIX: stops image overflow */
}

/* Caption */
.image-subtitle {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Better paragraph spacing */
.about-body p {
    margin-bottom: 1.4rem;
}

/* ---------- Skills Slider ---------- */

.skills-slider {
    position: relative;
    max-width: 720px;
    margin: 28px auto 8px auto;
    padding: 0px 0px; /* room for arrows */
}

.skills-slider-window {
    position: relative;
    height: 170px; /* keeps layout from jumping */
}

/* base skill-card style */
.skills-slider .skill-card {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%;
    max-width: 420px;
    transform: translateX(-50%);
    background: #fafafa;
    border-radius: 18px;
    border: 1px solid #ededed;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    padding: 14px 18px 16px 18px;
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease,
        box-shadow 0.3s ease;
}

.skills-slider .skill-card h4 {
    margin: 0 0 6px 0;
    font-size: 1.02rem;
    font-weight: 600;
}

.skills-slider .skill-card p {
    margin: 0;
    font-size: 0.94rem;
    color: #444;
}

/* center / side / hidden states */

.skill-center {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    z-index: 3;
    pointer-events: auto;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.skill-left {
    opacity: 0.6;
    transform: translateX(-115%) scale(0.92);
    z-index: 2;
}

.skill-right {
    opacity: 0.6;
    transform: translateX(15%) scale(0.92);
    z-index: 2;
}

.skill-hidden {
    opacity: 0;
    z-index: 1;
}

/* arrows */

.skills-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.20);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    color: #333;
    z-index: 4;
}

.skills-arrow:hover {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
}

.skills-arrow-left {
    left: 16px;
}

.skills-arrow-right {
    right: 16px;
}

/* mobile tweaks */

@media (max-width: 600px) {
    .skills-slider {
        padding: 0px 0px;
    }

    .skills-slider-window {
        height: auto;
        min-height: 0px;
    }

    .skill-left {
        transform: translateX(-105%) scale(0.9);
    }

    .skill-right {
        transform: translateX(5%) scale(0.9);
    }
    .nav-left {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .nav-icon {
        font-size: 1.1rem;
        color: #111;
        text-decoration: none;
    }
    
    .nav-icon:hover {
        color: #4078c0;  /* or whatever accent color you're using */
    }
    .video-card {
        text-decoration: none;
        color: inherit;
    }
    
    .video-card img {
        border-radius: 8px;
    }
    
}
/* ===== Single-video carousel layout ===== */
.video-carousel .carousel-track.single-video {
    display: flex;
    transition: transform 0.4s ease;
    gap: 40px;
    overflow: hidden;
}

.video-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Make iframe responsive */
.video-slide iframe {
    width: 100%;
    max-width: 700px;
    height: 395px;  /* 16:9 ratio */
    border-radius: 12px;
}

/* Video info text */
.video-info {
    text-align: center;
    margin-top: 12px;
}

.video-info .fav-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.video-info .fav-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin-top: 4px;
}

/* Arrows centered vertically */
.video-carousel .carousel-arrow {
    position: absolute;
    top: 45%;
}

.lb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #111;
    color: white;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.lb-btn:hover {
    background: #333;
}

/* Center all text inside the Favorites page */
.container.page-section,
.carousel-container,
.carousel-title,
.favorites-btn-row {
    text-align: center;
}

.fav-info {
    text-align: center;
}
.contact-actions {
    margin: 18px 0 26px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center; /* centers your buttons */
}
.hero {
    text-align: center;
}

.hero-text {
    text-align: center;
}
.container > h2,
.container > h3 {
    text-align: center;
}

