/* ==========================================================================
   DEDICATED ABOUT ME PORTFOLIO DESIGN SYSTEM
   Pure Black & Pure White Monochrome Theme, Corner Parallelogram & Precision Shift
   ANIME OP DYNAMIC GEOMETRIC BACKGROUND & SYMMETRY ENGINE
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COLOR PALETTES & PURE MONOCHROME TOKENS
   -------------------------------------------------------------------------- */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --font-jp: 'Noto Sans JP', sans-serif;
  
  --transition-speed: 0.4s;
  --transition-curve: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-curve: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Pure Black Dark Theme Variables */
[data-theme="dark"] {
  --bg-color: #000000; /* Pure Black Backdrop! */
  --bg-gradient: radial-gradient(circle at 50% 0%, #0a0a0a 0%, #000000 100%);
  --bg-image: url('arch_kali_black.jpg'); /* Dark Mode Background Image */
  --bg-image-opacity: 0.15;
  
  --surface-color: rgba(18, 18, 18, 0.85);
  --surface-hover: rgba(30, 30, 30, 0.95);
  --surface-border: rgba(255, 255, 255, 0.14);
  --surface-border-hover: rgba(56, 189, 248, 0.5);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --accent-color: #38bdf8;
  --accent-secondary: #818cf8;
  --accent-glow: rgba(56, 189, 248, 0.3);
  
  --matrix-color: #ffffff;
  --hud-line-color: rgba(255, 255, 255, 0.22);
  --hud-line-bright: rgba(255, 255, 255, 0.45);
  --hud-label-color: rgba(255, 255, 255, 0.65);
  
  --plate-fill: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(20, 20, 20, 0.9));
  --plate-preview-fill: rgba(0, 0, 0, 0.28);
  --plate-edge-line: rgba(255, 255, 255, 0.3);
  --solid-plate-bg: #38bdf8;
  --plate-shadow: rgba(0, 0, 0, 0.85);

  --about-direction: row; /* Bio Left, Parallelogram RIGHT in Dark Mode */
  --para-align: flex-end;
  --para-shift: translateX(100px); /* 100px in Dark Mode! */
  --badge-bg: rgba(255, 255, 255, 0.08);
  --badge-border: rgba(255, 255, 255, 0.2);

  --geo-stroke: rgba(255, 255, 255, 0.14);
  --geo-stroke-active: rgba(56, 189, 248, 0.4);
  --geo-fill-shard: rgba(255, 255, 255, 0.03);
  
  /* Thick Geometric Diamond Band Fills */
  --geo-thick-1cm: rgba(255, 255, 255, 0.08);
  --geo-thick-1cm-border: rgba(255, 255, 255, 0.35);
  --geo-thick-half-cm: rgba(56, 189, 248, 0.14);
  --geo-thick-half-cm-border: rgba(56, 189, 248, 0.45);
}

/* Pure White Light Theme Variables */
[data-theme="light"] {
  --bg-color: #ffffff; /* Pure White Backdrop! */
  --bg-gradient: radial-gradient(circle at 50% 0%, #ffffff 0%, #fafafa 100%);
  --bg-image: url('arch_kali_white.jpg'); /* White Mode Background Image */
  --bg-image-opacity: 0.12;
  
  --surface-color: rgba(248, 249, 250, 0.9);
  --surface-hover: rgba(240, 242, 245, 0.95);
  --surface-border: rgba(0, 0, 0, 0.1);
  --surface-border-hover: rgba(37, 99, 235, 0.5);
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  
  --accent-color: #2563eb;
  --accent-secondary: #4f46e5;
  --accent-glow: rgba(37, 99, 235, 0.2);
  
  --matrix-color: #000000;
  --hud-line-color: rgba(0, 0, 0, 0.18);
  --hud-line-bright: rgba(0, 0, 0, 0.4);
  --hud-label-color: rgba(0, 0, 0, 0.65);
  
  --plate-fill: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 240, 240, 0.92));
  --plate-preview-fill: rgba(255, 255, 255, 0.38);
  --plate-edge-line: rgba(0, 0, 0, 0.25);
  --solid-plate-bg: #000000;
  --plate-shadow: rgba(0, 0, 0, 0.15);

  --about-direction: row-reverse; /* Parallelogram LEFT, Bio RIGHT in Light Mode */
  --para-align: flex-start;
  --para-shift: translateX(-90px); /* -90px in Light Mode! */
  --badge-bg: rgba(0, 0, 0, 0.05);
  --badge-border: rgba(0, 0, 0, 0.15);

  --geo-stroke: rgba(0, 0, 0, 0.14);
  --geo-stroke-active: rgba(37, 99, 235, 0.4);
  --geo-fill-shard: rgba(0, 0, 0, 0.025);

  /* Thick Geometric Diamond Band Fills */
  --geo-thick-1cm: rgba(0, 0, 0, 0.06);
  --geo-thick-1cm-border: rgba(0, 0, 0, 0.35);
  --geo-thick-half-cm: rgba(37, 99, 235, 0.12);
  --geo-thick-half-cm-border: rgba(37, 99, 235, 0.45);
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESETS & BASE TYPOGRAPHY
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* Suppress transition flash during theme init (JS adds/removes this class) */
html.no-transition,
html.no-transition * {
  transition: none !important;
}

