/* ═══════════════════════════════════════════
   TUI HR CARD — STYLES
   ═══════════════════════════════════════════ */

:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #21262d;
  --border:    #30363d;
  --green:     #39d353;
  --green-dim: #238636;
  --amber:     #e3b341;
  --text:      #c9d1d9;
  --text-dim:  #8b949e;
  --text-bright: #f0f6fc;
  --accent:    #39d353;
  --cursor:    #39d353;
  --font: 'Courier New', 'Lucida Console', 'Consolas', monospace;
  --radius:    0px;
  --transition: 0.15s ease;
}

[data-theme="light"] {
  --bg:        #f6f8fa;
  --bg2:       #ffffff;
  --bg3:       #eaeef2;
  --border:    #d0d7de;
  --green:     #1a7f37;
  --green-dim: #2da44e;
  --amber:     #9a6700;
  --text:      #24292f;
  --text-dim:  #57606a;
  --text-bright: #1f2328;
  --accent:    #1a7f37;
  --cursor:    #1a7f37;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }

/* ── HIDDEN ── */
.hidden { display: none !important; }

/* ══════════════════════════════
   BOOT SCREEN
══════════════════════════════ */
#boot {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 2rem 3rem;
  z-index: 999;
  font-family: var(--font);
  color: var(--green);
  font-size: 13px;
  line-height: 1.8;
}

#boot-lines { white-space: pre; }
#boot-cursor {
  display: inline-block;
  animation: blink 0.7s step-end infinite;
  color: var(--green);
  margin-top: 4px;
}

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
#header {
  position: sticky; top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0.6rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  color: var(--green);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand::before { content: '> '; color: var(--text-dim); }

nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border: 1px solid transparent;
  transition: all var(--transition);
  font-size: 12px;
  white-space: nowrap;
}
nav a::before { content: '['; color: var(--border); }
nav a::after  { content: ']'; color: var(--border); }
nav a:hover {
  color: var(--green);
  border-color: var(--green-dim);
  background: var(--bg2);
}

.header-controls { display: flex; gap: 0.5rem; margin-left: auto; flex-shrink: 0; }

.tui-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 12px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: all var(--transition);
}
.tui-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--bg2);
}

/* ══════════════════════════════
   LAYOUT
══════════════════════════════ */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }

section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}
section:last-child { border-bottom: none; }

/* ── SECTION HEADER ── */
.section-title {
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-title::before { content: '##'; color: var(--green); font-weight: 700; }
.section-title::after  {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ══════════════════════════════
   HERO BLOCK
══════════════════════════════ */
.hero-block {
  padding: 2.5rem 0 2rem;
}

.hero-prompt {
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 0.5rem;
}
.hero-prompt::before { content: '$ whoami'; color: var(--green); }

.hero-name {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  min-height: 1.3em;
}

.hero-title {
  color: var(--amber);
  font-size: 1rem;
  margin: 0.4rem 0 0.2rem;
  min-height: 1.4em;
}

.hero-subtitle {
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 1.5rem;
}
.hero-subtitle::before { content: '# '; color: var(--border); }

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  transition: all var(--transition);
}
.hero-link:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--bg2);
}
.hero-link::before { content: '→ '; color: var(--green-dim); }

/* ══════════════════════════════
   TEXT BLOCK
══════════════════════════════ */
.text-body {
  color: var(--text);
  max-width: 680px;
  line-height: 1.75;
  border-left: 2px solid var(--green-dim);
  padding-left: 1rem;
}

/* ══════════════════════════════
   SKILLS / PROGRESS
══════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  max-width: 680px;
}

.skill-item { display: flex; flex-direction: column; gap: 0.25rem; }

.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}
.skill-label span:last-child { color: var(--green); }

.skill-bar-wrap {
  height: 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--green-dim);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  position: relative;
}
.skill-bar-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--green);
}

.skill-bar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 0.4rem;
  font-size: 10px;
  color: var(--bg);
  pointer-events: none;
  font-weight: 500;
  letter-spacing: 0.05em;
  overflow: hidden;
  white-space: nowrap;
}

/* ══════════════════════════════
   TIMELINE / EXPERIENCE
══════════════════════════════ */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px dashed var(--border);
  position: relative;
}
.timeline-item:last-child { border-bottom: none; }

.timeline-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 1rem;
  border-right: 1px solid var(--border);
  position: relative;
}
.timeline-left::after {
  content: '●';
  position: absolute;
  right: -5px;
  top: 2px;
  font-size: 8px;
  color: var(--green);
  background: var(--bg);
  line-height: 1;
}

.timeline-company {
  color: var(--text-bright);
  font-weight: 500;
  font-size: 13px;
}
.timeline-period {
  color: var(--green);
  font-size: 11px;
}

.timeline-role {
  color: var(--amber);
  font-size: 12px;
  margin-bottom: 0.4rem;
}
.timeline-desc {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.65;
}

/* ══════════════════════════════
   CASES
══════════════════════════════ */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.case-card {
  border: 1px solid var(--border);
  padding: 1.25rem;
  background: var(--bg2);
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}
.case-card:hover {
  border-color: var(--green-dim);
  background: var(--bg3);
}
.case-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: var(--green-dim);
}

.case-tag {
  display: inline-block;
  color: var(--green);
  font-size: 10px;
  border: 1px solid var(--green-dim);
  padding: 0.1rem 0.4rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
}
.case-title {
  color: var(--text-bright);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 0.5rem;
}
.case-desc {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
}

/* ══════════════════════════════
   CONTACTS LINKS
══════════════════════════════ */
.contacts-lead {
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 1rem;
}
.contacts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  transition: all var(--transition);
}
.contact-link:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--bg2);
}
.contact-link::before { content: '↗ '; color: var(--green-dim); }

/* ══════════════════════════════
   FORM
══════════════════════════════ */
.form-wrap { max-width: 560px; }

.form-field { margin-bottom: 1rem; }

.form-field label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.form-field label::before { content: '> '; color: var(--green-dim); }

.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 0.5rem 0.75rem;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--green);
  background: var(--bg3);
}
.form-field textarea { min-height: 100px; }

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--green);
  color: var(--green);
  font-family: var(--font);
  font-size: 13px;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
}
.form-submit:hover {
  background: var(--green);
  color: var(--bg);
}
.form-submit::before { content: '$ '; opacity: 0.6; }
.form-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.form-status {
  margin-top: 0.75rem;
  font-size: 12px;
  padding: 0.4rem 0.75rem;
  border-left: 2px solid var(--green);
  display: none;
}
.form-status.ok  { color: var(--green); border-color: var(--green); }
.form-status.err { color: #f85149;      border-color: #f85149; }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11px;
  text-align: center;
}
.footer::before { content: '# '; color: var(--border); }

/* ══════════════════════════════
   TYPEWRITER CURSOR
══════════════════════════════ */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--cursor);
  vertical-align: text-bottom;
  animation: blink 0.7s step-end infinite;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ══════════════════════════════
   FADE-IN ANIMATION
══════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 640px) {
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 0.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
  }
  .timeline-left::after { display: none; }
  nav { display: none; }
  .hero-name { font-size: 1.5rem; }
}