/* karm.dev portfolio — page-specific styles, extends kit.css */

/* =======================================================
   DARK MODE — opt-in via [data-theme="dark"] on <html>
   ======================================================= */
html[data-theme="dark"] {
  --fg-1: #F8FAFC;
  --fg-2: #9CA3AF;
  --fg-3: #6B7280;
  --fg-inverse: #0F172E;

  --bg-1: #0A0F1F;
  --bg-2: #0F172E;
  --bg-3: #1A2A4A;
  --bg-invert: #F8FAFC;

  --brand: #F8FAFC;
  --brand-hover: #E5E7EB;
  --brand-muted: #94A3B8;

  --border-1: rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.18);
}
html[data-theme="dark"] body { background: var(--bg-1); }
html[data-theme="dark"] .site-nav {
  background: rgba(10, 15, 31, 0.75);
  border-bottom-color: rgba(255,255,255,0.06);
}
html[data-theme="dark"] .site-nav--open .site-nav__links {
  background: rgba(10, 15, 31, 0.97);
  border-bottom-color: rgba(255,255,255,0.06);
}
html[data-theme="dark"] .logo-text,
html[data-theme="dark"] .h1,
html[data-theme="dark"] .h2,
html[data-theme="dark"] .h3,
html[data-theme="dark"] .h4,
html[data-theme="dark"] .section__title,
html[data-theme="dark"] .hero__title,
html[data-theme="dark"] .project-card__title,
html[data-theme="dark"] .skill-card__title {
  color: var(--fg-1);
}
html[data-theme="dark"] .btn-primary {
  background: var(--accent);
  color: #0A0F1F;
}
html[data-theme="dark"] .btn-primary:hover {
  background: var(--emerald-300);
}
html[data-theme="dark"] .btn-secondary {
  background: transparent;
  color: var(--fg-1);
  border-color: rgba(255,255,255,0.3);
}
html[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--accent);
  color: var(--fg-1);
}
html[data-theme="dark"] .btn-ghost { color: var(--fg-1); }
html[data-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,0.06); }
html[data-theme="dark"] .form-input {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.12);
  color: var(--fg-1);
}
html[data-theme="dark"] select.form-input option {
  background: #0F1629;
  color: var(--fg-1);
}
html[data-theme="dark"] .form-input:focus {
  background: rgba(255,255,255,0.05);
  border-color: var(--accent);
}
html[data-theme="dark"] .site-footer {
  background: #06091A;
  border-top: 1px solid rgba(255,255,255,0.06);
}
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .skill-card,
html[data-theme="dark"] .card {
  background: var(--bg-2);
  border-color: rgba(255,255,255,0.06);
}
html[data-theme="dark"] .intro-anim { background: var(--bg-1); }
html[data-theme="dark"] .intro-anim__wordmark { color: var(--fg-1); }
html[data-theme="dark"] .section--alt { background: rgba(255,255,255,0.02); }

/* =======================================================
   NAV EXTENSIONS — language toggle + theme toggle
   ======================================================= */
.nav-utility {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.lang-toggle {
  display: inline-flex;
  background: var(--bg-3);
  border-radius: var(--radius-full);
  padding: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
html[data-theme="dark"] .lang-toggle { background: rgba(255,255,255,0.06); }
.lang-toggle button {
  background: transparent;
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--fg-2);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  transition: all var(--transition-fast);
}
.lang-toggle button.is-active {
  background: var(--bg-2);
  color: var(--fg-1);
  box-shadow: var(--shadow-xs);
}
html[data-theme="dark"] .lang-toggle button.is-active {
  background: var(--accent);
  color: #0A0F1F;
}

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-3);
  border: none;
  cursor: pointer;
  color: var(--fg-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.theme-toggle:hover {
  background: var(--bg-2);
  transform: rotate(15deg);
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .theme-toggle { background: rgba(255,255,255,0.06); color: var(--fg-1); }
html[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,0.10); }

/* =======================================================
   HERO variants
   ======================================================= */
.hero__terminal {
  max-width: 640px;
  margin: var(--space-8) auto 0;
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-lg);
  text-align: left;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 14px;
}
.hero__terminal-bar {
  padding: 10px 14px;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hero__terminal-bar span {
  width: 11px; height: 11px; border-radius: 50%;
}
.hero__terminal-bar span:nth-child(1) { background: #FF5F57; }
.hero__terminal-bar span:nth-child(2) { background: #FEBC2E; }
.hero__terminal-bar span:nth-child(3) { background: #28C840; }
.hero__terminal-bar-title {
  width: auto !important; height: auto !important; border-radius: 0 !important;
  background: none !important;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  margin-left: 12px;
}
.hero__terminal-body {
  padding: 20px 24px;
  color: #E5E7EB;
  line-height: 1.75;
}
.hero__terminal-body .prompt { color: var(--accent); }
.hero__terminal-body .comment { color: #6B7280; }
.hero__terminal-body .key { color: #93C5FD; }
.hero__terminal-body .str { color: #FCD34D; }
.hero__terminal-body .punc { color: #9CA3AF; }
.cursor-blink {
  display: inline-block;
  width: 8px; height: 16px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1s steps(2) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* Hero variant: split layout with code snippet */
.hero--split .hero__inner {
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  gap: var(--space-16);
  align-items: center;
  text-align: left;
}
.hero--split .hero__title { text-align: left; }
.hero--split .hero__lead { margin-left: 0; }
.hero--split .hero__actions { justify-content: flex-start; }
.hero--split .hero__meta { justify-content: flex-start; }
.hero--split .hero__terminal { margin: 0; }
@media (max-width: 900px) {
  .hero--split .hero__inner { grid-template-columns: 1fr; }
}

/* Hero variant: minimal editorial */
.hero--minimal .hero__inner { max-width: 960px; text-align: left; }
.hero--minimal .hero__title {
  font-size: clamp(56px, 7vw, 88px);
  line-height: 1.05;
  margin-bottom: var(--space-8);
}
.hero--minimal .hero__lead { margin-left: 0; max-width: 560px; font-size: 20px; }
.hero--minimal .hero__actions { justify-content: flex-start; }
.hero--minimal .hero__meta { justify-content: flex-start; }
.hero--minimal .hero__divider {
  width: 80px; height: 2px; background: var(--accent);
  margin: var(--space-8) 0 var(--space-8);
}

/* Stat strip below hero */
.stat-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8) var(--space-16);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
.stat-strip__item {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-1);
}
.stat-strip__num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--fg-1);
  letter-spacing: -1px;
  line-height: 1;
}
.stat-strip__num em { color: var(--accent); font-style: normal; }
.stat-strip__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}
@media (max-width: 720px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

/* =======================================================
   EXPERIENCE TIMELINE
   ======================================================= */
.timeline {
  display: grid;
  gap: var(--space-6);
  position: relative;
  padding-left: var(--space-8);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border-1);
}
.timeline__item {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
  transition: all var(--transition-normal);
}
.timeline__item:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}
.timeline__dot {
  position: absolute;
  left: -33px; top: 30px;
  width: 16px; height: 16px;
  background: var(--bg-1);
  border: 3px solid var(--accent);
  border-radius: 50%;
}
.timeline__item--current .timeline__dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.15);
}
.timeline__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.timeline__role {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--fg-1);
  margin: 0;
}
.timeline__company {
  color: var(--accent);
  font-weight: 600;
}
.timeline__date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-3);
  letter-spacing: 0.3px;
}
.timeline__body {
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}
.timeline__body ul { margin: 8px 0 0; padding-left: 18px; }
.timeline__body li { margin-bottom: 4px; }

