/* =========================
   GLOBAL + VARIABLES
========================= */
:root{
  --text: #111;
  --muted: #555;
  --border: #e7e7e7;
  --max: 1280px;

  /* Page background for contrast */
  --page-bg: #f6f7f8;

  /* Accessibility focus ring */
  --focus: #60a5fa;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.7;
}

a{
  color: inherit;
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
}

/* Page width container */
.container{
  width: min(var(--max), 92vw);
  margin: 0 auto;
  padding: 12px 0 26px;
}


/* =====================
   TOP NAVIGATION
===================== */
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.brand{
  font-weight: 800;
  letter-spacing: .4px;
  font-size: 18px;
}

.menu{
  display: flex;
  gap: 20px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(20, 60, 90, 0.75);
  font-weight: 500;
}

.menu a{
  position: relative;
  transition: color 0.2s ease;
}

.menu a:hover{
  color: rgb(30, 120, 180);
}

.menu a.active{
  color: rgb(35, 140, 210);
  font-weight: 600;
  text-decoration: none;
}

.menu a.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #22c55e, #06b6d4);
  border-radius: 2px;
}


/* =====================
   TYPOGRAPHY
===================== */
h1{
  font-size: clamp(34px, 5vw, 52px);
  margin: 28px 0 10px;
  letter-spacing: -0.02em;
}

.lead{
  color: var(--muted);
  font-size: 18px;
  max-width: 70ch;
}

/* Generic section */
.section{
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}


