/* =====================================================
   JANNATHUL FIRTHOSE - DATA PORTFOLIO
   Theme: Dark Navy | White | Mint Green | Electric Blue
   Layout: wide, multi-column on laptops; swipeable projects
   and stacked cards on phones.
   ===================================================== */

:root {
  --navy: #0b1424;
  --navy-light: #101d30;
  --card: #142238;
  --card-hover: #1a2c45;

  --mint: #63d5b0;
  --blue: #4f8cff;
  --white: #ffffff;

  --text: #e8eef7;
  --muted: #a3b2c7;
  --line: #263851;

  --head: 'Manrope', sans-serif;
  --body: 'Inter', sans-serif;

  --radius: 16px;
  --shadow: 0 12px 35px rgba(0, 0, 0, .22);

  --header-h: 72px;
}

/* ---------- RESET ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--mint); text-decoration: none; }
button, input { font: inherit; }
ul { padding-left: 1.2rem; }
li + li { margin-top: .4rem; }

::selection { background: var(--mint); color: var(--navy); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }

/* ---------- COMMON LAYOUT ---------- */

/* Wide container so laptop screens are used fully */
.wrap {
  width: min(1240px, 92%);
  margin-inline: auto;
}

section {
  padding: 48px 0;
  scroll-margin-top: 72px;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}

section > .wrap { display: block; }

main > section:nth-of-type(even) { background: var(--navy-light); }

h1, h2, h3, h4 {
  font-family: var(--head);
  color: var(--white);
  line-height: 1.25;
}

.sec-title {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin-bottom: 8px;
  font-weight: 800;
}

.sec-title::after {
  content: "";
  display: block;
  width: 55px;
  height: 4px;
  background: var(--mint);
  margin-top: 12px;
  border-radius: 5px;
}

.sec-sub {
  color: var(--muted);
  max-width: 700px;
  margin: 14px 0 24px;
  line-height: 1.7;
}

.eyebrow {
  color: var(--mint);
  text-transform: uppercase;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  margin-bottom: 12px;
}

/* ---------- HEADER ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 20, 36, .97);
  border-bottom: 1px solid var(--line);
}

.bar {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: var(--head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  white-space: nowrap;
  letter-spacing: .5px;
}

.brand::after { content: "."; color: var(--mint); }

.nav { display: flex; align-items: center; gap: 3px; }

.nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
  border-radius: 8px;
  transition: .25s ease;
}

.nav a:hover,
.nav a.active { color: var(--mint); background: #172b46; }

.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav .icon { display: none; }

/* ---------- HERO / HOME ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 25%, rgba(79, 140, 255, .17), transparent 35%),
    radial-gradient(circle at 10% 85%, rgba(99, 213, 176, .09), transparent 35%),
    var(--navy) !important;
}

.hero-grid { display: block; }

.hero-content { max-width: 860px; }

.hero .eyebrow { letter-spacing: 1.4px; line-height: 1.6; }

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.12;
}

.hero-tagline {
  font-family: var(--head);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 700;
  color: var(--mint);
  margin-top: 20px;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-top: 14px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* At-a-glance panel (fills the right side of the home page) */
.glance {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.glance-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.glance-stats div {
  background: #203653;
  border-left: 4px solid var(--mint);
  border-radius: 10px;
  padding: 14px 12px;
}

.glance-stats strong {
  display: block;
  color: var(--mint);
  font-family: var(--head);
  font-size: 1.7rem;
  line-height: 1.1;
}

.glance-stats span { color: var(--muted); font-size: .76rem; }

.glance h4 {
  color: var(--mint);
  font-size: .78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 16px 0 10px;
}

/* ---------- BUTTONS ---------- */

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 11px 20px;
  border: 1px solid #40536e;
  border-radius: 9px;
  background: var(--card);
  color: var(--white);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: .25s ease;
}

.btn:hover { background: var(--card-hover); border-color: var(--mint); color: var(--mint); }

