/* ============================================================
   devcard.css — dark vcard theme for GRAV
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #07111f;
  --bg-2:        #0d1f35;
  --bg-3:        #142844;
  --text:        #dce8f5;
  --text-muted:  #537390;
  --accent:      #00d4e8;
  --accent-dim:  rgba(0, 212, 232, 0.12);
  --border:      #1a3a5c;
  --radius:      8px;
  --radius-lg:   16px;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
  --nav-h:       64px;
  --max-w:       1100px;
  --transition:  0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.75; }

img { max-width: 100%; display: block; }

/* ── Utilities ─────────────────────────────────────────────── */
.mono    { font-family: var(--font-mono); }
.accent  { color: var(--accent); }
.text-muted { color: var(--text-muted); }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Navigation ────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(7, 17, 31, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav-brand {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.nav-brand:hover { opacity: 0.75; }
.nav-cursor {
  color: var(--accent);
  animation: t-blink 1s step-end infinite;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); background: var(--accent-dim); opacity: 1; }

.nav-links .nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.35rem 1rem;
}
.nav-links .nav-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Sections ──────────────────────────────────────────────── */
.section {
  padding: 6rem 0;
}
.section-alt {
  background: var(--bg-2);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.section-num {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  background-image:
    radial-gradient(rgba(0, 212, 232, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 212, 232, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4rem;
  width: 100%;
}

.hero-greeting {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.hero-position {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Mugshot */
.hero-photo {
  flex-shrink: 0;
}

.mugshot-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px var(--accent-dim), 0 24px 64px rgba(0, 212, 232, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 500;
  color: var(--accent);
  user-select: none;
}

.mugshot {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px var(--accent-dim), 0 24px 64px rgba(0, 212, 232, 0.12);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: rgba(0, 212, 232, 0.35);
  box-shadow: 0 8px 32px rgba(0, 212, 232, 0.06);
}

/* ── About ─────────────────────────────────────────────────── */
.about-content {
  max-width: 720px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
}
.about-content p + p {
  margin-top: 1rem;
}
.about-content strong { color: var(--text); }

/* ── Skills ────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.skill-category {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tag-sm {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
}

/* ── Timeline ──────────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 160px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 128px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 10%, var(--border) 90%, transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 20px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.timeline-meta {
  position: absolute;
  left: -158px;
  top: 1.4rem;
  width: 120px;
  text-align: right;
  font-size: 0.78rem;
  line-height: 1.3;
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.timeline-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

/* ── Education ─────────────────────────────────────────────── */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
}

.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.edu-year {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  padding-top: 0.2rem;
  min-width: 48px;
}

.edu-degree {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* ── Contact ───────────────────────────────────────────────── */
.contact-inner {
  max-width: 600px;
}

.contact-sub {
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  margin-top: -1.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 0.95rem;
  transition: all var(--transition);
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(4px);
  opacity: 1;
}

.contact-icon {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 232, 0.2);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  min-width: 48px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
}
footer a { color: var(--text-muted); }

/* ── Page content (default template) ──────────────────────── */
.page-content {
  max-width: 720px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
  padding-top: var(--nav-h);
}
.page-content h1, .page-content h2, .page-content h3 {
  color: var(--text);
  margin: 2rem 0 1rem;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-photo {
    order: -1;
    display: flex;
    justify-content: center;
  }
  .mugshot-placeholder, .mugshot {
    width: 160px;
    height: 160px;
    font-size: 2.5rem;
  }
  .hero-tagline { margin: 0 auto 2.5rem; }
  .hero-actions { justify-content: center; }

  .timeline {
    padding-left: 1.5rem;
  }
  .timeline::before {
    left: 0;
  }
  .timeline-item::before {
    left: -5px;
  }
  .timeline-meta {
    position: static;
    width: auto;
    text-align: left;
    margin-bottom: 0.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; text-align: center; }
  .nav-toggle { display: flex; }

  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .edu-card { flex-direction: column; gap: 0.5rem; }
}

/* ── Terminal ──────────────────────────────────────────────── */
.terminal-hint {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  margin-top: -2rem;
}

.terminal-window {
  background: #0b0d12;
  border: 1px solid #1e2a3a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  width: 820px;
  max-width: 100%;
  outline: none;
}
.terminal-window:focus-within {
  border-color: rgba(0, 212, 232, 0.3);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,232,0.15);
}

.terminal-titlebar {
  background: #151820;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid #1e2a3a;
  user-select: none;
}
.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.terminal-dot.red    { background: #ff5f57; cursor: pointer; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green  { background: #28c840; cursor: pointer; }
.terminal-title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: #4a5568;
}

.terminal-body {
  padding: 1rem 1.25rem;
  height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  cursor: text;
}
.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: #1e2a3a; border-radius: 2px; }

.terminal-output {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #a8b5c8;
}
.terminal-line {
  white-space: pre;
  min-height: 1.55em;
}
.terminal-line.cmd-echo { color: #e2e8f0; }
.terminal-line.t-accent  { color: var(--accent); }
.terminal-line.t-muted   { color: #4a5568; }
.terminal-line.t-error   { color: #ff6b6b; }

.terminal-input-row {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  position: relative;
}
.terminal-prompt { color: var(--accent); white-space: pre; }
.terminal-display { color: #e2e8f0; white-space: pre; }
.terminal-cursor {
  display: inline-block;
  width: 7px; height: 0.9em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: t-blink 1s step-end infinite;
  margin-left: 1px;
}
@keyframes t-blink { 0%,100%{opacity:1} 50%{opacity:0} }

.terminal-hidden-input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  border: none; outline: none;
  pointer-events: none;
}

.terminal-reopen {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.terminal-reopen-icon {
  width: 64px;
  height: 48px;
  background: #0b0d12;
  border: 1px solid #1e2a3a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}
.terminal-reopen:hover .terminal-reopen-icon {
  border-color: var(--accent);
  color: var(--text);
}
.terminal-reopen-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.terminal-reopen:hover .terminal-reopen-label {
  color: var(--accent);
}

.game-wrap {
  position: relative;
  display: block;
}
.game-canvas {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.15;
  color: var(--accent);
  display: block;
  white-space: pre;
  overflow: hidden;
}
/* HUD overlay: always fixed top-right, never inside the char grid */
.game-hud {
  position: absolute;
  top: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.15;
  white-space: pre;
  color: var(--accent);
  background: rgba(7, 17, 31, 0.75);
  padding: 2px 5px;
  pointer-events: none;
  border-left: 1px solid rgba(0,212,232,0.15);
  border-bottom: 1px solid rgba(0,212,232,0.15);
}
.game-hint {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  margin-top: 0.4rem;
  color: #4a5568;
  text-align: center;
}
/* Mobile controls */
.game-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px 4px;
  gap: 12px;
}
.game-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dpad-row {
  display: flex;
  gap: 4px;
}
.game-btn {
  background: rgba(0,212,232,0.1);
  border: 1px solid rgba(0,212,232,0.35);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 4px;
  touch-action: none;
  text-align: center;
}
.game-btn:active { background: rgba(0,212,232,0.35); }
.game-action-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.game-fire-btn { font-size: 1.1rem; padding: 14px 18px; }
.game-clr-btn  { font-size: 0.75rem; }
