/* ─── RESET & BASE ────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-size: 16px;
  width: 100%;
  min-height: 100vh;
}

body {
  background-color: #f2ede4;
  background-image:
    linear-gradient(rgba(160, 150, 135, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 150, 135, 0.22) 1px, transparent 1px);
  background-size: 32px 32px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ─── ROOT CONTAINER ─────────────────────────────────────── */
#root {
  color: #2a2520;
  font-family: 'Nunito', 'Google Sans', sans-serif;
  font-weight: 700;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: transparent;
}

/* ─── CRT EFFECTS (kept but invisible on beige — only terminal uses them) ── */
#scanlines,
#flicker,
#vignette,
#ambient-bg {
  display: none;
}

/* ─── BOOT SCREEN ────────────────────────────────────────── */
#boot {
  background: #0a0a0a;
  padding: 28px 32px 48px;
  min-height: 100vh;
  position: relative;
  width: 100%;
}

#blines {
  overflow: hidden;
}

.bl {
  font-size: 13px;
  line-height: 1.9;
  white-space: pre;
  font-family: 'Nunito', 'Google Sans', sans-serif;
  font-weight: 700;
}

.bl.d { color: #3a3a3a; }
.bl.n { color: #909090; }
.bl.b { color: #e8e8e8; }
.bl.w { color: #d4a040; }
.bl.c { color: #aaaaaa; }
.bl.ok { color: #70a050; }
.bl.hi { color: #d4b060; }

#skip-hint {
  position: fixed;
  bottom: 20px;
  right: 28px;
  font-size: 11px;
  color: #484848;
  cursor: pointer;
  transition: color 0.25s;
  letter-spacing: 0.05em;
  z-index: 600;
}

#skip-hint:hover {
  color: #aaaaaa;
}

/* ─── WIPE TRANSITION ────────────────────────────────────── */
#wipe {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  transform: scaleY(0);
  transform-origin: top;
  z-index: 400;
}

/* ─── CV WRAPPER ─────────────────────────────────────────── */
#cv {
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* ─── HERO SECTION ───────────────────────────────────────── */
#hero-section {
  padding: 48px 60px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.cv-meta {
  font-size: 11px;
  color: #9a9080;
  margin-bottom: 20px;
  letter-spacing: 0.06em;
}

.hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(60px, 10vw, 96px);
  font-weight: 400;
  color: #1a1510;
  letter-spacing: 0.12em;
  line-height: 1;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.10);
}

/* ─── HERO NAME ROW + SOCIAL ICONS ──────────────────────── */
.hero-name-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-socials {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 6px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-socials.visible {
  opacity: 1;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease, filter 0.22s ease;
  text-decoration: none;
}

.social-link:hover {
  transform: translateY(-3px);
}

.social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
  transition: fill 0.22s ease;
}

/* ─── PER-ICON BRAND COLOURS ─────────────────────────────── */
.social-link[aria-label="LinkedIn"] { color: #0A66C2; }
.social-link[aria-label="LinkedIn"]:hover { filter: drop-shadow(0 0 6px rgba(10,102,194,0.6)); }

.social-link[aria-label="GitHub"] { color: #1a1510; }
.social-link[aria-label="GitHub"]:hover { filter: drop-shadow(0 0 6px rgba(26,21,16,0.4)); }

.social-link[aria-label="Gmail"] { color: #EA4335; }
.social-link[aria-label="Gmail"]:hover { filter: drop-shadow(0 0 6px rgba(234,67,53,0.6)); }

.social-link[aria-label="TryHackMe"] { color: #E31D24; }
.social-link[aria-label="TryHackMe"]:hover { filter: drop-shadow(0 0 6px rgba(227,29,36,0.6)); }

.hero-sub {
  font-size: 12.5px;
  color: #8a7f72;
  margin-top: 8px;
  letter-spacing: 0.09em;
}

.hero-sub a {
  color: #8a7f72;
  text-decoration: none;
}

.hero-sub a:hover {
  color: #4a3f32;
}

.hero-tag {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  color: #4a4038;
  border-left: 3px solid #8a7868;
  padding-left: 14px;
  line-height: 2;
}

/* ─── HERO RIGHT COL (lang btn + socials) ──────────── */
.hero-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 6px;
}

/* ─── LANGUAGE TOGGLE BUTTON ───────────────────── */
#lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.5);
  border: 1px solid #c8bfb0;
  color: #4a4038;
  font-family: 'Nunito', 'Google Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

#lang-btn:hover {
  background: rgba(255,255,255,0.85);
  border-color: #9a8878;
  color: #1a1510;
}

.lang-flag {
  font-size: 15px;
  line-height: 1;
}

/* ─── CITY DIVIDER ────────────────────────────── */
#city-divider {
  width: 100%;
  height: 260px;
  position: relative;
  overflow: hidden;
  display: none;
  background: #d8d0c4;
  max-width: 1100px;
  margin: 0 auto;
}

#city-divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: sepia(20%) brightness(0.85) contrast(1.1);
  display: block;
}

#city-fade-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to bottom, #f2ede4, transparent);
}

#city-fade-bot {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to top, #f2ede4, transparent);
}

