/* Warm Claymorphism & Glassmorphism Design System */
:root {
  --bg-gradient: transparent; /* Using the organic SVG sand dunes background */
  --card-bg: rgba(246, 238, 230, 0.6); /* Warm translucent sand cream */
  --card-bg-hover: rgba(246, 238, 230, 0.8);
  --card-dark: #2c2724; /* Soft warm charcoal instead of pure black */
  --text-primary: #332b25; /* Organic deep brown-charcoal */
  --text-secondary: #857467; /* Soft sand-dune shadow tone */
  --glass-border: rgba(186, 166, 149, 0.3); /* Low contrast warm border */
  --glass-shadow: 0 20px 50px -12px rgba(100, 85, 75, 0.08); /* Faint, elegant diffused shadow */
  --card-border-radius: 32px;
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --action-btn-text: #fff;
  --lang-btn-active-text: #fff;
  
  /* Design Gallery Aurora Colors */
  --aurora-glow-1: rgba(222, 171, 137, 0.85); /* Glowing warm peach-amber */
  --aurora-glow-2: rgba(186, 143, 119, 0.4);  /* Soft terracotta */
  --aurora-bg: rgba(246, 238, 230, 0.8);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none; /* Disable default browser focus outline globally */
  -webkit-tap-highlight-color: transparent; /* Remove blue/gray tap highlight overlay on mobile devices */
}
html {
  overflow-y: scroll;
  overflow-x: hidden;
}

/* Hard reset for interactive element focus states */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  box-shadow: none !important;
}