/* =======================================================
   PROJECT CARD VISUAL (custom for real projects)
   ======================================================= */
.project-card__image--kuira {
  background:
    radial-gradient(circle at 30% 20%, rgba(236, 72, 153, 0.55), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.45), transparent 55%),
    linear-gradient(135deg, #1E1B4B, #312E81);
}
.project-card__image--aduana {
  background:
    radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.25), transparent 55%),
    radial-gradient(circle at 85% 75%, rgba(59, 130, 246, 0.25), transparent 55%),
    linear-gradient(135deg, #0F172E, #1A2A4A);
}
.project-card__image--antros {
  background:
    radial-gradient(circle at 75% 25%, rgba(168, 85, 247, 0.55), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.40), transparent 55%),
    linear-gradient(135deg, #1E0A35, #0F172E);
}
.project-card__image--kuira::before,
.project-card__image--aduana::before,
.project-card__image--antros::before { display: none; }

.project-card__monogram {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 72px;
  line-height: 1;
  color: rgba(255,255,255,0.98);
  letter-spacing: -2px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.35));
}
.project-card__kind {
  position: absolute;
  bottom: 14px; left: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.project-card__url {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
}

/* =======================================================
   SKILLS — swap from cards to grouped columns
   ======================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
@media (max-width: 860px) {
  .skills-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}
.skills-col {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-xs);
}
.skills-col__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-1);
}
.skills-col__glyph {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-md);
  font-size: 22px;
}
html[data-theme="dark"] .skills-col__glyph {
  background: rgba(16, 185, 129, 0.12);
}
.skills-col__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--fg-1);
  margin: 0;
}
.skills-col__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 var(--space-3);
}
.skills-col__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-4);
}
.skills-col__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg-3);
  color: var(--fg-1);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-1);
}
html[data-theme="dark"] .skills-col__tag {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

/* =======================================================
   AVAILABILITY PILL (hero + contact)
   ======================================================= */
.avail-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.3px;
}
html[data-theme="dark"] .avail-pill { background: rgba(16, 185, 129, 0.12); }
.avail-pill__dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* =======================================================
   TWEAKS PANEL
   ======================================================= */
.tweaks-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 300px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 9998;
  font-family: var(--font-sans);
  overflow: hidden;
  animation: fadeInUp 0.3s ease-out;
}
.tweaks-panel__head {
  padding: 14px 18px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
html[data-theme="dark"] .tweaks-panel__head { background: rgba(255,255,255,0.03); }
.tweaks-panel__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-1);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0;
}
.tweaks-panel__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.tweak-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.tweak-row__label {
  font-size: 13px;
  color: var(--fg-1);
  font-weight: 500;
}
.tweak-row__hint {
  font-size: 11px;
  color: var(--fg-3);
  font-family: var(--font-mono);
}
.switch {
  width: 38px; height: 22px;
  background: var(--border-2);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  padding: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.switch.is-on { background: var(--accent); }
.switch.is-on::after { transform: translateX(16px); }

.tweaks-panel__section {
  padding-top: 10px;
  border-top: 1px solid var(--border-1);
  margin-top: 4px;
}
.tweaks-panel__section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

/* =======================================================
   RESPONSIVE TWEAKS
   ======================================================= */
@media (max-width: 768px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); padding: 0 var(--space-4) var(--space-12); }
  .timeline { padding-left: var(--space-6); }
  .tweaks-panel { width: calc(100% - 32px); right: 16px; bottom: 16px; }
  .nav-utility .lang-toggle { display: none; }
  .hero--split .hero__inner { gap: var(--space-8); }
}
