/* ═══════════════════════════════════════════════════════════════
   MUHAMMAD HAMAIS PORTFOLIO — style.css
   Premium Dark Portfolio Stylesheet
═══════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --bg-base: #1C1E24;
  --bg-surface: #252830;
  --bg-surface-2: #2E3140;
  --accent: #F1B815;
  --accent-dim: rgba(241, 184, 21, 0.12);
  --accent-glow: rgba(241, 184, 21, 0.25);
  --text-primary: #F0F2F5;
  --text-secondary: #cbd5e1;
  --text-muted: #5C6370;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 0 40px rgba(241, 184, 21, 0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font: 'Inter', system-ui, sans-serif;
  --container: 1240px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --section-gap: 7.5rem;
  /* 120px */
}

/* ── Reset & Base ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

/* ── Utility ────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2.5rem;
  /* 40px */
}

.section-label {
  display: block;
  font-size: 0.6875rem;
  /* 11px */
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 1.25rem;
  /* 20px */
}

.arrow {
  display: inline-block;
  transition: transform var(--transition);
}

/* ── Custom Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-surface-2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: var(--bg-base);
}


/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  background: radial-gradient(circle at center, rgba(241, 184, 21, 0.6) 0%, rgba(241, 184, 21, 0.2) 30%, var(--bg-surface) 60%, var(--bg-base) 100%);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Hero Left ──────────────────────────────────────────────── */
.hero__left {
  padding: 3.125rem 0 3.75rem 3.125rem;
  /* 50px 0 60px 50px */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 2;
}

.brand-mark {
  margin-bottom: 3.75rem;
  /* 60px */
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  /* 44px */
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  transition: var(--transition);
}

.brand-icon:hover {
  background: var(--accent);
  box-shadow: var(--shadow-accent);
}

.brand-icon:hover svg circle {
  fill: var(--bg-base);
}

.brand-icon:hover svg path {
  fill: var(--accent);
}

.hero__name {
  margin-bottom: auto;
}

.name-heading {
  font-size: clamp(3rem, 5.5vw, 4.75rem);
  /* clamp(48px,5.5vw,76px) */
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  /* 20px */
}

.hero__underline {
  width: 3rem;
  /* 48px */
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 3.75rem;
  /* 60px */
}

.social-links {
  display: flex;
  gap: 1rem;
  /* 16px */
  align-items: center;
  margin-top: auto;
  padding-top: 2.5rem;
  /* 40px */
}

.social-link {
  width: 2.5rem;
  /* 40px */
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scale(0);
  border-radius: 50%;
  transition: transform var(--transition);
}

.social-link:hover::before {
  transform: scale(1);
}

.social-link:hover {
  color: var(--bg-base);
  border-color: var(--accent);
}

.social-link svg {
  position: relative;
  z-index: 1;
}

/* ── Hero Center (Profile Image) ────────────────────────────── */
.hero__center {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.profile-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom,
      transparent 0%,
      black 15%,
      black 85%,
      transparent 100%);
  mask-image: linear-gradient(to bottom,
      transparent 0%,
      black 15%,
      black 85%,
      transparent 100%);
  transition: filter var(--transition);
}

.profile-image:hover {
  filter: grayscale(0%) contrast(1.05);
}

.profile-glow {
  position: absolute;
  bottom: -3.75rem;
  /* -60px */
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 12.5rem;
  /* 200px */
  background: radial-gradient(ellipse at center, rgba(241, 184, 21, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Hero Right ─────────────────────────────────────────────── */
.hero__right {
  padding: 3.125rem 3.125rem 3.75rem 2.5rem;
  /* 50px 50px 60px 40px */
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  /* 32px */
  margin-bottom: auto;
}

.nav-link {
  font-size: 0.875rem;
  /* 14px */
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  position: relative;
  transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  /* -4px */
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--text-primary);
}


/* Intro Block */
.hero__intro {
  margin-top: auto;
  padding-top: 3.75rem;
  /* 60px */
}

.intro-text {
  font-size: 0.9375rem;
  /* 15px */
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  /* 28px */
  max-width: 21.25rem;
  /* 340px */
}

.story-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* 8px */
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
}

.story-link:hover {
  gap: 0.75rem;
}

/* 12px */
.story-link:hover .arrow {
  transform: translateX(0.25rem);
}

/* 4px */


/* ═══════════════════════════════════════════════════════════════
   PHILOSOPHY & METRICS SECTION
═══════════════════════════════════════════════════════════════ */
.philosophy {
  padding: var(--section-gap) 0;
  background: var(--bg-base);
  position: relative;
}

.philosophy::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.philosophy__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  /* 80px */
  align-items: start;
}

