/* ============================================================
   Dallas Waldrop — Portfolio
   Custom stylesheet, no template
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- Custom Properties ------------------------------------ */

:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --surface-2:    #1c2128;
  --border:       #30363d;
  --accent:       #4acaa8;
  --accent-dim:   rgba(74, 202, 168, 0.12);
  --accent-hover: #3db896;
  --text:         #cdd9e5;
  --text-muted:   #768390;
  --text-dim:     #4d5566;
  --danger:       #f47067;

  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --mono:         'JetBrains Mono', 'Fira Code', monospace;

  --nav-h:        60px;
  --max-w:        860px;
  --radius:       8px;
  --radius-lg:    14px;
  --ease:         0.2s ease;
}

/* ---- Reset ------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }

/* ---- Utility ---------------------------------------------- */

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

.mono { font-family: var(--mono); }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(74, 202, 168, 0.25);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ---- Navigation ------------------------------------------- */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: none;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color var(--ease), background var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface);
}

.nav-links .resume-btn {
  color: var(--accent);
  border: 1px solid rgba(74, 202, 168, 0.4);
  margin-left: 8px;
}

.nav-links .resume-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-muted);
}

.nav-toggle svg { display: block; }

@media (max-width: 680px) {
  .nav-toggle { display: flex; align-items: center; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    gap: 2px;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 12px; }
  .nav-links .resume-btn { margin-left: 0; margin-top: 8px; text-align: center; }
}

/* ---- Hero ------------------------------------------------- */

#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(74, 202, 168, 0.3);
  border-radius: 100px;
  padding: 5px 14px;
  width: fit-content;
}

.open-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

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

.hero-name {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
}

.hero-pitch {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.75;
}

.hero-pitch strong { color: var(--text); font-weight: 500; }

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius);
  transition: all var(--ease);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0d1117;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(74, 202, 168, 0.4);
}

.btn-outline:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.hero-social {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.hero-social a {
  color: var(--text-dim);
  transition: color var(--ease);
  display: flex;
  align-items: center;
}

.hero-social a:hover { color: var(--accent); }

/* ---- Sections --------------------------------------------- */

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

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 40px;
}

/* ---- Experience timeline ---------------------------------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  padding-left: 28px;
  padding-bottom: 44px;
  position: relative;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 2px;
}

.timeline-company {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-role {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-location {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}

.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 3px;
}

/* ---- Projects --------------------------------------------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--ease), transform var(--ease);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-icon {
  color: var(--accent);
}

.project-links {
  display: flex;
  gap: 12px;
}

.project-links a {
  color: var(--text-muted);
  transition: color var(--ease);
}

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

.project-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.project-name a {
  color: var(--text);
  transition: color var(--ease);
}

.project-name a:hover { color: var(--accent); }

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

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

/* ---- Skills ----------------------------------------------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}

.skill-group h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

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

/* ---- Writing ---------------------------------------------- */

.writing-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.writing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  transition: border-color var(--ease);
  margin-bottom: 16px;
}

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

.writing-card-content { flex: 1; }

.writing-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.writing-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.writing-title a { color: var(--text); }
.writing-title a:hover { color: var(--accent); }

.writing-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.writing-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 4px;
  transition: color var(--ease), transform var(--ease);
}

.writing-card:hover .writing-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ---- Contact ---------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}

.contact-blurb {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--ease);
}

.contact-link:hover { color: var(--accent); }

.contact-link svg { flex-shrink: 0; }

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

input, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 12px 16px;
  transition: border-color var(--ease);
  outline: none;
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

input:focus, textarea:focus { border-color: var(--accent); }

textarea { resize: vertical; min-height: 130px; }

form .btn { margin-top: 4px; align-self: flex-start; }

@media (max-width: 640px) {
  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---- Footer ----------------------------------------------- */

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: var(--text-dim);
  transition: color var(--ease);
  display: flex;
  align-items: center;
}

.footer-social a:hover { color: var(--accent); }

/* ---- Blog post page --------------------------------------- */

.post-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.post-nav-inner {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--ease);
}

.back-link:hover { color: var(--accent); }

.post-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 60px) 24px 100px;
}

.post-header { margin-bottom: 48px; }

.post-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.post-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
}

.post-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.post-meta span::before { content: '· '; }
.post-meta span:first-child::before { content: ''; }

.post-divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

.post-body {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.85;
}

.post-body h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 12px;
}

.post-body p { margin-bottom: 20px; }

.post-body ul, .post-body ol {
  margin: 0 0 20px 20px;
}

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }

.post-body li { margin-bottom: 8px; }

.post-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--accent);
}

.post-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text);
}

.post-body strong { color: var(--text); font-weight: 600; }

.post-body a { color: var(--accent); }

.post-draft-notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ---- Responsive ------------------------------------------- */

@media (max-width: 560px) {
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .writing-card { flex-direction: column; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { justify-content: center; }
}
