/* 
  =========================================
  SAYEDUL ISLAM — PERSONAL PORTFOLIO CSS
  =========================================
  Aesthetic: Dark indie hacker / YC founder
  A premium, minimal, editorial, and technical design system.
  Strictly NO neon glows. Clean flat accents.
*/

/* --- Design Tokens --- */
:root {
  --bg: #0d0b1a;
  --primary: #7c3aed;
  --secondary: #a855f7;
  --glow: #c084fc;
  --text-primary: #f8f8ff;
  --text-secondary: #94a3b8;
  --card-bg: #13102a;
  --border: #2d2060;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  
  --transition: color .25s cubic-bezier(.16,1,.3,1), background-color .25s cubic-bezier(.16,1,.3,1), border-color .25s cubic-bezier(.16,1,.3,1), transform .25s cubic-bezier(.16,1,.3,1), opacity .25s cubic-bezier(.16,1,.3,1), box-shadow .25s cubic-bezier(.16,1,.3,1);
  --container-max: 1200px;
  --header-height: 80px;
}

/* --- Base Reset & Setup --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: var(--header-height);
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Smooth scroll only when user hasn't requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  overflow-x: hidden;
  background-color: var(--bg);
}

::selection {
  background-color: var(--primary);
  color: var(--text-primary);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  margin-bottom: 1.5rem;
  font-weight: 800;
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  margin-bottom: 1rem;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--glow);
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.mono-tag::before {
  content: "//";
  color: var(--border);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* --- Layout Containers --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
  border-bottom: 1px solid var(--border);
  /* Skip rendering off-screen sections — massive LCP/TBT win */
  content-visibility: auto;
  contain-intrinsic-size: 0 800px;
}

.section:last-of-type {
  border-bottom: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: start;
}

.grid-2-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Buttons & Interactive Elements --- */
.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-primary);
  border: 1px solid var(--primary);
}
.btn-primary:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-primary {
  /* will-change applied only on hover via CSS to avoid upfront layer allocation */
}

.btn-primary:hover {
  will-change: transform;
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background-color: rgba(124, 58, 237, 0.15);
  border-color: var(--primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* --- Card Architecture --- */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--secondary);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition);
}
.card:hover::before {
  opacity: 1;
}

/* --- Sticky Header / Navbar --- */
.header {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2.5rem);
  max-width: var(--container-max);
  height: 64px;
  z-index: 1000;
  background-color: rgba(13, 11, 26, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  /* Only transition cheap properties — no height/backdrop-filter */
  transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease, top .3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
}

.header.scrolled {
  top: 0.75rem;
  background-color: rgba(13, 11, 26, 0.75);
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.header .nav-container {
  padding: 0 1.5rem;
  max-width: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-monogram {
  font-family: var(--font-mono);
  background-color: var(--primary);
  color: var(--text-primary);
  font-weight: 700;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  letter-spacing: -0.05em;
  transition: var(--transition);
}
.logo-link:hover .logo-monogram {
  background-color: var(--secondary);
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}
.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --- Mobile Menu Trigger --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-primary);
  margin-bottom: 5px;
  transition: var(--transition);
}