body {
  font-family: var(--font-body);
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-speed) var(--transition-curve),
              color var(--transition-speed) var(--transition-curve);
}

/* --------------------------------------------------------------------------
   3. ANIME OP GEOMETRIC BACKGROUND & SYMMETRY ENGINE
   -------------------------------------------------------------------------- */
.ambient-bg {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Dynamic Background Image Backdrop (arch_kali_black.jpg / arch_kali_white.jpg) */
.ambient-bg-image {
  position: absolute;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: var(--bg-image-opacity);
  pointer-events: none;
  transition: background-image var(--transition-speed) ease,
              opacity var(--transition-speed) ease;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.16;
  transition: background var(--transition-speed) ease;
}

.orb-1 {
  top: -10%;
  right: 5%;
  width: 600px;
  height: 600px;
  background: var(--accent-color);
}

.orb-2 {
  bottom: 5%;
  left: -5%;
  width: 550px;
  height: 550px;
  background: var(--accent-secondary);
}

.cyber-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--surface-border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--surface-border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.06;
}

/* Anime OP Symmetrical Geometric Backdrop Container */
.anime-geo-layer {
  position: absolute;
  inset: -10%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.4s ease-out;
}

/* Symmetrical Rotating Wireframe Diamonds */
.geo-diamond {
  position: absolute;
  border: 1px solid var(--geo-stroke);
  transform-origin: center center;
  transition: border-color var(--transition-speed) ease;
}

/* 1cm (~38px) Thick Geometric Band Diamond Plate */
.diamond-thick-1cm {
  width: 1050px;
  height: 1050px;
  border: 38px solid var(--geo-thick-1cm); /* 1cm Thick Solid/Glass Band! */
  outline: 1.5px solid var(--geo-thick-1cm-border);
  outline-offset: -38px;
  box-shadow: inset 0 0 0 1.5px var(--geo-thick-1cm-border),
              0 0 45px var(--accent-glow);
  animation: spinSlow 75s linear infinite;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  will-change: transform;
}

/* 0.5cm (~19px) Thick Accent Geometric Diamond Band */
.diamond-thick-half-cm {
  width: 780px;
  height: 780px;
  border: 19px solid var(--geo-thick-half-cm); /* 0.5cm Thick Accent Band! */
  outline: 1.5px solid var(--geo-thick-half-cm-border);
  outline-offset: -19px;
  box-shadow: inset 0 0 0 1.5px var(--geo-thick-half-cm-border);
  animation: spinSlow 40s linear infinite reverse;
  will-change: transform;
}

.diamond-outer {
  width: 900px;
  height: 900px;
  border-width: 1.5px;
  animation: spinSlow 65s linear infinite;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.05);
  will-change: transform;
}

.diamond-mid {
  width: 680px;
  height: 680px;
  border-style: dashed;
  animation: spinSlow 45s linear infinite reverse;
  will-change: transform;
}

.diamond-inner {
  width: 480px;
  height: 480px;
  border-color: var(--geo-stroke-active);
  animation: spinSlow 30s linear infinite;
  will-change: transform;
}

@keyframes spinSlow {
  0% { transform: rotate(45deg); }
  100% { transform: rotate(405deg); }
}

/* Concentric Radial Wireframe HUD Rings */
.geo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--geo-stroke);
  transform-origin: center center;
}

.ring-outer {
  width: 1100px;
  height: 1100px;
  border-width: 1px;
  opacity: 0.4;
}

.ring-dashed {
  width: 850px;
  height: 850px;
  border-style: dashed;
  animation: spinRing 50s linear infinite;
  opacity: 0.5;
  will-change: transform;
}

.ring-inner {
  width: 600px;
  height: 600px;
  border-color: var(--geo-stroke-active);
  animation: spinRing 35s linear infinite reverse;
  opacity: 0.6;
  will-change: transform;
}