body {
  background: #f2e7dc; /* Base warm sand tone */
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Organic Sand Dunes Background */
.dune-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.dune-bg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Floating Pill Navigation (Liquid Glass style) */
header.container {
  position: fixed;
  top: 16px; 
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1152px;
  z-index: 1000;
  margin: 0;
}

.main-content {
  padding-top: 96px; /* Offset for fixed desktop header to align top/bottom gaps equally */
}

.header-wrapper {
  max-width: 1152px;
  margin: 0 auto;
  width: 100%;
  background: #f1e6da; /* Solid Cream */
  border: 1px solid rgba(186, 166, 149, 0.45);
  border-radius: 40px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Premium iOS 26 layered shadow with double inset highlights (No hover movement) */
  box-shadow: 
    0 30px 60px -15px rgba(100, 85, 75, 0.15),
    0 12px 24px -8px rgba(100, 85, 75, 0.12),
    0 4px 10px -4px rgba(100, 85, 75, 0.05),
    0 1px 2px rgba(255, 255, 255, 0.9) inset,
    0 -1px 1px rgba(0, 0, 0, 0.04) inset;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4c0b0, #bfa28c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

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

.logo-info h1 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.logo-info span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

nav {
  display: flex;
  gap: 12px;
  position: relative;
}

.nav-active-pill {
  position: absolute;
  background: rgba(255, 255, 255, 0.12); /* White capsule highlight */
  border-radius: 30px;
  z-index: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 14px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-tab.active {
  color: var(--text-primary);
}

.nav-tab.active::after {
  transform: translateX(-50%) scaleX(1);
}

.desktop-only-text {
  display: inline;
}

.mobile-only-text {
  display: none;
}

.tab-icon {
  display: none;
}

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

.lang-switch {
  background: rgba(246, 238, 230, 0.5);
  border: 1px solid var(--glass-border);
  padding: 4px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  gap: 4px;
}

.lang-btn {
  padding: 2px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-secondary);
}

.lang-btn.active {
  background: var(--card-dark);
  color: var(--lang-btn-active-text, #fff);
}

.action-btn-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card-dark);
  color: var(--action-btn-text, #fff);
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2; /* Always stack above the expanding text capsule */
}

.action-btn-circle:hover {
  transform: scale(1.05);
}

/* Hover-Expandable Email Pill */
.email-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 38px;
  height: 38px;
}

.email-text {
  position: absolute;
  right: 19px; /* Initially centered behind the button */
  width: 0;
  height: 38px;
  line-height: 36px; /* Center text vertically inside border */
  background: rgba(246, 238, 230, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 8px 20px rgba(100, 85, 75, 0.06);
  white-space: nowrap;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
  pointer-events: none;
}

/* On desktop/pointer devices, expand the pill on hover */
@media (hover: hover) {
  .email-pill:hover .email-text {
    opacity: 1;
    width: 220px; /* Full expanded width */
    padding: 0 48px 0 16px; /* Right padding leaves space for the 38px button */
    right: 0; /* Align right to overlap button perfectly */
    pointer-events: auto;
  }
}

/* On all devices, expand the pill when class .expanded is added via JS click */
.email-pill.expanded .email-text {
  opacity: 1;
  width: 220px; /* Full expanded width */
  padding: 0 48px 0 16px; /* Right padding leaves space for the 38px button */
  right: 0; /* Align right to overlap button perfectly */
  pointer-events: auto;
}

/* Hide theme toggle when email pill is expanded to prevent overlap */
.header-actions:has(.email-pill.expanded) #theme-toggle {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

@media (hover: hover) {
  .header-actions:has(.email-pill:hover) #theme-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
  }
}

/* Layout Showcase Block */
.hero-layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-caps-tag {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-text h2 {
  font-size: 4rem;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-text p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.btn-pill-dark {
  background: var(--card-dark);
  color: var(--action-btn-text, #fff);
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-pill-dark:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-pill-light {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-pill-light:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.6);
}

/* Right Side Media Frame & Highlights */
.media-showcase-frame {
  position: relative;
  background: #f7f2ec;
  border: 12px solid #fff;
  border-radius: 36px;
  padding: 16px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.floating-overlay-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 10px 25px rgba(135, 125, 115, 0.08);
}

.floating-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.floating-card-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.floating-card-text strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
}

/* Glass Cards Grid */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-border-radius);
  padding: 32px;
  box-shadow: var(--glass-shadow);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}



/* Nested Card widgets (eliminates harsh white inline backgrounds) */
.nested-card {
  flex: 1;
  text-align: center;
  background: rgba(246, 238, 230, 0.45);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}



/* General Layout Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
}

.full-width {
  grid-column: 1 / -1;
}

/* Container 3D Perspective Setup (Grid container keeps tabs aligned perfectly) */
.main-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr;
  perspective: 2000px;
  perspective-origin: 50% 35%; /* Tilted perspective for a more pronounced 3D sphere rotation */
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.main-content.transitioning {
  overflow: hidden !important;
  pointer-events: none;
}

/* Base Tab Content styles */
.tab-content {
  display: none;
  grid-area: 1 / 1 / 2 / 2; /* Layer all tabs on top of each other inside the same grid cell */
  width: 100%;
  align-self: start; /* Maintain natural heights and align at the top of the grid cell */
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.tab-content.active {
  display: block;
}

/* Overrides during active transition to display both old and new tab contents */
.main-content.transitioning .tab-content.active,
.main-content.transitioning .tab-content.leaving,
.main-content.transitioning .tab-content.entering {
  display: block !important;
}

/* Rely entirely on 3D depth (translate3d Z axis) and DOM paint order for natural layering */
.main-content.transitioning .tab-content.leaving {
  /* No z-index to avoid WebKit 3D rendering engine conflicts */
}

.main-content.transitioning .tab-content.entering {
  /* No z-index to avoid WebKit 3D rendering engine conflicts */
}

/* ==========================================================================
   Globe-like 3D Transition Animations
   ========================================================================== */

/* Forward navigation (left to right): Old page swings out to left/bottom-left */
.main-content.transitioning.forward .tab-content.leaving {
  animation: globeRotateOutLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Forward navigation (left to right): New page swings in from right/bottom-right */
.main-content.transitioning.forward .tab-content.entering {
  animation: globeRotateInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Backward navigation (right to left): Old page swings out to right/bottom-right */
.main-content.transitioning.backward .tab-content.leaving {
  animation: globeRotateOutRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Backward navigation (right to left): New page swings in from left/bottom-left */
.main-content.transitioning.backward .tab-content.entering {
  animation: globeRotateInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 3D Keyframe Animations (Curves and Spherical Motion - rely on translate3d Z depth) */
@keyframes globeRotateOutLeft {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    transform-origin: 50% 150%;
  }
  100% {
    opacity: 0;
    transform: translate3d(-35%, 15%, -500px) rotateX(-8deg) rotateY(-40deg) rotateZ(-12deg) scale(0.8);
    transform-origin: 50% 150%;
  }
}

@keyframes globeRotateInRight {
  0% {
    opacity: 0;
    transform: translate3d(35%, 15%, -500px) rotateX(-8deg) rotateY(40deg) rotateZ(12deg) scale(0.8);
    transform-origin: 50% 150%;
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    transform-origin: 50% 150%;
  }
}

@keyframes globeRotateOutRight {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    transform-origin: 50% 150%;
  }
  100% {
    opacity: 0;
    transform: translate3d(35%, 15%, -500px) rotateX(-8deg) rotateY(40deg) rotateZ(12deg) scale(0.8);
    transform-origin: 50% 150%;
  }
}

@keyframes globeRotateInLeft {
  0% {
    opacity: 0;
    transform: translate3d(-35%, 15%, -500px) rotateX(-8deg) rotateY(-40deg) rotateZ(-12deg) scale(0.8);
    transform-origin: 50% 150%;
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    transform-origin: 50% 150%;
  }
}

/* Card Drifting Parallax Effect (Nested depth animation) */
.main-content.transitioning.forward .tab-content.entering .glass-card {
  animation: cardInRight 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.main-content.transitioning.backward .tab-content.entering .glass-card {
  animation: cardInLeft 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardInRight {
  0% {
    transform: translate3d(40px, 10px, 50px) rotateY(12deg);
    box-shadow: 0 40px 80px rgba(100, 85, 75, 0.2);
  }
  100% {
    transform: translate3d(0, 0, 0) rotateY(0);
  }
}

@keyframes cardInLeft {
  0% {
    transform: translate3d(-40px, 10px, 50px) rotateY(-12deg);
    box-shadow: 0 40px 80px rgba(100, 85, 75, 0.2);
  }
  100% {
    transform: translate3d(0, 0, 0) rotateY(0);
  }
}

/* Academic Section Custom Theme */
.academic-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
}

/* GPA Simulator Panel styled like screenshot overlay cards */
.gpa-simulator-panel {
  background: rgba(246, 238, 230, 0.55);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-border-radius);
  padding: 28px;
}

.simulator-options {
  display: flex;
  flex-direction: column;
  margin: 12px 0;
}

.simulator-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(186, 166, 149, 0.2);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.simulator-option:last-child {
  border-bottom: none;
}

.simulator-option span {
  font-weight: 500;
  color: var(--text-secondary);
}

.simulator-option strong {
  font-weight: 600;
  color: var(--text-primary);
}

.simulator-option input {
  accent-color: var(--card-dark);
  cursor: pointer;
}

.simulated-gpa-box {
  background: var(--card-dark);
  color: var(--action-btn-text, #fff);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
}

/* Tables in claymorphism */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 2px solid rgba(186, 166, 149, 0.2);
}

td {
  padding: 16px;
  border-bottom: 1px solid rgba(186, 166, 149, 0.15);
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: none;
}

.badge-gt, .badge-ap {
  display: inline-block;
  background: rgba(186, 166, 149, 0.2);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* TOEFL Design */
.toefl-track {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.toefl-node {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(246, 238, 230, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 16px 20px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}



.toefl-node.target {
  background: rgba(246, 238, 230, 0.75);
  border-color: rgba(186, 166, 149, 0.45);
  box-shadow: 0 8px 20px rgba(100, 85, 75, 0.03);
}

.toefl-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}

.toefl-scores {
  display: flex;
  gap: 8px;
}

.score-chip {
  background: rgba(246, 238, 230, 0.65);
  border: 1px solid rgba(186, 166, 149, 0.25);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

.score-chip span {
  display: block;
}

.toefl-total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Project Cards Portfolio */
.project-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #decbbd;
  border: 1px solid rgba(133, 116, 103, 0.3);
  color: var(--text-primary);
  padding: 10px 22px;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:focus {
  outline: none;
}

.filter-btn:hover {
  background: #ecdcd0;
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--card-dark);
  border-color: transparent;
  color: var(--action-btn-text, #fff);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.project-tag {
  background: rgba(246, 238, 230, 0.65);
  border: 1px solid rgba(186, 166, 149, 0.25);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-highlights {
  list-style: none;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 16px;
}

.project-highlights li {
  position: relative;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.project-highlights li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--text-primary);
  font-weight: bold;
}

/* Timeline Components */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 9px;
  width: 2px;
  background: rgba(0, 0, 0, 0.06);
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 4px solid #f6eee6; /* Matches the card base background */
  box-shadow: 0 2px 6px rgba(100, 85, 75, 0.05);
}

.timeline-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.timeline-task {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Volunteering Items */
.volunteering-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.volunteering-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(246, 238, 230, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}



.volunteering-hours {
  background: var(--card-dark);
  color: var(--action-btn-text, #fff);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 16px;
}

/* Dashboard Hero Profile Section */
.dashboard-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr; /* Symmetrical three columns horizontally */
  gap: 32px;
  margin-bottom: 32px;
}

.intro-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro-card h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  font-family: var(--font-display);
}

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

.intro-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.bullet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2.5px;
}

.bullet-icon svg {
  color: var(--text-secondary);
  transition: color 0.3s ease, transform 0.3s ease;
}

.intro-bullets li:hover .bullet-icon svg {
  color: var(--text-primary);
  transform: scale(1.08);
}

.location-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
}

.location-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  z-index: 1;
  line-height: 1.5;
}

.location-header svg {
  color: var(--text-primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.globe-container {
  position: absolute;
  bottom: -62px;
  right: -42px;
  width: 240px;
  height: 240px;
  pointer-events: none;
  z-index: 0;
}

.globe-container.globe-left {
  left: -25px;
  right: auto;
}

/* Subtle micro-rotation to make the globe feel alive */
@keyframes rotateGlobeSubtle {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}

.globe-container svg {
  animation: rotateGlobeSubtle 24s ease-in-out infinite;
  transform-origin: center;
}

@media (min-width: 1025px) {
  #dashboard .dashboard-grid {
    grid-template-columns: 450px 1fr;
  }
  #dashboard .projects-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Responsive Customizations */
@media (max-width: 1024px) {
  .hero-layout-grid, .dashboard-grid, .academic-layout, .dashboard-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .hero-text h2 {
    font-size: 3rem;
  }
}

@media (max-width: 860px) {
  body {
    padding-bottom: 120px !important; /* Prevents the floating bottom menu from overlapping content */
  }

  header.container {
    position: relative; /* Normal flow on mobile */
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    margin-top: 12px; /* Spacing reduced by half */
    margin-bottom: 12px;
    padding: 0 8px;
  }

  .main-content {
    padding-top: 12px; /* Offset reset for mobile relative header */
  }
  
  .header-wrapper {
    padding: 8px;
    border-radius: 24px;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    backdrop-filter: none; /* Crucial! Fixes mobile containment bug positioning nav at the top */
    -webkit-backdrop-filter: none;
  }

  .logo-info, .header-actions {
    display: flex;
  }

  .logo-info h1 {
    font-size: 0.9rem;
  }

  .logo-info span {
    font-size: 0.7rem;
  }

  .nav-active-pill {
    display: block;
  }

  nav {
    position: fixed;
    top: auto; /* Reset desktop top: 24px constraint to prevent vertical stretching */
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 310px;
    background: #1e1c1a; /* Dark charcoal */
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px;
    padding: 6px; /* Symmetric padding to ensure equal margins on all sides */
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    z-index: 1000;
  }

  .desktop-only-text {
    display: none;
  }

  .mobile-only-text {
    display: inline;
  }

  .nav-tab {
    position: relative;
    z-index: 1; /* Stay clickable above active pill */
    padding: 8px 10px; /* Reduced padding on mobile to fit text labels without wrapping */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    background: transparent;
    border: none;
    color: #cfc5ba; /* Significantly lighter warm gray for readability/contrast */
    gap: 4px;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 60px; /* Ensure uniform tab button sizes on mobile */
    flex-shrink: 0; /* Prevent the browser from squeezing the tab layout */
  }

  .nav-tab::after {
    display: none !important; /* Hide desktop horizontal line style on mobile */
  }

  .nav-tab:hover {
    color: #ffffff; /* Fixed mobile tap/hover color contrast bug */
    background: transparent;
  }

  .nav-tab.active,
  .nav-tab.active:hover {
    background: transparent; /* Rely on sliding active pill instead of static highlight */
    color: #ffffff; /* Active pure white text & icon */
    box-shadow: none;
  }

  .tab-text {
    display: block; /* Show labels under icons on mobile */
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap; /* Prevent labels from wrapping to two lines */
    flex-shrink: 0; /* Guarantee that the text labels will not be squeezed */
  }

  /* Prevent text from overlapping the globe on mobile */
  .location-card {
    padding-bottom: 160px;
  }

  .tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
  }

  .tab-icon svg {
    width: 18px;
    height: 18px;
  }

  /* Responsive tables turned into vertical card lists */
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead {
    display: none;
  }
  tr {
    background: rgba(246, 238, 230, 0.45);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(100, 85, 75, 0.02);
  }
  td {
    border: none;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    text-align: right;
  }
  td:first-child {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(186, 166, 149, 0.2);
    padding-bottom: 8px;
    margin-bottom: 8px;
    display: block;
    text-align: left;
  }
  td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-right: 8px;
    float: left;
  }
  td:first-child::before {
    content: none;
  }

  /* Prevent stats card contents from wrapping or clipping on narrow mobile screens */
  .nested-card {
    padding: 12px 6px !important;
  }
  .nested-card div[id="dash-volunteer-hours"],
  .nested-card div:first-child {
    font-size: 1.6rem !important; /* Slightly smaller digits */
  }
  .nested-card div:last-child {
    font-size: 0.6rem !important; /* Slightly smaller sublabels */
    letter-spacing: 0.02em !important;
  }

  /* Prevent projects grid horizontal overflow on mobile screens */
  .projects-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  /* Prevent TOEFL standard test layout from overflowing on mobile screens */
  .toefl-node {
    padding: 12px 10px !important;
    gap: 6px !important;
  }
  .score-chip {
    padding: 4px 6px !important;
    font-size: 0.7rem !important;
    border-radius: 8px !important;
  }
  .toefl-scores {
    gap: 4px !important;
  }
  .toefl-total {
    font-size: 1.1rem !important;
  }
  .toefl-date {
    font-size: 0.8rem !important;
  }
}

/* ============================================================
   Unified Academic Stats Panel (Overview left column)
   ============================================================ */

.dash-stats-panel {
  padding: 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stats-section {
  padding: 20px 0;
}

.stats-section:first-child {
  padding-top: 0;
}

.stats-section:last-child {
  padding-bottom: 0;
}

.stats-divider {
  height: 1px;
  background: rgba(186, 166, 149, 0.2);
  flex-shrink: 0;
}

.stats-section-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* --- GPA Hero --- */
.gpa-hero-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gpa-hero-number {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
  flex-shrink: 0;
}

.gpa-year-chips {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gpa-year-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(186, 166, 149, 0.15);
  border: 1px solid rgba(186, 166, 149, 0.2);
  border-radius: 10px;
  padding: 4px 10px;
}

.gpa-year-chip-estimated {
  opacity: 0.65;
}

.gpa-year-chip-grade {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 28px;
}

.gpa-year-chip-val {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* --- TOEFL Hero --- */
.toefl-hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.toefl-hero-total {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
  flex-shrink: 0;
}

.toefl-hero-breakdown {
  display: flex;
  gap: 6px;
}

.toefl-hero-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(186, 166, 149, 0.15);
  border: 1px solid rgba(186, 166, 149, 0.2);
  border-radius: 10px;
  padding: 5px 8px;
  min-width: 34px;
}

.toefl-chip-letter {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  line-height: 1;
}

.toefl-chip-score {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.toefl-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-left: auto;
  text-align: right;
}

.toefl-hero-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.toefl-hero-target {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(44, 39, 36, 0.07);
  border-radius: 8px;
  padding: 2px 8px;
}

/* --- Course Grades List --- */
.course-grades-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.course-grades-list::-webkit-scrollbar {
  width: 3px;
}
.course-grades-list::-webkit-scrollbar-track {
  background: transparent;
}
.course-grades-list::-webkit-scrollbar-thumb {
  background: rgba(186, 166, 149, 0.4);
  border-radius: 4px;
}

.course-grade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(186, 166, 149, 0.08);
  transition: background 0.2s ease;
}



.course-grade-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-grade-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.course-grade-badge {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(186, 166, 149, 0.2);
  color: var(--text-secondary);
}

.course-grade-score {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 18px;
  text-align: right;
}

.course-grade-score.grade-a {
  color: #5a7a4a;
}

.course-grade-score.grade-b {
  color: #7a6040;
}

/* --- Volunteer Hours Hero --- */
.volunteer-hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.volunteer-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(186, 166, 149, 0.15);
  border: 1px solid rgba(186, 166, 149, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.volunteer-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.volunteer-hours-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.volunteer-hours-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.volunteer-orgs-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
  background: rgba(186, 166, 149, 0.12);
  border: 1px solid rgba(186, 166, 149, 0.2);
  border-radius: 14px;
  padding: 8px 16px;
}

.volunteer-org-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.volunteer-org-label {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .gpa-hero-number {
    font-size: 2.8rem;
  }
  .toefl-hero-total {
    font-size: 2.2rem;
  }
  .toefl-hero-meta {
    margin-left: 0;
    text-align: left;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  .course-grades-list {
    max-height: 200px;
  }
}

/* ==========================================
   Dark Theme Adaptation & SVG Gradient Overrides
   ========================================== */

[data-theme="dark"] {
  --card-bg: rgba(30, 26, 23, 0.7); /* Deep warm charcoal translucency */
  --card-bg-hover: rgba(38, 33, 29, 0.85);
  --card-dark: #eee7e1; /* Off-white for high contrast in dark mode */
  --text-primary: #f5ece3; /* Light warm cream */
  --text-secondary: #beb0a2; /* Soft warm muted grey-brown */
  --glass-border: rgba(222, 203, 183, 0.15); /* Soft light warm border */
  --glass-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.45); /* Deeper shadow for dark mode */
  --action-btn-text: #24201d; /* Dark text/icon color inside circles */
  --lang-btn-active-text: #24201d; /* Dark text inside active lang buttons */
  
  /* Design Gallery Aurora Colors (Dark theme) */
  --aurora-glow-1: rgba(212, 163, 115, 0.9);  /* Glowing gold */
  --aurora-glow-2: rgba(133, 98, 70, 0.3);   /* Warm bronze */
  --aurora-bg: rgba(44, 39, 36, 0.8);
}

[data-theme="dark"] body {
  background: #171412; /* Deep warm obsidian */
}

/* Header & Floating Pill */
[data-theme="dark"] .header-wrapper {
  background: #24201d; /* Solid Warm Charcoal */
  border: 1px solid rgba(222, 203, 183, 0.15);
  box-shadow: 
    0 30px 60px -15px rgba(0, 0, 0, 0.55),
    0 12px 24px -8px rgba(0, 0, 0, 0.45),
    0 4px 10px -4px rgba(0, 0, 0, 0.25),
    0 1px 2px rgba(255, 255, 255, 0.08) inset,
    0 -1px 1px rgba(0, 0, 0, 0.25) inset;
}

/* Theme Toggle Icons */
#theme-toggle .sun-icon {
  display: none;
}
#theme-toggle .moon-icon {
  display: block;
}
[data-theme="dark"] #theme-toggle .sun-icon {
  display: block;
}
[data-theme="dark"] #theme-toggle .moon-icon {
  display: none;
}

