/* ============================================================
   BASE: fonts, colors, and defaults that apply to the whole page
   ============================================================ */

/* Sets the font, text color, and subtle gradient background for every page */
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2d3436;
    line-height: 1.7;
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
}

/* Removes underlines from links and adds a hover highlight effect */
a {
    color: #0984e3;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}


/* ============================================================
   NAVIGATION: sticky bar that follows you as you scroll
   ============================================================ */

/* Keeps the nav fixed to the top and slightly frosted using backdrop-filter */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
}

nav .nav-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d3436;
    text-decoration: none;
}

/* Lays out the nav links horizontally and removes default bullet points */
nav .nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav .nav-links a {
    font-size: 14px;
    color: #555;
    font-weight: 400;
}

nav .nav-links a:hover {
    color: #0984e3;
    text-decoration: none;
}


/* ============================================================
   HERO: the split layout with your photo and intro text
   ============================================================ */

/* Uses flexbox to place the photo and text side by side */
.hero {
    display: flex;
    align-items: center;
    gap: 5%;
    padding: 72px 5% 64px;
    max-width: 1100px;
    margin: 0 auto;
    animation: fadeIn 1.2s ease-in-out;
}

/* Keeps the photo from shrinking and makes it a circle */
.hero-img {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 6px #e8f1fb;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 6px;
    color: #0984e3;
}

.hero-text .subtitle {
    font-size: 1.1rem;
    color: #0984e3;
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-text .bio {
    font-size: 15px;
    color: #555;
    max-width: 480px;
    margin-bottom: 24px;
    line-height: 1.75;
}

/* Lays the buttons out in a row with spacing between them */
.hero-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


/* ============================================================
   BUTTONS: reusable styles for all the CTA buttons
   ============================================================ */

/* Base button style — shared padding, font, and rounded corners */
.btn {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

/* Solid blue button for primary actions */
.btn-primary {
    background: #0984e3;
    color: #fff;
}

.btn-primary:hover {
    background: #0770c4;
    text-decoration: none;
}

/* Outlined button for secondary actions */
.btn-ghost {
    border: 1px solid #e0e0e0;
    color: #2d3436;
    background: #fff;
}

.btn-ghost:hover {
    border-color: #0984e3;
    color: #0984e3;
    text-decoration: none;
}


/* ============================================================
   PROJECTS: alternating background section with a card grid
   ============================================================ */

/* Light grey background to visually separate this section from the hero */
.projects-section {
    background: #f7f9fc;
    padding: 60px 5%;
    max-width: 100%;
}

/* Centers the section heading text */
.projects-section h2 {
    text-align: center;
    max-width: 1100px;
    margin: 0 auto 32px;
}

/* auto-fill means cards will wrap automatically as the screen shrinks */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Each card has a border, rounded corners, and lifts on hover */
.project-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* The image area at the top of each card — uses your local image files */
.project-image {
    height: 180px;
    background-color: #f4f4f4;
    background-size: cover;
    background-position: center;
}

#trash-project    { background-image: url('../images/marine_life_icon.jpg'); }
#expense-tracker  { background-image: url('../images/expense-tracker.jpg'); }

/* Gradient placeholder tile for the citation graph project (no photo) */
#citation-graph {
    background-image: linear-gradient(135deg, #0984e3 0%, #2d6cc0 55%, #163a6e 100%);
    position: relative;
}
#citation-graph::after {
    content: "{ 1975–2025 · OpenAlex }";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.project-info p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 14px;
}

.tech-stack {
    display: block;
    margin-bottom: 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0984e3;
}

.project-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0984e3;
}


/* ============================================================
   CONTACT: centered section at the bottom of the page
   ============================================================ */

/* White background to contrast with the grey projects section above */
.contact-section {
    padding: 60px 5%;
    text-align: center;
}

.contact-bio {
    font-size: 16px;
    color: #555;
    max-width: 480px;
    margin: 0 auto 28px;
}

/* Keeps the contact buttons centered and wraps them on small screens */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}


/* ============================================================
   SHARED UTILITIES: labels, footer, and animations
   ============================================================ */

/* Small uppercase label that appears above each section heading */
.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #0984e3;
    text-align: center;
    margin-bottom: 8px;
}

h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 32px;
    color: #2d3436;
}

footer {
    text-align: center;
    font-size: 13px;
    color: #b2bec3;
    padding: 24px 5%;
    border-top: 1px solid #e0e0e0;
}

/* Fade-in animation used on the hero section when the page loads */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   RESPONSIVE: adjustments for small screens (phones)
   ============================================================ */

/* On screens narrower than 700px, stack the hero vertically and center it */
@media (max-width: 700px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 5%;
    }

    .hero-ctas {
        justify-content: center;
    }
}

/* ============================================================
   EXPERIENCE: research roles, fellowship, and credentials
   ============================================================ */

.experience-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 5%;
}

.experience-section h2 {
    text-align: center;
}

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

.exp-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #0984e3;
    border-radius: 12px;
    padding: 22px 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.exp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.exp-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.exp-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3436;
}

.exp-date {
    font-size: 0.78rem;
    color: #b2bec3;
    white-space: nowrap;
    flex-shrink: 0;
}

.exp-org {
    margin: 4px 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0984e3;
}

.exp-detail {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

/* Education / credentials strip */
.credentials {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    background: #e8f4fd;
    border: 1px solid #c5dff7;
    border-radius: 12px;
    padding: 22px 28px;
}

.cred-main h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3436;
}

.cred-main p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.cred-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cred-list li {
    background: #fff;
    border: 1px solid #c5dff7;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.82rem;
    color: #0770c4;
    font-weight: 500;
}

.cred-list li strong {
    font-weight: 700;
}

/* Open Source Section */
#open-source {
  max-width: 900px;
  margin: 0 auto 80px;
  padding: 0 2rem;
}

#open-source .section-label {
  /* reuse your existing section-label style automatically */
}

.oss-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #c5dff7;
  border-radius: 12px;
  margin-top: 1rem;
  background: #e8f4fd;
}

.oss-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #c5dff7;
  text-decoration: none;
  color: #0770c4;
  font-weight: 500;
  transition: background 0.15s;
}

.oss-item:last-child { border-bottom: none; }
.oss-item:hover { background: #d5eaf7; }

.oss-repo-owner { color: #5aabdf; font-weight: 400; }

.oss-stars {
  font-size: 13px;
  color: #5aabdf;
}

/* ============================================================
   NUSCI ARTICLES: published writing section
   ============================================================ */

#writing {
  max-width: 700px;
  margin: 0 auto 80px;
  padding: 0 2rem;
}

#writing h2 {
  text-align: center;
}

.nusci-description {
  text-align: center;
  font-size: 15px;
  color: #555;
  max-width: 700px;
  margin: -16px auto 36px;
  line-height: 1.75;
}

.nusci-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  overflow: hidden;
}

.nusci-card {
  background: #fff;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.2s ease;
  border-bottom: none;
}

.nusci-card:last-child {
  border-bottom: none;
}

.nusci-card:hover {
  background: #f7f9fc;
}

.nusci-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nusci-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nusci-issue {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #0984e3;
}

.nusci-date {
  font-size: 12px;
  color: #b2bec3;
}

.nusci-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
  color: #2d3436;
}

.nusci-excerpt {
  font-size: 0.875rem;
  color: #636e72;
  line-height: 1.7;
  margin: 0;
}

.nusci-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0984e3;
  text-decoration: none;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}

.nusci-link:hover {
  text-decoration: underline;
}

.nusci-card:first-child {
  border-right: 1px solid #e0e0e0;
}