@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Sloped Blueprint Credit Frame Boxes (Anime OP Typography Outlines) */
.geo-blueprint-box {
  position: absolute;
  padding: 1.25rem 2rem;
  background: var(--surface-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hud-line-bright);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: rotate(-15deg);
  opacity: 0.45;
  transition: all var(--transition-speed) ease;
}

.box-left {
  top: 18%;
  left: 8%;
}

.box-right {
  bottom: 22%;
  right: 8%;
  transform: rotate(15deg);
}

.bp-jp {
  font-family: var(--font-jp);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.15em;
}

.bp-en {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-color);
  letter-spacing: 0.2em;
  font-weight: 600;
}

/* Symmetrical Diagonal Rays */
.geo-ray {
  position: absolute;
  width: 200vw;
  height: 1px;
  background: var(--geo-stroke);
}

.ray-tl-br {
  transform: rotate(35deg);
}

.ray-tr-bl {
  transform: rotate(-35deg);
}

/* Floating Vector Polyhedral Shards */
.geo-shard {
  position: absolute;
  background: var(--geo-fill-shard);
  border: 1px solid var(--geo-stroke-active);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: floatShard 8s ease-in-out infinite alternate;
  will-change: transform;
}

.shard-1 {
  top: 15%;
  right: 18%;
  width: 140px;
  height: 140px;
  clip-path: polygon(50% 0%, 100% 100%, 0% 80%);
  animation-delay: 0s;
}

.shard-2 {
  bottom: 20%;
  left: 14%;
  width: 180px;
  height: 120px;
  clip-path: polygon(0% 20%, 80% 0%, 100% 100%);
  animation-delay: 2s;
}

.shard-3 {
  top: 60%;
  right: 10%;
  width: 110px;
  height: 160px;
  clip-path: polygon(30% 0%, 100% 60%, 0% 100%);
  animation-delay: 4s;
}

.shard-4 {
  top: 25%;
  left: 20%;
  width: 130px;
  height: 130px;
  clip-path: polygon(0% 0%, 100% 30%, 70% 100%);
  animation-delay: 1s;
}

@keyframes floatShard {
  0% { transform: translateY(0px) rotate(0deg) scale(1); }
  100% { transform: translateY(-24px) rotate(6deg) scale(1.04); }
}

/* --------------------------------------------------------------------------
   4. NAVIGATION BAR
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--surface-color);
  border-bottom: 1px solid var(--surface-border);
  transition: background var(--transition-speed) ease,
              border-color var(--transition-speed) ease;
  will-change: transform;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--surface-border);
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: transform 0.3s ease;
}

.brand-logo:hover .logo-img {
  transform: rotate(5deg) scale(1.05);
}

.accent-dot {
  color: var(--accent-color);
}

.nav-menu {
  display: flex;
  gap: 2.2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* High-Tech Cyberpunk HUD Theme Switcher Button */
.cyber-theme-btn {
  background: var(--surface-color);
  border: 1px solid var(--surface-border-hover);
  border-radius: 30px;
  padding: 0.4rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--accent-glow);
  transition: all 0.3s var(--transition-curve);
  user-select: none;
}

.cyber-theme-btn:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--accent-color);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.cyber-hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
  animation: pulseDot 2s infinite;
}

.cyber-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
}

.cyber-icon-wrap svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--transition-curve);
}

.cyber-theme-btn:hover .cyber-icon-wrap svg {
  transform: rotate(18deg) scale(1.1);
}

.cyber-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   5. TOP SECTION: CONTACT HERO & PRISM PARALLELOGRAM CONSTRUCT
   -------------------------------------------------------------------------- */
.top-hero-section {
  min-height: 100vh;
  padding: 130px 2rem 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.top-hero-container {
  max-width: 1440px;
  width: 100%;
  display: flex;
  flex-direction: var(--about-direction); /* Dynamic layout orientation */
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  transition: flex-direction var(--transition-speed) var(--transition-curve);
}

/* LEFT / RIGHT BIO & CONTACT SUMMARY COLUMN */
.top-bio-column {
  flex: 1;
  max-width: 620px;
  width: 100%;
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent-color);
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent-color);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.hero-name {
  font-family: var(--font-heading);
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Quick Contact Card Grid */
.quick-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-chip {
  padding: 0.85rem 1.15rem;
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.contact-chip:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.chip-info {
  display: flex;
  flex-direction: column;
}

.chip-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chip-val {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s var(--transition-curve);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--accent-color);
  transform: translateY(-3px);
}

/* PARALLELOGRAM COLUMN: -90PX LIGHT / 100PX DARK SHIFT */
.portrait-column {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  justify-content: var(--para-align);
  transform: var(--para-shift);
  transition: transform var(--transition-speed) var(--transition-curve);
  z-index: 5;
}

/* --------------------------------------------------------------------------
   6. PRISM PARALLELOGRAM CANVAS & REVEAL CONSTRUCT
   -------------------------------------------------------------------------- */
.parallelogram-wrapper {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0;
  perspective: 1000px;
}

.parallelogram-outer-frame {
  position: absolute;
  inset: -24px;
  pointer-events: none;
  z-index: 1;
  border: 2px solid var(--surface-border);
  box-shadow: 0 0 55px var(--accent-glow);
  clip-path: polygon(18% 0%, 100% 0%, 82% 100%, 0% 100%);
  transition: border-color var(--transition-speed) ease;
}

.para-inner-stroke {
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--hud-line-color);
  clip-path: polygon(18% 0%, 100% 0%, 82% 100%, 0% 100%);
  opacity: 0.6;
}