.philosophy__heading {
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  /* clamp(24px,2.8vw,36px) */
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  /* 20px */
  color: var(--text-primary);
}

.philosophy__sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  /* 32px */
  max-width: 25rem;
  /* 400px */
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* 8px */
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid rgba(241, 184, 21, 0.3);
  padding-bottom: 0.125rem;
  /* 2px */
  transition: gap var(--transition), border-color var(--transition);
}

.email-link:hover {
  gap: 0.75rem;
  border-color: var(--accent);
}

.email-link:hover .arrow {
  transform: translateX(0.25rem);
}

.philosophy__quote {
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  /* clamp(22px,2.5vw,30px) */
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  /* 24px */
  quotes: none;
}

.philosophy__quote-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 3rem;
  /* 48px */
}

/* Stats */
.stats-row {
  display: flex;
  gap: 4rem;
  /* 64px */
  align-items: flex-start;
}

.stat-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.125rem 0.25rem;
  /* 2px 4px */
}

.stat-number {
  font-size: clamp(3.25rem, 5.5vw, 4.5rem);
  /* clamp(52px,5.5vw,72px) */
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-plus {
  font-size: 2rem;
  /* 32px */
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  align-self: flex-start;
  margin-top: 0.5rem;
  /* 8px */
}

.stat-label {
  width: 100%;
  font-size: 0.75rem;
  /* 12px */
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.375rem;
  /* 6px */
}


/* ═══════════════════════════════════════════════════════════════
   CORE FOCUS CARDS
═══════════════════════════════════════════════════════════════ */
.focus {
  padding: 0 0 var(--section-gap) 0;
  background: var(--bg-base);
}

.focus__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface-2);
}

.focus-card {
  padding: 3rem 2.5rem;
  /* 48px 40px */
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition);
  cursor: default;
}

.focus-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.focus-card:hover {
  transform: translateY(-0.25rem);
}

/* -4px */

/* Accent Card */
.focus-card--accent {
  background: var(--accent);
  color: var(--bg-base);
}

.focus-card--accent::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
}

.focus-card--accent:hover::after {
  opacity: 1;
}

.focus-card--accent .focus-card__icon,
.focus-card--accent .focus-card__title,
.focus-card--accent .focus-card__desc,
.focus-card--accent .focus-card__count {
  color: var(--bg-base);
}

/* Dark Cards */
.focus-card--dark {
  background: var(--bg-surface);
}

.focus-card__icon {
  color: currentColor;
  margin-bottom: 2.25rem;
  /* 36px */
  opacity: 0.8;
}

.focus-card--dark .focus-card__icon {
  color: var(--accent);
  opacity: 1;
}

.focus-card__title {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  /* clamp(20px,1.8vw,24px) */
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  /* 16px */
  color: inherit;
}

.focus-card--dark .focus-card__title {
  color: var(--text-primary);
}

.focus-card__desc {
  font-size: 0.875rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 2.5rem;
  /* 40px */
}

.focus-card--accent .focus-card__desc {
  color: rgba(28, 30, 36, 0.75);
}

.focus-card--dark .focus-card__desc {
  color: var(--text-secondary);
}

.focus-card__footer {
  margin-top: auto;
}

.focus-card__count {
  font-size: 0.6875rem;
  /* 11px */
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-card--dark .focus-card__count {
  color: #94a3b8;
}


/* ═══════════════════════════════════════════════════════════════
   TECH RIBBON
═══════════════════════════════════════════════════════════════ */
.tech-ribbon {
  padding: 3.75rem 0;
  /* 60px */
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

/* Edge fade */
.tech-ribbon::before,
.tech-ribbon::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7.5rem;
  /* 120px */
  z-index: 2;
  pointer-events: none;
}

.tech-ribbon::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-surface), transparent);
}

.tech-ribbon::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-surface), transparent);
}

