/* ====== Global foundation ====== */

:root {
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --border-subtle: #e2e8f0;
  --text-main: #111827;
  --text-muted: #4b5563;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top left, #e0edff 0, #f5f7fa 42%, #f5f7fa 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ====== Layout helpers ====== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ====== Header & navigation ====== */

.site-header {
  padding: 22px 0 10px;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo-area h1 {
  font-size: 1.05rem;
  margin: 0 0 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.logo-area h1 a {
  color: var(--text-main);
}

.logo-area .tagline {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-navigation a {
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-navigation a:hover {
  background: rgba(15, 23, 42, 0.03);
  color: var(--text-main);
}

.main-navigation .current-page a {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

/* ====== Main area ====== */

.site-main {
  margin-bottom: 40px;
}

.site-main .container {
  padding-bottom: 40px;
}

/* ====== Buttons & pills (shared) ====== */

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #f9fafb;
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-ghost {
  background: #eff6ff;
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.35);
}

.btn-ghost:hover {
  background: #dbeafe;
}

.pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* ====== Home hero ====== */

.hero {
  margin-top: 10px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.3);
  backdrop-filter: blur(10px);
  padding: 26px 26px 24px;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.hero-image {
  flex: 1;
  max-width: 360px;
}

.hero-image img {
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.hero-text {
  flex: 1.5;
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 4px;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 2.4vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 12px;
}

.hero-text p {
  margin: 0 0 12px;
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 12px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* ====== Generic inner page layout (About, Newsletter, Contact, Projects) ====== */

.page-section {
  margin-top: 10px;
}

.page-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.3);
  backdrop-filter: blur(10px);
  padding: 24px 24px 22px;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.breadcrumb a {
  color: var(--accent);
}

.breadcrumb span.separator {
  opacity: 0.6;
}

.page-header h1 {
  font-size: clamp(1.6rem, 2.1vw, 1.9rem);
  margin: 0 0 12px;
}

.page-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.7;
}

/* ====== About ====== */

.about-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-photo {
  max-width: 180px;
}

.about-photo img {
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.about-text p {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 14px;
}

.about-cta {
  margin-top: 8px;
}

/* ====== Newsletter ====== */

.newsletter-embed {
  margin-top: 10px;
}

.newsletter-frame {
  width: 100%;
  min-height: 320px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: transparent;
}

/* ====== Contact ====== */

.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-main {
  flex: 1;
}

.contact-details {
  flex: 0 0 260px;
  background: #f9fafb;
  border-radius: var(--radius-lg);
  border: 1px solid #e5e7eb;
  padding: 16px 16px 14px;
  font-size: 0.94rem;
}

.contact-details h2 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.contact-details p {
  margin: 0 0 8px;
  color: var(--text-muted);
}

.contact-details a {
  color: var(--accent);
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-note {
  margin-top: 8px;
}

/* Contact form */

.contact-form form {
  width: 100%;
  max-width: 520px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: #374151;
}

.form-input,
.form-textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  font-family: inherit;
  background: #f9fafb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
  background: #ffffff;
}

.form-textarea {
  resize: vertical;
}

/* Error + response boxes */

.error-box {
  background-color: #fef2f2;
  border-radius: 12px;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  padding: 10px 12px;
  margin-bottom: 16px;
  max-width: 520px;
  font-size: 0.9rem;
  color: #991b1b;
}

.error-box ul {
  margin: 0 0 0 18px;
  padding: 0;
}

.error-box li {
  margin-bottom: 4px;
}

.response-summary {
  background: #eff6ff;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  padding: 12px 14px;
  margin: 12px 0 18px;
  max-width: 520px;
  font-size: 0.9rem;
}

/* ====== Projects (grid + banner) ====== */

/* Header card that contains the banner + text */
.page-header {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0; /* actual padding is applied to children */
}

/* Banner wrapper: stretches to edges of header card */
.projects-banner-wrap {
  margin: 0;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  overflow: hidden;
  line-height: 0; /* removes tiny gap under image */
  position: relative;
}

/* Soft white gradient at bottom of banner */
.projects-banner-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%; /* how much of the bottom gets faded */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    #ffffff 85%
  );
  pointer-events: none;
}

/* Banner image */
.projects-banner {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  display: block;
}

/* Padding for the text content inside the header */
.page-header .hero-eyebrow,
.page-header h1,
.page-header .page-intro,
.page-header .tag-row {
  padding-left: 26px;
  padding-right: 26px;
}

.page-header .hero-eyebrow {
  margin-top: 18px;
  display: block;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  font-size: 0.75rem;
  padding: 5px 10px;
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 16px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  border-color: rgba(37, 99, 235, 0.22);
}

.project-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #111827;
  font-weight: 500;
}

.project-title {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 2px 0 2px;
  padding-right: 90px; /* ensure text doesn't run under badge */
  display: block;
}

.project-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.project-thumb-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
}

/* Base thumbnail styles + animation */
.project-thumb {
  width: 100%;
  display: block;
  border-radius: 14px;
  object-fit: cover;
  height: 190px;  /* fixed height so all thumbs match */
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}


.project-thumb-wrap:hover .project-thumb {
  transform: scale(1.03);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
}

/* Slightly shorter on small screens */
@media (max-width: 600px) {
  .project-thumb {
    height: 160px;  /* keep it consistent with fixed height approach */
  }
}

.project-thumb-label {
  position: absolute;
  bottom: 8px;
  left: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  font-weight: 500;
}


.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 2px;
}

.project-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 4px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
}

.project-footer small {
  font-size: 0.75rem;
  color: #6b7280;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  background: #eff6ff;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.project-link span.icon {
  font-size: 1rem;
  line-height: 1;
}

.project-link:hover {
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

/* ====== Footer ====== */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  padding: 18px 0 24px;
  font-size: 0.85rem;
  color: #9ca3af;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.site-footer a {
  color: #9ca3af;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ====== Responsive tweaks ====== */

@media (min-width: 769px) {
  .hero-layout {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .page-card {
    padding: 26px 28px 24px;
  }

  .about-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .about-photo {
    flex: 0 0 190px;
  }

  .about-text {
    flex: 1;
  }
}

@media (min-width: 869px) {
  .contact-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .hero-card {
    padding: 20px 18px 22px;
  }

  .hero-meta {
    justify-content: center;
  }

  .projects-banner {
    max-height: 180px;
  }

  .page-header .hero-eyebrow,
  .page-header h1,
  .page-header .page-intro,
  .page-header .tag-row {
    padding-left: 18px;
    padding-right: 18px;
  }
}
