/* ==========================================================================
   HARI NARAYAN KANOJIA - PERSONAL PORTFOLIO
   Design System: Inspired by Bermawy (bermawy.com)
   Aesthetic: Retro-Modern Typewriter, Editorial Monospace, Polaroid & Gameboy
   Typography: Cousine (Monospace) + Special Elite (Typewriter)
   Palette: Retro Paper (#F9F9F9), Charcoal (#1F1F1F), Cobalt Blue (#345AAA),
            Ice Blue (#E6F3FF) & Border Grey (#BDBDBD)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cousine:ital,wght@0,400;0,700;1,400;1,700&family=Special+Elite&family=DM+Sans:ital,opsz,wght@0,9..40,400..700;1,9..40,400..700&display=swap');

/* --- Root Design Tokens (Bermawy.com Exact System) --- */
:root {
  --bg-body: #F9F9F9;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-alt: #F0F4F8;
  --bg-ice: #E6F3FF;
  
  --border-main: #BDBDBD;
  --border-subtle: #E0E0E0;
  --border-blue: #345AAA;

  --text-main: #1F1F1F;
  --text-muted: #666666;
  --text-blue: #345AAA;
  --text-white: #FFFFFF;

  --accent-blue: #345AAA;
  --accent-blue-hover: #254280;
  --accent-orange: #FF5500;

  --font-mono: 'Cousine', 'Courier New', monospace;
  --font-typewriter: 'Special Elite', 'Cousine', cursive, monospace;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --container-max: 1140px;
}

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

html {
  font-size: 16px;
  background-color: var(--bg-body);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 14px;
}

/* --- Bermawy Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #F9F9F9;
  border-left: 1px solid #BDBDBD;
}

::-webkit-scrollbar-thumb {
  background: #E6F3FF;
  border: 1px solid #345AAA;
  border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
  background: #345AAA;
}

/* --- Container Utility --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Common Section */
.section {
  padding: 60px 0;
  position: relative;
}

.section-2 {
  padding: 50px 0;
  background-color: transparent;
}

.section-3 {
  padding: 40px 0;
  border-top: 1px solid var(--border-main);
  border-bottom: 1px solid var(--border-main);
  background-color: #FFFFFF;
  overflow: hidden;
}

/* --- Navbar (navbar-3) --- */
.navbar-3 {
  position: sticky;
  top: 0;
  width: 100%;
  height: 64px;
  background: transparent;
  z-index: 1000;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.navbar-3.is-scrolled {
  background: rgba(249, 249, 249, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.navbar-brand {
  text-decoration: none;
  color: var(--text-main);
}

.brand-text-block {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-main);
  text-transform: uppercase;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-link {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-blue);
  text-decoration: none;
  letter-spacing: 1.5px;
  transition: color 0.15s ease;
}

.navbar-link:hover {
  color: var(--accent-orange);
}

.navbar-divider-line {
  width: 100%;
  height: 1px;
  background-color: var(--border-main);
  margin-top: 12px;
}

.mobile-nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-main);
  background: #FFFFFF;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* --- Hero Section --- */
.hero-section {
  padding: 40px 0 60px 0;
}

.hero-grid-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

.hero-content-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Typewriter Area */
.typedjs-wrapper {
  margin: 0;
  padding: 0;
}

.typedjs-cursor {
  font-family: var(--font-typewriter);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 400;
  color: var(--text-main);
  line-height: 1.15;
  display: inline-block;
  margin: 0;
}

.typed-blink {
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Photo Column */
.hero-photo-col {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

/* Polaroid Photo Wrap (Bermawy signature 2-state cycle) */
.photo-wrap {
  position: relative;
  width: 280px;
  height: 340px;
  background: #FFFFFF;
  border: 1px solid var(--border-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 14px 14px 44px 14px;
  cursor: pointer;
  transform: rotate(-1.5deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.photo-wrap:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.photo-frame-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid #E0E0E0;
  background: #F0F0F0;
}

.photo-default {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
}

.photo-wrap:hover .photo-default {
  transform: scale(1.04);
  filter: contrast(1.02);
}

.polaroid-caption {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  text-align: center;
  font-family: var(--font-typewriter);
  font-size: 13px;
  color: #333333;
}

/* Hero Paragraph */
.hero-paragraph {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.8;
  color: #333333;
  margin: 0;
}

.hero-paragraph strong {
  color: var(--accent-blue);
  font-weight: 700;
}

.hero-actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.bermawy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-blue);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid var(--accent-blue);
  cursor: pointer;
  transition: all 0.2s ease;
}

.bermawy-btn:hover {
  background: #FFFFFF;
  color: var(--accent-blue);
}

.bermawy-btn-outline {
  background: transparent;
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
}

.bermawy-btn-outline:hover {
  background: var(--bg-ice);
  color: var(--accent-blue);
}

/* --- Section Headings (Bermawy Style) --- */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.text-block-kicker {
  display: inline-block;
  padding: 4px 12px;
  background: #FFFFFF;
  border: 1px solid var(--border-main);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-main);
}

.text-block-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-blue);
  text-decoration: none;
}