.tech-ribbon__track {
  overflow: hidden;
}

.tech-ribbon__items {
  display: flex;
  gap: 3.75rem;
  /* 60px */
  width: max-content;
  animation: scroll-ribbon 28s linear infinite;
}

@keyframes scroll-ribbon {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.tech-ribbon:hover .tech-ribbon__items {
  animation-play-state: paused;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* 12px */
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.8125rem;
  /* 13px */
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.3s ease, fill 0.3s ease;
}

.tech-item:hover {
  color: var(--text-primary);
}

.tech-icon {
  width: 1.375rem;
  /* 22px */
  height: 1.375rem;
  opacity: 0.4;
  transition: opacity 0.3s ease, fill 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.tech-item:hover .tech-icon {
  opacity: 1;
}

/* Brand Colors on Hover */
.tech-item--html:hover {
  color: #E34F26;
}

.tech-item--css:hover {
  color: #1572B6;
}

.tech-item--javascript:hover {
  color: #F7DF1E;
}

.tech-item--cpp:hover {
  color: #00599C;
}

.tech-item--python:hover {
  color: #3776AB;
}

.tech-item--tensorflow:hover {
  color: #FF6F00;
}

.tech-item--scikit:hover {
  color: #F7931E;
}

.tech-item--pandas:hover {
  color: #150458;
}

.tech-item--numpy:hover {
  color: #013243;
}


/* ═══════════════════════════════════════════════════════════════
   PORTFOLIO WORKS
═══════════════════════════════════════════════════════════════ */
.works {
  padding: var(--section-gap) 0;
  background: var(--bg-base);
}

.works__header {
  margin-bottom: 3.5rem;
  /* 56px */
}

.works__header-left {
  max-width: 32.5rem;
  /* 520px */
}

.works__heading {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  /* clamp(28px,3.2vw,44px) */
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
  /* 28px */
  color: var(--text-primary);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* 8px */
  padding: 0.75rem 1.75rem;
  /* 12px 28px */
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.btn-outline:hover {
  color: var(--bg-base);
  border-color: var(--accent);
}

.btn-outline:hover::before {
  transform: scaleX(1);
}

/* Ensure all direct text/children sit above the ::before fill layer */
.btn-outline span,
.btn-outline {
  position: relative;
}

.btn-outline span {
  z-index: 1;
}

/* Text node inside button (not in a span) also needs to be above the fill */
.btn-outline {
  isolation: isolate;
}

/* Works Grid */
.works__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Project Cards */
.project-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
  border-color: var(--border-hover);
}

.project-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-surface-2);
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 30, 36, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition);
  -webkit-backdrop-filter: blur(0.25rem);
  backdrop-filter: blur(0.25rem);
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__overlay-content {
  text-align: center;
  transform: translateY(1.25rem);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card__overlay-content {
  transform: translateY(0);
}

.project-card__desc {
  font-size: 0.9375rem;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-card__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--bg-base);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}

.project-card__btn:hover {
  transform: scale(1.05);
  background: #ffcc33;
}

.project-card__info {
  padding: 1.5rem 1.75rem 1.75rem;
  /* 24px 28px 28px */
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  /* 8px */
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  /* 12px */
}

.tag {
  font-size: 0.6875rem;
  /* 11px */
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.25rem 0.625rem;
  /* 4px 10px */
  border-radius: 100px;
  border: 1px solid rgba(241, 184, 21, 0.2);
}