/* City label — now sits BELOW the image */
#city-label {
  max-width: 1100px;
  margin: 10px auto 4px;
  display: block;
  font-size: 11px;
  color: #5a5048;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  border-left: 3px solid #8a7868;
  padding: 4px 0 4px 14px;
}

/* ─── CV BODY ────────────────────────────────────────────── */
#cv-body {
  padding: 20px 60px 40px;
  opacity: 0;
  transition: opacity 0.6s ease;
  max-width: 1100px;
  margin: 0 auto;
}

/* sections */
.sec {
  margin-top: 28px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.sec.on {
  opacity: 1;
  transform: translateY(0);
}

.sec-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.sec-lbl {
  font-size: 10px;
  color: #8a8070;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sec-ln {
  flex: 1;
  height: 1px;
  background: #d4c8b8;
}

/* ─── TAGS / SKILLS ──────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid #ccc0ae;
  color: #6a5e50;
  cursor: default;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.35);
}

.tag::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.0);
  transition: background 0.18s;
}

.tag:hover {
  border-color: #9a8878;
  color: #2a1f14;
  background: rgba(255,255,255,0.6);
}

.tag:hover::before {
  background: rgba(0, 0, 0, 0.02);
}

.tag.hi {
  border-color: #b8a890;
  color: #3a2e22;
  background: rgba(255,255,255,0.4);
}

.tag.hi:hover {
  border-color: #8a7868;
  color: #1a1008;
}

.tag.cert {
  border-color: #a8c090;
  color: #4a7030;
  background: rgba(168,192,144,0.12);
}

.tag.cert:hover {
  border-color: #78a058;
  color: #2a5018;
}

.tag.lang {
  border-color: #a0a0c8;
  color: #404088;
  background: rgba(160,160,200,0.12);
}

.tag.lang:hover {
  border-color: #7878a8;
  color: #202068;
}

/* tag group label */
.tag-group {
  margin-bottom: 10px;
}

.tag-group-lbl {
  font-size: 10px;
  color: #8a8070;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ─── PROJECTS / ENTRIES ─────────────────────────────────── */
.proj {
  border-left: 2px solid #d4c8b8;
  padding: 8px 0 8px 16px;
  margin-bottom: 13px;
  transition: border-color 0.22s;
  cursor: default;
  position: relative;
}

.proj::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #9a8878, transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.proj:hover {
  border-left-color: transparent;
}

.proj:hover::before {
  opacity: 1;
}

.proj-name {
  font-size: 13.5px;
  color: #1a1510;
}

.proj-meta {
  font-size: 11px;
  color: #8a7f72;
  margin-top: 3px;
  letter-spacing: 0.05em;
}

.proj-desc {
  font-size: 12px;
  color: #5a5048;
  margin-top: 6px;
  line-height: 1.8;
}

.proj-chips {
  margin-top: 7px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.chip {
  font-size: 10.5px;
  color: #7a7060;
  border: 1px solid #ccc0ae;
  padding: 2px 8px;
  background: rgba(255,255,255,0.3);
  transition: color 0.15s, border-color 0.15s;
}

.chip:hover {
  color: #2a2018;
  border-color: #9a8878;
}

/* ─── PROGRESS BARS ──────────────────────────────────────── */
.prog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}

.prog-lbl {
  font-size: 12px;
  color: #5a5048;
  width: 160px;
  flex-shrink: 0;
}

.prog-bar {
  flex: 1;
  height: 2px;
  background: #d4c8b8;
  position: relative;
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  background: #8a7868;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.prog-pct {
  font-size: 10.5px;
  color: #8a8070;
  width: 36px;
  text-align: right;
}

/* ─── TERMINAL CMD  (stays dark/black) ───────────────────── */
#cmd-wrap {
  margin-top: 36px;
  margin-bottom: 44px;
  border: 1px solid #1a1a1a;
  padding: 0 0 20px;
  opacity: 0;
  transition: opacity 0.5s;
  position: relative;
  background: #0d0d0d;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.22),
    0 2px 8px rgba(0,0,0,0.14);
  border-radius: 8px;
  overflow: hidden;
}