.text-block-link:hover {
  color: var(--accent-orange);
}

/* --- "IN THE WORKS" (3 Cards Grid) --- */
.in-the-works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  background: #FFFFFF;
  border: 1px solid var(--border-main);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 24px rgba(52, 90, 170, 0.12);
}

.work-card-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 0.5px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
  transition: color 0.15s ease, transform 0.15s ease;
}

.work-card:hover .work-card-cta {
  color: var(--accent-orange);
  transform: translateX(4px);
}

.work-card-img-wrap {
  width: 100%;
  height: 120px;
  background: var(--bg-ice);
  border: 1px solid #D5E5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.work-card-logo-pill {
  font-family: var(--font-typewriter);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-blue);
  text-align: center;
}

.work-card-text {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #444444;
}

.work-card-link-title {
  color: var(--accent-blue);
  font-weight: 700;
  text-decoration: underline;
  display: inline;
}

/* --- Articles & Solutions Table (Bermawy Style) --- */
/* --- Articles & Solutions Table (Bermawy Style Interactive Accordion) --- */
.articles-list {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border-main);
}

.solution-accordion-item {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}

.solution-accordion-item:last-child {
  border-bottom: none;
}

.article-row {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  align-items: center;
  padding: 18px 24px;
  transition: background-color 0.15s ease;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.article-row:hover,
.solution-accordion-item.is-open .article-row {
  background-color: var(--bg-ice);
}

.article-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #777777;
  letter-spacing: 1px;
}

.article-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  transition: color 0.15s ease;
}

.article-row:hover .article-title,
.solution-accordion-item.is-open .article-title {
  color: var(--accent-blue);
}

/* Glasses Read Icon (Default / Hover / Pressed) */
.glasses-wrap {
  cursor: pointer;
  display: flex;
  justify-content: flex-end;
}

.glasses-icon {
  width: 28px;
  height: 28px;
  color: #777777;
  transition: transform 0.2s ease, color 0.2s ease;
}

.article-row:hover .glasses-icon,
.solution-accordion-item.is-open .glasses-icon {
  color: var(--accent-blue);
  transform: scale(1.18);
}

/* --- Expanded Role Details Panel --- */
.solution-details-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: #FCFCFA;
  border-top: 1px dashed var(--border-subtle);
}

.solution-accordion-item.is-open .solution-details-panel {
  max-height: 1200px;
}

.solution-details-content {
  padding: 24px 28px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.role-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.role-company-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-blue);
  color: #FFFFFF;
  font-family: var(--font-typewriter);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 2px;
  margin-right: 12px;
}

.role-title-text {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.role-tenure-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #666666;
  letter-spacing: 0.5px;
}

.role-body-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

.role-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #777777;
  text-transform: uppercase;
  margin: 0 0 14px 0;
}