.project-card__title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.project-card__title {
  font-size: clamp(0.85rem, 1.1vw, 1.05rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

.project-card__arrow {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  transition: transform var(--transition), color var(--transition);
}

.project-card:hover .project-card__arrow {
  transform: translate(4px, -4px);
  color: var(--accent);
}

/* Placeholder Dashboard */
.project-card__image--placeholder {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  /* 8px */
  padding: 1.5rem;
  /* 24px */
  background: var(--bg-base);
}

.placeholder-dashboard {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  /* 8px */
  width: 100%;
  height: 7.5rem;
  /* 120px */
}

.ph-bar {
  flex: 1;
  background: var(--c, rgba(241, 184, 21, 0.7));
  border-radius: 4px 4px 0 0;
  opacity: 0.7;
  transition: height 0.3s ease;
}

/* Placeholder bar heights & colours — moved from inline styles */
.ph-bar--1 {
  height: 60%;
  background: #F1B815;
}

.ph-bar--2 {
  height: 80%;
  background: #4A90E2;
}

.ph-bar--3 {
  height: 45%;
  background: #F1B815;
}

.ph-bar--4 {
  height: 90%;
  background: #4A90E2;
}

.ph-bar--5 {
  height: 55%;
  background: #F1B815;
}

.ph-bar--6 {
  height: 70%;
  background: #4A90E2;
}

.project-card:hover .ph-bar {
  opacity: 1;
}


/* ═══════════════════════════════════════════════════════════════
   BLOG SECTION
═══════════════════════════════════════════════════════════════ */
.blog {
  padding: var(--section-gap) 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.blog__grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  /* 80px */
  align-items: start;
}

.blog__heading {
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

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

.blog-item {
  display: grid;
  grid-template-columns: 6.875rem 1fr 3.25rem;
  /* 110px 1fr 52px */
  align-items: center;
  gap: 1.25rem;
  /* 20px */
  padding: 1.75rem 0;
  /* 28px */
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  position: relative;
}

.blog-item:first-child {
  border-top: 1px solid var(--border);
}

.blog-item::before {
  content: '';
  position: absolute;
  inset: 0 -2.5rem;
  /* 0 -40px */
  background: var(--accent-dim);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 0;
}

.blog-item:hover::before {
  opacity: 1;
}

.blog-item__meta {
  position: relative;
  z-index: 1;
}

.blog-item__date {
  font-size: 0.6875rem;
  /* 11px */
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-item__content {
  position: relative;
  z-index: 1;
}

.blog-item__title {
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  /* clamp(14px,1.2vw,16px) */
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color var(--transition);
}

.blog-item:hover .blog-item__title {
  color: var(--accent);
}

.blog-item__arrow {
  width: 2.25rem;
  /* 36px */
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
  z-index: 1;
  justify-self: end;
}

.blog-item:hover .blog-item__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-base);
  transform: translateX(0.25rem);
  /* 4px */
}


/* ═══════════════════════════════════════════════════════════════
   FOOTER & CONTACT FORM
═══════════════════════════════════════════════════════════════ */
.footer {
  padding: 3rem 0 2rem;
  /* 48px 0 32px */
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  /* 80px */
  align-items: start;
  margin-bottom: 2.5rem;
  /* 40px */
}

.footer__heading {
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  /* clamp(32px,3.5vw,52px) */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  /* 20px */
  color: var(--text-primary);
}

.footer__sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  /* 36px */
  max-width: 23.75rem;
  /* 380px */
}

.footer__email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* 8px */
  font-size: 0.9375rem;
  /* 15px */
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid rgba(241, 184, 21, 0.3);
  padding-bottom: 0.125rem;
  /* 2px */
  transition: all var(--transition);
}

.footer__email:hover {
  border-color: var(--accent);
  gap: 0.75rem;
  /* 12px */
}

/* Contact Form */
.contact-form {
  padding-top: 1.75rem;
  /* 28px */
}

.form-field {
  margin-bottom: 2rem;
  /* 32px */
  position: relative;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9375rem;
  /* 15px */
  padding: 0.75rem 0;
  /* 12px 0 */
  outline: none;
  transition: border-color var(--transition);
  resize: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--accent);
}

.form-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-field:focus-within .form-line {
  width: 100%;
}

.form-field--message textarea {
  min-height: 5rem;
  /* 80px */
}

.form-submit-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.5rem;
  /* 8px */
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  /* 8px */
  padding: 1rem 2.25rem;
  /* 16px 36px */
  background: var(--accent);
  color: var(--bg-base);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.submit-btn:hover::before {
  opacity: 1;
}

.submit-btn:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.75rem 2.5rem rgba(241, 184, 21, 0.35);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-arrow {
  font-size: 1.125rem;
  /* 18px */
  transition: transform var(--transition);
}

.submit-btn:hover .submit-arrow {
  transform: translateX(0.25rem);
}

.form-success {
  display: none;
  margin-top: 1.25rem;
  /* 20px */
  padding: 0.875rem 1.25rem;
  /* 14px 20px */
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-sm);
  color: #4ade80;
  font-size: 0.875rem;
  font-weight: 600;
}

