/* 
 * css/styles.css
 * Core design system and stylesheet for the premium interactive cybersecurity portfolio.
 * Theme: Warm Off-White (#FAF9F5), Dark Charcoal (#1C1917), and Neo-Green (#22C55E) accents.
 * Typography: Satoshi (via Fontshare CDN).
 */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700,900&display=swap');

:root {
  --bg-color: #FAF9F5;
  --text-primary: #1C1917;
  --text-secondary: #5E5D62;
  --text-tertiary: #8E8D92;
  --border-color: #E6E5DF;
  --border-hover: #1C1917;
  --accent-green: #22C55E;
  --accent-green-alpha: rgba(34, 197, 94, 0.15);
  --surface-1: #FDFDFB;
  --surface-2: #FFFFFF;
  --surface-3: #FBFAF6;
  --surface-inset: rgba(255, 255, 255, 0.68);
  --surface-border-soft: rgba(21, 21, 22, 0.07);
  --scrollbar-thumb: #D5D4CD;
  --shadow-soft: rgba(0, 0, 0, 0.03);
  --shadow-card: rgba(0, 0, 0, 0.04);
  --button-soft-bg: #F0F0F3;
  --button-soft-fg: #111214;
  --button-soft-border: rgba(240, 240, 243, 0.86);
  --button-soft-hover-bg: #FFFFFF;
  --button-soft-hover-fg: #090A0C;
  --logo-surface: #FFFFFF;
  --logo-border: rgba(28, 25, 23, 0.12);
  --logo-shadow: rgba(28, 25, 23, 0.06);
  
  --font-satoshi: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.15s ease;
}

:root[data-theme='dark'] {
  --bg-color: #1C1917;
  --text-primary: #F4F1EA;
  --text-secondary: #CEC5B8;
  --text-tertiary: #A89E91;
  --border-color: #3C3632;
  --border-hover: #F4F1EA;
  --surface-1: #211E1C;
  --surface-2: #272320;
  --surface-3: #1D1A18;
  --surface-inset: rgba(244, 241, 234, 0.04);
  --surface-border-soft: rgba(244, 241, 234, 0.16);
  --scrollbar-thumb: #5E5550;
  --shadow-soft: rgba(0, 0, 0, 0.28);
  --shadow-card: rgba(0, 0, 0, 0.34);
  --button-soft-bg: #25211F;
  --button-soft-fg: #F4F1EA;
  --button-soft-border: rgba(244, 241, 234, 0.16);
  --button-soft-hover-bg: #2D2825;
  --button-soft-hover-fg: #F4F1EA;
  --logo-surface: #FFFFFF;
  --logo-border: rgba(28, 25, 23, 0.2);
  --logo-shadow: rgba(28, 25, 23, 0.09);
}

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

html, body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-satoshi);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scroll-behavior: auto;
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

@media (min-width: 901px) {
  html,
  body {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}

/* Fullscreen Canvas Container */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 90; /* Renders above content but allows interaction toggle */
}

#canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none !important;
}

.badge-fallback-active {
  display: grid;
  place-items: start center;
  padding-top: 18vh;
  pointer-events: none;
}

.fallback-lanyard {
  position: absolute;
  top: 5vh;
  left: 19vw;
  width: 160px;
  height: 210px;
  transform: translateX(-50%);
  pointer-events: none;
}

.fallback-lanyard span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 220px;
  background: #1C1917;
  opacity: 0.25;
  border-radius: 999px;
  transform-origin: top;
}

.fallback-lanyard span:first-child {
  transform: translateX(-50%) rotate(0deg);
}

.fallback-badge {
  position: relative;
  left: -31vw;
  width: 190px;
  min-height: 300px;
  background: #FAF9F5;
  border: 1px solid rgba(21, 21, 22, 0.18);
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(21, 21, 22, 0.12);
  overflow: hidden;
  transform: rotate(-2deg);
}

.fallback-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 34%, rgba(255, 255, 255, 0.04) 44%, rgba(178, 255, 217, 0.2) 50%, rgba(255, 255, 255, 0.07) 56%, transparent 66%);
  opacity: 0.34;
  pointer-events: none;
}