.btn.primary { background: var(--mint); border-color: var(--mint); color: var(--navy); }
.btn.primary:hover { background: #43bd99; border-color: #43bd99; color: var(--navy); }

/* ---------- CARDS AND CHIPS ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: border-color .3s ease;
}

.card:hover { border-color: rgba(99, 213, 176, .65); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }

.tags li {
  margin: 0;
  padding: 5px 11px;
  border: 1px solid #304762;
  border-radius: 30px;
  background: #203653;
  color: #c8ddff;
  font-size: .78rem;
  font-weight: 600;
}

/* ---------- ABOUT: text left, facts right ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 26px;
}

#aboutText p {
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 16px;
  font-size: 1.02rem;
}

#aboutText p:last-child { margin-bottom: 0; }

#aboutText p.pull {
  color: var(--text);
  border-left: 4px solid var(--mint);
  padding-left: 16px;
  font-weight: 500;
}

.photo {
  width: 125px;
  height: 125px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--mint);
  margin-bottom: 25px;
}

.facts {
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.facts dt {
  color: var(--mint);
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.facts dd {
  color: var(--text);
  margin-bottom: 16px;
  overflow-wrap: anywhere;
  font-size: .96rem;
}

.facts dd:last-child { margin-bottom: 0; }

/* ---------- PROJECTS: side by side ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.swipe-hint { display: none; }

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

.project h3 { font-size: 1.25rem; margin-bottom: 10px; }

.project .desc {
  color: var(--muted);
  line-height: 1.7;
  font-size: .94rem;
  margin-bottom: 16px;
}

.project h4 {
  color: var(--mint);
  font-size: .78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project ul:not(.tags) {
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 16px;
}

.project .tags { margin-bottom: 8px; }

.project .actions { margin-top: auto; padding-top: 14px; }

/* ---------- SKILLS: three paths side by side ---------- */

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

.skill-groups .card { padding: 22px; display: flex; flex-direction: column; }

.skill-groups .card h3 { font-size: 1.1rem; margin-bottom: 4px; color: var(--mint); }

.skill-groups .card .hint {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.5;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.skill-groups h4,
.tools-strip h4 {
  color: var(--white);
  font-size: .74rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: .8;
}

/* workflow: numbered steps */
.flow {
  list-style: none;
  padding: 0;
  counter-reset: step;
  margin-bottom: 16px;
}

.flow li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 3px 0 3px 32px;
  color: var(--text);
  font-size: .88rem;
}

.flow li + li { margin-top: 4px; }

.flow li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(99, 213, 176, .15);
  border: 1px solid var(--mint);
  color: var(--mint);
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-groups .tags { margin-top: auto; }

.skill-groups .tags li {
  background: #1a2d47;
  color: var(--text);
  border-color: #344c6b;
  font-size: .78rem;
}

.tools-strip {
  margin-top: 18px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.tools-strip h4 { margin: 0; white-space: nowrap; }
.tools-strip .tags li { background: #1a2d47; color: var(--text); border-color: #344c6b; }

/* ---------- INTERNSHIPS: main card + side cards ---------- */

.internship-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-top: 26px;
  align-items: stretch;
}

.internship-side { display: grid; gap: 20px; grid-template-rows: 1fr 1fr; }

.job h3 { font-size: 1.3rem; margin-bottom: 6px; }

.job .meta { color: var(--mint); font-size: .94rem; margin-bottom: 18px; }

.job ul:not(.tags) { color: var(--muted); margin-bottom: 8px; }
.job li { line-height: 1.7; }

.job h4 {
  color: var(--mint);
  font-size: .8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.job p { color: var(--muted); }

.job.compact { padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; }
.job.compact .eyebrow { margin-bottom: 6px; }
.job.compact h3 { font-size: 1.1rem; margin-bottom: 4px; }
.job.compact .meta { margin-bottom: 10px; }
.job.compact .summary { font-size: .9rem; line-height: 1.65; }

/* ---------- EDUCATION: side by side ---------- */

.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 26px;
}

.education-grid .eyebrow { margin-bottom: 12px; }

.education-grid .education-detail { color: var(--mint); font-weight: 700; margin: 12px 0; }

.education-grid .subject-heading {
  color: var(--mint);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 14px 0 10px;
}

/* ---------- CERTIFICATES: 3 per row ---------- */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cert {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: border-color .3s ease;
  box-shadow: var(--shadow);
}

.cert:hover { border-color: var(--mint); }

.cert img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 9px;
}

.cert strong {
  display: block;
  color: var(--white);
  font-family: var(--head);
  font-size: 1rem;
  line-height: 1.4;
}

.cert span { display: block; color: var(--muted); font-size: .83rem; margin-top: 4px; }

/* ---------- CONTACT: three cards in a row ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contact-grid a {
  display: block;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color .25s, transform .25s;
}

.contact-grid a:hover { border-color: var(--mint); transform: translateY(-3px); }

.contact-grid small {
  display: block;
  color: var(--mint);
  font-size: .75rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.contact-grid span {
  display: block;
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- FOOTER ---------- */

.footer {
  background: #080f1c;
  border-top: 1px solid var(--line);
  padding: 30px 0;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}

/* ---------- POPUP / DIALOG ---------- */

dialog {
  width: min(950px, 94vw);
  max-height: 90vh;
  margin: auto;
  padding: 0;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .55);
  overflow-y: auto;
}