.form-success.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.form-error {
  display: none;
  margin-top: 1.25rem;
  /* 20px */
  padding: 0.875rem 1.25rem;
  /* 14px 20px */
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-size: 0.875rem;
  font-weight: 600;
}

.form-error.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sub Footer */
.sub-footer {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  /* 20px */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  /* 16px */
}

.sub-footer__brand {
  transition: transform var(--transition);
  cursor: pointer;
}

.sub-footer__brand:hover {
  transform: scale(1.1) rotate(5deg);
}

.sub-footer__brand .brand-icon {
  width: 2.25rem;
  height: 2.25rem;
}

.sub-footer__brand .brand-icon svg {
  width: 26px;
  height: 26px;
}

.sub-footer__links {
  display: flex;
  gap: 1.5rem;
  /* 24px */
}

.sub-footer__links a {
  font-size: 0.75rem;
  /* 12px */
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.sub-footer__links a:hover {
  color: var(--accent);
}

.sub-footer__social {
  display: flex;
  gap: 1rem;
  /* 16px */
}

.sub-footer__social a {
  width: 1.85rem;
  /* 30px */
  height: 1.85rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  transition: all var(--transition);
}

.sub-footer__social a svg {
  width: 13px;
  height: 13px;
}

.sub-footer__social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.copyright {
  font-size: 0.75rem;
  /* 12px */
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.04em;
}


/* ═══════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
═══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(1.875rem);
  /* 30px */
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-1.875rem);
  /* -30px */
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(1.875rem);
  /* 30px */
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}

/* ═══════════════════════════════════════════════════════════════
   ACHIEVEMENTS PAGE STYLES
═══════════════════════════════════════════════════════════════ */
.page-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.timeline-item {
  padding: 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.timeline-item:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-card);
  border-color: var(--border-hover);
}