.fallback-badge-header {
  height: 54px;
  background: #1C1917;
  color: #FAF9F5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0;
}

.fallback-badge-header span {
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
}

.fallback-ascii {
  margin: 16px auto 18px;
  width: 150px;
  height: 116px;
  display: grid;
  place-items: center;
  background: #0c0c0d;
  color: #7e7d82;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.25;
  text-align: center;
}

.fallback-name,
.fallback-role {
  padding: 0 16px;
}

.fallback-name {
  color: #1C1917;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.05;
}

.fallback-role {
  margin-top: 8px;
  color: #5E5D62;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
}

.fallback-bars {
  height: 38px;
  margin: 22px 16px 18px;
  background: repeating-linear-gradient(90deg, #1C1917 0 3px, transparent 3px 6px, #1C1917 6px 10px, transparent 10px 14px);
}

/* Split Column Layout */
.app-container {
  display: block;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Left Column: Sticky Sidebar Area */
.sidebar-column {
  width: 39vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5rem 4vw 4rem 5vw;
  border-right: 1px solid var(--border-color);
  z-index: 10;
  overflow: hidden;
}

/* Right Column: Scrollable Content Area */
.content-column {
  width: 61vw;
  margin-left: 39vw;
  position: relative;
  padding-left: 2vw;
  z-index: 5;
}

.loop-hero-clone {
  pointer-events: auto;
}

.loop-hero-clone a,
.loop-hero-clone button,
.loop-hero-clone input,
.loop-hero-clone textarea,
.loop-hero-clone select,
.loop-hero-clone [tabindex='-1'] {
  pointer-events: none;
}

.loop-hero-clone a[href='#sentra-build'] {
  pointer-events: auto;
}

.loop-scroll-runway {
  height: 1px;
  pointer-events: none;
}

.loop-scrollbar {
  position: fixed;
  top: 50%;
  right: 22px;
  width: 18px;
  height: 168px;
  z-index: 130;
  display: none;
  align-items: stretch;
  justify-content: center;
  cursor: grab;
  transform: translateY(-50%);
  user-select: none;
  -webkit-user-select: none;
}

.loop-scrollbar::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 1px;
  border-radius: 999px;
  background: var(--border-color);
  opacity: 0.72;
}

.loop-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 5px;
  width: 8px;
  min-height: 28px;
  border-radius: 999px;
  background: var(--text-primary);
  opacity: 0.62;
  transition: opacity 0.16s ease, width 0.16s ease, left 0.16s ease;
}

.loop-scrollbar:hover .loop-scrollbar-thumb,
.loop-scrollbar.is-dragging .loop-scrollbar-thumb {
  left: 4px;
  width: 10px;
  opacity: 1;
}

.loop-scrollbar.is-dragging {
  cursor: grabbing;
}

@media (min-width: 901px) {
  .loop-scrollbar {
    display: flex;
  }
}

/* Sidebar Components */
.sidebar-header .logo {
  font-family: var(--font-satoshi);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
}

.sidebar-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
}

.sidebar-footer .nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 0 1 auto;
}

.sidebar-footer .nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.1rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  user-select: none;
  -webkit-user-select: none;
}

.sidebar-footer .nav-links a::before {
  content: '→';
  opacity: 0;
  transform: translateX(-5px);
  transition: var(--transition-fast);
}

.sidebar-footer .nav-links a:hover {
  color: var(--text-primary);
}

.sidebar-footer .nav-links a.active {
  color: var(--text-primary);
  font-weight: 700;
}

.sidebar-footer .nav-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.sidebar-socials {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: 0;
  margin-left: auto;
  padding-bottom: 2px;
}

.sidebar-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  opacity: 0.85;
  transition: var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
}

.sidebar-socials a:hover {
  color: var(--text-primary);
  opacity: 1;
  transform: translateY(-1px);
}

.sidebar-socials svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* Portfolio Section Styling */
section {
  padding: 6.5rem 6vw;
  border-bottom: 1px solid var(--border-color);
}

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

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 3.5rem;
}