.para-accent-line {
  position: absolute;
  width: 2px;
  height: 120%;
  background: var(--accent-color);
  opacity: 0.5;
}

.para-accent-line.line-left { left: 10%; top: -10%; transform: rotate(18deg); }
.para-accent-line.line-right { right: 10%; top: -10%; transform: rotate(18deg); }

.faceted-triangle {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.triangle-1 {
  top: -20px;
  left: 5%;
  width: 120px;
  height: 120px;
  background: rgba(56, 189, 248, 0.25);
  clip-path: polygon(0% 0%, 100% 40%, 30% 100%);
  border: 1px solid var(--accent-color);
}

.triangle-2 {
  top: 15%;
  right: -30px;
  width: 100px;
  height: 140px;
  background: rgba(129, 140, 248, 0.25);
  clip-path: polygon(40% 0%, 100% 100%, 0% 60%);
  border: 1px solid var(--accent-secondary);
}

.triangle-3 {
  bottom: -25px;
  right: 15%;
  width: 130px;
  height: 100px;
  background: rgba(56, 189, 248, 0.2);
  clip-path: polygon(0% 100%, 100% 0%, 70% 100%);
}

.triangle-4 {
  bottom: 20%;
  left: -25px;
  width: 95px;
  height: 120px;
  background: rgba(244, 114, 182, 0.2);
  clip-path: polygon(100% 0%, 0% 80%, 80% 100%);
}

.graphic-frame-lines {
  position: absolute;
  inset: -32px;
  pointer-events: none;
  z-index: 1;
}

.frame-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--accent-color);
  border-style: solid;
  opacity: 0.8;
}

.frame-corner.top-left { top: 0; left: 5%; border-width: 2px 0 0 2px; }
.frame-corner.top-right { top: 0; right: 0; border-width: 2px 2px 0 0; }
.frame-corner.bottom-left { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.frame-corner.bottom-right { bottom: 0; right: 5%; border-width: 0 2px 2px 0; }

.frame-diagonal-accent {
  position: absolute;
  top: -24px;
  right: -24px;
  width: 180px;
  height: 2px;
  background: var(--accent-color);
  transform: rotate(35deg);
  opacity: 0.6;
}

.parallelogram-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  clip-path: polygon(18% 0%, 100% 0%, 82% 100%, 0% 100%);
  background: var(--bg-color);
  border: 1px solid var(--surface-border);
  box-shadow: 0 45px 100px rgba(0, 0, 0, 0.6);
  transition: border-color var(--transition-speed) ease,
              transform 0.4s ease;
}

.parallelogram-card:hover {
  transform: translateY(-6px) scale(1.015);
}

.image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: var(--bg-color);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  border: none !important;
  outline: none !important;
  transition: opacity var(--transition-speed) ease;
}

.image-floating-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.4s ease;
}

.hud-circle-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--hud-line-color);
  opacity: 0.45;
}

.ring-1 { width: 380px; height: 380px; top: -40px; left: -20px; }
.ring-2 { width: 480px; height: 480px; bottom: -80px; right: -40px; border-style: dashed; }

.hud-diagonal-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--hud-label-color);
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.7;
}

.label-top { top: 35px; right: 10px; transform: rotate(35deg); }
.label-bottom { bottom: 45px; left: 20px; transform: rotate(35deg); }

.img-symbol {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--matrix-color);
  text-shadow: 0 0 10px var(--accent-glow);
  opacity: 0.85;
  user-select: none;
}

.sym-tl { top: 25px; left: 18%; }
.sym-tr { top: 25px; right: 8%; }
.sym-bl { bottom: 65px; left: 8%; }
.sym-br { bottom: 65px; right: 18%; }
.sym-c1 { top: 48%; left: 12%; font-size: 1.35rem; }
.sym-c2 { bottom: 90px; right: 12%; font-size: 0.85rem; letter-spacing: 0.1em; }