.nav-toggle span:last-child {
  margin-bottom: 0;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section (`#hero`) --- */
.hero-content {
  display: flex;
  align-items: center;
  min-height: 100vh;
  position: relative;
  background-image: radial-gradient(circle at 80% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 60%);
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-left {
  display: flex;
  flex-direction: column;
}

/* Pulsing Collaboration Badge */
.collaboration-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: rgba(45, 32, 96, 0.3);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  width: fit-content;
  margin-bottom: 2rem;
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #10b981;
  animation: pulse 1.8s 3 ease-in-out forwards;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Limit pulse to 3 cycles then stop — reduces continuous CPU drain */
.pulse-dot::after {
  animation-iteration-count: 3;
  animation-fill-mode: forwards;
}

.hero-title {
  max-width: 100%;
  margin-bottom: 1.5rem;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 1.1;
  font-weight: 800;
}

.hero-title span.purple-accent {
  color: var(--secondary); /* #a855f7 */
  background: none;
  -webkit-text-fill-color: initial;
}

.hero-desc {
  font-size: clamp(1.05rem, 1.8vw, 1.15rem);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.hero-stats-row span {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.hero-stats-row span:not(:last-child)::after {
  content: "•";
  color: var(--border);
  font-size: 0.9rem;
}

/* Right Side - Terminal Card */
.hero-right {
  display: flex;
  justify-content: center;
}

.terminal-card {
  width: 100%;
  max-width: 460px;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
  position: relative;
}

.terminal-card:hover {
  border-color: var(--secondary);
}

.terminal-header {
  background-color: #080612;
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background-color: #ef4444; }
.terminal-dot.yellow { background-color: #f59e0b; }
.terminal-dot.green { background-color: #10b981; }

.terminal-title {
  margin-left: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.terminal-body {
  padding: 1.5rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.terminal-prompt {
  color: #10b981; /* green prompt */
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.terminal-prompt::before {
  content: "> ";
}

.terminal-output {
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-left: 0.5rem;
}

.terminal-output:last-child {
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .hero-content {
    min-height: auto;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .hero-right {
    margin-top: 1rem;
  }
}


/* --- About Section (`#about`) --- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.about-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Founder profile photo */
.about-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
}

.about-image-placeholder:hover {
  border-color: var(--primary);
}

.about-image-placeholder picture {
  display: block;
  width: 100%;
  height: 100%;
}

.about-profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Quick Facts Pills Grid */
.about-facts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fact-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: rgba(45, 32, 96, 0.2);
  border: 1px solid var(--border);
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.fact-pill:hover {
  border-color: var(--primary);
  background-color: rgba(124, 58, 237, 0.05);
}

.fact-pill svg {
  width: 16px;
  height: 16px;
  color: var(--secondary);
  flex-shrink: 0;
}

/* Right Side - About Text Story */
.about-right {
  display: flex;
  flex-direction: column;
}

.about-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: block;
}

.about-right p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.about-right p strong {
  color: var(--text-primary);
}

/* Pull Quote styling */
.about-quote {
  border-left: 3px solid var(--primary);
  background-color: rgba(124, 58, 237, 0.04);
  padding: 1.25rem 1.75rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0 2rem;
  font-family: var(--font-sans);
}

.about-quote-text {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

.about-quote-author {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tech Stack row */
.about-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tech-tag-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.tech-tag-pill:hover {
  border-color: var(--secondary);
  background-color: rgba(45, 32, 96, 0.3);
}

.tech-tag-pill svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* --- Building Section (`#building`) --- */
/* --- Building Section (`#building`) --- */
.building-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3.5rem;
}

.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
  transition: var(--transition);
  position: relative;
}

.project-card:hover {
  border-color: var(--secondary);
}

.project-card.featured {
  border-left: 3px solid var(--primary);
  background-color: #161333; /* slightly brighter background */
}

.project-card.featured:hover {
  border-left-color: var(--glow);
  border-right-color: var(--secondary);
  border-top-color: var(--secondary);
  border-bottom-color: var(--secondary);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.project-status.live {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.project-status.live .status-dot {
  background-color: #10b981;
}

.project-status.in-progress {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.project-status.in-progress .status-dot {
  background-color: #f59e0b;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--secondary);
}

.project-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.project-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  flex-grow: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: rgba(45, 32, 96, 0.4);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.project-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.project-card-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary);
}

.project-card-footer a:hover {
  color: var(--glow);
}

.project-footer-note {
  text-align: center;
  margin-top: 3.5rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.project-footer-note a {
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.project-footer-note a:hover {
  color: var(--glow);
}

@media (max-width: 1024px) {
  .building-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Journey Section (`#journey`) --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 3.5rem auto 0;
  padding-left: 5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 2.25rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background-color: var(--primary); /* purple timeline track */
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  cursor: pointer;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  transition: var(--transition);
}

.timeline-item:hover {
  border-color: var(--secondary);
}

.timeline-item.active {
  border-color: var(--primary);
  background-color: rgba(124, 58, 237, 0.03);
}

/* Timeline Dot / Year Badge */
.timeline-badge-container {
  position: absolute;
  left: -5.75rem;
  top: 1.25rem;
  z-index: 10;
  display: flex;
  align-items: center;
}

.timeline-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background-color: var(--primary); /* purple badge background */
  border: 2px solid var(--bg);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  min-width: 90px;
  text-align: center;
  transition: var(--transition);
}

.timeline-item:hover .timeline-badge {
  background-color: var(--secondary);
  transform: scale(1.05);
}

.timeline-item.active .timeline-badge {
  background-color: var(--glow);
  color: var(--bg);
}

/* Timeline content header */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
}

.timeline-toggle-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}

.timeline-item.active .timeline-toggle-icon {
  transform: rotate(180deg);
  color: var(--secondary);
}

/* Timeline collapsible details body */
.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin-top 0.3s ease-out;
  opacity: 0;
  margin-top: 0;
}

.timeline-item.active .timeline-details {
  max-height: 250px; /* high enough to cover text */
  opacity: 1;
  margin-top: 1rem;
}

.timeline-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .timeline {
    padding-left: 0;
  }
  .timeline::before {
    display: none;
  }
  .timeline-item {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
  }
  .timeline-badge-container {
    position: relative;
    left: 0;
    top: 0;
    margin-bottom: 0.75rem;
    display: inline-block;
  }
  .timeline-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    min-width: auto;
  }
}

/* --- Skills & Stack Section (`#stack`) --- */
.stack-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3.5rem;
}

.skills-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.skill-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  transition: var(--transition);
}

.skill-card:hover {
  border-color: var(--secondary);
}

.skill-icon-container {
  color: var(--primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
}

.skill-icon-container svg {
  width: 28px;
  height: 28px;
  color: var(--secondary);
}

.skill-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.skill-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background-color: rgba(45, 32, 96, 0.3);
  border: 1px solid var(--border);
  color: var(--secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Right Side - Proficiency Bars */
.proficiency-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bar-info {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.bar-name {
  color: var(--text-primary);
}

.bar-percent {
  color: var(--secondary);
}

.bar-track {
  height: 8px;
  background-color: rgba(45, 32, 96, 0.4);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background-color: var(--primary); /* purple fill */
  width: 0; /* initial state for animation */
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 1024px) {
  .stack-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 640px) {
  .skills-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Writing Section (`#writing`) --- */
.writing-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3.5rem;
}

.blog-card-horizontal {
  display: grid;
  grid-template-columns: 240px 1fr;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  min-height: 200px;
  position: relative;
}

.blog-card-horizontal:hover {
  transform: translateY(-4px);
  border-color: var(--secondary);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.blog-card-horizontal::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--primary);
  opacity: 0;
  transition: var(--transition);
}

.blog-card-horizontal:hover::before {
  opacity: 1;
}

/* Image Placeholder Left */
.blog-card-image-wrapper {
  background-color: #0c0a1a;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.blog-card-img-placeholder {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--border);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  user-select: none;
}

/* Text Content Right */
.blog-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-card-top {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-card-meta span:not(.blog-category-tag) {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.blog-category-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

/* Colors for specific categories */
.blog-category-tag.founder {
  background-color: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
  color: #a855f7;
}

.blog-category-tag.technical {
  background-color: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8; /* blue-ish purple */
}

.blog-category-tag.mindset {
  background-color: rgba(192, 132, 252, 0.1);
  border-color: rgba(192, 132, 252, 0.3);
  color: #c084fc; /* lighter purple */
}

.blog-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  transition: var(--transition);
  letter-spacing: -0.02em;
}

.blog-card-horizontal:hover .blog-card-title {
  color: var(--glow);
}

.blog-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.blog-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(45, 32, 96, 0.2);
  padding-top: 1rem;
}

.blog-card-readtime {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card-bottom a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--secondary);
}

.blog-card-bottom a:hover {
  color: var(--glow);
}

.blog-footer-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 3.5rem;
}

@media (max-width: 768px) {
  .blog-card-horizontal {
    grid-template-columns: 1fr;
  }
  .blog-card-image-wrapper {
    aspect-ratio: 16 / 4;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
  }
  .blog-card-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .blog-card-image-wrapper {
    aspect-ratio: 16 / 6;
  }
}

/* --- Connect Section (`#connect`) --- */
.connect-section {
  border-top: 1px solid var(--border);
  background-color: var(--bg);
  padding: 8rem 0;
  text-align: center;
}

.connect-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.connect-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.large-email-link {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--secondary); /* purple email */
  text-decoration: none;
  letter-spacing: -0.03em;
  transition: var(--transition);
  margin-bottom: 2.5rem;
  display: inline-block;
  line-height: 1.1;
}

.large-email-link:hover {
  color: var(--glow);
}

.connect-separator-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.social-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 800px;
}

.social-card {
  background-color: var(--card-bg);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.social-card svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: var(--transition);
}

.social-card:hover {
  background-color: var(--primary); /* purple bg fill on hover */
  border-color: var(--primary);
  color: var(--text-primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background-color: #070512;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr auto 1fr;
  align-items: center;
  width: 100%;
}

.footer-left {
  text-align: left;
}

.footer-left-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.footer-left-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.footer-center {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-right {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(168, 85, 247, 0.3);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .social-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  .footer-left {
    text-align: center;
  }
  .footer-right {
    text-align: center;
  }
}

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

/* --- Animations & Scrollers --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* --- Responsive Adaptations --- */
@media (max-width: 1024px) {
  :root {
    --container-max: 900px;
  }
  .grid-2,
  .grid-2-equal,
  .building-showcase {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .connect-info {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--card-bg);
    border-left: 1px solid var(--border);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    transition: var(--transition);
    z-index: 999;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-toggle {
    display: block;
  }

  .section {
    padding: 6rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }
  .about-stats {
    grid-template-columns: 1fr;
  }
  .social-grid {
    grid-template-columns: 1fr;
  }
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  .btn {
    width: 100%;
  }
}