/* Hero Section */
.hero-sec {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 9rem;
  padding-bottom: 4.5rem;
  gap: 1.2rem;
  min-width: 0;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 2rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero-title span {
  display: block;
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 2.8rem;
  letter-spacing: -1px;
  margin-top: 10px;
}

.hero-desc {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--text-secondary);
  width: 100%;
  min-width: 0;
  max-width: 760px;
  margin-bottom: 1rem;
  overflow-wrap: break-word;
}

.hero-title-compact {
  font-size: 3.15rem;
  line-height: 1.08;
  margin-bottom: 0.8rem;
}

.hero-title-compact span {
  font-size: 1.55rem;
  font-weight: 500;
  margin-top: 0.8rem;
  overflow-wrap: anywhere;
}

.focus-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-bottom: 0.6rem;
  max-width: 100%;
  min-width: 0;
}

.focus-strip span {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0;
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
}

.hover-log-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
  max-width: 760px;
  min-width: 0;
}

.hover-log-item {
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  transition: var(--transition-smooth);
  min-width: 0;
}

.hover-log-item:hover,
.hover-log-item:focus-within {
  border-color: var(--border-hover);
  background: var(--surface-2);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.hover-log-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.hover-log-head h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  overflow-wrap: anywhere;
}

.hover-log-head p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.hover-log-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.hover-log-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.34s ease, opacity 0.24s ease;
}

.hover-log-item:hover .hover-log-details,
.hover-log-item:focus-within .hover-log-details {
  max-height: 140px;
  opacity: 1;
}

.hover-log-details p {
  margin-top: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.92rem;
}

.hover-log-details a {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--text-primary);
}

.scroll-indicator-arrow {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 1px;
  margin-top: auto;
  opacity: 0.65;
  animation: bounce-horizontal 2.5s infinite;
}

.scroll-arrow-line {
  height: 1px;
  width: 80px;
  background: var(--text-primary);
}

@keyframes bounce-horizontal {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(12px); }
}

/* Sentra Build Section */
.sentra-build-sec {
  position: relative;
  border-top: 1px solid var(--border-color);
}

