/* ============================================
   jonesy.sh — terminal-chic portfolio
   ============================================ */

:root {
  --bg:        #0a0e14;
  --bg-light:  #0f1620;
  --amber:     #ffb86c;
  --text:      #d6dae0;
  --text-dim:  #8a929c;
  --border:    #1e2a3a;

  /* stealie palette — Grateful Dead split, sourced from the fastfetch logo */
  --stealie-red:   #dc2626;
  --stealie-cream: #fef3c7;
  --stealie-blue:  #2563eb;
  --stealie-blue-dim: #1e40af;

  /* primary accent — replaces the previous green */
  --accent:     var(--stealie-blue);
  --accent-dim: var(--stealie-blue-dim);
  --accent-rgb: 37, 99, 235;

  /* hyprland window tokens */
  --hypr-shadow:    0 4px 20px rgba(0, 0, 0, 0.53);
  --hypr-bezier:    cubic-bezier(0.2, 1, 0.3, 1);
  --hypr-inactive:  rgba(30, 42, 58, 0.55);
  --hypr-glass-bg:  rgba(15, 22, 32, 0.72);
  --hypr-glass-hi:  rgba(255, 255, 255, 0.06);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--accent-dim) var(--bg);
}

body {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, 'DejaVu Sans Mono', monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* CRT Scanlines */
.scanlines {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-logo:hover {
  color: var(--accent);
}

.prompt-accent { color: var(--accent); }
.prompt-blue   { color: var(--stealie-blue); }
.prompt-red    { color: var(--stealie-red); }
.prompt-cream  { color: var(--stealie-cream); }
.dim           { color: var(--text-dim); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::before {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}

.nav-toggle:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

/* ============================================
   Hyprland-style tiled windows (hero)
   ============================================ */
.hypr-stage {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hypr-window {
  position: relative;
  border-radius: 14px;
  border: 1.5px solid var(--hypr-inactive);
  background: var(--hypr-glass-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow:
    var(--hypr-shadow),
    inset 0 1px 0 var(--hypr-glass-hi);
  opacity: 0.85;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  animation: hypr-popin 1.1s var(--hypr-bezier) backwards;
}

.hypr-window:nth-child(2) { animation-delay: 0.35s; }
.hypr-window:focus { outline: none; }

.hypr-window.active {
  opacity: 1;
  border-color: rgba(51, 204, 255, 0.7);
  box-shadow:
    var(--hypr-shadow),
    inset 0 1px 0 var(--hypr-glass-hi),
    0 0 0 1px rgba(51, 204, 255, 0.25),
    0 0 28px rgba(51, 204, 255, 0.18);
}

@keyframes hypr-popin {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); }
}

.hypr-titlebar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.hypr-ws    { color: var(--accent); font-weight: 600; }
.hypr-title { letter-spacing: 0.04em; }

.fastfetch-content { padding: 1.25rem 1.25rem 1.5rem; }
.fastfetch-content .fastfetch-header {
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  gap: 1rem;
}

/* ============================================
   Fastfetch inner content
   ============================================ */
.fastfetch-header {
  padding: 1.75rem 1.5rem;
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.fastfetch-art {
  flex-shrink: 0;
}

.stealie-art {
  font-size: 0.7rem;
  line-height: 1.1;
  white-space: pre;
  margin: 0;
  font-family: inherit;
  color: var(--text);
}

.stealie-art .s-l {
  color: var(--stealie-red);
  text-shadow: 0 0 3px rgba(220, 38, 38, 0.45);
}

.stealie-art .s-m {
  color: var(--stealie-cream);
  text-shadow:
    0 0 4px rgba(255, 255, 200, 0.9),
    0 0 10px rgba(255, 255, 200, 0.45);
  font-weight: 700;
}

.stealie-art .s-r {
  color: var(--stealie-blue);
  text-shadow: 0 0 3px rgba(37, 99, 235, 0.45);
}

.fastfetch-info {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fastfetch-title {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.15rem;
  letter-spacing: 0.02em;
}

.fastfetch-title .info-at,
.fastfetch-title .info-host {
  color: var(--text);
}

.fastfetch-title .info-host {
  color: var(--amber);
}

.fastfetch-rule {
  color: var(--text-dim);
  margin-bottom: 0.25rem;
  letter-spacing: -0.05em;
  user-select: none;
}

.info-line {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.info-label {
  color: var(--accent);
  flex-shrink: 0;
  width: 5rem;
  font-weight: 500;
}

.info-value {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.about-info {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.terminal-body {
  padding: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.8;
  border-top: 1px solid var(--border);
}

.terminal-line {
  margin-bottom: 0.25rem;
}

.prompt {
  color: var(--accent);
  user-select: none;
}

.path {
  color: var(--amber);
  user-select: none;
}

.bash-prompt {
  color: var(--text-dim);
  user-select: none;
  margin-right: 0.35rem;
}
.bash-prompt .user { color: var(--accent); }
.bash-prompt .host { color: var(--stealie-red); }

.dir-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.dir-link:hover { border-bottom-color: var(--accent); }

.output {
  color: var(--text);
  padding-left: 0.5rem;
  margin-bottom: 1rem;
}

.output.multiline br {
  display: block;
  content: '';
  margin-top: 0.15rem;
}

.typed-line {
  margin-top: 0.75rem;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem 4rem;
  background-image: url('../img/alps-peaks.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(10, 14, 20, 0.25) 0%, rgba(10, 14, 20, 0.55) 100%);
}

.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18vh;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(10, 14, 20, 0) 0%, var(--bg) 100%);
  pointer-events: none;
}

.hero .fastfetch-hero {
  width: 100%;
  max-width: 760px;
}

.hero .terminal-body {
  font-size: 0.85rem;
}

/* ============================================
   Golf animation (hobbies easter egg)
   ============================================ */
.golf-stage {
  margin-top: 3rem;
  padding: 1rem 1.25rem 1.25rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}

.golf-caption {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.golf-caption a {
  color: var(--stealie-red);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.golf-caption a:hover {
  border-bottom-color: var(--stealie-red);
}

#golf-frame {
  color: var(--stealie-red);
  white-space: pre;
  font-size: 0.7rem;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 0 6px rgba(220, 38, 38, 0.25);
}

.scroll-hint {
  display: block;
  margin-top: 3rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  transition: color 0.2s;
  animation: float 2s ease-in-out infinite;
}

.scroll-hint:hover {
  color: var(--accent);
}

.scroll-hint .arrow {
  display: block;
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 6rem 0;
}

.section h2 {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: var(--text);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg,
    var(--stealie-red),
    var(--stealie-cream),
    var(--stealie-blue),
    transparent);
  opacity: 0.55;
  margin-bottom: 3rem;
}

.section-intro {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
  font-style: italic;
}

/* ============================================
   About Section
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.about-text strong {
  color: var(--text);
}

/* ============================================
   Projects Section
   ============================================ */
.project.featured {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  background: var(--bg-light);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.project.featured:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.05);
}

.project-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--stealie-red);
  color: var(--stealie-cream);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  letter-spacing: 0.1em;
}

.project-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.project-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  max-width: 600px;
}

.project-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--amber);
  background: rgba(255, 184, 108, 0.05);
}

/* Stealie tag cycling — red / cream / blue / amber, then loops */
.project-features .tag:nth-child(4n+1) {
  color: var(--stealie-red);
  border-color: rgba(220, 38, 38, 0.30);
  background: rgba(220, 38, 38, 0.06);
}
.project-features .tag:nth-child(4n+2) {
  color: var(--stealie-cream);
  border-color: rgba(254, 243, 199, 0.30);
  background: rgba(254, 243, 199, 0.06);
}
.project-features .tag:nth-child(4n+3) {
  color: var(--stealie-blue);
  border-color: rgba(37, 99, 235, 0.30);
  background: rgba(37, 99, 235, 0.06);
}
.project-features .tag:nth-child(4n+4) {
  color: var(--amber);
  border-color: rgba(255, 184, 108, 0.30);
  background: rgba(255, 184, 108, 0.06);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-family: inherit;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-dim);
  box-shadow:
    0 0 20px rgba(var(--accent-rgb), 0.30),
    0 4px 14px rgba(37, 99, 235, 0.18);
}

