/* Page base */
html,
body {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    height: auto;
    background: #141e3c;
    color: #e6edf3;
    overflow-x: hidden;
    overflow-y: auto;
    /* prevent side-to-side bar */
}

/* About Me section */
#about-me.section {
    max-width: 800px;
    /* match projects container */
    margin: 0 auto;
    padding: var(--card-pad);
    background-color: var(--card-bg, #1a1a2ecc);
    border: 1px solid var(--border-color, #ffffff1a);
    border-radius: var(--radius-lg, 20px);
    box-shadow: var(--shadow-md, 0 4px 16px #00000026);

    display: flex;
    flex-direction: column;
    gap: var(--stack-gap);

    /* Fade-up animation for consistency */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards;
    animation-delay: 300ms;
}

#about-me h2 {
    text-align: center;
    font-size: 1.8rem;
    color: rgb(230, 237, 243);
    /* cyan accent like project titles */
    margin: 10px;
}

#about-me p {
    font-size: 1rem;
    line-height: 1.6;
    color: #e2e7ec;
    margin: 0;
}



/* HERO: one viewport tall */
.hero {
    position: relative;
    /* don’t fix the height strictly to the old 100vh */
    min-height: 100dvh;
    /* mobile-safe viewport height */
    /* overflow: clip;  <-- remove this */
    overflow: hidden;
    /* still hides canvas bleed but doesn’t break scrolling */
    background: #141e3c;

    display: flex;
    align-items: center;
    justify-content: center;
    /* flex: column; <-- invalid; if you intended column layout use: */
    flex-direction: column;
}

#scroll-to-projects {
    touch-action: manipulation;
    pointer-events: auto;
    margin-top: 150px;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2b80ff, #1a5fd1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 14px rgba(43, 128, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    position: relative;
    z-index: 2;
    /* keep above canvas */

    /* start hidden */
    opacity: 0;
    transform: translateY(20px);

    /* run fadeUp animation after 3s */
    animation: fadeUp 1s ease forwards;
    animation-delay: 2000ms;
}

/* Hover & active states */
#scroll-to-projects:hover {
    background: linear-gradient(135deg, #3a8eff, #2970e6);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(43, 128, 255, 0.3);
}

#scroll-to-projects:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(43, 128, 255, 0.25);
}

/* Animation keyframes */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero {
    position: relative;
}

#hero-text-container {
    position: relative;
    /* so z-index works */
    z-index: 2;
    /* higher than the canvas */
    pointer-events: none;
}

#scroll-to-projects:hover {
    background-color: #005bcc;
}

#hero-text-container {
    flex-direction: column;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas in the background */
#canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    touch-action: pan-y;
    -ms-touch-action: pan-y;
}

/* Text overlay (stacked vertically, centered) */
.hero-text {
    padding-top: 10px;
    position: relative;
    text-align: center;
    z-index: 1;

    gap: 10px;
    pointer-events: none;
}

/* Hero headline */
#intro {
    margin: 0 0 8px;
    font-weight: 600;
    font-size: clamp(28px, 5vw, 48px);
    /* was 20–32px, now 28–48px */
    opacity: 0;
    line-height: 1.2;
    color: #fff;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    animation: fadeInUp 1.2s ease forwards;
    animation-delay: 400ms;
}

/* Hero sub-headline */
#job {
    margin: 0;
    font-weight: 400;
    font-size: clamp(18px, 3vw, 24px);
    /* was 14–18px, now 18–24px */
    line-height: 1.4;
    color: #e2e7ec;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    opacity: 0;
    animation: fadeInUp 1.5s ease forwards;
    animation-delay: 1000ms;
}


/* Fade-in keyframes */
@keyframes fadeInUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Section below so there's content to scroll to */
.section {
    background: #121821;
    border-top: 1px solid #1a2230;
    padding: 60px 20px;
}

.inner {
    max-width: 800px;
    margin: 0 auto;
}

.section h2 {
    margin: 0 0 12px;
}

.section p {
    color: #9aa7b2;
    line-height: 1.6;
}

.site-footer {
    background: #121821;
    border-top: 1px solid #1a2230;
    padding: 20px 0;
    color: #9aa7b2;
    font-size: 0.9rem;
    margin-top: 20px;

}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.footer-links a {
    color: #9aa7b2;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-socials a {
    color: #9aa7b2;
    margin: 0 8px;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.footer-socials a:hover {
    color: #ffffff;
}

/* Make footer stack on small screens */
@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        gap: 12px;
    }
}

/* Publications container — match projects */
#publications .container {
    max-width: 1100px;
    margin: 0 auto;
}

#publications h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #00d4ff;
    /* Cyan accent */
}

/* Grid layout — same as projects */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Card — identical to .project-card */
.publication-card {
    padding: var(--card-pad);
    display: flex;
    flex-direction: column;
    gap: var(--stack-gap);
    background-color: var(--card-bg, #1a1a2ecc);
    border: 1px solid var(--border-color, #ffffff1a);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-md, 0 4px 16px #00000026);
    transition: border-color var(--transition-normal, 0.3s ease),
        box-shadow var(--transition-normal, 0.3s ease);
}

/* Image styles */
.publication-card .project-header {
    margin: 0;
}

.publication-card .project-header img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--border-color, #ffffff1a);
    margin: 0;
}

/* Title row styles */
.publication-card .project-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
}

.publication-card .project-title-row h3 {
    font-size: 1.5rem;
    color: #00d4ff;
}

/* Reset margins + paragraph styling */
.publication-card .project-title-row h3,
.publication-card h4,
.publication-card p {
    margin: 0;
}

.publication-card p {
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e7ec;
}

/* Links */
.publication-card .project-links {
    display: flex;
    gap: 8px;
}

.publication-card .project-links a {
    font-size: 0.85rem;
    color: #00d4ff;
    text-decoration: none;
    border: 1px solid rgba(0, 247, 255, 0.35);
    padding: 4px 10px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.publication-card .project-links a:hover {
    background: rgba(0, 247, 255, 0.15);
}