.sentra-build-sec .section-label {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.sentra-sticker-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.sentra-sticker-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.sentra-sticker-root {
  position: relative;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.sentra-clone-stickers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sentra-clone-stickers img {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
}

.sentra-title {
  position: relative;
  z-index: 1;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  max-width: 20ch;
}

.sentra-copy {
  position: relative;
  z-index: 1;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 760px;
  margin-bottom: 1rem;
}

.sentra-points {
  position: relative;
  z-index: 1;
  margin-top: 0.4rem;
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  letter-spacing: 0;
}

.sentra-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
  color: var(--button-soft-fg);
  background: var(--button-soft-bg);
  border: 1px solid var(--button-soft-border);
  border-radius: 999px;
  height: 42px;
  padding: 0 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  transition: var(--transition-fast);
}

.sentra-btn:hover {
  transform: translateY(-1px);
  background: var(--button-soft-hover-bg);
  color: var(--button-soft-hover-fg);
}

/* StickerPeel */
:root {
  --sticker-rotate: 30deg;
  --sticker-p: 10px;
  --sticker-peelback-hover: 22%;
  --sticker-peelback-active: 38%;
  --sticker-peel-easing: power3.out;
  --sticker-peel-hover-easing: power2.out;
  --sticker-start: calc(-1 * var(--sticker-p));
  --sticker-end: calc(100% + var(--sticker-p));
  --sticker-shadow-opacity: 0.45;
  --sticker-lighting-constant: 0.08;
  --peel-direction: 0deg;
}

.sticker-bounds {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: visible;
  pointer-events: none;
}

.draggable {
  position: absolute;
  cursor: grab;
  transform: translateZ(0);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.sentra-sticker-main {
  z-index: 32;
}

.sentra-sticker-alt-1 {
  z-index: 31;
}

.sentra-sticker-alt-2 {
  z-index: 30;
}

.draggable:active {
  cursor: grabbing;
}

.sticker-container {
  position: relative;
  transform: rotate(var(--peel-direction));
  transform-origin: center;
}

.sticker-container * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.sticker-main {
  clip-path: polygon(
    var(--sticker-start) var(--sticker-start),
    var(--sticker-end) var(--sticker-start),
    var(--sticker-end) var(--sticker-end),
    var(--sticker-start) var(--sticker-end)
  );
  transition: clip-path 0.6s ease-out;
  filter: url(#dropShadow);
}

.sticker-main > * {
  transform: rotate(calc(-1 * var(--peel-direction)));
}

.sticker-lighting {
  filter: url(#pointLight);
}

.sticker-container:hover .sticker-main,
.sticker-container.touch-active .sticker-main {
  clip-path: polygon(
    var(--sticker-start) var(--sticker-peelback-hover),
    var(--sticker-end) var(--sticker-peelback-hover),
    var(--sticker-end) var(--sticker-end),
    var(--sticker-start) var(--sticker-end)
  );
}

.sticker-container:active .sticker-main {
  clip-path: polygon(
    var(--sticker-start) var(--sticker-peelback-active),
    var(--sticker-end) var(--sticker-peelback-active),
    var(--sticker-end) var(--sticker-end),
    var(--sticker-start) var(--sticker-end)
  );
}

.sticker-image {
  transform: rotate(var(--sticker-rotate));
}

.flap {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: calc(-100% - var(--sticker-p) - var(--sticker-p));
  clip-path: polygon(
    var(--sticker-start) var(--sticker-start),
    var(--sticker-end) var(--sticker-start),
    var(--sticker-end) var(--sticker-start),
    var(--sticker-start) var(--sticker-start)
  );
  transform: scaleY(-1);
  transition: all 0.6s ease-out;
}

.flap > * {
  transform: rotate(calc(-1 * var(--peel-direction)));
}

.sticker-container:hover .flap,
.sticker-container.touch-active .flap {
  clip-path: polygon(
    var(--sticker-start) var(--sticker-start),
    var(--sticker-end) var(--sticker-start),
    var(--sticker-end) var(--sticker-peelback-hover),
    var(--sticker-start) var(--sticker-peelback-hover)
  );
  top: calc(-100% + 2 * var(--sticker-peelback-hover) - 1px);
}

.sticker-container:active .flap {
  clip-path: polygon(
    var(--sticker-start) var(--sticker-start),
    var(--sticker-end) var(--sticker-start),
    var(--sticker-end) var(--sticker-peelback-active),
    var(--sticker-start) var(--sticker-peelback-active)
  );
  top: calc(-100% + 2 * var(--sticker-peelback-active) - 1px);
}

.flap-lighting {
  filter: url(#pointLightFlipped);
}

.flap-image {
  transform: rotate(var(--sticker-rotate));
  filter: url(#expandAndFill);
}

.sticker-image,
.flap-image {
  width: var(--sticker-width, 220px);
  height: auto;
  display: block;
}

.sticker-main,
.flap {
  will-change: clip-path, transform;
}

/* About Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.bento-cell {
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.bento-cell:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
  box-shadow: 0 8px 30px var(--shadow-soft);
}

.bento-cell-full {
  grid-column: span 2;
}

.cell-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-icon {
  font-size: 1.2rem;
  opacity: 0.85;
}

.bento-cell p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.bento-cell p:last-child {
  margin-bottom: 0;
}

/* Experience / Education items inside bento */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-item {
  border-left: 2px solid var(--border-color);
  padding-left: 18px;
  transition: var(--transition-fast);
  position: relative;
}

.info-item:hover {
  border-left-color: var(--text-primary);
}

.info-item .item-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.info-item .item-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.info-item .item-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.info-item .item-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* Personal specifications inside bento */
.spec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.spec-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.spec-value {
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Toolkit Styling */
.toolkit-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.toolkit-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toolkit-search {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 260px;
  flex: 1;
  max-width: 340px;
}

.toolkit-search span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 700;
}

.toolkit-search input {
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  height: 42px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 0.92rem;
  font-family: var(--font-satoshi);
  color: var(--text-primary);
  outline: none;
}

.toolkit-search input:focus {
  border-color: var(--text-primary);
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 9px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-satoshi);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-color);
}

.toolkit-count {
  margin-bottom: 1rem;
  color: var(--text-tertiary);
  font-size: 0.84rem;
  font-family: var(--font-mono);
}

.toolkit-context-note {
  margin-bottom: 0.55rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.toolkit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  min-height: 250px;
}

.tool-card {
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  padding: 16px 16px 15px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 196px;
  transition: var(--transition-smooth);
}

.tool-card.is-hidden {
  display: none;
}

.tool-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-1);
  box-shadow: 0 10px 26px var(--shadow-card);
  transform: translateY(-1px);
}

.tool-logo {
  width: 100%;
  height: auto;
  aspect-ratio: 512 / 166;
  object-fit: contain;
  object-position: center center;
  border-radius: 10px;
  border: 1px solid var(--logo-border);
  background: var(--logo-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 2px 8px var(--logo-shadow);
  padding: 0;
  display: block;
}

.tool-logo-fallback {
  width: 100%;
  height: auto;
  aspect-ratio: 512 / 166;
  border-radius: 10px;
  border: 1px solid var(--logo-border);
  display: grid;
  place-items: center;
  font-family: var(--font-satoshi);
  font-size: 0.95rem;
  font-weight: 900;
  color: #2A2623;
  background: var(--logo-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 2px 8px var(--logo-shadow);
  letter-spacing: 0;
  text-transform: uppercase;
}

.tool-card .tool-name {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: 0;
}

.tool-card .tool-desc {
  font-size: 0.86rem;
  font-family: var(--font-satoshi);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.45;
  letter-spacing: 0;
}

.toolkit-empty-state {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* Projects Section & Carousel */
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3.5rem;
}

.carousel-nav-buttons {
  display: flex;
  gap: 12px;
}

.carousel-arrow {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  font-size: 1.1rem;
}

.carousel-arrow:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-color);
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  margin-bottom: 2rem;
  cursor: grab;
}

.carousel-viewport:active {
  cursor: grabbing;
}

.is-dragging-carousel,
.is-dragging-carousel * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.project-card-wrapper {
  min-width: 320px;
  width: 320px;
  flex-shrink: 0;
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
  transition: var(--transition-smooth);
}

.project-card-wrapper:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
  box-shadow: 0 8px 30px var(--shadow-soft);
}

.proj-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0.9rem;
}

