/* ── Minescout / Thomas Carleton — main.css v12 ── */

/* 1. RESET & VARIABLES */
:root {
  --bg:     #ffffff;
  --fg:     #1a1916;
  --accent: #ff4d1c;
  --muted:  #66625a;
  --light:  #f9f8f6;
  --border: #e8e4dd;
  --sans:   'Jost', sans-serif;
  --serif:  'Playfair Display', serif;
  --sidebar-w: 240px;
}

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

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

/* 2. CORE LAYOUT */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 3rem 3.5rem;
}

.main--page {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.page-content {
  width: 100%;
  max-width: 620px;
  padding-top: 1rem;
}

.page-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.page-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

/* 3. MODULAR SIDEBAR */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 1.5rem;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo {
  width: 32px; height: 32px;
  border-radius: 4px; object-fit: cover;
}

.sidebar-name {
  font-family: var(--serif);
  font-size: 0.9rem; font-weight: 700;
  color: var(--fg); line-height: 1.2;
}

.sidebar-tagline {
  font-size: 0.62rem; color: var(--muted);
  letter-spacing: 0.04em;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 0.1rem; }

.sidebar-nav a,
.sidebar-secondary a {
  font-size: 0.8rem; color: var(--muted);
  text-decoration: none; padding: 0.4rem 0.6rem;
  border-radius: 4px; transition: all 0.15s;
  letter-spacing: 0.01em;
}

.sidebar-nav a:hover,
.sidebar-secondary a:hover {
  color: var(--fg); background: var(--light);
}

.sidebar-nav a.active,
.sidebar-secondary a.active {
  color: var(--fg); font-weight: 500; background: var(--light);
}

.sidebar-spacer { flex: 1; }

.sidebar-secondary {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding-top: 1rem; border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.sidebar-bottom {
  font-size: 0.6rem; color: var(--muted);
  margin-top: 1rem; letter-spacing: 0.04em;
}

/* 4. MOBILE HAMBURGER & OVERLAY */
.hamburger {
  display: none; /* shown only in mobile media query below */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--fg); border-radius: 2px; transition: all 0.25s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 900;
  opacity: 0; transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.nav-overlay.active { display: block; opacity: 1; }

/* 5. SHARED COMPONENTS (Buttons, etc.) */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--bg); background: var(--fg);
  padding: 0.85rem 1.5rem; border-radius: 4px;
  text-decoration: none; transition: background 0.15s, transform 0.1s;
  border: none; cursor: pointer;
}

.btn-primary:hover { background: var(--accent); }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  color: var(--muted); text-decoration: none;
  padding: 0.85rem 1rem; transition: color 0.15s;
}
.btn-ghost:hover { color: var(--fg); }

/* 6. HOMEPAGE: HERO */
.hero-layout {
  display: flex; align-items: center;
  gap: 5rem; max-width: 960px; padding-top: 2rem;
}

.hero { flex: 1; opacity: 0; animation: fadeUp 0.6s ease 0.2s forwards; }

.hero-greeting {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--serif); font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.05; color: var(--fg);
  margin-bottom: 1.5rem; letter-spacing: -0.02em;
}

.hero-title em { font-style: italic; font-weight: 400; }

.hero-desc {
  font-size: 1rem; color: var(--muted); line-height: 1.75;
  max-width: 460px; margin-bottom: 2.5rem;
}

.hero-photo {
  flex-shrink: 0; width: 260px; height: 340px;
  border-radius: 12px; object-fit: cover; object-position: center top;
  border: 3px solid var(--border); opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
  box-shadow: 20px 20px 0 var(--light);
}

/* 7. WORK: PROJECT CARDS */
.projects {
  display: flex; flex-direction: column; gap: 1.25rem;
  width: 100%; max-width: 640px; margin-top: 1rem;
}

.project-card {
  display: flex; align-items: center; gap: 1.5rem; padding: 1.25rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; text-decoration: none; color: var(--fg);
  transition: all 0.2s ease; opacity: 0;
  animation: fadeUp 0.5s ease forwards; animation-delay: var(--delay, 0s);
}

