/* =========================================================
   Saiful Islam Shah — Portfolio stylesheet
   Sections:
     1. Design tokens        8. Skills / tech stack
     2. Reset & base         9. Projects
     3. Cursor & background 10. Education
     4. Navigation          11. Goals
     5. Section shell       12. Contact & footer
     6. Hero                13. Animations
     7. About / clients /   14. Responsive & accessibility
        experience
   ========================================================= */

/* 1. DESIGN TOKENS — change these to retheme everything */
:root {
  --bg:           #080810;
  --surface:      #0F0F1A;
  --surface2:     #151525;
  --border:       rgba(255,255,255,0.07);
  --border-glow:  rgba(138,107,255,0.35);
  --purple:       #8A6BFF;
  --purple-dim:   #4B3D9A;
  --purple-deep:  #1A1430;
  --green:        #00E5A0;
  --lime:         #D2FD00;       /* accent from the hero banner */
  --white:        #F0EEFF;
  --muted:        #8A87A0;
  --muted2:       #4A4862;
  --text:         #E8E4FF;
  --mono:         'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display:      'Cabinet Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r:            0.875rem;
  --r-sm:         0.5rem;
  --nav-h:        4.25rem;
  --container:    70rem;         /* main content width (1120px at 16px) */
}

/* 2. RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Fluid base size. 16px up to ~1330px wide, then grows with the screen
   (about 17px at 1536px, 19.5px at 1920px, max 22px), so the site looks
   the same at 100%, 125% or 150% Windows display scaling. */
html {
  font-size: clamp(16px, calc(8px + 0.6vw), 22px);
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--display);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: 1rem;
  z-index: 1000;
  background: var(--purple);
  color: #fff;
  padding: 0.625rem 1rem;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 3. CURSOR & BACKGROUND
   Custom cursor only on devices with a real mouse */
.cursor, .cursor-ring { display: none; }

@media (hover: hover) and (pointer: fine) {
  body.has-cursor { cursor: none; }
  body.has-cursor a, body.has-cursor button { cursor: none; }
  body.has-cursor .cursor,
  body.has-cursor .cursor-ring { display: block; }
}

.cursor {
  width: 10px; height: 10px;
  background: var(--purple);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease;
  mix-blend-mode: screen;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(138,107,255,0.5);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.12s ease;
}

/* Film-grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
}

/* Glow orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 { width: 500px; height: 500px; background: rgba(138,107,255,0.08); top: -100px; right: -100px; }
.orb-2 { width: 400px; height: 400px; background: rgba(0,229,160,0.04); bottom: 20%; left: -150px; }
.orb-3 { width: 300px; height: 300px; background: rgba(138,107,255,0.06); bottom: -50px; right: 20%; }

.page-wrap { position: relative; z-index: 2; }

/* 4. NAVIGATION */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 clamp(1.5rem, 5vw, 5rem);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,8,16,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--purple);
  text-decoration: none;
  letter-spacing: 0.06em;
}
.nav-logo span { color: var(--muted); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.2rem;
}
.nav-links a {
  font-size: 0.72rem;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: 2.5rem; height: 2.5rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--white);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* 5. SECTION SHELL */
section {
  padding: clamp(5rem, 10vw, 8rem) clamp(1.5rem, 5vw, 5rem);
  max-width: var(--container);
  margin: 0 auto;
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-eyebrow::after {
  content: '';
  flex: 1;
  max-width: 3.75rem;
  height: 1px;
  background: var(--purple-dim);
}

.section-heading {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1rem;
}

.section-intro {
  color: var(--muted);
  max-width: 40rem;
  font-size: 0.95rem;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: var(--container);
  margin: 0 auto;
}

/* 6. HERO
   Full-width banner image, with the intro text overlapping its
   dark lower half. Lime accents match the banner artwork. */
#hero {
  max-width: none;
  padding: var(--nav-h) 0 clamp(4rem, 8vw, 6rem);
  text-align: center;
  position: relative;
}

.hero-visual {
  position: relative;
  max-width: 90rem;
  /* Never taller than the screen: shrink width so banner + pills + buttons fit */
  width: min(100%, calc((100vh - var(--nav-h) - 3rem) * 2));
  width: min(100%, calc((100svh - var(--nav-h) - 3rem) * 2));
  margin: 0 auto;
  aspect-ratio: 2 / 1;   /* slightly wider than the image, hides its bottom caption line */
  overflow: hidden;
  /* Fade all four edges to transparent so the banner melts into the page */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 55%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 55%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-composite: intersect;
}
/* The banner at its real 16:9 shape, placed the way "cover" would place it
   (centred, 15% from the top), so the stickers can be pinned in % of the image */