/* Translucent components backgrounds in Dark Mode */
[data-theme="dark"] .lang-switch {
  background: rgba(30, 26, 23, 0.6);
}
[data-theme="dark"] .email-text {
  background: rgba(36, 32, 29, 0.95);
}
[data-theme="dark"] .nested-card {
  background: rgba(30, 26, 23, 0.5);
}
[data-theme="dark"] .gpa-simulator-panel {
  background: rgba(30, 26, 23, 0.6);
}
[data-theme="dark"] .simulator-option {
  border-bottom: 1px solid rgba(222, 203, 183, 0.1);
}
[data-theme="dark"] .toefl-node {
  background: rgba(30, 26, 23, 0.45);
}
[data-theme="dark"] .toefl-node.target {
  background: rgba(30, 26, 23, 0.75);
  border-color: rgba(222, 203, 183, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .score-chip {
  background: rgba(30, 26, 23, 0.7);
  border: 1px solid rgba(222, 203, 183, 0.15);
}
[data-theme="dark"] .filter-btn {
  background: rgba(222, 203, 183, 0.12);
  border: 1px solid rgba(222, 203, 183, 0.2);
  color: var(--text-primary);
}
[data-theme="dark"] .filter-btn.active {
  background: var(--card-dark) !important;
  color: var(--action-btn-text) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] .filter-btn:not(.active):hover {
  background: rgba(222, 203, 183, 0.25);
  color: var(--text-primary);
}
[data-theme="dark"] .project-tag {
  background: rgba(30, 26, 23, 0.7);
  border: 1px solid rgba(222, 203, 183, 0.15);
}
[data-theme="dark"] .project-highlights {
  border-top: 1px solid rgba(222, 203, 183, 0.1);
}
[data-theme="dark"] .volunteering-item {
  background: rgba(30, 26, 23, 0.5);
}
[data-theme="dark"] tr {
  background: rgba(30, 26, 23, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] th {
  border-bottom: 2px solid rgba(222, 203, 183, 0.15);
}
[data-theme="dark"] td {
  border-bottom: 1px solid rgba(222, 203, 183, 0.1);
}

/* Timeline */
[data-theme="dark"] .timeline::before {
  background: rgba(222, 203, 183, 0.1);
}
[data-theme="dark"] .timeline-item::before {
  border: 4px solid #1e1a17;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Organic Sand Dunes SVG Gradient Adaptation */
[data-theme="dark"] #dune-grad-1 stop:nth-child(1) { stop-color: #1e1a17 !important; }
[data-theme="dark"] #dune-grad-1 stop:nth-child(2) { stop-color: #191512 !important; }
[data-theme="dark"] #dune-grad-1 stop:nth-child(3) { stop-color: #13100e !important; }

[data-theme="dark"] #dune-grad-2 stop:nth-child(1) { stop-color: #1c1815 !important; }
[data-theme="dark"] #dune-grad-2 stop:nth-child(2) { stop-color: #241f1b !important; }
[data-theme="dark"] #dune-grad-2 stop:nth-child(3) { stop-color: #2e2823 !important; }

[data-theme="dark"] #dune-grad-3 stop:nth-child(1) { stop-color: #221d19 !important; }
[data-theme="dark"] #dune-grad-3 stop:nth-child(2) { stop-color: #181412 !important; }
[data-theme="dark"] #dune-grad-3 stop:nth-child(3) { stop-color: #0f0d0b !important; }

/* Location Card Globe SVG Adaptation */
[data-theme="dark"] #sphereGradMd stop:nth-child(1) { stop-color: rgba(255, 255, 255, 0.05) !important; }
[data-theme="dark"] #sphereGradMd stop:nth-child(2) { stop-color: rgba(186, 166, 149, 0.15) !important; }
[data-theme="dark"] #sphereGradMd stop:nth-child(3) { stop-color: rgba(44, 39, 36, 0.8) !important; }

[data-theme="dark"] .globe-container line,
[data-theme="dark"] .globe-container path {
  stroke: rgba(222, 203, 183, 0.15) !important;
}
[data-theme="dark"] .globe-container circle[fill^="url"] {
  stroke: rgba(222, 203, 183, 0.25) !important;
}
[data-theme="dark"] .globe-container circle[fill^="rgba(85, 74, 65"] {
  fill: rgba(222, 203, 183, 0.35) !important;
}

/* ==========================================================================
   Design Gallery Photo Browser Card & Interactive Dial
   ========================================================================== */
.photo-browser-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px !important;
}

.dial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
}

.dial-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dial-instruction {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.8;
  margin-top: 4px;
}

.spin-icon {
  animation: spinIconAnim 3s linear infinite;
}

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

.dial-counter {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(186, 166, 149, 0.15);
  padding: 2px 10px;
  border-radius: 12px;
}

.dial-core-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: #151515; /* Slightly lighter flat dark background */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); /* Flat design, removed outer drop shadow */
  display: flex;
  align-items: center;
  justify-content: center;
}

.aurora-ring-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0; /* Keep flush to prevent leaking outside */
  border-radius: 50%;
  pointer-events: none;
  transform-origin: center center;
  /* Snappy transition for real-time rotation */
  transition: transform 0.05s linear;
  overflow: hidden; /* Clips the glow to only the black ring, absolutely no leaking! */
}

