/* ==========================================================================
   macOS Desktop Design System — Inspired by palash.dev
   Penapaka Bhargav Sai Portfolio
   ========================================================================== */

@view-transition {
  navigation: auto;
}

:root {
  color-scheme: dark;

  /* Typography */
  --font-ui: "Lucida Grande", "SF Pro Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "SF Pro Display", "Helvetica Neue", "Segoe UI Variable Display", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Monaco, Menlo, Consolas, monospace;

  /* Metrics */
  --menubar-h: 26px;
  --titlebar-h: 34px;
  --tile: 44px;
  --radius-window: 10px;
  --gutter: 20px;

  /* Dark Theme Palette (Default) */
  --desk-base: #0b1026;
  --desk-a: #1c3d98;
  --desk-b: #0c6a7e;
  --desk-c: #842363;
  --desk-d: #3c2082;
  --silk-color: rgba(190, 210, 255, 0.12);
  --grain-opacity: 0.18;

  --menubar-bg: rgba(26, 27, 34, 0.82);
  --menubar-line: rgba(0, 0, 0, 0.65);
  --menu-bg: #25262c;
  --menu-stripe-bg: #212227;

  --titlebar-top: #44454b;
  --titlebar-bottom: #2b2c31;
  --titlebar-line: #141416;
  --titlebar-text: #e6e6ea;
  --etch: rgba(0, 0, 0, 0.55);

  --window-bg: #1c1d22;
  --window-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 0 0.5px rgba(255, 255, 255, 0.12);

  --sidebar-bg: #23252c;
  --sidebar-line: #16171a;
  --sidebar-heading: #8d95a2;
  --statusbar-bg: #24252a;

  --text: #ececef;
  --text-2: #b4b8c2;
  --text-3: #828792;
  --hairline: #33363e;
  --link: #7cb2ff;

  --aqua-top: #72aeff;
  --aqua-mid: #3283ea;
  --aqua-bottom: #1754be;
  --aqua-tail: #4594ef;
  --aqua-edge: #13448f;

  --gel-top: #52545c;
  --gel-mid: #3d3e45;
  --gel-bottom: #313238;
  --gel-edge: #1d1e22;

  --select-top: #4c8de4;
  --select-bottom: #235fb8;

  --stripe: #22242a;
  --token-bg: #212f46;
  --token-edge: #355078;
  --panel-bg: #23242a;
  --code-bg: #18191d;
  --scroll-track: #26272e;
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.35);

  --accent-cyan: #00f2fe;
  --accent-amber: #ff9f0a;
  --accent-green: #30d158;
}

/* Light Theme Variables */
:root[data-theme="light"], [data-theme="light"] {
  color-scheme: light;

  --desk-base: #cad8ea;
  --desk-a: #86b6ee;
  --desk-b: #9fdcd3;
  --desk-c: #f4cfae;
  --desk-d: #c1b8ee;
  --silk-color: rgba(255, 255, 255, 0.55);
  --grain-opacity: 0.22;

  --menubar-bg: rgba(250, 250, 250, 0.85);
  --menubar-line: rgba(0, 0, 0, 0.2);
  --menu-bg: #fbfbfb;
  --menu-stripe-bg: #f3f3f3;

  --titlebar-top: #eaeaea;
  --titlebar-bottom: #c6c6c6;
  --titlebar-line: #929292;
  --titlebar-text: #222222;
  --etch: rgba(255, 255, 255, 0.6);

  --window-bg: #ffffff;
  --window-shadow: 0 20px 60px rgba(10, 25, 60, 0.32), 0 0 0 0.5px rgba(0, 0, 0, 0.25);

  --sidebar-bg: #e2e7ef;
  --sidebar-line: #b6bfcb;
  --sidebar-heading: #6b7787;
  --statusbar-bg: #e8e8e8;

  --text: #1d1d1f;
  --text-2: #484b50;
  --text-3: #82868d;
  --hairline: #d8dadf;
  --link: #1c5ec2;

  --aqua-top: #9ecbfb;
  --aqua-mid: #4193ec;
  --aqua-bottom: #1e61c5;
  --aqua-tail: #57a3f3;
  --aqua-edge: #194e9c;

  --gel-top: #fefefe;
  --gel-mid: #ededed;
  --gel-bottom: #d7d7d7;
  --gel-edge: #949494;

  --select-top: #689fe3;
  --select-bottom: #2b64bf;

  --stripe: #f2f5fa;
  --token-bg: #e2ecfa;
  --token-edge: #a6c0e8;
  --panel-bg: #f8f8fa;
  --code-bg: #f4f5f8;
  --scroll-track: #eaeaea;
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.08), 0 5px 14px rgba(20, 40, 80, 0.09);

  --accent-cyan: #0071e3;
  --accent-amber: #d97706;
  --accent-green: #28a745;
}