.hud-jp-block {
  position: absolute;
  display: flex;
  flex-direction: column;
  font-family: var(--font-jp);
  color: var(--matrix-color);
  line-height: 1.2;
  opacity: 0.75;
}

.block-left { top: 75px; left: 18%; }
.block-right { bottom: 75px; right: 18%; text-align: right; }

.jp-title { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.1em; }
.jp-sub { font-size: 0.7rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.15em; opacity: 0.8; }

.sloped-panels-overlay {
  position: absolute;
  inset: -60%;
  pointer-events: none;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: rotate(35deg);
}

.center-seam-line {
  width: 260%;
  height: 2px;
  background: var(--accent-color);
  box-shadow: 0 0 12px var(--accent-glow);
  z-index: 5;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.sloped-panels-overlay.opened .center-seam-line {
  opacity: 0;
  transform: scaleX(0);
}

.door-flap {
  width: 260%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 3.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
}

.flap-top { margin-bottom: 2px; }
.flap-bottom { margin-top: 2px; }

.sloped-plate {
  width: 100%;
  background: var(--plate-fill);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--plate-edge-line);
  border-bottom: 1px solid var(--plate-edge-line);
  box-shadow: 0 12px 35px var(--plate-shadow);
  position: relative;
  transition: transform 3.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  transform: translateY(0);
}

.sloped-plate.transparent-preview {
  height: 160px;
  background: var(--plate-preview-fill) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: inset 0 0 20px rgba(56, 189, 248, 0.15);
}

.plate-top-accent { height: 100px; }
.plate-bottom-accent { height: 100px; }

.solid-edge-plate {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--solid-plate-bg);
  box-shadow: 0 2px 10px var(--accent-glow);
  transform: translateY(0);
  transition: transform 4.0s cubic-bezier(0.16, 1, 0.3, 1);
}

.solid-edge-plate.top-edge { top: -4px; }
.solid-edge-plate.bottom-edge { bottom: -4px; }
.solid-edge-plate.bottom-seam-edge { bottom: 0; height: 4px; background: var(--accent-color); }
.solid-edge-plate.top-seam-edge { top: 0; height: 4px; background: var(--accent-color); }

.plate-line {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
  transform: translateY(0);
  transition: transform 3.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.line-main { top: 50%; height: 1px; background: var(--hud-line-color); }
.line-dashed { top: 65%; height: 1px; border-top: 1px dashed var(--plate-edge-line); }
.line-accent { top: 35%; height: 2px; background: var(--accent-color); opacity: 0.7; }

.plate-tag {
  position: absolute;
  right: 25%;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--hud-label-color);
  opacity: 0.6;
}

.preview-tag {
  color: var(--accent-color);
  opacity: 0.9;
  letter-spacing: 0.25em;
}

.sloped-panels-overlay.opened .flap-top { transform: translateY(-260px); }
.sloped-panels-overlay.opened .plate-top-accent { transform: translateY(-35px); transition-duration: 3.2s; }
.sloped-panels-overlay.opened .plate-top-big { transform: translateY(-18px); transition-duration: 3.8s; }
.sloped-panels-overlay.opened .flap-top .solid-edge-plate { transform: translateY(-12px); }
.sloped-panels-overlay.opened .flap-top .plate-line { transform: translateY(-8px); }

.sloped-panels-overlay.opened .flap-bottom { transform: translateY(260px); }
.sloped-panels-overlay.opened .plate-bottom-big { transform: translateY(18px); transition-duration: 3.8s; }
.sloped-panels-overlay.opened .plate-bottom-accent { transform: translateY(35px); transition-duration: 3.2s; }
.sloped-panels-overlay.opened .flap-bottom .solid-edge-plate { transform: translateY(12px); }
.sloped-panels-overlay.opened .flap-bottom .plate-line { transform: translateY(8px); }

.sloped-panels-overlay.closed .door-flap,
.sloped-panels-overlay.closed .sloped-plate,
.sloped-panels-overlay.closed .solid-edge-plate,
.sloped-panels-overlay.closed .plate-line {
  transform: translateY(0) !important;
}

.card-status-tag {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  padding: 0.6rem 1rem;
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 4;
}

.status-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   7. SECTION SEPARATORS & SECTION HEADINGS
   -------------------------------------------------------------------------- */
.section-wrapper {
  padding: 100px 2rem;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--surface-border);
  overflow-x: hidden;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.section-header {
  margin-bottom: 3.5rem;
  text-align: center;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-color);
  margin-bottom: 0.75rem;
}