.hero-art {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: -0.9375%;   /* 15% of the 6.25% overflow; % margins use the width */
}
.hero-art picture,
.hero-art picture img { display: block; width: 100%; height: 100%; }

/* Banner name letters: cut-outs of "SAIFUL ISLAM", positioned inline in index.html */
.hero-letter { position: absolute; height: auto; pointer-events: none; }

/* Banner stickers: exact cut-outs over "Automation Engineer" and "1+ years" */
.hero-sticker {
  position: absolute;
  height: auto;
  transform-origin: center;
  pointer-events: none;
}
.hero-sticker--automation { left: 30.6%;    top: 34.5481%; width: 12.3%; }
.hero-sticker--years      { left: 61.9333%; top: 47.8815%; width: 8.3%; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 54rem;
  margin: clamp(-4.5rem, -5.5vw, -0.5rem) auto 0;   /* stickers sit just below the banner frame */
  padding: 0 clamp(1.5rem, 5vw, 5rem);
  min-width: 0;
}

.hero-title { margin-bottom: 0; }

/* Lime "sticker" pills, like the labels in the banner */
.hero-roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.role-pill {
  display: inline-block;
  background: var(--lime);
  color: #0A0A0A;
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  transform: rotate(-3deg);
  transition: transform 0.25s ease;
}
.role-pill:nth-child(2) { transform: rotate(2deg); }
.role-pill:nth-child(3) { transform: rotate(-1.5deg); }
.role-pill:hover { transform: rotate(0) scale(1.05); }


/* Code-style business card */
.hero-code,
.project-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--purple);
  border-radius: var(--r);
  font-family: var(--mono);
  position: relative;
  overflow-x: auto;
}
.hero-code {
  padding: 1.4rem 1.8rem;
  font-size: 0.78rem;
  line-height: 2;
  margin: 0.5rem 0 1.5rem;
}
.hero-code::before {
  content: '● ● ●';
  position: absolute;
  top: 0.625rem; left: 1rem;
  font-size: 0.5rem;
  color: var(--muted2);
  letter-spacing: 4px;
}
.hero-code code { display: block; padding-top: 1rem; white-space: pre; font-family: inherit; }
.ck { color: #AFA9EC; }
.cv { color: var(--white); }
.cs { color: #7ECFB3; }
.cp { color: #F0C070; }
.cb { color: var(--muted); }

/* 7a. ABOUT — profile photo card */
.about-media { display: flex; flex-direction: column; gap: 1rem; }

.photo-wrap {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4/5;
  border: 1px solid var(--border);
}
.photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(8,8,16,0.92) 100%);
}
.photo-wrap picture { display: block; height: 100%; }
.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%) contrast(1.05);
  transition: filter 0.5s;
}
.photo-wrap:hover img { filter: grayscale(0%) contrast(1.05); }

.photo-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  z-index: 2;
}
.photo-label-name,
.photo-label-role { display: block; }
.photo-label-name { font-size: 1.1rem; font-weight: 700; color: var(--white); letter-spacing: -0.02em; }
.photo-label-role { font-family: var(--mono); font-size: 0.68rem; color: var(--purple); letter-spacing: 0.08em; margin-top: 2px; }

.info-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.75rem 1rem;
}
.chip dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.chip dd { font-size: 0.88rem; font-weight: 600; color: var(--white); margin-top: 2px; }
.chip dd.is-open { color: var(--green); }

/* About layout */
.about-grid {
  display: grid;
  grid-template-columns: 21.25rem minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}
.about-body { min-width: 0; }
.about-text p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.85;
}
.about-text p strong { color: var(--text); }

.about-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.stat-box:hover { border-color: var(--border-glow); }
.stat-num { font-size: 2.2rem; font-weight: 800; color: var(--purple); line-height: 1; letter-spacing: -0.04em; }
.stat-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 7b. CLIENTS CAROUSEL */
.clients-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  max-width: var(--container);
  margin: 0 auto;
  overflow: hidden;
}
.clients-section .section-eyebrow,
.clients-section .section-heading,
.clients-section .section-intro {
  padding-left: clamp(1.5rem, 5vw, 5rem);
  padding-right: clamp(1.5rem, 5vw, 5rem);
}
.carousel-wrap {
  margin-top: 3rem;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.carousel-track {
  display: flex;
  gap: 1rem;
  list-style: none;
  width: max-content;
  padding: 0.5rem 0;
}
/* JS duplicates the logos and adds .is-animated for a seamless loop */
.carousel-track.is-animated { animation: scroll-logos var(--carousel-speed, 70s) linear infinite; }
/* Second row: a little gap above it, and it moves the opposite way */
.carousel-track + .carousel-track { margin-top: 0.5rem; }
.carousel-track--reverse.is-animated { animation-direction: reverse; }
.carousel-wrap:hover .carousel-track,
.carousel-wrap:focus-within .carousel-track { animation-play-state: paused; }
@keyframes scroll-logos {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 0.5rem)); }
}