/* ==========================================================================
   Base & Layout
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--menubar-h) minmax(0, 1fr) auto;
  color: var(--text);
  background: var(--desk-base);
  font: 0.8125rem/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  user-select: none;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::selection {
  background: #3b82f6;
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  z-index: 200;
  color: #fff;
  background: var(--aqua-bottom);
  border-radius: 999px;
  padding: 4px 14px;
  position: fixed;
  top: 6px;
  left: 50%;
  transform: translate(-50%, -200%);
  font-size: 0.75rem;
  font-weight: 600;
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ==========================================================================
   Desktop Backdrop (Silky Aurora Mesh)
   ========================================================================== */

.backdrop {
  z-index: 0;
  background: var(--desk-base);
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.backdrop .glow {
  background:
    radial-gradient(42% 46% at 18% 22%, var(--desk-a), transparent 72%),
    radial-gradient(38% 42% at 82% 18%, var(--desk-d), transparent 70%),
    radial-gradient(46% 42% at 72% 82%, var(--desk-b), transparent 72%),
    radial-gradient(36% 40% at 20% 85%, var(--desk-c), transparent 72%);
  animation: 48s ease-in-out infinite alternate drift;
  position: absolute;
  inset: -15%;
}

@keyframes drift {
  0% { transform: translate(-2%, -1%) rotate(0deg) scale(1); }
  50% { transform: translate(1%, 2%) rotate(3deg) scale(1.04); }
  100% { transform: translate(2%, -2%) rotate(-2deg) scale(1.06); }
}

.backdrop .silk {
  background: var(--silk-color);
  position: absolute;
  inset: 0;
  opacity: 0.6;
}

.backdrop .grain {
  mix-blend-mode: overlay;
  opacity: var(--grain-opacity);
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 0);
  background-size: 24px 24px;
  position: absolute;
  inset: 0;
}

/* ==========================================================================
   macOS Top Menubar
   ========================================================================== */

.menubar {
  z-index: 100;
  background: var(--menubar-bg);
  border-bottom: 1px solid var(--menubar-line);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  user-select: none;
  align-items: stretch;
  padding: 0 8px;
  font-size: 0.8125rem;
  display: flex;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  height: var(--menubar-h);
}

.menubar nav {
  min-width: 0;
  display: flex;
}