.role-bullets-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-bullets-list li {
  position: relative;
  padding-left: 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: #333333;
}

.role-bullets-list li::before {
  content: "?";
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: 700;
}

.role-meta-sidebar {
  position: sticky;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #FFFFFF;
  border: 1px solid var(--border-main);
  padding: 18px;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.04);
}

.role-meta-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.role-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-blue);
  text-transform: uppercase;
}

.role-meta-text {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: #555555;
  margin: 0;
}

.tech-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tech-tag {
  display: inline-block;
  padding: 3px 8px;
  background: #EBF3FA;
  border: 1px solid #D0E3F3;
  color: var(--accent-blue);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* --- Infinite Client/Tech Logos Marquee --- */
.logos-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.home-logo-wrapper {
  display: flex;
  width: max-content;
  animation: logoSlide 35s linear infinite;
}

@keyframes logoSlide {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.clients-grid {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
}

.client-logo-item {
  font-family: var(--font-typewriter);
  font-size: 16px;
  font-weight: 700;
  color: #777777;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 20px;
}

.client-logo-dot {
  font-size: 12px;
  color: var(--accent-blue);
}

/* --- Media / Tabs Section & Interactive Gameboy --- */
.tabs-menu-2 {
  display: flex;
  border-bottom: 1px solid var(--border-main);
  margin-bottom: 24px;
}

.tab-link {
  padding: 10px 24px;
  background: #FFFFFF;
  border: 1px solid var(--border-main);
  border-bottom: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: lowercase;
  color: #777777;
  cursor: pointer;
  margin-right: -1px;
  transition: all 0.15s ease;
}

.tab-link.is-active {
  background: var(--accent-blue);
  color: #FFFFFF;
  border-color: var(--accent-blue);
}

.tab-content-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.media-list-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.media-card-item {
  background: #FFFFFF;
  border: 1px solid var(--border-main);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.media-card-item:hover,
.media-card-item.is-selected {
  border-color: var(--accent-blue);
  background: var(--bg-ice);
}

.media-card-thumb {
  width: 90px;
  height: 64px;
  background: #111111;
  border: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: var(--font-typewriter);
  font-size: 12px;
  flex-shrink: 0;
  text-align: center;
}

.media-card-info {
  flex: 1;
}

.media-card-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.media-card-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #666666;
}

/* =============================================================================
   AUTHENTIC NINTENDO GAME BOY (DMG-01) CONSOLE COLORWAY & ARCHITECTURE
   ============================================================================= */
.gameboy-outer {
  width: 100%;
  max-width: 320px;
  background: #D2D1C9; /* Authentic DMG-01 warm pebbled grey plastic */
  border: 2px solid #2B2B2B;
  border-radius: 12px 12px 52px 12px; /* Iconic bottom-right chamfer */
  padding: 14px 16px 24px 16px;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.75),
    inset -2px -2px 0 rgba(0, 0, 0, 0.15),
    4px 6px 0px #222222;
  position: sticky;
  top: 90px;
  user-select: none;
}

/* Top Power Switch Groove & Ribs */
.gameboy-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}

.gameboy-power-text {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: #7E7D76;
  letter-spacing: 0.5px;
}

.gameboy-top-ribs {
  display: flex;
  gap: 3px;
}

.gameboy-top-ribs span {
  width: 16px;
  height: 3px;
  background: #B6B5AC;
  border-radius: 2px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
}

/* Authentic Slate-Grey Screen Bezel with Maroon/Navy Stripes */
.gameboy-screen-bezel {
  background: #5B5E6D; /* Authentic DMG slate blue-grey bezel */
  border: 2px solid #26272B;
  border-radius: 8px 8px 32px 8px; /* Signature bezel bottom-right curve */
  padding: 10px 14px 14px 14px;
  margin-bottom: 12px;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    inset -1px -1px 0 rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.15);
}