/* macOS-style titlebar */
.term-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px 10px;
  background: #1c1c1c;
  border-bottom: 1px solid #111;
  margin-bottom: 16px;
}

.term-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.9;
}

.term-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: #888;
  letter-spacing: 0.04em;
  padding-right: 40px;
  font-family: 'Nunito', 'Google Sans', sans-serif;
}

/* Inner content pad */
#cmd-wrap > *:not(.term-titlebar) {
  padding-left: 22px;
  padding-right: 22px;
}

#cmd-wrap.on {
  opacity: 1;
}

.cmd-hint {
  font-size: 11.5px;
  color: #606060;
  margin-bottom: 10px;
  line-height: 1.8;
}

.cmd-hint b {
  color: #909090;
  font-weight: 400;
}

#cmd-history {
  margin-bottom: 6px;
}

.cmd-history-line {
  font-size: 12px;
  color: #686868;
  line-height: 1.7;
  white-space: pre-wrap;
}

.cmd-history-line.cmd-echo {
  color: #707070;
}

#cmd-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#cmd-ps {
  font-size: 12px;
  color: #909090;
  white-space: nowrap;
}

#cmd-in {
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Nunito', 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #d0d0d0;
  flex: 1;
  caret-color: #d0d0d0;
}

#cmd-out {
  margin-top: 12px;
  font-size: 12px;
  color: #a0a0a0;
  line-height: 1.85;
  min-height: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}

#cmd-out.er {
  color: #c06060;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: #e8e0d4;
}

::-webkit-scrollbar-thumb {
  background: #c0b0a0;
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9a8878;
}

/* ─── GLITCH ANIMATION ───────────────────────────────────── */
@keyframes glitch-shift {
  0%   { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 0); }
  20%  { clip-path: inset(50% 0 30% 0); transform: translate(2px, 0); }
  40%  { clip-path: inset(70% 0 10% 0); transform: translate(-1px, 0); }
  60%  { clip-path: inset(10% 0 80% 0); transform: translate(1px, 0); }
  80%  { clip-path: inset(40% 0 40% 0); transform: translate(-2px, 0); }
  100% { clip-path: inset(20% 0 60% 0); transform: translate(0, 0); }
}

.glitch-active {
  position: relative;
}

.glitch-active::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: #2a2520;
  animation: glitch-shift 0.18s steps(2) forwards;
  opacity: 0.35;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  #hero-section,
  #cv-body {
    padding-left: 24px;
    padding-right: 24px;
  }

  #boot {
    padding: 20px 20px 40px;
  }

  .hero-name {
    font-size: 38px;
  }
}

@media (max-width: 480px) {
  #hero-section,
  #cv-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-name {
    font-size: 32px;
  }
}