.menubar .menus {
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.menubar .menus > li {
  display: flex;
  align-items: stretch;
}

.menubar .app-name {
  white-space: nowrap;
  font-weight: 700;
  line-height: var(--menubar-h);
  align-items: center;
  padding: 0 10px 0 6px;
  display: flex;
  color: var(--text);
  font-size: 0.8125rem;
}

.menubar details.menu {
  display: flex;
  position: relative;
}

.menubar summary {
  color: var(--text);
  cursor: default;
  white-space: nowrap;
  align-items: center;
  padding: 0 9px;
  list-style: none;
  display: flex;
  line-height: var(--menubar-h);
  font-size: 0.8125rem;
}

.menubar summary::-webkit-details-marker {
  display: none;
}

.menubar details.menu[open] > summary,
.menubar summary:hover {
  color: #fff;
  background: linear-gradient(var(--select-top), var(--select-bottom));
}

/* Orb Apple Icon */
.orb-button {
  padding: 0 8px;
  display: flex;
  align-items: center;
}

.orb {
  background:
    radial-gradient(circle at 36% 28%, #ffffff 0%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 50% 100%, #a8d6ff, #2f72d6 72%);
  border-radius: 50%;
  width: 13px;
  height: 13px;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.35), 0 1px rgba(255, 255, 255, 0.5);
  display: inline-block;
}

/* Dropdown Menu List */
.menu-list {
  z-index: 150;
  background: var(--menu-bg);
  border: 0.5px solid rgba(0, 0, 0, 0.45);
  border-radius: 0 0 6px 6px;
  min-width: 210px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: 0.12s ease-out drop;
}

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

.menu-list li {
  position: relative;
}

.menu-list a, .menu-list .note {
  color: var(--text);
  white-space: nowrap;
  align-items: center;
  gap: 8px;
  padding: 3px 16px 3px 18px;
  font-size: 0.8125rem;
  line-height: 1.45;
  text-decoration: none;
  display: flex;
}

.menu-list a:hover {
  color: #fff;
  background: linear-gradient(var(--select-top), var(--select-bottom));
  text-decoration: none;
}

.menu-list kbd {
  color: var(--text-3);
  font: inherit;
  margin-left: auto;
  padding-left: 20px;
  font-size: 0.75rem;
}

.menu-list a:hover kbd {
  color: rgba(255, 255, 255, 0.85);
}

.menu-list .sep {
  background: var(--hairline);
  height: 1px;
  margin: 4px 0;
}

.menu-list .note {
  color: var(--text-3);
  font-size: 0.6875rem;
  padding: 4px 16px;
}

/* Extras (Right Menubar) */
.menubar .extras {
  align-items: stretch;
  margin-left: auto;
  display: flex;
}

.menubar .clock {
  white-space: nowrap;
  align-items: center;
  padding: 0 10px;
  display: flex;
  font-size: 0.8125rem;
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.menubar .theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  line-height: var(--menubar-h);
}

.menubar .theme-toggle-btn:hover {
  color: #fff;
  background: linear-gradient(var(--select-top), var(--select-bottom));
}

/* ==========================================================================
   Desktop Canvas & Desktop Icons
   ========================================================================== */

.desktop {
  z-index: 1;
  min-height: 0;
  padding: 10px var(--gutter) 6px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.desk-icons {
  z-index: 0;
  justify-items: center;
  gap: 16px;
  display: none;
  position: absolute;
  top: 14px;
  right: 18px;
  user-select: none;
}

@media (min-width: 1540px) {
  .desk-icons {
    display: grid;
  }
}

html.minimized .desk-icons {
  display: grid;
}

.desk-icons a {
  color: #fff;
  justify-items: center;
  gap: 3px;
  width: 86px;
  text-decoration: none;
  display: grid;
}

.desk-icons .glyph {
  border-radius: 8px;
  place-items: center;
  width: 52px;
  height: 52px;
  display: grid;
  transition: transform 0.15s ease;
}

.desk-icons a:hover .glyph {
  transform: scale(1.06);
}

.desk-icons .glyph svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  width: 44px;
  height: 44px;
}

.desk-icons .label {
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  border-radius: 4px;
  max-width: 100%;
  padding: 0 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
}

.desk-icons a:hover .label {
  background: linear-gradient(var(--select-top), var(--select-bottom));
  text-shadow: none;
}

/* ==========================================================================
   macOS Application Window
   ========================================================================== */

.window {
  z-index: 1;
  grid-template-rows: var(--titlebar-h) 30px minmax(0, 1fr) auto;
  background: var(--window-bg);
  border-radius: var(--radius-window);
  max-width: 1220px;
  width: 100%;
  height: 100%;
  box-shadow: var(--window-shadow);
  margin: 0 auto;
  transition: max-width 0.25s, border-radius 0.25s;
  display: grid;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hairline);
}

/* ==========================================================================
   macOS Open Tabs Bar (Safari / Finder Style)
   ========================================================================== */

.window-tabs {
  background: linear-gradient(var(--titlebar-bottom), color-mix(in srgb, var(--titlebar-bottom) 85%, #000));
  border-bottom: 1px solid var(--titlebar-line);
  display: flex;
  align-items: stretch;
  padding: 0 8px;
  gap: 2px;
  height: 30px;
  user-select: none;
  overflow-x: auto;
}

.win-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: var(--text-3);
  font: 500 0.75rem/1 var(--font-ui);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  max-width: 220px;
  min-width: 110px;
  position: relative;
  transition: all 0.15s ease;
  margin-top: 3px;
}

.win-tab:hover:not(.active) {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
}

.win-tab.active {
  color: var(--text);
  background: var(--window-bg);
  border-color: var(--titlebar-line);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2);
  font-weight: 600;
}

.win-tab .tab-icon {
  font-size: 0.8125rem;
  line-height: 1;
}

.win-tab .tab-title {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
  text-align: left;
}

.win-tab .tab-close {
  color: var(--text-3);
  font-size: 0.875rem;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.win-tab .tab-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  opacity: 1;
}

.new-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 1rem;
  padding: 0 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 4px;
  margin: 3px 0 0 4px;
  height: calc(100% - 3px);
}

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

/* Fullscreen / Zoomed mode */
html.zoomed .desktop {
  padding: 0;
}