.tag-line {
  width: 24px;
  height: 2px;
  background: var(--accent-color);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   8. SECTION 2: DETAILED ABOUT ME NARRATIVE, HIGHLIGHTS & SKILL MATRIX
   -------------------------------------------------------------------------- */
.about-narrative-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.about-paragraph {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.about-paragraph:last-child {
  margin-bottom: 0;
}

.about-highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.highlight-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.highlight-card:hover {
  background: var(--surface-hover);
  border-color: var(--surface-border-hover);
  transform: translateY(-4px);
}

.highlight-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.highlight-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

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

/* Technical Skill Matrix Styles */
.skill-matrix-container {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 2.5rem;
}

.skill-matrix-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skill-matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.skill-category-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.5rem;
}

.skill-cat-header {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-pills-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-pill {
  padding: 0.4rem 0.85rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.skill-pill:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* --------------------------------------------------------------------------
   9. SECTION 3: ACADEMIC DETAILS & INTERNSHIPS GRID
   -------------------------------------------------------------------------- */
.academic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.academic-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 2.2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.academic-card:hover {
  background: var(--surface-hover);
  border-color: var(--surface-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.card-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.card-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.95rem;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.card-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.card-bullets li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.bullet-icon {
  color: var(--accent-color);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   10. SECTION 4: PROJECT SHOWCASE (CONCISE CARDS & EXPLORE ALL PROJECTS LINK)
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.project-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.project-card:hover {
  background: var(--surface-hover);
  border-color: var(--surface-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.proj-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.proj-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.proj-tech-pill {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--accent-color);
}

.proj-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

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

.proj-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.825rem;
  border-radius: 10px;
}

.btn-github {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
  text-decoration: none;
}

.btn-github:hover {
  background: var(--surface-border);
  color: var(--accent-color);
}

.btn-details {
  background: var(--accent-color);
  color: #ffffff;
  text-decoration: none;
}

.btn-details:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Explore All Projects Action Row */
.all-projects-wrapper {
  margin-top: 3.5rem;
  text-align: center;
  display: flex;
  justify-content: center;
}

.btn-all-projects {
  padding: 1.05rem 2.5rem;
  font-size: 1.05rem;
  border-radius: 16px;
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 10px 30px var(--accent-glow);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.btn-all-projects:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 16px 42px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   11. SECTION 5: DIRECT CONTACT DETAILS & FOOTER
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.contact-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent-color);
  transform: translateY(-4px);
}

.contact-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.contact-card-title {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-card-val {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* Page Main Wrapper (replaces inline padding-top on subpages) */
.page-main-wrapper {
  padding-top: 110px;
}

/* Contact Page Specific Classes */
.contact-status-wrapper {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  width: 100%;
}

.contact-status-badge {
  position: relative;
  inset: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  max-width: 100%;
  padding: 0.65rem 1.5rem;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.45;
}

.contact-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
  align-items: start;
}

.contact-form-card {
  margin-bottom: 0;
}

.contact-form-title {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.contact-form-desc {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.contact-form-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-border);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px var(--accent-glow);
}

.contact-form-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-submit-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 0.95rem;
}

.contact-cards-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-card-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--surface-border);
  font-size: 0.9rem;
  color: var(--text-secondary);
  z-index: 1;
  position: relative;
}

/* --------------------------------------------------------------------------
   12. MODAL PLACEHOLDER FOR UPCOMING DETAILED PROJECT PAGE
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--surface-color);
  border: 1px solid var(--surface-border-hover);
  border-radius: 24px;
  padding: 2.25rem;
  max-width: 780px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-align: left;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 40px var(--accent-glow);
  transform: scale(0.92);
  transition: transform 0.3s var(--transition-curve);
  position: relative;
}

/* Custom Scrollbar for Modal Box */
.modal-box::-webkit-scrollbar {
  width: 6px;
}

.modal-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.modal-box::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 10px;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.modal-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

/* Responsive Modal Styling for Smartphones */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0.75rem;
  }

  .modal-box {
    padding: 1.5rem 1.25rem;
    max-height: 90vh;
    border-radius: 18px;
  }

  .modal-title {
    font-size: 1.3rem;
  }

  .modal-text {
    font-size: 0.875rem;
  }
}

/* --------------------------------------------------------------------------
   13. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1400px) {
  .portrait-column {
    transform: translateX(0) !important;
  }
  .anime-geo-layer {
    transform: scale(0.85);
  }
}

@media (max-width: 1100px) {
  .top-hero-container {
    flex-direction: column !important;
    gap: 3rem;
  }
  
  .portrait-column {
    justify-content: center !important;
    transform: translateX(0) !important;
  }
  
  .about-highlights-grid,
  .skill-matrix-grid,
  .academic-grid {
    grid-template-columns: 1fr;
  }

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

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

/* --------------------------------------------------------------------------
   14. MOBILE SIDEBAR NAVIGATION & RESPONSIVE PHONE STYLING (<= 768PX)
   -------------------------------------------------------------------------- */

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  cursor: pointer;
  z-index: 105;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  border-color: var(--accent-color);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile Sidebar Backdrop */
.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1090;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mobile-sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Sidebar Panel */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 88%;
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--surface-border-hover);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.75rem 1.5rem;
  box-shadow: -15px 0 35px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.35s var(--transition-curve);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  gap: 0;
}