.gameboy-bezel-header {
  margin-bottom: 8px;
}

.bezel-stripe {
  height: 2px;
  width: 100%;
}

.stripe-magenta {
  background: #8E1848; /* Classic DMG Magenta stripe */
  margin-bottom: 2px;
}

.stripe-blue {
  background: #1B2B68; /* Classic DMG Navy Blue stripe */
  margin-bottom: 6px;
}

.bezel-header-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 700;
  color: #C3C5CE;
  letter-spacing: 0.5px;
}

.bezel-battery {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.battery-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF1A1A; /* Glowing red LED indicator */
  box-shadow: 0 0 5px #FF1A1A, inset -1px -1px 1px rgba(0, 0, 0, 0.5);
  display: inline-block;
}

.battery-text {
  font-size: 7.5px;
  color: #B2B4BD;
}

.bezel-title {
  font-size: 7.5px;
  letter-spacing: 0.8px;
}

/* Authentic Pea-Soup Green LCD Matrix */
.gameboy-screen {
  background: #8F9E6C;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.04) 50%, transparent 50%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 50%, transparent 50%);
  background-size: 3px 3px;
  border: 2px solid #2B331A;
  width: 100%;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-family: var(--font-typewriter);
  color: #0F380F; /* Authentic DMG deepest pixel tone */
  box-shadow: 
    inset 2px 2px 6px rgba(0, 0, 0, 0.4),
    inset -1px -1px 2px rgba(255, 255, 255, 0.1);
  transition: opacity 0.1s ease;
}

.gameboy-screen-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  color: #0F380F;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 rgba(143, 158, 108, 0.6);
}

.gameboy-screen-sub {
  font-size: 11px;
  line-height: 1.4;
  color: #1A381A;
}

.gameboy-screen-desc {
  font-size: 9.5px;
  margin-top: 8px;
  color: #244224;
  letter-spacing: 0.5px;
}

/* Nintendo Game Boy Brand Markings */
.gameboy-brand-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  padding-left: 6px;
}

.nintendo-badge {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  font-size: 11px;
  color: #102264; /* Classic Nintendo Cobalt/Navy */
  letter-spacing: -0.5px;
  border: 1.5px solid #102264;
  padding: 0 6px;
  border-radius: 8px;
  display: inline-block;
  line-height: 1.25;
}

.gameboy-text {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 14px;
  color: #102264; /* Classic Nintendo Cobalt/Navy */
  letter-spacing: 1px;
  display: inline-flex;
  align-items: baseline;
}

.gb-tm {
  font-size: 7.5px;
  font-style: normal;
  font-weight: 700;
  margin-left: 2px;
  vertical-align: super;
}

/* D-Pad & Controls Row */
.gameboy-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  margin-bottom: 16px;
}

.gameboy-dpad {
  width: 68px;
  height: 68px;
  position: relative;
  cursor: pointer;
}

.dpad-cross-h {
  position: absolute;
  top: 22px;
  left: 0;
  width: 68px;
  height: 24px;
  background: #242424;
  border-radius: 3px;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.25),
    2px 2px 0 #181818;
}

.dpad-cross-v {
  position: absolute;
  top: 0;
  left: 22px;
  width: 24px;
  height: 68px;
  background: #242424;
  border-radius: 3px;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.25),
    2px 2px 0 #181818;
}