html.zoomed .window {
  border-radius: 0;
  max-width: none;
  border: none;
}

html.minimized .window {
  display: none;
}

/* Titlebar */
.titlebar {
  background: linear-gradient(var(--titlebar-top), var(--titlebar-bottom));
  border-bottom: 1px solid var(--titlebar-line);
  user-select: none;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  display: flex;
  position: relative;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35);
  height: var(--titlebar-h);
}

/* Traffic Lights */
.lights {
  z-index: 2;
  gap: 7px;
  display: flex;
  position: relative;
}

.light {
  width: 12px;
  height: 12px;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.5), inset 0 -3px 3px rgba(255, 255, 255, 0.35), 0 1px 0 var(--etch);
  color: rgba(0, 0, 0, 0.65);
  font: 700 9px/1 var(--font-ui);
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  place-items: center;
  padding: 0;
  display: grid;
  position: relative;
  transition: filter 0.12s;
}

.light:after {
  content: "";
  background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  border-radius: 50%;
  width: 6px;
  height: 4px;
  position: absolute;
  top: 1px;
  left: 3px;
}

.light span {
  opacity: 0;
  transition: opacity 0.12s;
  pointer-events: none;
}

.lights:hover .light span {
  opacity: 1;
}

.light.close {
  background: radial-gradient(circle at 50% 100%, #ff9e94, #d9372d 72%);
}

.light.minimize {
  background: radial-gradient(circle at 50% 100%, #ffe07a, #d49812 72%);
}

.light.zoom {
  background: radial-gradient(circle at 50% 100%, #a2e88e, #2e9b26 72%);
}

/* Nav History Buttons (◀ ▶) */
.nav-buttons {
  z-index: 2;
  display: flex;
  position: relative;
}

.nav-buttons button {
  width: 24px;
  height: 20px;
  color: var(--text-2);
  background: linear-gradient(var(--gel-top), var(--gel-mid) 50%, var(--gel-bottom) 51%, var(--gel-mid));
  border: 1px solid var(--gel-edge);
  place-items: center;
  padding: 0;
  font-size: 9px;
  display: grid;
  cursor: pointer;
  box-shadow: 0 1px rgba(255, 255, 255, 0.2);
}

.nav-buttons button:first-child {
  border-radius: 4px 0 0 4px;
}

.nav-buttons button:last-child {
  border-radius: 0 4px 4px 0;
  margin-left: -1px;
}

.nav-buttons button:active {
  filter: brightness(0.85);
}

/* Window Title & Proxy */
.window-title {
  color: var(--titlebar-text);
  text-shadow: 0 1px 0 var(--etch);
  white-space: nowrap;
  justify-content: center;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  position: absolute;
  inset: 0 140px;
  overflow: hidden;
  pointer-events: none;
}

.window-title .proxy {
  background: linear-gradient(135deg, #5aa0f0, #cfe1f7);
  border-radius: 3px;
  flex: none;
  width: 14px;
  height: 14px;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Window Body: Sidebar + Main Content Area
   ========================================================================== */

.window-body {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  display: grid;
  height: 100%;
  overflow: hidden;
}

@media (min-width: 768px) {
  .window-body {
    grid-template-columns: 215px minmax(0, 1fr);
  }
}

/* Sidebar */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-line);
  min-height: 0;
  padding: 12px 0;
  display: none;
  overflow-y: auto;
  user-select: none;
}

@media (min-width: 768px) {
  .sidebar {
    display: block;
  }
}

.sidebar h2 {
  color: var(--sidebar-heading);
  font: 700 0.6875rem/1.6 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 var(--etch);
  margin: 8px 14px 4px;
  padding: 0;
}

.sidebar ul {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.sidebar a {
  color: var(--text);
  white-space: nowrap;
  align-items: center;
  gap: 9px;
  padding: 4px 14px 4px 18px;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-decoration: none;
  display: flex;
  overflow: hidden;
  border-radius: 4px;
  margin: 1px 8px;
  cursor: pointer;
}

.sidebar a:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(var(--select-top), var(--select-bottom));
  text-shadow: 0 1px rgba(0, 0, 0, 0.45);
  font-weight: 600;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25);
}

.mini-tile {
  border-radius: 5px;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  display: grid;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(0, 0, 0, 0.4);
}

.mini-tile:after {
  content: "";
  background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.05));
  position: absolute;
  inset: 0 0 50%;
}

.mini-tile svg {
  filter: drop-shadow(0 0.5px 0.5px rgba(0, 0, 0, 0.4));
  width: 14px;
  height: 14px;
}

