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

:root {
  --ink: #1a1a18;
  --cream: #f5f0e8;
  --warm: #e8e0d0;
  --accent: #c84b2f;
  --gold: #b8965a;
  --muted: #7a746a;
  --line: rgba(26, 26, 24, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.5;
}

/* ── HEADER ── */
header {
  position: relative;
  padding: 80px 60px 60px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
}

header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 50%, transparent 100%);
}

.header-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  max-width: 1100px;
  margin: 0 auto;
}

.header-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.1s;
}

h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--cream);
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.2s;
}

h1 em {
  font-style: italic;
  color: var(--gold);
}

.header-subtitle {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 300;
  color: rgba(245, 240, 232, 0.65);
  margin-top: 16px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.35s;
}

.contact-block {
  text-align: right;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.4s;
}

.contact-block a,
.contact-block span {
  display: block;
  font-size: 11px;
  color: rgba(245, 240, 232, 0.6);
  text-decoration: none;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  transition: color 0.2s;
}

.contact-block a:hover {
  color: var(--gold);
}

/* ── LAYOUT ── */
.main-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 60px 100px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  margin-top: 60px;
}

/* ── SECTIONS ── */
.section {
  margin-bottom: 52px;
}

.section-label {
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── SUMMARY ── */
.summary-text {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink);
  border-left: 2px solid var(--gold);
  padding-left: 20px;
}

/* ── EXPERIENCE ── */
.job {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.job.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.job-title {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.job-period {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.job-company {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.job-location {
  color: var(--muted);
  font-weight: 300;
}

.job-bullets {
  list-style: none;
  padding: 0;
}

.job-bullets li {
  padding: 4px 0 4px 18px;
  position: relative;
  color: #3a3a38;
  font-size: 14.5px;
  line-height: 1.6;
}

.job-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 12px;
}

.bullet-lead {
  font-weight: 500;
  color: var(--ink);
}

.social-links {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  background: rgba(245, 240, 232, 0.08);
  border: 1px solid rgba(245, 240, 232, 0.18);
  padding: 5px 11px;
  border-radius: 2px;
  font-size: 10px !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.7) !important;
  transition: all 0.2s !important;
  margin-bottom: 0 !important;
  text-decoration: none;
}

.social-links a:hover {
  background: rgba(184, 150, 90, 0.2) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}

/* ── SIDEBAR ── */
.sidebar .section {
  margin-bottom: 40px;
}

.skill-group {
  margin-bottom: 16px;
}

.skill-group-name {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

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

.tag {
  background: var(--warm);
  border: 1px solid var(--line);
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.03em;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s;
}

.tag:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.tag.highlight {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ── EDUCATION ── */
.edu-item {
  margin-bottom: 20px;
}

.edu-degree {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
}

.edu-school {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.edu-year {
  font-size: 10px;
  color: var(--gold);
  margin-top: 2px;
  letter-spacing: 0.1em;
}

/* ── AWARDS ── */
.award-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.award-item:last-child {
  border-bottom: none;
}

.award-title {
  font-weight: 500;
  color: var(--ink);
}

.award-detail {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── SPEAKING ── */
.speak-item {
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.speak-item:last-child {
  border-bottom: none;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(245, 240, 232, 0.4);
  text-align: center;
  padding: 24px;
  font-size: 11px;
  letter-spacing: 0.1em;
}

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

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

/* ── RESPONSIVE ── */
@media (max-width: 800px) {
  header {
    padding: 50px 24px 40px;
  }

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

  .contact-block {
    text-align: left;
  }

  .main-wrap {
    padding: 0 24px 80px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ── ACTIVITY FEED ── */
.activity-feed {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}

.activity-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-title {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
  flex: 1;
}

.activity-repo {
  color: var(--accent);
  font-weight: 500;
}

.activity-date {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 3px;
}

.loading-state,
.empty-state,
.error-state {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  padding: 8px 0;
}

/* ── CONTRIBUTIONS GRAPH ── */
.contributions-container {
  margin-top: 12px;
  background: rgba(26, 26, 24, 0.03);
  padding: 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.contributions-container img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.1) brightness(0.95);
  mix-blend-mode: multiply;
}

.form-container {
  max-width: 650px;
  margin: 60px auto 0;
  background: rgba(245, 240, 232, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(26, 26, 24, 0.05);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group label {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: white;
  border: 1.5px solid var(--line);
  padding: 16px;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: var(--ink);
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 75, 47, 0.1);
  transform: translateY(-1px);
}

.recaptcha-wrapper {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.submit-btn {
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 20px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 6px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: 0.5s;
}

.submit-btn:hover {
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(200, 75, 47, 0.3);
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:active {
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.form-status {
  font-size: 12px;
  text-align: center;
  padding: 14px;
  border-radius: 6px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

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

.form-status.error {
  color: var(--accent);
  background: rgba(200, 75, 47, 0.08);
  border: 1px solid rgba(200, 75, 47, 0.2);
}

.form-status.success {
  color: #1b4332;
  background: rgba(45, 106, 79, 0.1);
  border: 1px solid rgba(45, 106, 79, 0.2);
}

@media (max-width: 800px) {
  .form-container {
    margin: 40px 20px;
    padding: 30px 20px;
  }
}