.dpad-center-dimple {
  position: absolute;
  top: 26px;
  left: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1B1B1B;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.dpad-arrow {
  position: absolute;
  font-size: 8px;
  color: #121212;
  z-index: 3;
  line-height: 1;
  user-select: none;
  cursor: pointer;
  transition: color 0.1s ease;
}

.dpad-arrow:hover {
  color: #555555;
}

.dpad-up { top: 4px; left: 29px; }
.dpad-down { bottom: 4px; left: 29px; }
.dpad-left { top: 28px; left: 5px; }
.dpad-right { top: 28px; right: 5px; }

/* Authentic Angled A/B Button Well */
.gameboy-ab-tray {
  background: #BCBBB1; /* Recessed tray in DMG casing */
  padding: 6px 8px;
  border-radius: 24px;
  transform: rotate(-25deg);
  box-shadow: 
    inset 1px 1px 2px rgba(0, 0, 0, 0.35),
    inset -1px -1px 1px rgba(255, 255, 255, 0.4);
  display: flex;
  gap: 10px;
}

.gameboy-btn-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gameboy-btn-round {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9E1949, #8C153E 70%, #680E2D); /* Authentic DMG Magenta */
  border: 1px solid #480A20;
  box-shadow: 
    2px 3px 0 #202020,
    inset 1px 1px 2px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  padding: 0;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.gameboy-btn-round:active {
  transform: translate(2px, 2px);
  box-shadow: 
    0px 1px 0 #202020,
    inset 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.gameboy-btn-label {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  font-size: 11px;
  color: #102264; /* Printed Nintendo Navy */
  letter-spacing: 0.5px;
  line-height: 1;
}

/* Bottom Row: SELECT / START & Speaker Slits */
.gameboy-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2px 4px 0 12px;
}

.gameboy-start-select {
  display: flex;
  gap: 12px;
  transform: rotate(-25deg);
  margin-bottom: 6px;
}

.pill-btn-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.gameboy-pill-btn {
  width: 38px;
  height: 10px;
  background: #60626B; /* Rubber pill */
  border: 1px solid #2F3036;
  border-radius: 5px;
  box-shadow: 
    inset 1px 1px 1px rgba(255, 255, 255, 0.2),
    1px 2px 0 #222224;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.gameboy-pill-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 0px 1px 0 #222224;
}

.pill-label {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  font-size: 7.5px;
  color: #102264; /* Nintendo Navy */
  letter-spacing: 0.8px;
}

/* Speaker Grille Slits */
.gameboy-speaker-grille {
  display: flex;
  gap: 4px;
  transform: rotate(-25deg);
  padding-right: 4px;
  margin-bottom: 4px;
}

.speaker-slit {
  width: 3.5px;
  height: 36px;
  background: #4A4944; /* Slotted dark hole */
  border-radius: 3px;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* --- Footer (footer-2) --- */
.footer-2 {
  background: #FFFFFF;
  border-top: 1px solid var(--border-main);
  padding: 60px 0 40px 0;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-main);
  margin-bottom: 60px;
}

.footer-col {
  padding: 24px;
  border-right: 1px solid var(--border-main);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col:last-child {
  border-right: none;
}

.footer-col-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888888;
  margin-bottom: 6px;
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
  word-break: break-word;
}

.footer-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
  transform: translateX(2px);
}

.footer-text-primary {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.footer-text-muted {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #666666;
  line-height: 1.4;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #0F5132;
  background: #D1E7DD;
  padding: 4px 10px;
  border-radius: 12px;
  margin-top: 4px;
  width: fit-content;
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  background: #198754;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(25, 135, 84, 0.6);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Giant Footer Wordmark */
.footer-wordmark-wrap {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 20px;
}

.footer-wordmark-title {
  font-family: var(--font-typewriter);
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 400;
  color: #1F1F1F;
  letter-spacing: 6px;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.9;
}

.footer-bottom-copy {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #888888;
}

/* --- Native HTML5 <dialog> Modals (Resume & Role Details) --- */
dialog#resumeModal,
dialog#roleModal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(920px, 94vw);
  max-height: 86vh;
  border: 2px solid var(--border-blue);
  background: #FFFFFF;
  color: #1F1F1F;
  box-shadow: 8px 8px 0px rgba(52, 90, 170, 0.2);
  padding: 0;
  overflow: hidden;
  z-index: 2000;
}

dialog#resumeModal[open],
dialog#roleModal[open],
dialog#resumeModal:modal,
dialog#roleModal:modal {
  display: flex !important;
  flex-direction: column !important;
  height: 86vh;
  max-height: 86vh;
}

dialog#resumeModal::backdrop,
dialog#roleModal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-header-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #E6F3FF;
  border-bottom: 1px solid var(--border-blue);
}