.mini-tile.ic-cert { background: linear-gradient(#5aa0f0, #1f63c8); }
.mini-tile.ic-space { background: linear-gradient(#ff9f0a, #d45800); }
.mini-tile.ic-cyber { background: linear-gradient(#30d158, #187a32); }
.mini-tile.ic-github { background: linear-gradient(#6b7078, #202328); }
.mini-tile.ic-linkedin { background: linear-gradient(#0077b5, #004b75); }
.mini-tile.ic-insta { background: linear-gradient(#e1306c, #833ab4); }
.mini-tile.ic-phone { background: linear-gradient(#34c759, #248a3d); }
.mini-tile.ic-mail { background: linear-gradient(#5ac8fa, #007aff); }

/* ==========================================================================
   Main Content Area (Scrollable Mac Canvas)
   ========================================================================== */

.content {
  min-width: 0;
  min-height: 0;
  padding: 22px 24px 48px;
  overflow-y: auto;
  user-select: text;
}

@media (min-width: 900px) {
  .content {
    padding: 28px 36px 56px;
  }
}

.content::-webkit-scrollbar {
  width: 14px;
}

.content::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

.content::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--aqua-top), var(--aqua-mid) 50%, var(--aqua-bottom) 51%, var(--aqua-tail)) padding-box;
  border: 3px solid transparent;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(20, 70, 150, 0.5);
}

/* Home 2-Column Grid */
.home-grid {
  display: grid;
  gap: 16px 28px;
  max-width: 1040px;
}

@media (min-width: 960px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}

.main-col {
  min-width: 0;
}

.side-col {
  min-width: 0;
}

/* ==========================================================================
   About Header (Avatar + Name + Bio + Action Gel Buttons)
   ========================================================================== */

.about {
  align-items: flex-start;
  gap: 18px;
  display: flex;
}

.avatar {
  border-radius: 16px;
  flex: none;
  width: 68px;
  height: 68px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(0, 0, 0, 0.4);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.about h1 {
  font: 200 clamp(1.8rem, 4.2vw, 2.5rem)/1.1 var(--font-display);
  letter-spacing: -0.025em;
  margin: 0 0 3px;
  color: var(--text);
}

/* Clean, Simple, Crisp Name Styling */
.about .name-highlight {
  font-weight: 700;
  color: var(--link);
}

[data-theme="light"] .about .name-highlight {
  color: #0066cc;
}

.about .role {
  color: var(--text-3);
  margin: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 500;
}

.about .role a {
  color: var(--link);
}

.about .bio {
  color: var(--text-2);
  margin: 0 0 10px;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 65ch;
}

/* Gel & Aqua Buttons (palash.dev signature) */
.buttons {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  display: flex;
}

.button {
  min-height: 22px;
  color: var(--text);
  background: linear-gradient(var(--gel-top), var(--gel-mid) 50%, var(--gel-bottom) 51%, var(--gel-mid));
  border: 1px solid var(--gel-edge);
  font: 0.75rem/1.4 var(--font-ui);
  white-space: nowrap;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  padding: 2px 14px;
  text-decoration: none;
  display: inline-flex;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.1s;
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.button:active {
  filter: brightness(0.85);
  transform: translateY(1px);
}

.button.primary {
  color: #fff;
  background: linear-gradient(var(--aqua-top), var(--aqua-mid) 50%, var(--aqua-bottom) 51%, var(--aqua-tail));
  border-color: var(--aqua-edge);
  text-shadow: 0 -1px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   Present Active Topics (DSA & Machine Learning Cards)
   ========================================================================== */

.learning-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .learning-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.learning-card {
  background: var(--panel-bg);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
  border-radius: 8px;
  padding: 14px 16px;
  transition: transform 0.15s, border-color 0.15s;
}

.learning-card:hover {
  border-color: var(--link);
  transform: translateY(-1px);
}

.learning-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.learning-name {
  font: 700 0.875rem/1.3 var(--font-ui);
  color: var(--text);
  margin: 0;
}

.learning-tag {
  font-size: 0.6875rem;
  color: var(--text-3);
  display: block;
  margin-top: 2px;
}

.learning-desc {
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

.learning-quote {
  margin: 10px 0 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--link);
  border-radius: 0 6px 6px 0;
  font: italic 0.735rem/1.45 var(--font-ui);
  color: var(--text-2);
}

[data-theme="light"] .learning-quote,
:root[data-theme="light"] .learning-quote {
  background: rgba(0, 0, 0, 0.035);
  border-left-color: #0071e3;
}

.learning-quote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 0.65rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* Quotes Side Panel */
.quotes-panel {
  background: var(--panel-bg);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.quote-item {
  position: relative;
  padding-left: 10px;
  border-left: 2px solid var(--link);
  margin-bottom: 12px;
}

.quote-item:last-child {
  margin-bottom: 0;
}

.quote-item.tone-purple {
  border-left-color: #bf5af2;
}

.quote-item.tone-green {
  border-left-color: var(--accent-green);
}

.quote-text {
  font: italic 0.735rem/1.45 var(--font-ui);
  color: var(--text-2);
  margin: 0 0 3px;
}

.quote-author {
  font: 600 0.65rem/1 var(--font-ui);
  color: var(--text-3);
  display: block;
}

/* ==========================================================================
   Stats Row (palash.dev dl.stats)
   ========================================================================== */

.stats {
  gap: 8px 0;
  margin: 18px 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.stats div {
  border-left: 1px solid var(--hairline);
  min-width: 0;
  padding: 0 14px;
}

.stats div:first-child {
  border-left: 0;
  padding-left: 0;
}

.stats dt {
  font: 300 1.35rem/1.15 var(--font-display);
  color: var(--text);
}

.stats dd {
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 2px 0 0;
  font-size: 0.625rem;
  font-weight: 600;
}

/* ==========================================================================
   Featured Project (Suraksha Kavach)
   ========================================================================== */

.featured {
  background: var(--panel-bg);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
  border-radius: 10px;
  margin: 18px 0 24px;
  display: grid;
  overflow: hidden;
}

@media (min-width: 600px) {
  .featured {
    grid-template-columns: 1.15fr 1fr;
  }
}

.shot {
  background: #11141a;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 600px) {
  .shot {
    border-bottom: 0;
    border-right: 1px solid var(--hairline);
  }
}

.shot-visual {
  width: 100%;
  height: 100%;
  min-height: 170px;
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.15), rgba(255, 94, 98, 0.15)), #141720;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.shot-visual svg {
  filter: drop-shadow(0 0 12px rgba(41, 151, 255, 0.5));
}

.featured-copy {
  padding: 16px 18px;
  align-self: center;
}

.featured-copy .kicker {
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 4px;
  font-size: 0.6875rem;
  font-weight: 700;
}

.featured-copy h2 {
  color: var(--text);
  font: 700 1.15rem/1.3 var(--font-ui);
  letter-spacing: 0;
  text-transform: none;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  display: flex;
}

.featured-copy .feat-tagline {
  color: var(--text-2);
  margin: 4px 0 10px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.feat-facts {
  color: var(--text-3);
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 12px;
  padding: 0;
  font-size: 0.75rem;
  list-style: none;
  display: flex;
}

.feat-facts strong {
  color: var(--text);
}

/* ==========================================================================
   macOS App Icon View (Certificates Grid)
   ========================================================================== */

.section-head {
  color: var(--text-3);
  font: 700 0.6875rem/1.4 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 24px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-view {
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 12px 6px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
}

.icon-view .item {
  align-content: start;
  justify-items: center;
  display: grid;
  text-align: center;
}

.icon-view .item > button {
  background: none;
  border: none;
  color: var(--text);
  text-align: center;
  border-radius: 6px;
  justify-items: center;
  gap: 4px;
  padding: 6px 4px 4px;
  text-decoration: none;
  display: grid;
  cursor: pointer;
  width: 100%;
}

.icon-view .item > button:hover .tile {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.icon-view .tile {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  place-items: center;
  display: grid;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 0 0 0.5px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s, filter 0.15s;
}

.icon-view .tile:after {
  content: "";
  background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.08));
  border-radius: 12px 12px 40% 40% / 12px 12px 18% 18%;
  position: absolute;
  inset: 1px 2px 50%;
  pointer-events: none;
}

.icon-view .tile svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  width: 28px;
  height: 28px;
}

/* App Tile Color Themes */
.tone-cisco { background: linear-gradient(#30d158, #187a32); }
.tone-isl { background: linear-gradient(#ff9f0a, #bd4500); }
.tone-oci { background: linear-gradient(#c73824, #8b1d0e); }
.tone-cusat { background: linear-gradient(#5aa0f0, #1c5ec2); }
.tone-be10x { background: linear-gradient(#bf5af2, #7a20aa); }
.tone-sih { background: linear-gradient(#ff5e62, #ff2a7a); }

.icon-view .name {
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 4px;
  max-width: 100%;
  padding: 1px 5px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  color: var(--text);
}

.icon-view .meta {
  color: var(--text-3);
  font-size: 0.65rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0 4px;
}

/* Verified Proof Status Pill */
.release {
  max-width: 100%;
  color: var(--text-2);
  background: var(--token-bg);
  border: 1px solid var(--token-edge);
  white-space: nowrap;
  border-radius: 999px;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 1px 7px;
  font-size: 0.625rem;
  line-height: 1.5;
  text-decoration: none;
  display: inline-flex;
}

.release .dot {
  background: radial-gradient(circle at 40% 35%, #b6f0a8, #2f9a3a);
  border-radius: 50%;
  flex: none;
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Side Column: "Now Active" / "Academic Base" / "Specs"
   ========================================================================== */

.now.panel {
  background: var(--panel-bg);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
  border-radius: 8px;
  margin: 0 0 14px;
  padding: 12px 14px;
}

.now h2 {
  color: var(--text-3);
  font: 700 0.6875rem/1.4 var(--font-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.rel-head {
  align-items: center;
  gap: 8px;
  display: flex;
  margin-bottom: 8px;
}

.badge-now {
  color: #fff;
  text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
  background: linear-gradient(#6fcf6a, #2f9a3a);
  border: 1px solid #2a7f33;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 0.5625rem;
  font-weight: 700;
  line-height: 1.4;
}

.now ul {
  margin: 0 0 8px;
  padding-left: 14px;
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 1.45;
}

.now li {
  margin-bottom: 5px;
}

.now strong {
  color: var(--text);
}

/* Listview / Academic Anchor (palash.dev listview) */
.listview {
  border: 1px solid var(--hairline);
  border-radius: 4px;
  margin: 8px 0 14px;
  overflow: hidden;
  background: var(--panel-bg);
}

.listview-head {
  background: linear-gradient(var(--gel-top), var(--gel-bottom));
  border-bottom: 1px solid var(--hairline);
  grid-template-columns: minmax(0, 1fr) auto;
  font-size: 0.6875rem;
  font-weight: 700;
  display: grid;
  color: var(--text);
  padding: 2px 8px;
}

.listview ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.listview li {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0 10px;
  padding: 5px 8px;
  display: grid;
  font-size: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.listview li:nth-child(2n) {
  background: var(--stripe);
}

.listview .title {
  color: var(--text);
  font-weight: 600;
}

.listview .sub {
  color: var(--text-3);
  grid-column: 1 / -1;
  font-size: 0.6875rem;
}

/* QR Code Card in Sidebar/Side-col */
.qr-mini-card {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  background: var(--panel-bg);
  margin-top: 10px;
}

.qr-mini-card img {
  width: 90px;
  height: 90px;
  border-radius: 6px;
  display: block;
  margin: 0 auto 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.qr-mini-card a {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  display: block;
}

/* ==========================================================================
   Statusbar (Bottom of macOS Window)
   ========================================================================== */

.statusbar {
  min-height: 22px;
  color: var(--text-3);
  background: var(--statusbar-bg);
  border-top: 1px solid var(--hairline);
  white-space: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  font-size: 0.6875rem;
  display: flex;
  overflow: hidden;
}

.pathbar ol {
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.pathbar li {
  align-items: center;
  display: flex;
}

.pathbar li + li:before {
  content: "›";
  color: var(--text-3);
  padding: 0 6px;
}

.pb-disk {
  background: linear-gradient(#e6e9ee, #9aa3af);
  border-radius: 2px;
  flex: none;
  width: 12px;
  height: 9px;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.35);
  margin-right: 5px;
}

/* ==========================================================================
   macOS Bottom Dock (palash.dev Dock with Magnification)
   ========================================================================== */

.dock-area {
  z-index: 50;
  padding: 4px 6px calc(2px + env(safe-area-inset-bottom));
  justify-content: center;
  display: flex;
  position: relative;
}

.dock {
  position: relative;
  user-select: none;
}

.dock:before {
  content: "";
  z-index: -1;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  background: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px 14px 6px 6px;
  position: absolute;
  inset: 12px -6px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .dock:before {
  background: linear-gradient(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.3));
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18), inset 0 1px rgba(255, 255, 255, 0.9);
}

.dock ul {
  align-items: flex-end;
  gap: 4px;
  margin: 0;
  padding: 0 8px 4px;
  list-style: none;
  display: flex;
}

.dock-item {
  width: calc(var(--tile) + 4px);
  color: var(--text);
  justify-items: center;
  padding-top: 2px;
  text-decoration: none;
  display: grid;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
}

.dock-item .tile {
  width: var(--tile);
  height: var(--tile);
  transform-origin: 50% 100%;
  transform: scale(var(--s, 1));
  border-radius: 22%;
  place-items: center;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
  display: grid;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(0, 0, 0, 0.4);
}

.dock-item .tile:after {
  content: "";
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.05));
  border-radius: 22% 22% 45% 45% / 30% 30% 18% 18%;
  position: absolute;
  inset: 1px 2px 50%;
}

.dock-item .tile svg {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
  width: 65%;
  height: 65%;
}

/* Dock Tiles Gradients */
.t-home { background: linear-gradient(#8cc8ff, #2c78dc); }
.t-specs { background: linear-gradient(#ffe07a, #d49812); }
.t-certs { background: linear-gradient(#9ee8a0, #2c9448); }
.t-contact { background: linear-gradient(#ffbd98, #d65a8e); }
.t-github { background: linear-gradient(#666a72, #16181c); }
.t-linkedin { background: linear-gradient(#0077b5, #004b75); }
.t-insta { background: linear-gradient(#e1306c, #833ab4); }
.t-theme { background: linear-gradient(#a5dcff, #3a8ce0); }

/* Tooltip Labels */
.dock-item .label {
  bottom: calc(100% + 14px + var(--tile) * (var(--s, 1) - 1));
  color: #fff;
  opacity: 0;
  pointer-events: none;
  background: rgba(20, 20, 24, 0.88);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.6875rem;
  white-space: nowrap;
  transition: opacity 0.12s, transform 0.12s;
  position: absolute;
  transform: translateY(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dock-item:hover .label {
  opacity: 1;
  transform: translateY(0);
}

/* Active running indicator dot */
.dock-item[data-running]:after {
  content: "";
  background: radial-gradient(circle, #fff 0%, #8fd0ff 60%, transparent 70%);
  border-radius: 50%;
  width: 4px;
  height: 4px;
  position: absolute;
  bottom: -4px;
  box-shadow: 0 0 5px 1px rgba(120, 200, 255, 0.9);
}

.dock-divider {
  width: 1px;
  height: calc(var(--tile) - 6px);
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px 4px;
  box-shadow: 1px 0 rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   macOS Quick Look Modal Dialog
   ========================================================================== */

dialog.preview {
  width: min(92vw, 840px);
  height: min(86dvh, 680px);
  color: var(--text);
  background: var(--window-bg);
  border-radius: var(--radius-window);
  border: 1px solid var(--hairline);
  padding: 0;
  display: none;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85), 0 0 0 0.5px rgba(255, 255, 255, 0.2);
  z-index: 250;
  position: fixed;
  inset: 0;
  margin: auto;
}

dialog.preview.active {
  display: grid;
  grid-template-rows: var(--titlebar-h) auto minmax(0, 1fr) auto;
}

dialog.preview::backdrop, .modal-backdrop {
  backdrop-filter: blur(8px);
  background: rgba(10, 15, 30, 0.6);
  position: fixed;
  inset: 0;
  z-index: 240;
  display: none;
}

.modal-backdrop.active {
  display: block;
}

.preview-titlebar {
  background: linear-gradient(var(--titlebar-top), var(--titlebar-bottom));
  border-bottom: 1px solid var(--titlebar-line);
  user-select: none;
  align-items: center;
  padding: 0 12px;
  display: flex;
  position: relative;
  height: var(--titlebar-h);
}

.preview-title {
  color: var(--titlebar-text);
  text-shadow: 0 1px 0 var(--etch);
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0 auto;
}

.preview-body {
  padding: 16px 20px;
  overflow-y: auto;
}

.preview-body h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
  color: var(--text);
}

.preview-body p {
  color: var(--text-2);
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.preview-meta-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.preview-meta-item {
  font-size: 0.75rem;
}

.preview-meta-item strong {
  display: block;
  color: var(--text-3);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.preview-pdf-frame {
  width: 100%;
  height: 320px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: #111;
  margin-top: 10px;
}

.preview-footer {
  padding: 10px 16px;
  background: var(--statusbar-bg);
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}


/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
}

.toast {
  background: rgba(28, 28, 32, 0.92);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast.active {
  opacity: 1;
  transform: translateY(0);
}