.proj-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  background: var(--surface-3);
}

.proj-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.proj-title {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.3px;
}

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

.proj-footer {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

.proj-btn {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1.5px solid var(--text-primary);
  padding-bottom: 2px;
  transition: var(--transition-fast);
}

.proj-btn:hover {
  color: var(--text-secondary);
  border-bottom-color: var(--text-secondary);
}

.proj-btn-muted {
  border-bottom: none;
  opacity: 0.6;
  cursor: default;
}

/* Carousel Scrollbar Indicator */
.carousel-indicator-bar {
  width: 100%;
  height: 2px;
  background: var(--border-color);
  position: relative;
  border-radius: 1px;
}

.carousel-indicator-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 25%; /* Dynamically calculated */
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition-smooth);
}

/* Footer Section */
.footer-sec {
  background: #1C1917;
  color: #FAF9F5;
  padding: 6rem 6vw;
  border-bottom: none;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5rem;
  flex-wrap: wrap;
  gap: 3rem;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.footer-tagline {
  font-size: 1.05rem;
  color: #A1A1A5;
  max-width: 320px;
  line-height: 1.5;
  margin-top: 10px;
}

.footer-links-grid {
  display: flex;
  gap: 6rem;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: #7E7D82;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-list a {
  color: #E5E7EB;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.footer-links-list a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  font-size: 0.85rem;
  color: #7E7D82;
}

.footer-sec-clearance {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Floating Theme Toggle */
.theme-toggle-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 120;
  transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.theme-icon {
  display: block;
}

.theme-icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-icon-moon {
  display: none;
}

:root[data-theme='dark'] .theme-icon-sun {
  display: block;
}

/* Floating Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--text-primary);
  border: 1px solid var(--border-color);
  color: var(--bg-color);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(15px);
  transition: var(--transition-smooth);
  z-index: 80;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--bg-color);
  color: var(--text-primary);
  border-color: var(--text-primary);
}

/* 404 Page */
.not-found-body {
  min-height: 100vh;
}

.not-found-page {
  min-height: 100vh;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 14vh 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-color);
  color: var(--text-primary);
  text-align: center;
}

.dead-face {
  width: 150px;
  height: 150px;
  margin-bottom: 2rem;
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-content: center;
  padding: 34px 30px 42px;
  position: relative;
  animation: dead-face-drift 3s ease-in-out infinite;
}

.dead-eye {
  font-family: var(--font-mono);
  font-size: 2.45rem;
  font-weight: 700;
  line-height: 1;
  animation: dead-eye-twitch 2.6s steps(1, end) infinite;
}

.dead-eye:nth-child(2) {
  animation-delay: 0.16s;
}

.dead-mouth {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 34px;
  height: 14px;
  border-bottom: 3px solid var(--text-primary);
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%) rotate(180deg);
}