.project-card:hover {
  border-color: var(--fg); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.project-date {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; width: 60px; height: 60px;
  background: var(--light); border-radius: 6px; font-size: 0.7rem;
  font-weight: 600; line-height: 1.3; text-transform: uppercase;
  color: var(--muted); flex-shrink: 0;
}

.project-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.project-url { font-size: 0.8rem; color: var(--muted); }
.project-arrow { margin-left: auto; font-size: 1.2rem; color: var(--border); transition: all 0.2s; }
.project-card:hover .project-arrow { color: var(--fg); transform: translateX(4px); }

/* 8. RESUME: SCREEN VERSION */
.resume-table { width: 100%; border-collapse: collapse; }
.year-row td {
  padding: 2.5rem 0 0.5rem; font-family: var(--serif); font-size: 1.4rem;
  font-weight: 700; color: var(--fg); border-bottom: 2px solid var(--fg);
}
.entry-row td { padding: 1rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 0.88rem; }
.entry-row td:first-child { width: 110px; color: var(--muted); font-size: 0.75rem; }
.entry-row td:nth-child(2) { width: 160px; font-weight: 500; }

.resume-skills { margin-top: 2.5rem; border-top: 2px solid var(--fg); padding-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.skills-block { display: flex; gap: 1.5rem; font-size: 0.85rem; }
.skills-label { width: 100px; font-weight: 500; text-transform: uppercase; font-size: 0.75rem; color: var(--fg); }

/* 9. ABOUT PAGE GRID */
.about-layout {
  display: grid; grid-template-columns: 1fr 200px; gap: 4rem;
  align-items: start; max-width: 700px; margin-top: 2rem;
}
.about-text p { font-size: 0.92rem; line-height: 1.9; margin-bottom: 1.25rem; }
.about-detail { margin-bottom: 1.5rem; }
.about-detail-label { font-size: 0.62rem; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.about-detail-value { font-size: 0.85rem; }

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

/* 11. MOBILE OVERRIDES */
@media (max-width: 900px) {
  .hero-layout { flex-direction: column-reverse; gap: 2.5rem; padding-top: 1rem; }
  .hero-photo { width: 140px; height: 175px; box-shadow: 12px 12px 0 var(--light); }
  .about-layout { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .sidebar {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  }

  .sidebar-logo-wrap {
    margin-bottom: 0;
  }

  .hamburger {
    display: inline-flex !important;
  }

  .sidebar-nav,
  .sidebar-secondary {
    display: none;
    margin-top: 0.75rem;
  }

  .sidebar.open .sidebar-nav,
  .sidebar.open .sidebar-secondary {
    display: flex;
  }

  .main {
    margin-left: 0;
    padding: 4.25rem 1.25rem 2rem;
  }
}

/* 12. PRINT ENGINE (High-End LaTeX Look) */
@media print {
  @page { margin: 0.5in; size: letter; }
  .sidebar, .hamburger, .nav-overlay, .pdf-btn, .page-label, .sidebar-bottom { display: none !important; }
  body { background: white !important; color: black !important; font-family: "Times New Roman", serif !important; }
  .main { margin-left: 0 !important; padding: 0 !important; }
  .page-title { display: none; }
  
  .print-header { display: block !important; margin-bottom: 20pt; }
  .print-name { font-size: 30pt; font-weight: bold; margin-bottom: 4pt; }
  .print-contact { font-size: 10pt; border-bottom: 1.5pt solid black; padding-bottom: 8pt; }

  .resume-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .year-row td { padding: 25pt 0 6pt !important; font-size: 14pt !important; font-weight: bold !important; border-bottom: 1.5pt solid black !important; }
  
  .entry-row td { border: none !important; padding: 10pt 0 !important; font-size: 11pt !important; vertical-align: top; }
  .entry-row td:nth-child(1) { width: 18% !important; font-weight: bold !important; }
  .entry-row td:nth-child(2) { width: 22% !important; font-weight: bold !important; padding-right: 15pt !important; }
  .entry-row td:nth-child(3) { width: 60% !important; text-align: justify; line-height: 1.4; }

  .resume-skills { border-top: 2pt solid black !important; margin-top: 30pt !important; padding-top: 15pt !important; }
  .skills-block { display: flex !important; flex-direction: row !important; margin-bottom: 8pt !important; }
  .skills-label { width: 18% !important; font-size: 10pt !important; }
  .skills-value { width: 82% !important; font-size: 10.5pt !important; }
}

.print-header { display: none; }