.client-tile {
  flex-shrink: 0;
  width: 11.875rem;
  height: 8.125rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.client-tile:hover { border-color: var(--border-glow); background: var(--surface2); transform: translateY(-3px); }
.client-tile img {
  max-width: 8.75rem;
  max-height: 4rem;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.3s;
}
.client-tile:hover img { opacity: 1; }
.client-name {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

/* 7c. EXPERIENCE */
.exp-list { margin-top: 3rem; list-style: none; }
.exp-item {
  display: grid;
  grid-template-columns: 11.25rem 1fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
}
.exp-item:first-child { padding-top: 0; }
.exp-item:last-child { border-bottom: none; }
.exp-item:hover { padding-left: 8px; }

.exp-date,
.edu-year {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  padding-top: 4px;
  display: block;
}
.exp-co,
.edu-inst { font-size: 0.85rem; color: var(--purple); font-weight: 600; margin-top: 6px; }

.exp-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.exp-company-logo {
  width: 4rem;
  height: 4rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  object-fit: contain;
  background: var(--bg);
  padding: 0.375rem;
  margin-bottom: 1rem;
}
.exp-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-style: normal;
}
.exp-contact a { color: var(--muted); text-decoration: none; }
.exp-contact a:hover { color: var(--white); }

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.exp-bullets li {
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 1.25rem;
  position: relative;
}
.exp-bullets li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-size: 1rem;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.375rem; list-style: none; }
.tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  background: var(--purple-deep);
  color: var(--purple);
  border: 1px solid rgba(138,107,255,0.2);
  padding: 0.2rem 0.625rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

/* 8. SKILLS / TECH STACK */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.skill-group:hover { border-color: var(--border-glow); }
.skill-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.skill-icon {
  width: 2.125rem; height: 2.125rem;
  border-radius: var(--r-sm);
  background: var(--purple-deep);
  border: 1px solid rgba(138,107,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.skill-group-title { font-size: 0.9rem; font-weight: 700; color: var(--white); }

.tech-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.375rem, 1fr));
  gap: 0.6rem;
}
.tech-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.56rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.tech-item:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.tech-item img {
  width: 1.375rem;
  height: 1.375rem;
  object-fit: contain;
  flex-shrink: 0;
}
/* Some brand icons are black — give them a light badge so they stay visible */
.tech-item img.icon-on-light {
  background: #F0EEFF;
  border-radius: 5px;
  padding: 2px;
}
.tech-dot {
  width: 1.375rem; height: 1.375rem;
  border-radius: 5px;
  background: var(--purple-deep);
  border: 1px solid rgba(138,107,255,0.25);
  color: var(--purple);
  font-family: var(--mono);
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.44rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.85rem;
  color: var(--muted);
}
.skill-row:last-child { border-bottom: none; }
.skill-name { display: inline-flex; align-items: center; gap: 0.6rem; }
.skill-name img { width: 1.25rem; height: 1.25rem; object-fit: contain; border-radius: 4px; background: #fff; padding: 1px; }
.skill-list { list-style: none; }
.skill-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.lv-pro   { background: rgba(138,107,255,0.15); color: var(--purple); }
.lv-bld   { background: rgba(240,192,112,0.12); color: #F0C070; }
.lv-learn { background: rgba(0,229,160,0.1);    color: var(--green); }

/* 9. PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover { border-color: var(--border-glow); transform: translateY(-4px); }
.project-code {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 1rem 1.25rem;
  font-size: 0.72rem;
  line-height: 1.9;
}
.project-code code { white-space: pre; font-family: inherit; }
.project-title { font-size: 1rem; font-weight: 700; color: var(--white); letter-spacing: -0.02em; }
.project-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.7; flex: 1; }
.project-links {
  display: flex;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.project-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--purple);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.project-link:hover { color: #C4B0FF; }
.project-link.is-disabled { color: var(--muted); pointer-events: none; }

/* 10. EDUCATION */
.edu-list { margin-top: 3rem; list-style: none; }
.edu-item {
  display: grid;
  grid-template-columns: 12.5rem 1fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
}
.edu-item:first-child { padding-top: 0; }
.edu-item:last-child { border-bottom: none; }
.edu-item:hover { padding-left: 8px; }
.edu-degree { font-size: 1.1rem; font-weight: 700; color: var(--white); letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.edu-note { font-size: 0.85rem; color: var(--muted); line-height: 1.65; margin-bottom: 1rem; }

/* Certificate preview (Education section) */
.cert-thumb {
  display: block;
  max-width: 22rem;
  margin: 0 0 1rem;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}
.cert-thumb:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.cert-thumb img { width: 100%; height: auto; }

/* Bullet list inside a project card */
.project-card .exp-bullets { margin-bottom: 0; }
.project-card .exp-bullets li { font-size: 0.82rem; }

/* 11. GOALS */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
  list-style: none;
}
.goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.goal-card:hover { border-color: var(--border-glow); }
.goal-year { font-family: var(--mono); font-size: 0.65rem; color: var(--purple); letter-spacing: 0.12em; margin-bottom: 0.5rem; display: block; }
.goal-text { font-size: 0.9rem; font-weight: 600; color: var(--white); line-height: 1.4; }

/* 12. CONTACT & FOOTER */
#contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 5rem);
  max-width: none;
}
.contact-inner { max-width: var(--container); margin: 0 auto; }
.contact-headline {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.contact-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 3rem; max-width: 32.5rem; }

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 0.75rem;
  list-style: none;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}