.not-found-status {
  margin-bottom: 0.65rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
}

.not-found-page h1 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0;
}

.not-found-url {
  width: 100%;
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.45;
}

.not-found-url span {
  display: block;
  margin-bottom: 0.45rem;
}

.not-found-url code {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.not-found-home {
  min-height: 42px;
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text-primary);
  border-radius: 8px;
  padding: 0 1rem;
  background: var(--text-primary);
  color: var(--bg-color);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition-fast);
}

.not-found-home:hover,
.not-found-home:focus-visible {
  background: var(--button-soft-hover-fg);
  border-color: var(--button-soft-hover-fg);
}

@keyframes dead-face-drift {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(5px) rotate(1deg);
  }
}

@keyframes dead-eye-twitch {
  0%,
  78%,
  100% {
    transform: translate(0, 0);
  }

  82% {
    transform: translate(1px, -1px);
  }

  86% {
    transform: translate(-1px, 1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dead-face,
  .dead-eye {
    animation: none;
  }
}

/* Responsive Rules */
@media (max-width: 900px) {
  .theme-toggle-btn {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
  }

  /* Layout collapses to single column scrollable */
  .app-container {
    flex-direction: column;
  }
  
  .sidebar-column {
    width: 100vw;
    height: auto;
    position: relative;
    left: auto;
    padding: 2.7rem 6vw 2.1rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    overflow: visible;
  }
  
  .content-column {
    width: 100vw;
    margin-left: 0;
    padding-left: 0;
  }

  .loop-hero-clone,
  .loop-scroll-runway {
    display: none !important;
  }

  .sidebar-footer {
    align-items: flex-start;
    gap: 1.25rem;
    margin-top: 2.25rem;
  }

  .sidebar-footer .nav-links {
    gap: 10px;
  }

  .sidebar-footer .nav-links a {
    font-size: 1rem;
  }

  .sidebar-socials {
    margin-left: 0;
    padding-bottom: 0;
    gap: 12px;
  }
  
  /* Render canvas at the top of the screen */
  #canvas-container {
    display: none !important;
  }

  #canvas-container canvas {
    display: none !important;
  }

  .badge-fallback-active {
    display: none !important;
  }

  .fallback-lanyard {
    display: none;
  }

  .fallback-badge {
    display: none;
  }
  
  .hero-sec {
    min-height: auto;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .hero-title-compact {
    font-size: 2.4rem;
  }

  .hero-title-compact span {
    font-size: 1.2rem;
  }

  .hero-desc {
    max-width: 100%;
    font-size: 1.07rem;
  }

  .focus-strip {
    gap: 8px;
  }

  .focus-strip span {
    padding: 5px 10px;
    font-size: 0.72rem;
  }

  .hover-log-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .hover-log-details {
    max-height: none;
    opacity: 1;
  }

  .scroll-indicator-arrow,
  .sentra-sticker-overlay {
    display: none;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-title span {
    font-size: 2.2rem;
  }
  
  .toolkit-controls {
    align-items: flex-start;
  }

  .toolkit-tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .toolkit-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 0 0 auto;
  }

  .toolkit-search {
    min-width: 100%;
    max-width: none;
  }

  .sentra-title {
    font-size: 1.9rem;
    letter-spacing: -0.6px;
    margin-bottom: 1rem;
  }

  .sentra-copy {
    font-size: 1rem;
  }

  .toolkit-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    min-height: 0;
  }

  .tool-card {
    padding: 12px;
    min-height: 150px;
    gap: 8px;
    border-radius: 10px;
  }

  .tool-logo,
  .tool-logo-fallback {
    height: auto;
    border-radius: 8px;
  }

  .tool-card .tool-name {
    line-height: 1.2;
  }

  .tool-card .tool-desc {
    line-height: 1.35;
  }
  
  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .carousel-nav-buttons {
    align-self: flex-end;
  }
  
  .carousel-viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    cursor: auto;
    scroll-snap-type: x proximity;
  }
  
  .carousel-track {
    gap: 16px;
    transition: none;
  }
  
  .project-card-wrapper {
    min-width: 280px;
    width: 280px;
    scroll-snap-align: start;
  }
  
  .footer-links-grid {
    gap: 3rem;
  }
}

