/* ═══════════════════════════════════════════════════════
   HACKER-MINIMALIST PORTFOLIO — DESIGN SYSTEM
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');

/* ── Tokens ── */
:root {
  --bg: #000000;
  --fg: #d4d4d4;
  --fg-dim: #6b6b6b;
  --fg-bright: #ffffff;
  --accent: #00ff41;
  --accent-dim: rgba(0, 255, 65, 0.15);
  --red: #ff5f56;
  --yellow: #ffbd2e;
  --blue: #5af;
  --font: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', monospace;
  --max-w: 720px;
  --lh: 1.65;
  --gap: 2rem;
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

html {
  scrollbar-color: #222 var(--bg);
}

/* ── Selection ── */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── CRT Scanline Overlay ── */
.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 2px,
      rgba(0, 0, 0, 0.15) 2px,
      rgba(0, 0, 0, 0.15) 4px);
  opacity: 0.03;
}

/* ── Boot Screen ── */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  font-family: var(--font);
  font-size: 0.82rem;
  color: var(--accent);
  line-height: 1.8;
  transition: opacity 0.6s ease;
}

.boot-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.boot-screen__log {
  max-width: 600px;
  margin: 0 auto;
}

.boot-screen__line {
  opacity: 0;
  animation: boot-line-in 0.15s ease forwards;
}

@keyframes boot-line-in {
  to {
    opacity: 1;
  }
}

.boot-screen__line--ok {
  color: var(--accent);
}

.boot-screen__line--info {
  color: var(--fg-dim);
}

.boot-screen__line--warn {
  color: var(--yellow);
}

.boot-screen__line--accent {
  color: var(--fg-bright);
  font-weight: 700;
}

.boot-screen__cursor {
  color: var(--accent);
  animation: blink 0.6s step-end infinite;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

/* ── Sections ── */
section {
  margin-bottom: var(--gap);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Section Dividers ── */
.divider {
  color: var(--fg-dim);
  margin: 2.5rem 0 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}

.divider::before {
  content: '// ';
  color: var(--fg-dim);
}

/* ── Header ── */
.header {
  margin-bottom: 3rem;
  opacity: 1;
  transform: none;
}

.header__name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg-bright);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.header__cursor {
  display: inline-block;
  width: 2px;
  height: 1.4em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.header__tagline {
  color: var(--fg-dim);
  font-size: 0.85rem;
  font-weight: 300;
  margin-top: 0.5rem;
}

.header__tagline span {
  color: var(--accent);
}

/* ── Status Bar ── */
.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: var(--fg-dim);
  margin-top: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
}

.status-bar__item::before {
  content: attr(data-label);
  color: var(--fg-dim);
  margin-right: 0.35rem;
}

.status-bar__item {
  color: var(--fg);
}

/* ── About Highlights ── */
.about__highlights {
  list-style: none;
  padding-left: 1rem;
  margin: 0.75rem 0;
}

.about__highlights li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.35rem;
  color: var(--fg);
  font-size: 0.85rem;
}

.about__highlights li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.about strong {
  color: var(--accent);
  font-weight: 500;
}

/* ── About ── */
.about p {
  color: var(--fg);
  font-size: 0.85rem;
  max-width: 65ch;
}

.about p+p {
  margin-top: 0.75rem;
}

/* ── Skills ── */
.skills__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skills__tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #222;
  border-radius: 2px;
  color: var(--fg);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: default;
}

.skills__tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Projects ── */
.projects__list {
  list-style: none;
}

.project {
  padding: 0.85rem 0;
  border-bottom: 1px solid #111;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  align-items: start;
}

.project:last-child {
  border-bottom: none;
}

.project__name {
  font-weight: 500;
  color: var(--fg-bright);
  font-size: 0.85rem;
}

.project__name a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.project__name a:hover {
  opacity: 0.7;
}

.project__name a::after {
  content: ' ↗';
  font-size: 0.7em;
  opacity: 0.6;
}

.project__desc {
  font-size: 0.78rem;
  color: var(--fg-dim);
  grid-column: 1 / -1;
}

.project__tech {
  font-size: 0.7rem;
  color: var(--fg-dim);
  opacity: 0.65;
  justify-self: end;
  white-space: nowrap;
}