.mobile-sidebar.active {
  transform: translateX(0);
}

.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface-border);
}

.mobile-sidebar-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-sidebar-close:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.mobile-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--badge-bg);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateX(4px);
}

.mobile-nav-icon {
  font-size: 1.15rem;
}

.mobile-sidebar-contact {
  border-top: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.5rem;
}

.mobile-contact-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.mobile-contact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-contact-item:hover {
  color: var(--accent-color);
}

.mobile-social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.mobile-social-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-social-icon:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

/* ============================================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   Disable expensive GPU operations and animations on touch
   devices to prevent flashes, stutters, and stuck glitches.
   ============================================================ */
@media (max-width: 768px) {
  /* Ultra-lightweight, high-performance geometric backdrop scaling for mobile */
  .anime-geo-layer {
    transform: scale(0.48) !important;
    opacity: 0.45 !important;
    pointer-events: none !important;
  }

  /* Thin down thick geometric borders on mobile so they don't block text */
  .diamond-thick-1cm {
    border-width: 2px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }

  .diamond-thick-half-cm {
    border-width: 1px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Disable heavy spinning/floating animations on mobile to ensure 60fps scrolling */
  .diamond-thick-1cm,
  .diamond-thick-half-cm,
  .diamond-outer,
  .diamond-mid,
  .diamond-inner,
  .ring-dashed,
  .ring-inner,
  .geo-shard {
    animation: none !important;
    will-change: auto;
  }

  /* Hide heavy decorative shards and blueprint credit boxes on mobile */
  .geo-shard,
  .geo-blueprint-box,
  .geo-ray {
    display: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Optimize ambient glow blur for low-power GPUs */
  .glow-orb {
    filter: blur(50px) !important;
    opacity: 0.08 !important;
  }

  /* Simplify navbar backdrop blur on mobile */
  .navbar {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  /* Remove hover transforms that cause repaints mid-scroll */
  .flagship-card:hover,
  .bento-card:hover,
  .project-card:hover {
    transform: none !important;
  }

  /* Suppress smooth scroll for fast mobile flick scrolling */
  html {
    scroll-behavior: auto !important;
  }
}

/* Respect prefers-reduced-motion system setting */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* RESPONSIVE MEDIA QUERIES FOR SMARTPHONES (<= 768PX) */
@media (max-width: 768px) {
  .nav-menu {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .navbar {
    padding: 0.65rem 0.85rem !important;
  }

  .nav-container {
    gap: 0.5rem !important;
  }

  .logo-img {
    width: 32px !important;
    height: 32px !important;
  }

  .brand-text {
    font-size: 1.05rem !important;
  }

  /* Hide textual label on theme button for small mobile screens so header never overflows */
  .cyber-label {
    display: none !important;
  }

  .cyber-theme-btn {
    padding: 0.4rem 0.6rem !important;
    gap: 0.35rem !important;
    border-radius: 8px !important;
  }

  .mobile-menu-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
  }

  .hero-name {
    font-size: 2.25rem !important;
    line-height: 1.15;
  }

  .hero-tagline {
    font-size: 0.9rem !important;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .section-wrapper {
    padding: 55px 0.85rem;
  }

  .section-container {
    padding: 0;
  }

  .section-title {
    font-size: 1.85rem !important;
  }

  .section-subtitle {
    font-size: 0.875rem !important;
  }

  .about-highlights-grid,
  .skill-matrix-grid,
  .academic-grid,
  .projects-grid,
  .contact-grid,
  .quick-contact-grid {
    grid-template-columns: 1fr !important;
  }

  .about-narrative-card,
  .skill-matrix-container,
  .academic-card {
    padding: 1.25rem !important;
    border-radius: 16px !important;
  }

  .box-left, .box-right {
    display: none;
  }

  /* ---- About Me page: top-hero section mobile fixes ---- */
  .top-hero-section {
    padding: 90px 1rem 40px !important;
    min-height: auto !important;
    align-items: flex-start !important;
  }

  .top-hero-container {
    flex-direction: column !important;
    gap: 1.5rem !important;
    align-items: stretch !important;
  }

  /* Hide the heavy portrait column on phones — saves ~300px of vertical space */
  .portrait-column {
    display: none !important;
  }

  /* Bio column takes full width */
  .top-bio-column {
    max-width: 100% !important;
  }

  /* Quick contact chips stack to 1 column */
  .quick-contact-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  /* Hero badge and name scaling */
  .hero-badge {
    font-size: 0.7rem !important;
  }

  /* Bento grid: single column */
  .bento-grid-container,
  .bento-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .bento-span-8,
  .bento-span-4,
  .bento-span-6,
  .bento-span-12 {
    grid-column: span 1 !important;
  }

  .bento-card {
    padding: 1.25rem 1rem !important;
    border-radius: 16px !important;
  }

  /* About-highlights grid single column */
  .about-highlights-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Nav container: prevent overflow on smallest phones */
  .nav-container {
    padding: 0 0.75rem !important;
    min-width: 0;
  }

  /* Brand logo: hide on very small screens if needed */
  .brand-logo {
    min-width: 0;
    flex-shrink: 1;
  }

  .brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
  }

  /* Contact Page Mobile Overrides (<= 768px) */
  .page-main-wrapper {
    padding-top: 75px !important;
  }

  .contact-split-grid {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
    margin-bottom: 2.5rem !important;
  }

  .contact-card {
    padding: 1.25rem 1rem !important;
    border-radius: 14px !important;
    flex-direction: row !important;
    text-align: left !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 1rem !important;
  }

  .contact-card-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.15rem !important;
    flex-shrink: 0 !important;
    border-radius: 10px !important;
  }

  .contact-card-val {
    font-size: 0.95rem !important;
  }

  .contact-status-badge {
    padding: 0.55rem 1rem !important;
    font-size: 0.785rem !important;
    border-radius: 12px !important;
    text-align: center !important;
  }

  .contact-form-card {
    padding: 1.35rem 1.15rem !important;
    border-radius: 18px !important;
  }
}

/* Dynamic Progressive Downscaling for Project Cards & Grids (<= 700px) */
@media (max-width: 700px) {
  /* Fix section padding to prevent flagship overflow */
  .section-wrapper {
    padding: 50px 0.75rem !important;
  }

  .section-container {
    max-width: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .projects-grid {
    gap: 1.15rem !important;
  }

  .project-card {
    padding: 1.25rem 1rem !important;
    border-radius: 16px !important;
  }

  .proj-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.05rem !important;
    border-radius: 10px !important;
  }

  .proj-title {
    font-size: 1.15rem !important;
  }

  .proj-desc {
    font-size: 0.84rem !important;
    margin-bottom: 1rem !important;
  }

  .proj-tech-pill {
    font-size: 0.68rem !important;
    padding: 0.2rem 0.55rem !important;
  }
}

@media (max-width: 520px) {
  .projects-grid {
    gap: 1rem !important;
  }

  .project-card {
    padding: 1rem 0.85rem !important;
    border-radius: 14px !important;
  }

  .proj-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
  }

  .proj-title {
    font-size: 1.1rem !important;
  }

  .proj-desc {
    font-size: 0.81rem !important;
    margin-bottom: 0.85rem !important;
  }

  .project-card .proj-actions {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .project-card .proj-actions .btn {
    width: 100% !important;
    padding: 0.5rem 0.65rem !important;
    font-size: 0.8rem !important;
    text-align: center;
    justify-content: center;
  }

  /* Contact Page Small Phone Overrides (<= 520px) */
  .page-main-wrapper {
    padding-top: 65px !important;
  }

  .contact-card {
    padding: 1rem 0.85rem !important;
    gap: 0.85rem !important;
  }

  .contact-card-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
  }

  .contact-card-title {
    font-size: 0.72rem !important;
  }

  .contact-card-val {
    font-size: 0.875rem !important;
  }

  .contact-form-input {
    padding: 0.65rem 0.85rem !important;
    font-size: 0.875rem !important;
    border-radius: 10px !important;
  }

  .contact-form-card {
    padding: 1.15rem 0.95rem !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 380px) {
  .project-card {
    padding: 0.85rem 0.75rem !important;
    border-radius: 12px !important;
  }

  .proj-icon {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.85rem !important;
  }

  .proj-title {
    font-size: 1.025rem !important;
  }

  .proj-desc {
    font-size: 0.785rem !important;
  }

  .contact-card {
    padding: 0.85rem 0.75rem !important;
  }

  .contact-card-val {
    font-size: 0.81rem !important;
  }
}