/* =====================
   ABOUT PAGE HERO
===================== */
.about-hero{
  width: 100%;
  margin-top: 0;
  padding: 26px 0;
  background-image:
    linear-gradient(rgba(5, 25, 45, 0.35), rgba(5, 25, 45, 0.35)),
    url("images/about-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.08);
}

@keyframes fadeUp{
  from{
    opacity: 0;
    transform: translateY(10px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUpDelayed{
  from{
    opacity: 0;
    transform: translateY(6px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

.about-hero-inner{
  color: #fff;
  animation: fadeUp 0.6s ease-out both;
}

.about-hero h1{
  margin: 0 0 10px;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.03em;
  color: #fff;
}

.about-hero-lead{
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  max-width: 60ch;
  color: #fff;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  animation: fadeUpDelayed 0.6s ease-out both;
  animation-delay: 0.15s;
}

.about-body{
  padding-top: 18px;
}


/* =====================
   ABOUT PAGE GRID
===================== */
.about-grid{
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  align-items: start;
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}

.about-text p{
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.85;
}

.about-text p:last-child{
  margin-bottom: 0;
}

.about-intro{
  font-size: 19px;
  font-weight: 500;
}

.intro-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #111; /* strong readable text */
}

/* =====================
   ABOUT PHOTO
===================== */
.about-photo img{
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: 50% 10%; /* ✅ keeps your face visible */
  display: block;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: transform 0.25s ease;
  will-change: transform;
}

.about-photo img:hover{
  transform: translateY(-4px);
}

@media (min-width: 901px){
  .about-photo{
    position: sticky;
    top: 92px;
  }
}


/* =====================
   GENERIC GRID + CARDS
===================== */
.grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card{
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 12px;
  transition: transform .12s ease, box-shadow .12s ease;
  background: #fff;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.card h3{
  margin: 0 0 6px;
  font-size: 16px;
}

.card p{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.card .links{
  display: flex;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
}


/* =====================
   BLOG LIST
===================== */
.postlist{
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.post{
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: transform .12s ease, box-shadow .12s ease;
}

.post:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.post .meta{
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}


/* =====================
   FOOTER
===================== */
.footer{
  margin-top: 44px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 24px;
}


/* =====================
   SOCIAL LINKS
===================== */
.social{
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.icon-link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1e3a8a, #0ea5a4);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.icon-link:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  filter: brightness(1.03);
  text-decoration: none;
}

.icon-link:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.icon-link.github:hover{
  background: linear-gradient(135deg, #111827, #374151);
}

.icon-link.linkedin:hover{
  background: linear-gradient(135deg, #0a66c2, #0ea5e9);
}

.icon-link.email:hover{
  background: linear-gradient(135deg, #334155, #14b8a6);
}

.icon{
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.icon svg{
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.icon-link .label{
  color: #fff;
  line-height: 1;
}


/* =====================
   PORTFOLIO HERO
===================== */
.portfolio-hero{
  background:
    radial-gradient(900px 420px at 10% 25%, rgba(59,130,246,0.45), transparent 55%),
    radial-gradient(900px 420px at 90% 30%, rgba(34,197,94,0.40), transparent 55%),
    radial-gradient(900px 420px at 55% 110%, rgba(6,182,212,0.35), transparent 55%),
    linear-gradient(180deg, #071a2a 0%, #0b2a3f 55%, #071a2a 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 44px 0;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.portfolio-hero .about-hero-inner{
  max-width: 70ch;
}


/* =====================
   SECTION HEADER
===================== */
.section-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.section-head h2{
  margin: 0;
}


/* =====================
   FILTER CHIPS
===================== */
.filters{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip{
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(20, 60, 90, 0.75);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.chip:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

.chip.is-active{
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}


/* =====================
   TAGS
===================== */
.tags{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.tag{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(20, 60, 90, 0.78);
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(231,231,231,0.9);
}


/* =====================
   CARD ACTIONS
===================== */
.card-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #0ea5a4);
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  filter: brightness(1.03);
  text-decoration: none;
}

.btn:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}


/* =====================
   BLOG PAGE POLISH
===================== */
.blog-hero{
  background:
    radial-gradient(900px 420px at 15% 25%, rgba(59,130,246,0.40), transparent 55%),
    radial-gradient(900px 420px at 85% 30%, rgba(6,182,212,0.35), transparent 55%),
    radial-gradient(900px 420px at 55% 110%, rgba(34,197,94,0.30), transparent 55%),
    linear-gradient(180deg, #071a2a 0%, #0b2a3f 55%, #071a2a 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 44px 0;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.blog-tools{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search{
  height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.9);
  font-size: 14px;
  outline: none;
}

.search:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.post-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn-ghost{
  background: #fff;
  color: rgba(20, 60, 90, 0.75);
  border: 1px solid var(--border);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.btn-ghost:hover{
  transform: none;
  box-shadow: none;
  filter: none;
}


/* =====================
   PORTFOLIO IMAGE GRID
===================== */
.portfolio-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.portfolio-card{
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 420px;
  border-radius: 24px;
  text-decoration: none;
  background: #1D2A50;
  box-shadow: 0 16px 40px rgba(13, 22, 48, 0.14);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover{
  transform: translateY(-8px);
  box-shadow: 0 24px 52px rgba(13, 22, 48, 0.18);
  text-decoration: none;
}

.portfolio-card img{
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.portfolio-card:hover img{
  transform: scale(1.04);
}

/* Light glass overlay for better image visibility */
.portfolio-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  background: linear-gradient(
    to top,
    rgba(255,255,255,0.85) 0%,
    rgba(255,255,255,0.60) 40%,
    rgba(255,255,255,0.00) 100%
  );
}

/* More horizontal text layout */
.portfolio-text{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
}

.portfolio-text h3{
  flex: 1;
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
  color: #111;
}

.portfolio-text p{
  flex: 1.2;
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #333;
  text-align: right;
}

/* GitHub badge appears on hover */
.portfolio-github{
  position: absolute;
  right: 18px;
  bottom: 18px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s ease;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.portfolio-card:hover .portfolio-github{
  opacity: 1;
  transform: translateY(0);
}

/* Optional category accents */
.portfolio-card.analytics{
  box-shadow: 0 16px 40px rgba(29, 42, 80, 0.14);
}

.portfolio-card.healthcare{
  box-shadow: 0 16px 40px rgba(29, 42, 80, 0.14);
}

.portfolio-card.storytelling{
  box-shadow: 0 16px 40px rgba(29, 42, 80, 0.14);
}

.portfolio-card.dashboard{
  box-shadow: 0 16px 40px rgba(29, 42, 80, 0.14);
}


/* =====================
   RESPONSIVE
===================== */
@media (max-width: 900px){
  .about-grid{
    grid-template-columns: 1fr;
  }

  .about-photo img{
    height: auto;
  }

  .about-hero{
    padding: 22px 0;
  }

  .about-hero-lead{
    font-size: 17px;
  }
}

@media (max-width: 800px){
  .grid{
    grid-template-columns: 1fr;
  }

  .menu{
    gap: 12px;
    font-size: 14px;
  }
}

@media (max-width: 900px){
  .portfolio-grid{
    grid-template-columns: 1fr;
  }

  .portfolio-card,
  .portfolio-card img{
    min-height: 340px;
  }

  .portfolio-text{
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .portfolio-text p{
    text-align: left;
  }
}

@media (max-width: 640px){
  .portfolio-grid{
    gap: 1.4rem;
  }

  .portfolio-card,
  .portfolio-card img{
    min-height: 300px;
  }

  .portfolio-overlay{
    padding: 1.1rem;
  }

  .portfolio-text h3{
    font-size: 1.12rem;
  }

  .portfolio-text p{
    font-size: 0.94rem;
  }

  .portfolio-github{
    right: 14px;
    bottom: 14px;
    font-size: 12px;
    padding: 8px 13px;
  }
}