@media (max-width: 600px) {
  .not-found-page {
    padding-top: 10vh;
  }

  .dead-face {
    width: 126px;
    height: 126px;
    padding: 28px 25px 36px;
  }

  .dead-eye {
    font-size: 2.1rem;
  }

  .not-found-url {
    max-width: 280px;
  }

  .not-found-home {
    width: 100%;
    max-width: 260px;
  }

  section {
    padding: 4.25rem 5.5vw;
  }

  .theme-toggle-btn {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .sidebar-column {
    padding: 2.2rem 5.5vw 1.7rem;
  }

  .sidebar-header .logo {
    font-size: 1.35rem;
  }

  .sidebar-footer {
    gap: 1rem;
    margin-top: 2rem;
  }

  .sidebar-footer .nav-links {
    gap: 9px;
  }

  .sidebar-footer .nav-links a {
    font-size: 0.94rem;
  }

  .sidebar-socials {
    gap: 11px;
  }

  .sidebar-socials svg {
    width: 18px;
    height: 18px;
  }
  
  .section-title {
    font-size: 2.3rem;
  }

  .hero-sec {
    padding-top: 3.1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-title span {
    font-size: 1.8rem;
  }

  .hero-title-compact {
    font-size: 2.05rem;
  }

  .hero-title-compact span {
    font-size: 1.05rem;
  }

  .hero-desc,
  .sentra-copy {
    font-size: 0.98rem;
  }

  .sentra-title {
    font-size: 1.65rem;
    margin-bottom: 0.9rem;
  }

  .sentra-points {
    font-size: 0.84rem;
    line-height: 1.5;
  }

  .hover-log-item {
    padding: 0.9rem 0.95rem;
  }

  .toolkit-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .tab-btn {
    width: 100%;
    min-height: 36px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 0.76rem;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .toolkit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .tool-card {
    min-height: 126px;
    padding: 9px;
    gap: 7px;
    border-radius: 9px;
  }

  .tool-logo,
  .tool-logo-fallback {
    border-radius: 7px;
    box-shadow: none;
  }

  .tool-logo-fallback {
    font-size: 0.76rem;
  }

  .tool-card .tool-name {
    font-size: 0.78rem;
    line-height: 1.18;
  }

  .tool-card .tool-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.7rem;
    line-height: 1.28;
  }

  .carousel-track {
    gap: 12px;
  }

  .project-card-wrapper {
    min-width: 86vw;
    width: 86vw;
    padding: 1.35rem;
  }
  
  .footer-links-grid {
    flex-direction: column;
    gap: 2rem;
  }
}