.timeline-item::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.timeline-item:hover::after {
  opacity: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.title-hover,
.accent-hover {
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.timeline-item:hover .title-hover {
  color: var(--accent);
}

.timeline-item:hover .accent-hover {
  color: #FFC933;
  /* Brighter yellow */
  text-shadow: 0 0 10px rgba(241, 184, 21, 0.25);
}

.date-tag {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.timeline-item:hover .date-tag {
  color: var(--text-primary);
}

.experience-list {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
  padding-left: 1.25rem;
  margin-top: 1.25rem;
}

.experience-list li {
  margin-bottom: 0.5rem;
  list-style-type: square;
  color: var(--accent);
}

.experience-list li span {
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT SOCIAL LIST
═══════════════════════════════════════════════════════════════ */
.contact-social-list {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 4rem;
  row-gap: 0.5rem;
}

.contact-social-list h4 {
  grid-column: 1 / -1;
}

.contact-social-item {
  display: inline-flex;
  width: max-content;
  justify-content: flex-start;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.3s ease;
}

.social-text,
.social-arrow {
  transition: color 0.3s ease, transform 0.3s ease;
}

.contact-social-item:hover {
  border-color: var(--border-hover);
}

.contact-social-item:hover .social-text,
.contact-social-item:hover .social-arrow {
  color: var(--accent);
}

.contact-social-item:hover .social-arrow {
  transform: translate(0.25rem, -0.25rem);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (max 1024px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root {
    --section-gap: 5rem;
  }

  /* 80px */
  .container {
    padding: 0 1.875rem;
  }

  /* 30px */

  .hero__inner {
    grid-template-columns: 1fr 1fr;
    min-height: 0;
  }

  .hero__center {
    grid-column: 1;
    grid-row: 1;
  }

  .hero__left {
    grid-column: 2;
    grid-row: 1;
    padding: 2.5rem 2.5rem 2.5rem 1.25rem;
  }

  .hero__right {
    grid-column: 1 / 3;
    grid-row: 2;
    padding: 2.5rem;
  }

  .hero__right .main-nav {
    justify-content: flex-start;
    margin-bottom: 2.5rem;
  }

  .hero__intro {
    padding-top: 0;
  }

  .philosophy__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .focus__grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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


  .blog__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 3.75rem;
  }
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (max 768px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --section-gap: 4rem;
  }

  /* 64px */
  .container {
    padding: 0 1.25rem;
  }

  /* Subpage Navigation Mobile Stack & Wrap */
  .subpage-nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .subpage-nav-container .brand-mark {
    display: none;
  }

  .subpage-nav-container .main-nav {
    padding: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
  }

  /* 20px */

  .hero__inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero__right {
    display: contents;
  }

  .main-nav {
    grid-column: 1;
    grid-row: 1;
    padding: 2.5rem 1.25rem 1rem;
    justify-content: center;
    gap: 1.5rem;
    display: flex;
  }

  .hero__left {
    display: contents;
  }

  .projects-page .hero__left {
    display: flex;
    grid-column: 1;
    grid-row: 2;
  }

  .hero__left .brand-mark {
    grid-column: 1;
    grid-row: 2;
    margin-top: 1.5rem;
    justify-self: center;
  }

  .hero__left .name-heading {
    grid-column: 1;
    grid-row: 3;
    justify-self: center;
    text-align: center;
  }

  .hero__left .hero__underline {
    grid-column: 1;
    grid-row: 4;
    justify-self: center;
    margin-bottom: 2rem;
  }

  .hero__center {
    grid-column: 1;
    grid-row: 5;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1.25rem 2.5rem;
  }

  .hero__left .social-links {
    grid-column: 1;
    grid-row: 6;
    justify-self: center;
    margin-bottom: 1.5rem;
  }

  .hero__intro {
    grid-column: 1;
    grid-row: 7;
    padding: 0 1.25rem 2.5rem;
    text-align: center;
  }

  .profile-image-wrap {
    width: 15rem;
    height: 15rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #F5C747 50%, #D49D0E 100%);
    padding: 5px;
    box-shadow: 0 10px 30px rgba(241, 184, 21, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
  }

  .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    filter: grayscale(0%) contrast(1.05);
  }

  .profile-glow {
    display: none;
  }

  .brand-mark {
    margin-bottom: 0;
  }

  .hero__underline {
    margin: 0 auto 2.5rem;
  }

  .social-links {
    justify-content: center;
  }

  .intro-text {
    max-width: 100%;
    text-align: center;
  }

  .story-link {
    justify-content: center;
  }

  .stats-row {
    gap: 2rem;
  }

  /* 32px */
  .stat-number {
    font-size: 3rem;
  }

  /* 48px */

  .focus__grid {
    gap: 2px;
  }

  .focus-card {
    padding: 2.25rem 1.75rem;
  }

  /* 36px 28px */

  .blog-item {
    grid-template-columns: 5rem 1fr 2.5rem;
    gap: 0.75rem;
    padding: 1.25rem 0;
  }

  .blog-item__date {
    font-size: 0.625rem;
  }

  /* 10px */

  .sub-footer__links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .name-heading {
    font-size: 2.5rem;
  }

  /* 40px */
  .works__grid {
    gap: 0.75rem;
  }

  /* 12px */
  .blog-item {
    grid-template-columns: 1fr 2.25rem;
  }

  .blog-item__meta {
    display: none;
  }
}

/* ── Achievements Page Specific Styles ── */
.subpage-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.subpage-nav-container .main-nav {
  margin-bottom: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.pb-section {
  padding-bottom: var(--section-gap);
}

.achievements-intro-section {
  margin-top: 3.75rem;
  margin-bottom: 5rem;
  max-width: 800px;
}

.mb-2 {
  margin-bottom: 2rem;
}

.achievements-intro-text {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.mb-5 {
  margin-bottom: 5rem;
}

.achievements-focus-grid {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 5rem;
  gap: 1.5rem;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  padding: 1rem 0;
}

.radius-md {
  border-radius: var(--radius-md);
}

.score-text {
  font-size: 2.5rem;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 0;
  line-height: 1;
}

.score-subtext {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.score-subtext-uppercase {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ── Achievements Page Specific Styles ── */
.subpage-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.subpage-nav-container .main-nav {
  margin-bottom: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.pb-section {
  padding-bottom: var(--section-gap);
}

.achievements-intro-section {
  margin-top: 3.75rem;
  margin-bottom: 5rem;
  max-width: 800px;
}

.mb-2 {
  margin-bottom: 2rem;
}

.achievements-intro-text {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.mb-5 {
  margin-bottom: 5rem;
}

.achievements-focus-grid {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 5rem;
  gap: 1.5rem;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  padding: 1rem 0;
}

.radius-md {
  border-radius: var(--radius-md);
}

.score-text {
  font-size: 2.5rem;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 0;
  line-height: 1;
}

.score-subtext {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.score-subtext-uppercase {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.text-accent {
  color: var(--accent) !important;
}

.transparent-tag {
  background: transparent;
  border-color: transparent;
}

.mb-1 {
  margin-bottom: 1rem;
}

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

.footer-no-border {
  padding-top: 0;
  border-top: none;
}

.sub-footer-bordered {
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

/* ── Index Page Specific Styles ── */
.ph-bar--1 {
  height: 60%;
  --c: #F1B815;
}

.ph-bar--2 {
  height: 80%;
  --c: #4A90E2;
}

.ph-bar--3 {
  height: 45%;
  --c: #F1B815;
}

.ph-bar--4 {
  height: 90%;
  --c: #4A90E2;
}

.ph-bar--5 {
  height: 55%;
  --c: #F1B815;
}

.ph-bar--6 {
  height: 70%;
  --c: #4A90E2;
}

.mt-1-5 {
  margin-top: 1.5rem;
}

.contact-social-heading {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ── Projects Page Custom Styles ── */
.projects-page {
  background-color: var(--bg-base);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.projects-page .name-heading {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  margin-bottom: 0.75rem;
}

.projects-page .hero {
  background: var(--bg-base) !important;
  min-height: auto !important;
  padding-bottom: 0 !important;
}

.projects-page .hero__underline {
  margin-bottom: 0 !important;
}

/* ── Projects Showcase Interactive Layout ── */
.projects-showcase {
  padding: 2rem 0;
  background-color: var(--bg-base);
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.showcase-container {
  display: grid;
  grid-template-columns: 28fr 6fr 66fr;
  gap: 2rem;
  align-items: center;
  flex: 1;
  width: 100%;
}

/* Sidebar & Rolling List */
.projects-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
}

.project-list {
  position: relative;
  width: 100%;
  height: 580px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

/* Rounded card layout mirroring container panel shape */
.project-list-item {
  position: absolute;
  width: 100%;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 90px;
  text-align: left;
  flex-shrink: 0;
}

.project-list-item .card-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  transition: color var(--transition);
}

.project-list-item .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.35;
  transition: color var(--transition);
}

/* Rolling/Active States: Active is focused, glowing yellow border, scaled up */
.project-list-item.active {
  opacity: 1;
  transform: scale(1.06) translateY(0);
  pointer-events: auto;
  z-index: 3;
  background: var(--bg-surface-2);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(241, 184, 21, 0.22), var(--shadow-card);
}

.project-list-item.active .card-num {
  color: var(--accent);
}

.project-list-item.active .card-title {
  color: #fff;
}

/* Surrounding cards scale down and fade out */
.project-list-item.prev-1 {
  opacity: 0.55;
  transform: scale(0.92) translateY(-110px);
  pointer-events: auto;
  z-index: 2;
}

.project-list-item.next-1 {
  opacity: 0.55;
  transform: scale(0.92) translateY(110px);
  pointer-events: auto;
  z-index: 2;
}

.project-list-item.prev-2 {
  opacity: 0.2;
  transform: scale(0.82) translateY(-210px);
  z-index: 1;
}

.project-list-item.next-2 {
  opacity: 0.2;
  transform: scale(0.82) translateY(210px);
  z-index: 1;
}

/* Gutter Navigation Controls in Gutter space */
.projects-gutter-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  z-index: 5;
}

.gutter-control-btn {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.gutter-control-btn:hover {
  background: var(--accent);
  color: var(--bg-base);
  border-color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--accent-glow);
}

.gutter-control-btn:active {
  transform: scale(0.95);
}

/* Details Panel */
.projects-details {
  background: rgba(28, 30, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  padding: 3rem;
  height: 580px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
}

.details-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.details-panel.fading {
  opacity: 0;
  transform: translateY(15px);
}

.detail-title {
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
}

.details-header-left {
  flex: 1;
}

.details-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex-shrink: 0;
  align-items: flex-end;
  margin-top: 0.5rem; /* Slight shift down to align with title text line */
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  white-space: nowrap;
  text-align: center;
  min-width: 180px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.btn-action:active {
  transform: scale(0.97);
}

.btn-action-primary {
  background: var(--accent);
  color: #1c1e24;
  border: 1px solid var(--accent);
}

.btn-action-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #1c1e24;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
}

.btn-action-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--accent);
}

.btn-action-outline:hover {
  background: var(--accent-dim);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

@media (max-width: 768px) {
  .details-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }
  
  .details-action-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0;
  }
  
  .btn-action {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .detail-title {
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  .projects-details {
    height: auto;
  }

  .detail-content {
    height: 360px;
    flex: none;
  }
}

.detail-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 0.75rem;
}

/* Custom subtle scrollbar */
.detail-content::-webkit-scrollbar {
  width: 6px;
}

.detail-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
  border-radius: 3px;
}

.detail-content::-webkit-scrollbar-thumb {
  background: rgba(241, 184, 21, 0.15);
  border-radius: 3px;
  transition: background 0.3s ease;
}

.detail-content::-webkit-scrollbar-thumb:hover {
  background: rgba(241, 184, 21, 0.35);
}

.detail-desc {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 800px;
}

.detail-desc p {
  margin-bottom: 1.5rem;
}

.detail-desc p:last-child {
  margin-bottom: 0;
}

.detail-desc strong {
  color: var(--text-primary);
}

.detail-desc .highlight-title {
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}

.detail-desc .highlight-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 1px;
}

.detail-desc .highlight-list {
  padding-left: 0;
  margin-top: 1.25rem;
  margin-bottom: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-desc .highlight-list li {
  position: relative;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

.detail-desc .highlight-list li:hover {
  background: rgba(241, 184, 21, 0.04);
  transform: translateX(4px);
}


/* Responsive Scaling: Desktop/Laptops (14-inch to 17-inch) and tablet */
@media (max-width: 1200px) {
  .showcase-container {
    grid-template-columns: 32fr 6fr 62fr;
    gap: 1.5rem;
  }
  .projects-details {
    padding: 3rem;
  }
}

@media (max-width: 992px) {
  .showcase-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
  }
  
  .projects-sidebar {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .projects-gutter-controls {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin: 0.5rem 0;
  }
  
  .project-list {
    height: 380px;
  }
  
  .project-list-item {
    width: 100%;
  }
  
  .projects-details {
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    min-height: auto;
  }
}

@media (max-width: 576px) {
  .project-list {
    height: 320px;
  }
  
  .project-list-item {
    padding: 1rem 1.25rem;
    min-height: 80px;
  }
  
  .project-list-item.prev-1 {
    transform: scale(0.9) translateY(-90px);
  }
  
  .project-list-item.next-1 {
    transform: scale(0.9) translateY(90px);
  }
  
  /* Hide prev-2 and next-2 on mobile screens to save space and simplify layout */
  .project-list-item.prev-2,
  .project-list-item.next-2 {
    display: none !important;
  }
  
  .detail-title {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }
  
  .projects-details {
    padding: 1.75rem;
  }
}

/* ── Laptop Screens (1024px to 1440px) ───────────────────────── */
@media (min-width: 1024px) and (max-width: 1440px) {
  /* Scale Down Left Text */
  .name-heading {
    font-size: clamp(2.25rem, 3.8vw, 3.35rem);
  }

  /* Scale Down Right Text */
  .intro-text {
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
  }

  .hero__intro .section-label {
    font-size: 0.58rem;
    margin-bottom: 0.875rem;
  }

  .story-link {
    font-size: 0.75rem;
  }

  /* Adjust Spacing */
  .hero__left {
    padding: 2.25rem 0 2.5rem 2.25rem;
  }

  .hero__left .brand-mark {
    margin-bottom: 2.5rem;
  }

  .hero__underline {
    margin-bottom: 2.5rem;
  }

  .social-links {
    padding-top: 1.5rem;
  }

  .hero__right {
    padding: 2.25rem 2.25rem 2.5rem 1.75rem;
  }

  .hero__intro {
    padding-top: 2rem;
  }

  /* Projects Page Safe Spacing & Symmetry */
  .projects-page .projects-details {
    margin-right: 2rem;
  }
}
