/* ==========================================================================
   c8win — centralized site stylesheet
   Monochromatic dark palette built around --primary (#00ff80)
   Link this on every page: <link rel="stylesheet" href="styles.css">
   ========================================================================== */

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

:root {
  /* --- Primary accent (single hue, everything else derived from it) --- */
  --primary:       #00ff80;
  --primary-hover: #33ff99;
  --primary-dim:   #00cc66;   /* secondary accent — same hue, lower luminance */
  --primary-faint: rgba(0, 255, 128, 0.08);
  --primary-line:  rgba(0, 255, 128, 0.25);
  --primary-glow:  rgba(0, 255, 128, 0.35);

  /* --- Monochromatic dark neutrals (green-black tint, not pure gray) --- */
  --bg:       #0a0f0d;
  --surface:  #101613;
  --surface-2:#141c18;
  --border:   #1e2925;
  --muted:    #71857c;
  --text:     #c3d1cb;
  --white:    #eefff5;

  /* --- Type --- */
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Space Grotesk', sans-serif;

  /* --- Layout --- */
  --content-width: 860px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --nav-height: 56px;
  --footer-height: 44px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scanline + grid texture, shared across all pages */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--primary-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--primary-faint) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; }

::selection {
  background: var(--primary-glow);
  color: var(--white);
}

/* ==========================================================================
   Nav
   ========================================================================== */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 15, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.02em;
  animation: pulse-glow 2.6s ease-in-out infinite;
}

.nav-brand .bracket {
  color: var(--muted);
  transition: color 0.2s;
  animation: pulse-glow 2.6s ease-in-out infinite;
}
 
.nav-brand:hover .bracket { color: var(--primary-dim); }
 
@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 5px var(--primary-glow); }
}

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

.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-links a::before {
  content: '> ';
  color: var(--primary-dim);
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::before { opacity: 1; }
.nav-links a.is-active { color: var(--primary); }
.nav-links a.is-active::before { content: '> '; opacity: 1; }

/* ==========================================================================
   Page shell
   ========================================================================== */

main {
  position: relative;
  z-index: 1;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 120px 2rem 100px;
}

main.wide { max-width: 1080px; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--primary-dim);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.hero h1 .accent,
.accent { color: var(--primary); }

.hero-sub {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* ==========================================================================
   TypeWriter Component
   ========================================================================== */
.typewriter-text { color: var(--white); }

.typewriter-cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.9em;
  margin-left: 0.06em;
  background: var(--primary);
  border: 1.5px solid var(--primary-dim);
  border-radius: 2px;
  vertical-align: -0.08em;
  opacity: 1;
  box-shadow: 0 0 6px 1px var(--primary-glow);
}

/* ==========================================================================
   Divider
   ========================================================================== */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.25s forwards;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

.card:hover {
  border-color: var(--primary-line);
  transition: border-color 0.25s;
}

.card-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.card > p { color: var(--text); font-size: 15px; line-height: 1.75; }

/* Grid of small items inside a card (e.g. "majors") */
.item-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .item-grid { grid-template-columns: 1fr; }
}

.grid-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.grid-item::before {
  content: '//';
  color: var(--primary-dim);
  margin-right: 8px;
  opacity: 0.8;
}

.grid-item:hover {
  border-color: var(--primary-dim);
  transform: translateX(4px);
}

/* ==========================================================================
   Accordion
   ========================================================================== */

.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.acc-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.acc-item.is-open { border-color: var(--primary-line); }

.acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  text-align: left;
  transition: color 0.2s, background 0.2s;
}

.acc-trigger:hover {
  color: var(--white);
  background: var(--primary-faint);
}

.acc-trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

.acc-title { display: flex; align-items: center; gap: 10px; }

.acc-prefix { color: var(--primary-dim); font-weight: 700; user-select: none; }

.acc-icon {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.2s;
}

.acc-item.is-open .acc-icon { transform: rotate(180deg); color: var(--primary); }

.acc-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s ease, opacity 0.25s ease;
  opacity: 0;
  border-top: 0px solid var(--border);
}

.acc-item.is-open .acc-panel {
  max-height: 200px;
  opacity: 1;
  border-top: 1px solid var(--border);
}

.acc-panel-inner { padding: 0.75rem 1.25rem 1rem; }

/* ==========================================================================
   Tags / pills
   ========================================================================== */

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

.tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-faint);
  border: 1px solid var(--primary-line);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  letter-spacing: 0.04em;
  transition: background 0.15s, border-color 0.15s;
}

.tag:hover {
  background: rgba(0, 255, 128, 0.15);
  border-color: var(--primary-glow);
}

/* ==========================================================================
   Buttons / links
   ========================================================================== */

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

.social-btn,
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  background: none;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.social-btn:hover,
.btn:hover {
  color: var(--white);
  border-color: var(--primary);
  background: var(--primary-faint);
}

.btn-primary {
  color: var(--bg);
  background: var(--primary);
  border-color: var(--primary);
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 15, 13, 0.9);
  border-top: 1px solid var(--border);
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
