/* Import a clean, high-contrast font for dark backgrounds */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ========== CSS RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== COLOR VARIABLES (Dark Mode Forced) ========== */
:root {
  --bg: #0b0c10;
  --card: #11131a;
  --muted: #9da3b0;
  --text: #f5f7fa;
  --brand: #3b82f6;
  --chip: #1b2030;
  --border: #1f2330;
}

/* ========== GLOBAL STYLES ========== */
html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.01em;
  color-scheme: dark; /* Forces dark mode in browsers */
}

body {
  height: 100%;
  font-family: 'Poppins', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ========== LINKS ========== */
a {
  color: var(--brand);
  text-decoration: none;
}

/* ========== LAYOUT ========== */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.nav .name {
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* ========== TYPING EFFECT ========== */
.typing {
  font-size: 0.95rem;
  color: var(--muted);
  overflow: hidden;
  border-right: 2px solid var(--muted);
  width: 0;
  display: inline-block;
  white-space: nowrap;
  animation: typing 10s steps(250, end) infinite, blink-caret step-end infinite;
}

@media (max-width: 480px) {
  .typing {
    white-space: normal;
    width: auto;
    animation: none;
  }
}

@keyframes typing {
  0%, 100% {
    width: 0;
  }
  50% {
    width: 100%;
  }
}

@keyframes blink-caret {
  0%, 100% {
    border-color: transparent;
  }
  50% {
    border-color: var(--muted);
  }
}

/* ========== TAGS / CHIPS ========== */
.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--border);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--chip);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  transition: all 0.3s ease;
  cursor: default;
}

.chip:hover {
  background: #0ea5e9;
  transform: translateY(-3px);
  cursor: pointer;
}

/* ========== GRID & CARDS ========== */
.grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 960px) {
  .grid-2 {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-top: 12px;
}

/* ========== KPI CARDS ========== */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 12px;
}

@media (max-width: 680px) {
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi {
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

/* ========== HEADINGS ========== */
h1 {
  font-size: 42px;
  line-height: 1.15;
  margin: 10px 0 6px;
}

h2 {
  font-size: 22px;
  margin: 0 0 14px;
}

h3 {
  font-size: 16px;
  margin: 0;
}

.muted {
  color: var(--muted);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #0ea5e9;
  transform: translateY(-3px);
  cursor: pointer;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ========== ROWS ========== */
.row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 600px) {
  .row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ========== AVATAR ========== */
.avatar {
  width: 100px;
  height: 100px;
  border-radius: 14px;
  background-image: url("media/profile.JPG");
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

/* ========== AVATAR MODAL ========== */
.avatar-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.avatar-modal-img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.avatar-modal:target {
  opacity: 1;
  pointer-events: auto;
}

.close-area {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ========== LISTS ========== */
.list {
  display: grid;
  gap: 14px;
}

.li {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
}

.li .top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
}

/* ========== MEDIA ========== */
.media {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0ea5e9, transparent);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.media-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ========== FOOTER ========== */
footer {
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

/* ========== ACCESSIBILITY ========== */
.sr {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.highlight {
  color: white;
  font-weight: bold;
}