.modal-header-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-blue);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-close-btn {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--accent-blue);
  background: none;
  border: 1px solid var(--accent-blue);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close-btn:hover {
  background: var(--accent-blue);
  color: #FFFFFF;
}

.modal-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(86vh - 56px);
  overflow-y: auto !important;
  overscroll-behavior: contain;
  padding: 28px 28px 36px 28px;
  font-family: var(--font-mono);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #7B96C2 #F4F6F9;
}

/* Modal Scrollbar */
.modal-scroll-body::-webkit-scrollbar {
  width: 9px;
}

.modal-scroll-body::-webkit-scrollbar-track {
  background: #F4F6F9;
  border-left: 1px solid var(--border-subtle);
}

.modal-scroll-body::-webkit-scrollbar-thumb {
  background: #7B96C2;
  border-radius: 4px;
}

.modal-scroll-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

.role-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  margin-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.resume-header {
  border-bottom: 2px solid var(--accent-blue);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.resume-name {
  font-family: var(--font-typewriter);
  font-size: 32px;
  margin-bottom: 4px;
}

.resume-role-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.resume-contact-line {
  font-size: 12px;
  color: #666666;
}

.resume-section-heading {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #CCCCCC;
  padding-bottom: 4px;
  margin: 20px 0 12px 0;
  color: var(--accent-blue);
}

.resume-bullets {
  padding-left: 20px;
  margin-top: 6px;
}

.resume-bullets li {
  list-style: square;
  font-size: 13px;
  margin-bottom: 6px;
  color: #333333;
}

/* --- Responsive Media Queries --- */

/* Tablet & Smaller (max-width: 991px) */
@media (max-width: 991px) {
  .hero-grid-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-photo-col {
    order: 2;
    justify-content: center;
    margin-top: 10px;
  }

  .in-the-works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .role-body-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .role-meta-sidebar {
    position: static;
  }

  .tab-content-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .gameboy-outer {
    max-width: 320px;
    margin: 20px auto 0 auto;
    position: static;
  }

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

  .footer-col:nth-child(2) {
    border-right: none;
  }

  .footer-col:nth-child(1),
  .footer-col:nth-child(2) {
    border-bottom: 1px solid var(--border-main);
  }
}

/* Mobile Nav Drawer breakpoint (max-width: 860px) */
@media (max-width: 860px) {
  .mobile-nav-toggle {
    display: flex;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1px solid var(--border-main);
    border-bottom: 2px solid var(--border-blue);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px;
    gap: 4px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    z-index: 999;
  }

  .navbar-menu.is-open {
    display: flex;
    animation: mobileNavSlide 0.2s ease-out;
  }

  @keyframes mobileNavSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .navbar-link {
    padding: 10px 12px;
    font-size: 13px;
    letter-spacing: 1.5px;
    border-bottom: 1px dashed var(--border-subtle);
    display: block;
    color: var(--text-main);
    border-radius: 2px;
  }

  .navbar-link:last-child {
    border-bottom: none;
  }

  .navbar-link:hover,
  .navbar-link:active {
    background: var(--bg-ice);
    color: var(--accent-blue);
  }
}

/* Mobile Screens (max-width: 767px) */
@media (max-width: 767px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section {
    padding: 40px 0;
  }

  .section-2 {
    padding: 36px 0;
  }

  .section-3 {
    padding: 24px 0;
  }

  .hero-section {
    padding: 24px 0 36px 0;
  }

  .hero-grid-layout {
    gap: 20px;
  }

  .typedjs-cursor {
    font-size: clamp(2rem, 7.5vw, 2.6rem);
  }

  .hero-paragraph {
    font-size: 13px;
    line-height: 1.65;
  }

  .hero-actions-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .hero-actions-row .bermawy-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 12px;
  }

  .photo-wrap {
    width: min(260px, 80vw);
    height: auto;
    aspect-ratio: 280 / 340;
    padding: 12px 12px 38px 12px;
  }

  .in-the-works-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .work-card {
    padding: 18px 16px;
  }

  .work-card-img-wrap {
    height: 96px;
  }

  .work-card-logo-pill {
    font-size: 18px;
  }

  /* Solutions Accordion Mobile Styling */
  .article-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding: 14px 48px 14px 14px;
    gap: 4px;
  }

  .article-date {
    font-size: 11px;
    color: var(--accent-blue);
    font-weight: 700;
    letter-spacing: 0.8px;
  }

  .article-title {
    font-size: 13px;
    line-height: 1.45;
  }

  .glasses-wrap {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
  }

  .solution-accordion-item.is-open .solution-details-panel {
    max-height: 3000px;
  }

  .solution-details-content {
    padding: 18px 14px;
    gap: 16px;
  }

  .role-header-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .role-company-badge {
    margin-right: 8px;
    font-size: 11px;
    padding: 3px 8px;
  }

  .role-title-text {
    font-size: 13px;
    display: block;
    margin-top: 4px;
  }

  .role-tenure-tag {
    font-size: 11px;
  }

  .role-bullets-list li {
    font-size: 12px;
    line-height: 1.6;
    padding-left: 18px;
  }

  .role-meta-sidebar {
    padding: 14px;
  }

  .role-meta-text {
    font-size: 11.5px;
  }

  /* Tabs mobile scroll */
  .tabs-menu-2 {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 20px;
    padding-bottom: 2px;
  }

  .tabs-menu-2::-webkit-scrollbar {
    display: none;
  }

  .tab-link {
    white-space: nowrap;
    padding: 9px 16px;
    font-size: 11px;
    letter-spacing: 1px;
    flex-shrink: 0;
  }

  /* Media list cards on mobile */
  .media-card-item {
    padding: 12px;
    gap: 12px;
  }

  .media-card-thumb {
    width: 58px;
    height: 50px;
    font-size: 10px;
    flex-shrink: 0;
  }

  .media-card-title {
    font-size: 13px;
    line-height: 1.35;
  }

  .media-card-desc {
    font-size: 11px;
    line-height: 1.4;
  }

  /* Game Boy on mobile */
  .gameboy-outer {
    width: 100%;
    max-width: 310px;
    margin: 20px auto 0 auto;
    padding: 12px 14px 20px 14px;
  }

  /* Modals on mobile */
  dialog#resumeModal[open],
  dialog#roleModal[open] {
    width: 95vw;
    height: 92vh;
    max-height: 92vh;
  }

  .modal-header-bar {
    padding: 10px 14px;
  }

  .modal-header-title {
    font-size: 11px;
    letter-spacing: 0.8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 40px);
  }

  .modal-scroll-body {
    padding: 16px 14px 24px 14px;
    max-height: calc(92vh - 50px);
  }

  .role-modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
    padding-top: 16px;
  }

  .role-modal-footer .bermawy-btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer on mobile */
  .footer-2 {
    padding: 40px 0 28px 0;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    margin-bottom: 36px;
  }

  .footer-col {
    padding: 18px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border-main);
  }

  .footer-col:last-child {
    border-bottom: none;
  }

  .footer-wordmark-title {
    font-size: clamp(2.4rem, 13vw, 4.5rem);
    letter-spacing: 3px;
  }

  .footer-bottom-copy {
    font-size: 11px;
    line-height: 1.5;
  }
}

/* --- Print Styles --- */
@media print {
  body * {
    visibility: hidden;
  }
  dialog#resumeModal,
  dialog#resumeModal * {
    visibility: visible;
  }
  dialog#resumeModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-height: none;
    box-shadow: none;
    border: none;
  }
  .modal-header-bar {
    display: none;
  }
}