dialog::backdrop { background: rgba(0, 0, 0, .82); backdrop-filter: blur(5px); }

.close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 5;
  width: 40px;
  height: 40px;
  margin: 12px 12px -52px 0;
  background: #203653;
  color: var(--white);
  border: 1px solid #40536e;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

.close:hover { background: var(--mint); color: var(--navy); }

.m-wrap { padding: 35px; }
.m-wrap h3 { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 20px; }
.m-wrap h4 { color: var(--mint); font-size: 1rem; margin: 22px 0 12px; }
.m-wrap p, .m-wrap li { color: var(--muted); line-height: 1.8; }
.m-wrap ul { margin-bottom: 18px; }

/* ---------- PROJECT KPIs ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin: 25px 0;
}

.kpis div { background: #203653; padding: 17px; border-radius: 10px; border-left: 4px solid var(--mint); }

.kpis strong { display: block; color: var(--mint); font-family: var(--head); font-size: 1.5rem; }
.kpis span { color: var(--muted); font-size: .78rem; }

/* ---------- PROJECT SCREENSHOTS ---------- */

.shots { display: grid; gap: 20px; margin: 25px 0; }
.shots img { width: 100%; border: 1px solid var(--line); border-radius: 10px; }

figcaption { color: var(--muted); font-size: .82rem; margin-top: 8px; }

.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ---------- CERTIFICATE POPUP ---------- */

.cert-view img {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 10px;
  margin: 20px 0;
}

.cert-view .btn { margin-top: 15px; }

/* ---------- SCROLL ANIMATION ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}

.js .reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- LAPTOP HEIGHT: keep each section on one screen ---------- */

@media (min-width: 1101px) and (max-height: 800px) {
  section { padding: 32px 0; }
  .sec-sub { margin: 10px 0 16px; }
  .card { padding: 20px; }
  .project .desc { margin-bottom: 12px; font-size: .9rem; }
  .project ul:not(.tags) { font-size: .88rem; margin-bottom: 12px; }
  .project li + li { margin-top: .25rem; }
  .cert img { height: 105px; }
  .flow li { font-size: .84rem; }
}

/* ---------- TABLET AND PHONE: ICON BAR AT THE BOTTOM ---------- */

@media (max-width: 1100px) {

  body { padding-bottom: 75px; }

  :root { --header-h: 65px; }

  section { min-height: calc(100vh - var(--header-h) - 75px); }

  .bar { min-height: 65px; }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0;
    padding: 8px 3px calc(8px + env(safe-area-inset-bottom));
    background: #0b1424;
    border-top: 1px solid var(--line);
  }

  .nav a {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 8px 2px;
    color: var(--muted);
  }

  .nav .icon { width: 21px; height: 21px; display: block; }
  .nav span { display: none; }
  .nav a.active { color: var(--mint); background: transparent; }

  .skill-groups { grid-template-columns: 1fr; }
  .flow { display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .flow li + li { margin-top: 0; }
}

/* ---------- SMALL LAPTOP / TABLET ---------- */

@media (max-width: 900px) {

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

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

  .internship-layout { grid-template-columns: 1fr; }
  .internship-side { grid-template-rows: auto; }

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

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

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

/* ---------- PHONE: projects become a swipeable row ---------- */

@media (max-width: 760px) {

  section { padding: 50px 0; min-height: 0; }

  .hero { padding: 60px 0; }
  .hero h1 { font-size: 2.5rem; letter-spacing: -1px; }

  .card { padding: 20px; }

  .m-wrap { padding: 25px 20px; }

  .swipe-hint {
    display: block;
    color: var(--mint);
    font-size: .8rem;
    font-weight: 600;
    margin: -8px 0 12px;
  }

  .project-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    margin-inline: -4%;
    padding-inline: 4%;
    scrollbar-width: thin;
  }

  .project-grid .project {
    flex: 0 0 90%;
    scroll-snap-align: center;
  }

  .project.reveal { opacity: 1; transform: none; }

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

@media (max-width: 520px) {

  .cert-grid { grid-template-columns: 1fr; }
  .cert img { height: 170px; }

  .glance-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .glance-stats strong { font-size: 1.4rem; }
}

/* ---------- SMALL PHONES ---------- */

@media (max-width: 420px) {

  .wrap { width: 90%; }
  .brand { font-size: .85rem; }
  .hero h1 { font-size: 2.2rem; }
  .lead { font-size: .98rem; }
  .actions .btn { width: 100%; }
  .nav a { padding: 7px 1px; }
  .nav .icon { width: 19px; height: 19px; }
}

/* ---------- ACCESSIBILITY ---------- */

@media (prefers-reduced-motion: reduce) {

  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }

  .js .reveal { opacity: 1; transform: none; }
}
