/* ============================================
   PERSONAL SITE — styles.css
   Aesthetic: Dark terminal / editorial mono
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* === red · white · blue — Warm Canvas Editorial palette ===
     60 % — warm parchment page canvas
     30 % — warm cream card surface (floats above canvas)
     10 % — Old Glory crimson accents                         */

  /* Backgrounds */
  --bg:            #c9b99a;   /* warm tan canvas — parchment page ground      */
  --bg-card:       #ede5d3;   /* warm cream      — elevated card surface       */
  --bg-card-hover: #f5f0e6;   /* warm ivory      — hovered card state          */
  --border:        #b5a588;   /* warm sand       — borders and rules           */

  /* Accents — red family */
  --accent:        #cc2b35;   /* Old Glory crimson — CTAs, labels, links       */
  --accent-dim:    #9e2228;   /* deep burgundy    — secondary accents/borders  */

  /* Text hierarchy — deep navy (WCAG AA on both tan canvas and cream cards) */
  --text-primary:  #1e3060;   /* deep navy   — headings, card titles           */
  --text-muted:    #2d4e80;   /* medium navy — body text, nav links            */
  --text-faint:    #4a6e9a;   /* muted steel — labels, arrows, footnotes       */

  /* RGB channels — used exclusively inside rgba() calls below */
  --accent-rgb:         204,  43,  53;
  --bg-card-rgb:        237, 229, 211;
  --text-primary-rgb:    30,  48,  96;

  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --font-body: 'DM Sans', sans-serif;

  --radius: 6px;
  --max-w: 780px;
  --header-h: 60px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ---------- GRAIN OVERLAY ---------- */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ---------- CONTAINER ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(var(--bg-card-rgb), 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.monogram {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  border: 1px solid var(--accent-dim);
  padding: 4px 10px;
  border-radius: var(--radius);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--accent); opacity: 1; }

/* ---------- HERO ---------- */
.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 80px 24px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  animation: fadeUp 0.8s ease both;
  text-align: center;
}

.hero-title-group {
  display: inline-block;
  text-align: left;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  animation: fadeUp 0.7s ease both;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
  animation: fadeUp 0.8s 0.1s ease both;
}

.hero-tagline {
  font-size: 1.4rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 40px;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s ease both;
}

/* ---------- BUTTONS ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
.btn-primary:hover {
  opacity: 1;
  background: var(--bg-card-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.25);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover {
  opacity: 1;
  border-color: var(--accent-dim);
  color: var(--accent);
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 32px;
  font-weight: 400;
}

/* ---------- ABOUT ---------- */
.about-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 620px;
  margin-bottom: 16px;
}
.about-text strong { color: var(--text-primary); font-weight: 500; }

/* ---------- LINK CARDS ---------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--text-primary-rgb), 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.link-card:hover {
  opacity: 1;
  background: var(--bg-card-hover);
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.link-card:hover::before { opacity: 1; }

.link-icon {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 4px;
  padding: 6px 8px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  text-transform: uppercase;
}

.link-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.link-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.link-handle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.link-arrow {
  font-size: 1rem;
  color: var(--text-faint);
  transition: color 0.15s ease, transform 0.15s ease;
}
.link-card:hover .link-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ---------- PROJECTS ---------- */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}
.project-card:hover {
  border-color: var(--accent-dim);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.project-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-links {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.project-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.project-links a:hover { color: var(--accent); opacity: 1; }

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

.footer-copy { color: var(--text-faint); }

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .nav { gap: 16px; }
  .hero { padding: 60px 24px; }
  .link-grid { grid-template-columns: 1fr; }
  .project-header { flex-direction: column; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}