.icon {
  font-size: 0.85rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  display: block;
}

.project-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.projects-grid .project-card:hover {
  border-color: var(--stealie-blue);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.30),
    0 0 18px rgba(37, 99, 235, 0.12);
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.project-card h4 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.project-card p {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.card-link {
  font-size: 0.7rem;
  color: var(--accent);
}

/* ============================================
   Music Section
   ============================================ */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.music-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s;
}

.music-card:hover {
  border-color: var(--stealie-red);
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.30),
    0 0 18px rgba(220, 38, 38, 0.12);
}

/* Music icon tints — one accent per card */
.music-icon.vinyl  { color: var(--stealie-red); }
.music-icon.mic    { color: var(--stealie-cream); }
.music-icon.guitar { color: var(--stealie-blue); }
.music-icon.bolt   { color: var(--accent); }
.music-icon.golf   { color: var(--amber); }

.music-icon {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  display: inline-block;
}

.music-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.music-tag {
  font-size: 0.7rem;
  color: var(--amber);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.music-card p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.music-footer {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.85rem;
}

.music-footer a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.music-footer a:hover {
  border-bottom-color: var(--accent);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
}

.contact-card:hover {
  border-color: var(--stealie-cream);
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.30),
    0 0 14px rgba(254, 243, 199, 0.10);
}

.contact-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.contact-card h4 {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.contact-card a,
.contact-card code {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-card code {
  background: rgba(var(--accent-rgb), 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  display: inline-block;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-text {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* ============================================
   Animations — fade in on scroll
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-hint,
  .cursor {
    animation: none;
  }
  .hypr-window {
    animation: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(10, 14, 20, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .hypr-stage {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hypr-window,
  .hypr-window.active {
    opacity: 1;
  }

  .fastfetch-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    text-align: left;
  }

  .stealie-art {
    font-size: 0.5rem;
  }

  .fastfetch-info {
    width: 100%;
    align-self: stretch;
  }

  .info-label {
    width: 4.5rem;
  }

  .hero {
    padding: 5rem 1rem 3rem;
  }

  .section {
    padding: 4rem 0;
  }

  .container {
    padding: 0 1.25rem;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .terminal-body {
    font-size: 0.75rem;
    padding: 1rem;
  }

  .stealie-art {
    font-size: 0.42rem;
  }

  .fastfetch-info {
    font-size: 0.72rem;
  }

  .info-label {
    width: 4rem;
  }

  #golf-frame {
    font-size: 0.55rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid,
  .music-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Selection color
   ============================================ */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ============================================
   Screen reader only
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
