/* ==========================================================
   Tokens
   ========================================================== */
:root {
  --bg: #0a0c11;
  --surface: #12151d;
  --surface-2: #171b25;
  --border: #262c3a;
  --text: #e7ecf3;
  --text-muted: #8992a6;
  --accent: #7cff6b;       /* terminal green */
  --accent-dim: #4fae46;
  --accent-2: #ff5d5d;     /* alert / red dot */
  --accent-3: #ffcc66;     /* yellow dot */
  --accent-4: #55c8ff;     /* links secondary glow */

  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 80px;
  position: relative;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(124,255,107,0.06), transparent 55%),
    linear-gradient(var(--bg), var(--bg));
}

@media (min-width: 640px) {
  body { padding-top: 64px; }
}

/* ambient glow behind terminal */
.glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(closest-side, rgba(124,255,107,0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* subtle scanline / crt texture over whole page */
.crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.018) 0px,
    rgba(255,255,255,0.018) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.5;
}

::selection { background: var(--accent); color: #06210a; }

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ==========================================================
   Terminal shell
   ========================================================== */
.terminal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 30px 60px -20px rgba(0,0,0,0.6),
    0 0 80px -30px rgba(124,255,107,0.15);
  overflow: hidden;
  animation: rise 0.6s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.terminal__dots { display: flex; gap: 7px; flex-shrink: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--red { background: var(--accent-2); }
.dot--yellow { background: var(--accent-3); }
.dot--green { background: var(--accent); }

.terminal__path {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal__status {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.7;
}

.terminal__body {
  padding: 32px 24px 8px;
}

.terminal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================
   Profile
   ========================================================== */
.profile {
  text-align: center;
  margin-bottom: 28px;
}

.profile__avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 109px 18px;
}

.profile__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  border: 2px solid var(--border);
  display: block;
}

.profile__status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 8px var(--accent);
}

.profile__name {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: #fff;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

.cursor--inline { margin-left: 2px; }

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

.profile__tagline {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 14px;
  min-height: 18px;
}

.profile__bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 18px;
  padding: 0 6px;
}

.profile__contact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.profile__contact:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: rgba(124,255,107,0.06);
}

.profile__contact .icon { width: 14px; height: 14px; flex-shrink: 0; }

/* ==========================================================
   Link sections
   ========================================================== */
.sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 20px;
}

.section__heading {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section__heading::before {
  content: "//";
  color: var(--accent-dim);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-item a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.link-item a::before {
  content: "$";
  color: var(--accent-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  flex-shrink: 0;
  transition: color 0.18s ease;
}

.link-item .icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.link-item .icon-wrap .icon { width: 15px; height: 15px; }

.link-item .link-text {
  flex: 1;
  min-width: 0;
}

.link-item .link-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-item .link-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-item .arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.18s ease, color 0.18s ease;
  width: 16px;
  height: 16px;
}

.link-item a:hover,
.link-item a:focus-visible {
  transform: translateX(4px);
  border-color: var(--accent-dim);
  background: rgba(124,255,107,0.05);
}

.link-item a:hover::before { color: var(--accent); }
.link-item a:hover .icon-wrap { color: var(--accent); border-color: var(--accent-dim); }
.link-item a:hover .arrow { transform: translateX(3px); color: var(--accent); }

/* soft/disabled links (e.g. "coming soon" demos) */
.link-item a.is-soon {
  opacity: 0.55;
  cursor: default;
}
.link-item a.is-soon:hover { transform: none; border-color: var(--border); background: var(--surface-2); }
.link-item a.is-soon .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-3);
  border: 1px solid rgba(255,204,102,0.3);
  padding: 2px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 380px) {
  .terminal__body { padding: 26px 16px 8px; }
  .profile__name { font-size: 21px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .terminal, .cursor { animation: none; }
  .link-item a, .profile__contact { transition: none; }
}