/* ========== Base Theme (white / grey / black) ========== */
:root {
  --bg: #ffffff;
  --panel: #a7d3f6;
  --muted: #000000;
  --text: #111111;
  --accent: #111111;
  --border: #dddddd;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Fluid base font size */
html {
  font-size: clamp(14px, 0.9rem + 0.4vw, 18px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Smooth fluid scaling for main body text */
body {
  font-size: clamp(0.9rem, 0.85rem + 0.2vw, 1.05rem);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.container {
  max-width: min(70rem, 100% - 2.5rem);
  margin: 0 auto;
}

/* Section headings scale with viewport */
.section-title {
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2.3rem);
  margin: 0 0 1rem;
  font-weight: 700;
}

/* ========== Buttons / pills / links ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.link {
  color: var(--accent);
  font-weight: 500;
  font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem);
}

.pill {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: clamp(0.7rem, 0.68rem + 0.12vw, 0.8rem);
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  background: #a7d3f6;
  border-bottom: 1px solid var(--border);
  z-index: 20;
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0.5rem 0;
}

.logo {
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text);
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.2rem);
}

.logo span {
  color: var(--accent);
}

#main-nav a {
  margin-left: 1.1rem;
  color: var(--muted);
  font-size: clamp(0.8rem, 0.78rem + 0.18vw, 0.95rem);
}

#main-nav a.active,
#main-nav a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
}

#theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--muted);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
}

/* ========== Hero ========== */
.hero {
  padding: clamp(3rem, 2.5rem + 2vw, 4rem) 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1.5fr) minmax(0, 160px);
  gap: 1.5rem;
  align-items: center;
}

.profile-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.profile-card img {
  border-radius: 0.6rem;
  margin-bottom: 0.75rem;
}

.profile-meta h3 {
  margin: 0.2rem 0 0.1rem;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.2rem);
}

.profile-meta p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.8rem, 0.78rem + 0.15vw, 0.9rem);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.hero-copy .eyebrow {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
  font-size: clamp(0.7rem, 0.65rem + 0.15vw, 0.8rem);
}

.hero-copy h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  line-height: 1.05;
  margin: 0.1rem 0 0.8rem;
}

.accent {
  color: var(--accent);
}

.lead {
  color: var(--muted);
  max-width: 52ch;
  font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem);
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Simple stats box */
.stats-bubble {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  text-align: center;
  box-shadow: var(--shadow);
  font-size: clamp(0.8rem, 0.78rem + 0.15vw, 0.9rem);
}

.stats-bubble div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.stats-bubble span {
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.8rem);
  font-weight: 700;
}

.stats-bubble small {
  color: var(--muted);
}

/* No fancy background */
.topo {
  display: none;
}

/* ========== About ========== */
.about {
  padding: 2.5rem 0;
  height: auto;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1.5fr);
  gap: 1.5rem;
  align-items: flex-start;
}

.about-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1.1rem;
  border-radius: 0.75rem;
  color: var(--muted);
  font-size: clamp(0.88rem, 0.84rem + 0.15vw, 0.96rem);
}

.about-card p {
  margin: 0 0 0.75rem;
}

.about-photo {
  min-height: 10rem;
  border-radius: 0.75rem;
  border: 1px dashed var(--border);
  background: #fafafa;
}

/* ========== Skills ========== */
.skills {
  padding: 2.2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skill-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.skill-card {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  font-size: clamp(0.88rem, 0.84rem + 0.15vw, 0.96rem);
}

.skill-card h3 {
  margin: 0 0 0.4rem;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
}

.skill-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tags li {
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: clamp(0.7rem, 0.68rem + 0.12vw, 0.8rem);
}

/* ========== Projects ========== */
.projects {
  padding: 2.2rem 0 2.5rem;
  background: #fdfdfd;
}

.projects .section-title {
  margin-bottom: 1rem;
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.project-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: clamp(0.88rem, 0.84rem + 0.15vw, 0.96rem);
}

.project-card h3 {
  margin: 0;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
}

.project-card p {
  margin: 0;
  color: var(--muted);
}

.project-card .tags {
  margin-top: 0.5rem;
}

.project-card .link {
  margin-top: 0.75rem;
  font-size: clamp(0.8rem, 0.78rem + 0.15vw, 0.9rem);
}

/* ========== Contact ========== */
.contact {
  padding: 2.5rem 0;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contact-form textarea {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.8rem;
  color: var(--text);
  font: inherit;
  font-size: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
}

.contact-form button {
  justify-self: flex-start;
}

/* ========== Footer ========== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  color: var(--muted);
  font-size: clamp(0.75rem, 0.72rem + 0.12vw, 0.85rem);
  background: #f7f7f7;
}

/* ========== Screen-reader only (used by contact form labels) ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* ========== Responsive Layout Tweaks ========== */
@media (max-width: 980px) {
  .nav {
    gap: 0.75rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .stats-bubble {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .skill-cards {
    grid-template-columns: 1fr;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    flex-wrap: wrap;
  }

  #main-nav a {
    margin-left: 0.75rem;
  }

  .stats-bubble {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects,
  .skills,
  .about,
  .contact,
  .hero {
    padding-inline: 0;
  }
}
/* Highlight links by making them bold on hover */
a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500; /* normal link weight */
  transition: font-weight 0.15s ease, color 0.15s ease;
}

a:hover {
  font-weight: 700;   /* bold on hover */
  color: var(--text); /* optional: slight color shift */
}

/* ========== Project Rows (3 images per project) ========== */

.project-row {
  display: grid;
  grid-template-columns: 2fr 1fr; /* left: images, right: info */
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.project-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* three images */
  gap: 0.75rem;
}

.project-images img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.project-info {
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.8rem);
}

.project-info p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 0.85rem + 0.3vw, 1.1rem);
  line-height: 1.5;
}

.project-link {
  margin-top: 1rem;
  font-weight: 600;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.2rem);
  color: var(--accent);
  text-decoration: none;
}

.project-link:hover {
  color: var(--text);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .project-row {
    grid-template-columns: 1fr; /* stack images over text */
  }
}

@media (max-width: 650px) {
  .project-images {
    grid-template-columns: 1fr; /* stack all 3 images on small screens */
  }

  .project-images img {
    height: 160px;
  }
}
/* ========== Extra small phones (<= 480px) ========== */
@media (max-width: 480px) {
  /* Container padding a bit tighter */
  .container {
    max-width: 100%;
    padding-inline: 1rem;
  }

  /* Header / nav stacks nicely */
  .nav {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: auto;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  #main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #main-nav a {
    margin: 0;
    font-size: 0.8rem;
  }

  /* Hero spacing + text */
  .hero {
    padding: 1.8rem 0 1.8rem;
  }

  .hero-copy h1 {
    font-size: 1.7rem;
    line-height: 1.15;
  }

  .lead {
    font-size: 0.9rem;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* Stats: 2 columns so they’re readable */
  .stats-bubble {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  /* About spacing */
  .about {
    padding: 1.8rem 0;
  }

  /* Skills: keep single column but soften spacing */
  .skills {
    padding: 1.8rem 0 2rem;
  }

  .skill-card {
    padding: 0.9rem;
  }

  /* Projects: tighter spacing & images not too tall */
  .projects {
    padding: 1.8rem 0 2rem;
  }

  .project-row {
    gap: 1.25rem;
    padding: 1.8rem 0;
  }

  .project-images img {
    height: 140px;
  }

  /* Contact form: full-width inputs with smaller padding */
  .contact {
    padding: 2rem 0;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 0.7rem;
    font-size: 0.85rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
