/* ── gruvbox-inspired hipster dev theme ── */

:root {
  --bg: #1d2021;
  --bg-soft: #282828;
  --bg-hover: #32302f;
  --text: #ebdbb2;
  --text-muted: #928374;
  --text-bright: #fbf1c7;
  --accent: #fe8019;
  --accent-dim: rgba(254, 128, 25, 0.08);
  --green: #b8bb26;
  --green-dim: rgba(184, 187, 38, 0.1);
  --aqua: #8ec07c;
  --yellow: #fabd2f;
  --red: #fb4934;
  --purple: #d3869b;
  --blue: #83a598;
  --border: #3c3836;
  --border-bright: #504945;
  --font: "Space Mono", monospace;
  --max-width: 1060px;
  --r: 3px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(254, 128, 25, 0.04), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(142, 192, 124, 0.03), transparent 50%),
    var(--bg);
}

/* scanlines */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.018) 2px,
    rgba(0, 0, 0, 0.018) 4px
  );
}

/* film grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
}

/* ── layout ── */

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 20px 0 40px;
}

/* ── header ── */

.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(29, 32, 33, 0.92);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text) !important;
  text-decoration: none !important;
}

.brand-prompt {
  color: var(--green);
}

.brand-sep {
  color: var(--text-muted);
}

.brand-path {
  color: var(--blue);
}

.brand .cursor {
  color: var(--text);
  margin-left: 4px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
}

.site-nav a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── typography ── */

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-bright);
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  text-shadow: 0 0 80px rgba(254, 128, 25, 0.12);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-bright);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.hero-text,
.section-note,
.value-card p,
.project-card p,
.timeline-body p,
.cv-block p,
.contact-section p {
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-text {
  max-width: 54ch;
  margin: 16px 0 0;
  font-size: 0.95rem;
}

.t-muted {
  color: var(--text-muted);
  font-weight: 400;
}

/* ── animations ── */

.hero,
.section,
.contact-section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero.is-visible,
.section.is-visible,
.contact-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cursor.blink {
  animation: blink 1s step-end infinite;
}

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

/* ── hero ── */

.hero {
  display: grid;
  grid-template-columns: 1.4fr minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.button:hover {
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--yellow);
}

.button-secondary {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── hero terminal card ── */

.hero-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-title {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 18px;
}

.terminal-line {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.focus-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0.85rem;
}

.focus-list li::before {
  content: "▸ ";
  color: var(--green);
}

.hero-stats {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.stat-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.85rem;
}

.stat-key {
  color: var(--blue);
  white-space: nowrap;
}

.stat-dots {
  flex: 1;
  border-bottom: 1px dotted var(--border-bright);
  margin-bottom: 4px;
}

.stat-value {
  color: var(--text-bright);
  font-weight: 700;
  white-space: nowrap;
}

/* ── sections ── */

.section,
.contact-section {
  margin-top: 24px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-soft);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}

.section-note {
  max-width: 32ch;
  font-size: 0.85rem;
  text-align: right;
}

/* ── value cards ── */

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.value-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  transition: border-left-color 0.25s;
}

.value-card:hover {
  border-left-color: var(--accent);
}

.value-card h3 {
  margin-bottom: 8px;
}

/* ── project cards ── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.project-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  transition: border-left-color 0.25s;
}

.project-card:hover {
  border-left-color: var(--green);
}

.project-card.featured {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, rgba(254, 128, 25, 0.04), var(--bg));
}

.project-tag {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--yellow);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.project-meta li {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: var(--r);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--aqua);
}

.project-impact {
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
}

/* ── timeline ── */

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px dashed var(--border);
}

.timeline-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.timeline-date {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.timeline-body h3 {
  margin-bottom: 8px;
}

.timeline-body p {
  font-size: 0.9rem;
}

/* ── cv panel ── */

.cv-panel {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
}

.cv-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.cv-block {
  display: none;
}

.cv-block.active {
  display: block;
}

.cv-block h3 {
  margin-bottom: 10px;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.skill-cloud span {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--aqua);
  transition: border-color 0.2s, color 0.2s;
}

.skill-cloud span:hover {
  border-color: var(--aqua);
  color: var(--text-bright);
}

/* ── contact ── */

.contact-section {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.8fr);
  gap: 24px;
  align-items: center;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--green) !important;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

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

.contact-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
}

.contact-card a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.contact-card a:hover {
  color: var(--yellow);
}

/* ── footer ── */

.site-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  text-align: center;
}

.footer-art {
  font-family: var(--font);
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  text-align: left;
  display: inline-block;
}

/* ── responsive ── */

@media (max-width: 980px) {
  .hero,
  .section-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .value-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .section-note {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 10px;
  }

  .site-header {
    flex-direction: column;
    align-items: start;
    padding: 14px;
  }

  .site-nav {
    gap: 12px;
  }

  .hero,
  .section,
  .contact-section {
    padding: 20px;
  }

  h1 {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }

  .timeline-date {
    margin-bottom: -6px;
  }
}