.aurora-conic {
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: 50%;
  /* Warm amber/gold color to perfectly match the UI's earthy/beige theme */
  background: conic-gradient(from 0deg at 50% 50%, rgba(212, 163, 115, 0.95) 0deg, transparent 20deg, transparent 270deg, rgba(212, 163, 115, 0.1) 320deg, rgba(212, 163, 115, 0.95) 360deg);
  filter: blur(12px);
}

.aurora-peak {
  position: absolute;
  top: -5px; left: 50%; /* Positioned right against the top clipped edge */
  width: 50px; height: 35px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 0%, rgba(255, 200, 100, 1) 0%, transparent 60%);
  filter: blur(2px);
}

.inner-photo-circle {
  position: absolute;
  top: 20px; left: 20px; right: 20px; bottom: 20px; /* Thinner black ring (20px instead of 40px) */
  border-radius: 50%;
  background: #1c1c1e;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
  z-index: 5;
  perspective: 1000px;
}

.dial-photo-slides {
  position: relative;
  width: 100%; height: 100%;
}

.photo-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  width: 100%;
  height: 100%;
}

.photo-slide.active {
  opacity: 1;
  z-index: 3;
}

/* Animations */
.photo-slide.leaving-cw {
  animation: outToRightBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 2;
}
.photo-slide.entering-cw {
  animation: inFromLeftBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 3;
}
.photo-slide.leaving-ccw {
  animation: outToLeftBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 2;
}
.photo-slide.entering-ccw {
  animation: inFromRightBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 3;
}

@keyframes outToLeftBottom {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0deg); transform-origin: 50% 150%; }
  100% { opacity: 0; transform: translate3d(-80px, 50px, 0) scale(0.8) rotate(-30deg); transform-origin: 50% 150%; }
}
@keyframes inFromRightBottom {
  0% { opacity: 0; transform: translate3d(80px, 50px, 0) scale(0.8) rotate(30deg); transform-origin: 50% 150%; }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0deg); transform-origin: 50% 150%; }
}
@keyframes outToRightBottom {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0deg); transform-origin: 50% 150%; }
  100% { opacity: 0; transform: translate3d(80px, 50px, 0) scale(0.8) rotate(30deg); transform-origin: 50% 150%; }
}
@keyframes inFromLeftBottom {
  0% { opacity: 0; transform: translate3d(-80px, 50px, 0) scale(0.8) rotate(-30deg); transform-origin: 50% 150%; }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0deg); transform-origin: 50% 150%; }
}

.dial-touch-overlay {
  position: absolute;
  top: -20px; left: -20px; right: -20px; bottom: -20px;
  border-radius: 50%;
  z-index: 10;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.dial-touch-overlay:active {
  cursor: grabbing;
}