.social-link:hover { border-color: var(--border-glow); color: var(--white); background: var(--purple-deep); }
.sdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--dot, var(--purple)); }

.site-footer {
  background: var(--surface);
  padding: 0 clamp(1.5rem, 5vw, 5rem) 2.5rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* 13. ANIMATIONS
   .reveal only hides content when JS is running, so the page
   stays fully readable for crawlers and no-JS visitors */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-content > * { animation: fadeUp 0.7s ease both; }
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.35s; }
.hero-content > *:nth-child(4) { animation-delay: 0.5s; }
/* The hero intro waits for the banner image (JS adds .is-ready to .hero-visual).
   Without JS, everything simply shows in place. */
.js .hero-visual { opacity: 0; }
.js .hero-visual.is-ready { animation: fadeIn 0.8s ease both; }

/* Name intro: each letter of SAIFUL ISLAM rises into place, one after another */
@keyframes letter-in {
  from { opacity: 0; clip-path: inset(100% 0 0 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
.js .hero-letter { opacity: 0; }
.js .hero-visual.is-ready .hero-letter {
  animation: letter-in 0.7s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(0.5s + var(--i) * 0.09s);
}

/* Banner stickers: a zoom-in pop once the name has landed, then a slow "breathing" zoom */
@keyframes sticker-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.22); }
  60%  { transform: scale(0.95); }
  80%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes sticker-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.js .hero-visual:not(.is-ready) .hero-sticker { animation: none; }
.hero-visual.is-ready .hero-sticker--automation {
  animation: sticker-pop 0.9s cubic-bezier(.3, .7, .3, 1) 2s both,
             sticker-pulse 3.2s ease-in-out 3.4s infinite;
}
.hero-visual.is-ready .hero-sticker--years {
  animation: sticker-pop 0.9s cubic-bezier(.3, .7, .3, 1) 2.3s both,
             sticker-pulse 3.2s ease-in-out 5s infinite;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 14. RESPONSIVE & ACCESSIBILITY */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .about-media { max-width: 24rem; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .exp-item, .edu-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .goals-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(8,8,16,0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem clamp(1.5rem, 5vw, 5rem) 1rem;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child a { border-bottom: none; }
}

@media (max-width: 700px) {
  /* Square crop keeps the face and labels large on phones */
  .hero-visual { aspect-ratio: 1 / 1; width: 100%; }
  /* Square crop: banner fills the height, centred left-to-right */
  .hero-art { left: 50%; width: 177.7778%; margin-top: 0; transform: translateX(-50%); }
  /* Stronger bottom fade hides the banner's caption line on small screens */
  .hero-visual {
    -webkit-mask-image:
      linear-gradient(to bottom, transparent 0%, #000 10%, #000 55%, transparent 88%),
      linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
    mask-image:
      linear-gradient(to bottom, transparent 0%, #000 10%, #000 55%, transparent 88%),
      linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  }
  .hero-content { margin-top: -0.5rem; }
}

@media (max-width: 600px) {
  .goals-grid { grid-template-columns: 1fr; }
  .hero-code { padding: 1.2rem 1.1rem; font-size: 0.7rem; }
  .client-tile { width: 10rem; height: 7.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .carousel-track.is-animated { animation: none; }
  .carousel-wrap { overflow-x: auto; }
  .hero-letter, .hero-sticker { animation: none !important; opacity: 1 !important; }
  .js .hero-visual { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; }
}