/* ── Experience ── */
.experience__list {
  list-style: none;
}

.exp {
  padding: 0.75rem 0;
  border-bottom: 1px solid #111;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem;
  align-items: baseline;
}

.exp:last-child {
  border-bottom: none;
}

.exp__role {
  font-weight: 500;
  color: var(--fg-bright);
  font-size: 0.85rem;
}

.exp__company {
  color: var(--accent);
  font-size: 0.85rem;
}

.exp__period {
  font-size: 0.75rem;
  color: var(--fg-dim);
  justify-self: end;
  white-space: nowrap;
}

.exp__desc {
  font-size: 0.78rem;
  color: var(--fg-dim);
  grid-column: 1 / -1;
  margin-top: 0.2rem;
}

/* ── Writing / Blog ── */
.writing__list {
  list-style: none;
}

.writing__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid #0a0a0a;
  font-size: 0.82rem;
}

.writing__item:last-child {
  border-bottom: none;
}

.writing__item a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}

.writing__item a:hover {
  color: var(--accent);
}

.writing__date {
  color: var(--fg-dim);
  font-size: 0.72rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* ── Links ── */
.links__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.82rem;
}

.links__list a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.links__list a:hover {
  opacity: 0.65;
}

.links__list a::before {
  content: '→ ';
  opacity: 0.4;
}

/* ── Footer ── */
.footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #111;
  font-size: 0.7rem;
  color: var(--fg-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  opacity: 1;
  transform: none;
}

.footer span {
  opacity: 0.5;
}

/* ── Terminal Overlay (Easter Egg) ── */
.terminal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.terminal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.terminal {
  width: min(600px, 90vw);
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 255, 65, 0.05);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #111;
  border-bottom: 1px solid #1a1a1a;
}

.terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal__dot--red {
  background: var(--red);
}

.terminal__dot--yellow {
  background: var(--yellow);
}

.terminal__dot--green {
  background: var(--accent);
}

.terminal__title {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: var(--fg-dim);
}

.terminal__body {
  padding: 1rem;
  min-height: 200px;
  max-height: 50vh;
  overflow-y: auto;
  font-size: 0.78rem;
  line-height: 1.6;
}

.terminal__line {
  margin-bottom: 0.25rem;
}

.terminal__line--prompt::before {
  content: '❯ ';
  color: var(--accent);
}

.terminal__line--output {
  color: var(--fg-dim);
  padding-left: 1.1rem;
}

.terminal__input-line {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.terminal__input-line::before {
  content: '❯ ';
  color: var(--accent);
  flex-shrink: 0;
}

.terminal__input {
  background: none;
  border: none;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.78rem;
  outline: none;
  width: 100%;
  caret-color: var(--accent);
}

/* ── Anti-Inspect Warning ── */
.devtools-warning {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-family: var(--font);
}

.devtools-warning.active {
  opacity: 1;
  pointer-events: all;
}

.devtools-warning__icon {
  font-size: 3rem;
  animation: warning-pulse 2s ease-in-out infinite;
}

@keyframes warning-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.devtools-warning__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
}

.devtools-warning__text {
  font-size: 0.8rem;
  color: var(--fg-dim);
  text-align: center;
  max-width: 400px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  html {
    font-size: 13px;
  }

  .container {
    padding: 2.5rem 1rem 4rem;
  }

  .project {
    grid-template-columns: 1fr;
  }

  .project__tech {
    justify-self: start;
  }

  .exp {
    grid-template-columns: 1fr;
  }

  .exp__period {
    justify-self: start;
  }

  .status-bar {
    gap: 0.75rem;
  }

  .writing__item {
    flex-direction: column;
    gap: 0.15rem;
  }

  .writing__date {
    margin-left: 0;
  }
}

/* ── CTF Flag Toast ── */
.flag-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 8000;
  background: #0a0a0a;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font);
  font-size: 0.82rem;
  color: var(--fg);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.15), 0 8px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  white-space: nowrap;
}

.flag-toast.show {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.flag-toast__icon {
  font-size: 1.2rem;
}

.flag-toast__text code {
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.03em;
}