:root {
  --bg-color: #050608;
  --bg-surface: #0d0f12;
  --bg-glass: rgba(13, 15, 18, 0.85);
  --text-primary: #eff1f3;
  --text-secondary: #9499a1;
  --accent-color: #bb86fc;
  --accent-glow: rgba(187, 134, 252, 0.4);
  --teal: #03dac6;
  --border-color: #1e2229;
  --font-main: 'Inter', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── CUSTOM SCROLLBAR ── */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-color) 0%, var(--teal) 100%);
  border-radius: 999px;
  border: 2px solid var(--bg-color);
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d4a8fe 0%, #00f5e4 100%);
}
* { scrollbar-width: thin; scrollbar-color: var(--accent-color) var(--bg-color); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

.bg-blob {
  position: fixed;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  filter: blur(120px);
  z-index: -2;
  pointer-events: none;
}
.blob-1 { top: -200px; right: -150px; }
.blob-2 { bottom: -200px; left: -150px; opacity: 0.5; }

/* ── NAVBAR ── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: sticky;
  top: 0;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 5%;
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.logo {
  font-family: var(--font-code);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  transition: text-shadow 0.4s ease;
}
.navbar.scrolled .logo {
  text-shadow: 0 0 20px var(--accent-glow);
}
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color), var(--teal));
  border-radius: 2px;
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--accent-color); }
.nav-links a.active::after { width: 100%; }

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 110;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex;
  position: fixed;
  top: 0;
  right: -100%;
  width: min(300px, 80vw);
  height: 100vh;
  background: rgba(10, 12, 15, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid var(--border-color);
  z-index: 105;
  padding: 6rem 2.5rem 2.5rem;
  flex-direction: column;
  gap: 0.5rem;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}
.mobile-nav.open {
  right: 0;
}
.mobile-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 600;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.mobile-nav a:hover, .mobile-nav a.active {
  color: var(--accent-color);
  padding-left: 0.5rem;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 104;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-overlay.open { 
  opacity: 1; 
  pointer-events: auto;
}

/* ── LAYOUT ── */
main { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section {
  padding: 9rem 0;
  border-bottom: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.subtitle { color: var(--text-secondary); font-size: 1.1rem; }
.gradient-h2 {
  font-size: 3rem; font-weight: 800;
  background: linear-gradient(120deg, #fff, #9499a1);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

/* ── CARD BASE (contact only) ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover { border-color: var(--accent-color); background: #121519; }
.card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* ── BUTTONS ── */
.btn {
  display: inline-block; padding: 1rem 2rem; border-radius: 50px;
  text-decoration: none; font-weight: 600; transition: var(--transition);
  border: 1px solid transparent; font-family: var(--font-main); pointer-events: auto;
}
.btn.primary { background: var(--accent-color); color: #000; box-shadow: 0 8px 30px var(--accent-glow); }
.btn.primary:hover { background: transparent; color: var(--accent-color); border-color: var(--accent-color); transform: translateY(-3px); }
.btn.secondary { background: transparent; color: var(--text-primary); border-color: var(--border-color); }
.btn.secondary:hover { border-color: var(--accent-color); transform: translateY(-3px); }

/* ── HERO & IDE WIDGET ── */
.hero {
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}
.ide-widget {
  width: 100%;
  max-width: 100%;
  background: #0d1117;
  border-radius: 16px;
  border: 1px solid #30363d;
  box-shadow: 0 50px 100px rgba(0,0,0,0.7), 0 0 60px rgba(187,134,252,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 10;
  position: relative;
  min-height: 500px;
}
.ide-topbar {
  display: flex;
  align-items: center;
  background: #010409;
  border-bottom: 1px solid #30363d;
  padding: 0 1rem;
  height: 48px;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
}
.ide-window-controls { display: flex; gap: 8px; margin-right: 2rem; flex-shrink: 0; }
.ide-tabs { 
  display: flex; 
  height: 100%; 
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ide-tabs::-webkit-scrollbar { display: none; }
.ide-tab {
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: #8b949e;
  border-right: 1px solid #30363d;
  border-left: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  gap: 8px;
}
.ide-tab:hover:not(.active) { background: rgba(255,255,255,0.03); color: #c9d1d9; }
.ide-tab.active {
  background: #0d1117;
  color: #c9d1d9;
  border-top: 2px solid var(--accent-color);
  border-left: 1px solid #30363d;
}
.ide-tab-icon { font-weight: bold; font-size: 0.8rem; }
.ide-actions { margin-left: auto; color: #8b949e; font-family: var(--font-code); font-size: 0.85rem; cursor: pointer; transition: color 0.3s; }
.ide-actions:hover { color: #c9d1d9; }
.ide-body { display: flex; width: 100%; flex: 1; }
.ide-sidebar {
  width: 200px;
  min-width: 160px;
  background: #010409;
  border-right: 1px solid #30363d;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.ide-explorer-header { font-family: var(--font-main); font-size: 0.7rem; font-weight: 600; color: #8b949e; padding: 0 1rem; margin-bottom: 0.5rem; letter-spacing: 1px; }
.ide-tree-folder { font-family: var(--font-code); font-size: 0.8rem; color: #c9d1d9; padding: 0.4rem 1rem; display: flex; align-items: center; gap: 8px; }
.ide-tree-file { font-family: var(--font-code); font-size: 0.8rem; color: #8b949e; padding: 0.3rem 1rem 0.3rem 2rem; display: flex; align-items: center; gap: 8px; cursor: pointer; border-left: 2px solid transparent; transition: all 0.2s; }
.ide-tree-file.active { color: var(--teal); background: rgba(3, 218, 198, 0.05); border-left: 2px solid var(--teal); }
.ide-tree-file:hover:not(.active) { color: #c9d1d9; background: rgba(255, 255, 255, 0.03); }
.ide-editor { flex: 1; display: flex; background: #0d1117; position: relative; overflow: hidden; }
.ide-line-numbers {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 2.5rem 0.5rem;
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: #484f58;
  border-right: 1px solid #30363d;
  user-select: none;
  width: 40px;
  flex-shrink: 0;
}
.ide-line-numbers span { line-height: 1.6; }
.ide-editor-content {
  flex: 1;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  overflow-y: auto;
}

.hero-content { flex: 1; min-width: 0; }
.greeting { font-family: var(--font-code); color: var(--teal); margin-bottom: 1rem; font-size: 1.1rem; }
.name { 
  font-size: clamp(1.2rem, 3.5vw, 3.2rem); 
  white-space: nowrap;
  font-weight: 900; 
  line-height: 1.1; 
  margin-bottom: 1rem; 
  letter-spacing: -2px; 
}
.vibe-badge { font-family: var(--font-code); background: linear-gradient(90deg, #bb86fc, #03dac6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.role { font-size: 1.5rem; color: #a5d6ff; margin-bottom: 2rem; min-height: 2.5rem; }
.hero-graphic { flex: 0 0 auto; max-width: 420px; width: 100%; }
.code-graphic {
  background: var(--bg-surface);
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  font-family: var(--font-code);
  font-size: 0.9rem;
  transform: perspective(1000px) rotateY(-8deg);
  color: #a5d6ff;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
}
@keyframes float { 0%, 100% { transform: perspective(1000px) rotateY(-8deg) translateY(0); } 50% { transform: perspective(1000px) rotateY(-8deg) translateY(-16px); } }
.float-anim { animation: float 6s ease-in-out infinite; }

/* ══════════════════════════════════════
   ABOUT: TERMINAL + HOBBY STRIP
══════════════════════════════════════ */
.about-dual {
  display: grid;
  /* Off Duty: LEFT | Interests: RIGHT */
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
/* Force Off Duty to column 1 and Interests to column 2 */
.about-dual .about-off-duty { order: 1; }
.about-dual .about-interests { order: 2; }

/* Section side-labels */
.side-label { margin-bottom: 2rem; }
.side-label h2 {
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(120deg, #fff, #9499a1);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.3rem;
}

/* Terminal Widget */
.terminal-widget {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.terminal-topbar {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.85rem 1.2rem;
  background: #1a1c23;
  border-bottom: 1px solid var(--border-color);
}
.tdots { display: flex; gap: 6px; }
.tdot { width: 12px; height: 12px; border-radius: 50%; }
.tdot-r { background: #ff5f57; }
.tdot-y { background: #febc2e; }
.tdot-g { background: #28c840; }
.term-filename { font-family: var(--font-code); font-size: 0.75rem; color: var(--text-secondary); }

.terminal-body {
  background: #0d0f12;
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.term-line {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: var(--transition);
  word-break: break-word;
  white-space: pre-wrap;
}
.term-line:hover {
  background: rgba(187, 134, 252, 0.05);
  border-color: rgba(187, 134, 252, 0.15);
}
.t-cmd-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem;
  font-family: var(--font-code); font-size: 0.85rem;
}
.t-prompt { color: #6e5b8a; }
.t-at, .t-path { color: var(--teal); }
.t-dollar { color: var(--text-secondary); margin: 0 3px; }
.t-cmd { color: #a5d6ff; font-weight: 700; }
.t-flag { color: var(--teal); }
.t-val { color: #f8c555; }
.t-out {
  font-family: var(--font-code); font-size: 0.78rem;
  color: var(--text-secondary); margin-left: 1.2rem;
}
.t-arrow { color: var(--accent-color); margin-right: 5px; }
.term-cursor-line .t-cmd-row { opacity: 0.6; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.t-blink { font-family: var(--font-code); color: var(--teal); animation: blink 1.1s step-end infinite; }

/* ══════════════════════════════════════
   OFF DUTY: LIFESTYLE MOODS
══════════════════════════════════════ */
.lifestyle-vibe {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mood-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem 1.8rem;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: var(--transition);
}

.mood-item:hover {
  transform: translateX(6px);
}

/* Soft background glow per mood */
.mood-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: inherit;
  z-index: 0;
}
.mood-item:hover .mood-glow { opacity: 1; }

.mood-amber .mood-glow {
  background: radial-gradient(ellipse at 20% 50%, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
}
.mood-azure .mood-glow {
  background: radial-gradient(ellipse at 20% 50%, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
}
.mood-rose .mood-glow {
  background: radial-gradient(ellipse at 20% 50%, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
}

/* Large editorial number */
.mood-num {
  font-family: var(--font-main);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.5px var(--border-color);
  transition: var(--transition);
}

.mood-amber:hover .mood-num { -webkit-text-stroke-color: #f59e0b; }
.mood-azure:hover .mood-num { -webkit-text-stroke-color: #0ea5e9; }
.mood-rose:hover  .mood-num { -webkit-text-stroke-color: #ec4899; }

/* Text block */
.mood-text {
  position: relative;
  z-index: 1;
}

.mood-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  transition: color 0.3s ease;
}

.mood-amber:hover .mood-text h3 { color: #f59e0b; }
.mood-azure:hover .mood-text h3 { color: #0ea5e9; }
.mood-rose:hover  .mood-text h3 { color: #ec4899; }

.mood-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ══════════════════════════════════════
   LIVE PROJECTS SHOWCASE
══════════════════════════════════════ */
.lp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.lp-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1.1rem;
  background: rgba(40, 200, 70, 0.08);
  border: 1px solid rgba(40, 200, 70, 0.2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: var(--font-code);
  color: #3fb950;
  white-space: nowrap;
}

.lp-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fb950;
  box-shadow: 0 0 0 0 rgba(40, 200, 70, 0.5);
  animation: lp-pulse-ring 2s ease-out infinite;
  flex-shrink: 0;
}

@keyframes lp-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(40, 200, 70, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(40, 200, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 200, 70, 0); }
}

/* ✨ UNIFIED TABBED BROWSER ✨ */
.unified-browser-frame {
  width: 100%;
  background: #0d0f12;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  margin-top: 3rem;
  transition: border-color 0.4s ease;
}

.ub-top-bar {
  height: 48px;
  background: #1a1d23;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  max-width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.ub-window-controls {
  display: flex;
  gap: 8px;
}

.ub-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.ub-tabs-strip {
  display: flex;
  height: 100%;
  align-items: flex-end;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
  pointer-events: auto;
  mask-image: linear-gradient(to right, black 90%, transparent 100%);
}
.ub-tabs-strip::-webkit-scrollbar { display: none; }

.ub-tab {
  height: 38px;
  padding: 0 18px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-bottom: none;
  white-space: nowrap;
  pointer-events: auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ub-tab:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.ub-tab.active {
  background: #0d0f12;
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  z-index: 2;
}

.tab-icon { font-size: 1rem; }

.ub-address-bar {
  height: 40px;
  background: #0d0f12;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  max-width: 100%;
  overflow: hidden;
}

.ub-main-body {
  display: flex;
  flex-direction: row;
  min-height: 540px;
}

.ub-lock { font-size: 0.75rem; opacity: 0.5; }

#ub-active-url {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.ub-viewport {
  position: relative;
  flex: 0 0 72%; /* 72% for preview */
  height: auto; 
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
  /* Use a reliable calc for width based on container nesting */
  --available-width: calc(1200px * 0.72); 
}

@media (max-width: 1200px) {
  .ub-viewport { --available-width: calc((100vw - 4rem) * 0.72); }
}

@media (max-width: 1024px) {
  .ub-viewport { --available-width: calc(100vw - 4rem); }
}

@media (max-width: 768px) {
  .ub-viewport { --available-width: calc(100vw - 4rem); }
}

@media (max-width: 480px) {
  .ub-viewport { --available-width: calc(100vw - 2rem); }
}

.ub-project-view {
  position: absolute;
  top: 0; left: 0; 
  width: 1920px !important;
  height: 1080px !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  transform: scale(calc(var(--available-width) / 1920));
  transform-origin: top left;
}

.ub-project-view.active {
  opacity: 1;
  pointer-events: auto;
}

.ub-project-view iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
  pointer-events: none;
}

.ub-info-panel {
  flex: 1;
  padding: 2.5rem;
  background: linear-gradient(180deg, #13161b 0%, #0d0f12 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  border-top: none;
}

#ub-project-content { width: 100%; }
#ub-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.6rem; color: #fff; letter-spacing: -0.02em; }
#ub-desc { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.2rem; }

.ub-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.ub-launch-link {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  align-self: flex-start;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
}

.ub-launch-link:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

@media (max-width: 1200px) {
  .ub-viewport { flex: 0 0 62%; height: auto; aspect-ratio: 16/9; }
  .ub-project-view { transform: scale(0.38); } /* Fallback */
}

@media (max-width: 1024px) {
  .ub-main-body { flex-direction: column; min-height: unset; height: auto; }
  .ub-viewport { flex: none; width: 100%; height: auto; aspect-ratio: 16/9; border-right: none; border-bottom: 1px solid var(--border-color); }
  .ub-project-view { transform: scale(0.53); } /* Fallback */
  .ub-info-panel { padding: 2rem; border-top: 1px solid var(--border-color); width: 100%; }
  .ub-launch-link { width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
  .ub-viewport { height: auto; aspect-ratio: 16/9; }
  .ub-project-view { transform: scale(0.4); } /* Fallback */
  .ub-tab { 
    padding: 0 16px; 
    height: 42px; 
    font-size: 0.8rem; 
    min-width: 100px;
    justify-content: center;
  }
  .ub-tab-icon { display: none; }
}

@media (max-width: 480px) {
  .ub-section-header { text-align: center; }
  .ub-viewport { height: auto; aspect-ratio: 16/9; }
  /* Scaled down to fit smaller padding */
  .ub-project-view { transform: scale(calc((100vw - 2rem) / 1920)); } 
  #ub-title { font-size: 1.4rem; }
  .ub-tab { padding: 0 10px; }
}


/* RESPONSIVE PORTFOLIO OPTIMIZATION (FORCED DESKTOP PREVIEWS) */
/* ... media queries ... */




/* ══════════════════════════════════════
   GITHUB PROFILE LAYOUT
══════════════════════════════════════ */
.gh-section-header { margin-bottom: 3rem; }
.gh-profile-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.gh-profile-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center;
}
.gh-avatar-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  overflow: hidden; border: 2px solid var(--border-color); margin-bottom: 0.5rem;
  position: relative;
}
.gh-avatar-img { width: 100%; height: 100%; object-fit: cover; display: none; }
.gh-avatar-img.loaded { display: block; }
.gh-avatar-fallback {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--accent-color), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-code); font-weight: 700; font-size: 1.4rem; color: #000;
}
.gh-display-name { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.gh-username { font-family: var(--font-code); font-size: 0.82rem; color: var(--text-secondary); }
.gh-bio { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }
.gh-stat-row { display: flex; justify-content: center; gap: 1.2rem; margin: 0.3rem 0; }
.gh-stat { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.gh-stat span { font-family: var(--font-code); font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.gh-stat label { font-size: 0.7rem; color: var(--text-secondary); }
.gh-visit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.55rem 1.1rem;
  background: rgba(40,200,70,0.08); color: #3fb950;
  border: 1px solid rgba(63,185,80,0.25);
  border-radius: 8px; text-decoration: none;
  font-size: 0.82rem; font-weight: 600;
  transition: var(--transition); margin-top: 0.4rem;
}
.gh-visit-btn:hover { background: rgba(40,200,70,0.18); border-color: #3fb950; transform: translateY(-2px); }
.gh-repos-panel { display: flex; flex-direction: column; gap: 0.8rem; }
.gh-pinned-label { font-family: var(--font-code); font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.gh-repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 0.85rem; }

/* GitHub-style repo cards */
.gh-repo-card {
  background: #0d1117; border: 1px solid #30363d;
  border-radius: 10px; padding: 1.1rem 1.4rem;
  text-decoration: none; display: flex; flex-direction: column; gap: 0.5rem;
  transition: var(--transition);
}
.gh-repo-card:hover { background: #161b22; border-color: #58a6ff55; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.gh-repo-name { font-family: var(--font-code); font-size: 0.88rem; color: #58a6ff; font-weight: 600; }
.gh-repo-desc { font-size: 0.8rem; color: #8b949e; line-height: 1.5; flex: 1; }
.gh-repo-footer { display: flex; align-items: center; gap: 1rem; font-size: 0.72rem; color: #8b949e; font-family: var(--font-code); margin-top: 0.3rem; }
.gh-lang-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.lang-python { background: #3572A5; } .lang-javascript { background: #f1e05a; }
.lang-typescript { background: #3178c6; } .lang-html { background: #e34c26; }
.lang-css { background: #563d7c; } .lang-jupyter { background: #DA5B0B; }
.lang-default { background: #8b949e; }

/* Contribution Graph */
.contrib-section { padding-top: 2.5rem; border-top: 1px solid var(--border-color); }
.contrib-label { font-family: var(--font-code); font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.8rem; }
.contrib-graph { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 0.5rem; }
.contrib-week { display: flex; flex-direction: column; gap: 3px; }
.contrib-day {
  width: 12px; height: 12px; border-radius: 3px;
  background: #161b22; cursor: default;
  opacity: 0; animation: cfade 0.3s ease forwards;
  transition: transform 0.1s ease;
}
.contrib-day:hover { transform: scale(1.4); }
.contrib-day[data-level="1"] { background: #0e4429; }
.contrib-day[data-level="2"] { background: #006d32; }
.contrib-day[data-level="3"] { background: #26a641; }
.contrib-day[data-level="4"] { background: #39d353; }
@keyframes cfade { to { opacity: 1; } }
.contrib-legend { display: flex; align-items: center; gap: 4px; margin-top: 0.6rem; }
.contrib-legend-text { font-family: var(--font-code); font-size: 0.68rem; color: var(--text-secondary); margin: 0 4px; }
.cl-box { width: 12px; height: 12px; border-radius: 3px; background: #161b22; display: inline-block; }
.cl-box[data-level="1"] { background: #0e4429; } .cl-box[data-level="2"] { background: #006d32; }
.cl-box[data-level="3"] { background: #26a641; } .cl-box[data-level="4"] { background: #39d353; }

/* ══════════════════════════════════════
   SCHOLAR: PAPER TIMELINE
══════════════════════════════════════ */
.scholar-header-row {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 3.5rem;
  flex-wrap: wrap; gap: 1rem;
}
.scholar-header-row h2 {
  font-size: 3rem; font-weight: 800;
  background: linear-gradient(120deg, #fff, #9499a1);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; margin-bottom: 0.4rem;
}
.scholar-profile-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.65rem 1.4rem;
  background: rgba(66,133,244,0.08); color: #4285f4;
  border: 1px solid rgba(66,133,244,0.25);
  border-radius: 8px; text-decoration: none;
  font-size: 0.85rem; font-weight: 600;
  transition: var(--transition); flex-shrink: 0;
}
.scholar-profile-btn:hover { background: rgba(66,133,244,0.18); border-color: #4285f4; transform: translateY(-2px); }

.paper-timeline { display: flex; flex-direction: column; position: relative; }
.paper-timeline::before {
  content: ''; position: absolute;
  left: 1.8rem; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, var(--accent-color), transparent);
}
.paper-item {
  display: flex; gap: 2.5rem;
  padding: 2rem 0; border-bottom: 1px solid var(--border-color);
  cursor: pointer; transition: var(--transition); position: relative;
}
.paper-item:last-child { border-bottom: none; }
.paper-item:hover { padding-left: 0.75rem; }
.paper-index {
  font-family: var(--font-code); font-size: 0.82rem;
  color: var(--accent-color); font-weight: 700;
  flex-shrink: 0; width: 1.8rem; padding-top: 0.25rem; position: relative;
}
.paper-index::after {
  content: ''; position: absolute;
  right: -1.9rem; top: 0.55rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-color); box-shadow: 0 0 10px var(--accent-glow);
}
.paper-body { display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.paper-domain-tag { font-family: var(--font-code); font-size: 0.72rem; color: var(--teal); letter-spacing: 0.04em; }
.paper-body h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); line-height: 1.55; }
.paper-item:hover .paper-body h3 { color: var(--accent-color); }
.paper-authors { font-size: 0.82rem; color: var(--text-secondary); }
.paper-read-link {
  font-family: var(--font-code); font-size: 0.78rem;
  color: var(--accent-color); width: fit-content;
}
.paper-item:hover .paper-read-link { text-decoration: underline; }

/* ══════════════════════════════════════
   CONTACT: DIGITAL POCKET FOLDER
══════════════════════════════════════ */
.digital-pocket-container {
  max-width: 450px;
  margin: 4rem auto;
  position: relative;
  height: 500px; /* Increased for more movement */
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.folder-pocket {
  width: 100%;
  height: 280px;
  position: relative;
  perspective: 1000px;
}

/* The 'File' that slides up */
.folder-card {
  position: absolute;
  bottom: 20px;
  left: 5%;
  width: 90%;
  height: 380px; /* Taller card for more spacing */
  background: rgba(25, 30, 35, 0.9); /* Slightly more opaque */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem; /* More padding */
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
}

.folder-pocket:hover .folder-card,
.folder-pocket.open .folder-card {
  transform: translateY(-280px) rotate(-2deg); /* Pushed much further out */
}

@media (max-width: 768px) {
  .folder-pocket.open .folder-card {
    transform: translateY(-220px) rotate(0deg);
  }
  /* On mobile, clear the default hover to avoid sticky states if possible */
  .folder-pocket:hover .folder-card { transform: none; }
  .folder-pocket.open .folder-card { transform: translateY(-220px) rotate(0deg); }
}

.card-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--accent-color);
  font-weight: 700;
}

.card-status {
  font-family: var(--font-code);
  font-size: 0.6rem;
  color: #28c840;
}

.card-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.card-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.card-links a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: var(--transition);
}

.link-label {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--text-secondary);
  opacity: 0.5;
  text-transform: uppercase;
}

.link-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
  word-break: break-all;
}

.card-links a:hover .link-val {
  color: var(--accent-color);
  transform: translateX(5px);
}

.card-footer {
  margin-top: auto;
  text-align: right;
  opacity: 0.5;
}

/* The Front of the Pocket */
.pocket-front {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 240px;
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  z-index: 2;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pocket-tab {
  position: absolute;
  top: -15px;
  right: 20px;
  width: 100px;
  height: 30px;
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  clip-path: polygon(0 100%, 15% 0, 85% 0, 100% 100%);
}

.pocket-label {
  font-family: var(--font-main);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  letter-spacing: 4px;
  pointer-events: none;
}

/* ── RESPONSIVE OVERRIDES ── */

/* Tablets & Small Desktops */
@media (max-width: 1100px) {
  .hero-graphic { max-width: 280px; }
  .code-graphic { padding: 2rem; font-size: 0.85rem; }
  .ide-editor-content { gap: 2rem; }
}

@media (max-width: 900px) {
  .hero-graphic { max-width: 240px; }
  .ide-sidebar { width: 160px; min-width: 140px; }
  .name { font-size: clamp(2rem, 3vw, 3rem); }
}

/* Phones & Tablets */
@media (max-width: 1024px) {
  .navbar { padding: 1rem 5%; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: flex; }
  .mobile-overlay { display: block; pointer-events: none; }
  .mobile-overlay.open { pointer-events: auto; }
  
  .section { padding: 5rem 0; }
  .gradient-h2 { font-size: 2.2rem; }
  
  .hero { text-align: center; justify-content: center; padding-top: 2rem; }
  .ide-widget { border-radius: 10px; min-height: unset; width: 100%; }
  .ide-sidebar { display: none !important; }
  .ide-line-numbers { display: none !important; }
  .ide-editor-content { flex-direction: column; padding: 1.25rem; gap: 1.25rem; align-items: center; justify-content: flex-start; width: 100%; max-width: 100%; overflow-x: hidden; box-sizing: border-box; }
}

@media (max-width: 768px) {
  .hero { text-align: center; justify-content: center; padding-top: 1rem; }
  .ide-topbar { height: 42px; padding: 0 0.75rem; }
  .ide-tab { padding: 0 0.85rem; font-size: 0.8rem; gap: 5px; }
  .ide-actions { font-size: 0.8rem; }
  .ide-window-controls { margin-right: 0.5rem; gap: 6px; }
  .hero-content { width: 100%; max-width: 100%; }
  .name { font-size: clamp(1.1rem, 6.5vw, 2.5rem); letter-spacing: -1px; white-space: nowrap; line-height: 1.2; }
  .role { font-size: 1.2rem; height: auto; white-space: nowrap; }
  #typing-text, .cursor { display: inline-block; vertical-align: middle; }
  .cta-buttons { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
  .btn { width: 100%; max-width: 300px; }

  .hero-graphic { width: 100%; max-width: 100%; overflow: hidden; box-sizing: border-box; }
  .code-graphic { padding: 1.25rem; font-size: 0.78rem; transform: none !important; animation: float-mobile 6s ease-in-out infinite; width: 100%; box-sizing: border-box; }
  @keyframes float-mobile { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
  
  /* On mobile: stack Off Duty then Interests */
  .about-dual { grid-template-columns: 1fr; gap: 3rem; }
  .about-dual .about-off-duty { order: 1; }
  .about-dual .about-interests { order: 2; }

  /* Live Projects on mobile */
  .lp-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .unified-browser-frame { width: 100%; max-width: 100%; border-radius: 12px; }
  .ub-main-body { flex-direction: column; min-height: unset; height: auto; }
  .ub-address-bar { width: 100%; max-width: 100%; overflow: hidden; }
  
  .terminal-widget { font-size: 0.8rem; width: 100%; }
  .terminal-body { padding: 1rem; }
  
  .gh-profile-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .gh-profile-card { align-items: center; text-align: center; }
  .gh-repo-grid { grid-template-columns: 1fr; }
  
  .paper-timeline::before { display: none; }
  .paper-item { flex-direction: column; gap: 0.5rem; padding: 2rem 0; }
  .paper-index { width: auto; font-size: 1.2rem; margin-bottom: 0.5rem; }
  .paper-index::after { display: none; }
  .paper-item:hover { padding-left: 0; }
  
  .connect-row { padding: 1.2rem; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .connect-value { text-align: left; margin: 0; font-size: 0.9rem; }
  .connect-arrow { position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); }
  
  /* Additional force reset to prevent overflows */
  * { box-sizing: border-box; }
}

/* Very Small Phones */
@media (max-width: 480px) {
  main { padding: 0 1rem; overflow-x: hidden; }
  .name { font-size: clamp(1rem, 6vw, 1.8rem); }
  .gradient-h2 { font-size: 1.6rem; }
  .greeting { font-size: 0.85rem; }
  .subtitle { font-size: 0.9rem; }
  
  .terminal-topbar { padding: 0.6rem 0.8rem; }
  .term-line { padding: 0.4rem; }
  .t-cmd-row { font-size: 0.7rem; }
  .t-out { font-size: 0.65rem; margin-left: 0.2rem; }
  
  .mood-item { padding: 1rem; gap: 0.75rem; }
  .mood-num { font-size: 1.8rem; }
  
  .gh-visit-btn { width: 100%; justify-content: center; }
}

/* UTILITIES */
.tilt-element { transition: transform 0.15s ease, box-shadow 0.15s ease; }

