/* ===== Design tokens (black & white) ===== */
:root {
  --bg: #ffffff;
  --bg-soft: #f3f3f1;
  --bg-dark: #0e0e0e;
  --ink: #111111;
  --ink-soft: #5a5a5a;
  --line: #e3e3e1;
  --line-dark: #2a2a2a;
  --orange: #d92d20; /* accent (red) */
  --radius: 14px;
  --container: 1060px;
  --font: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* ===== Header / nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 15px 28px; }
.brand { font-weight: 800; letter-spacing: .2px; font-size: 16px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: 15px; color: var(--ink-soft); transition: color .15s ease; }
.nav-links a:hover { color: var(--orange); }
.nav-links a.active { color: var(--ink); font-weight: 600; position: relative; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -19px; height: 2px; background: var(--orange);
}
.nav-cta {
  border: 1px solid var(--orange); color: var(--orange) !important;
  padding: 7px 16px; border-radius: 999px; font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.nav-cta:hover { background: var(--orange); color: #fff !important; }

/* ===== Bands ===== */
.band { padding: 92px 0; border-top: 1px solid var(--line); }
.band-hero { padding: 80px 0 64px; border-top: none; }
.band-soft { background: var(--bg-soft); border-top: 1px solid var(--line); }
.band-dark { background: var(--bg-dark); color: #fff; border-top: none; }

.section-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--ink); margin-bottom: 40px; position: relative; padding-left: 34px;
}
.section-title::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 24px; height: 3px;
  background: var(--orange); transform: translateY(-50%);
}

/* ===== Hero ===== */
.hero { display: grid; grid-template-columns: 1.4fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  font-size: 13px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 64px); line-height: 1.02; letter-spacing: -1.5px; font-weight: 800;
}
.hero h1 .dot { color: var(--orange); }
.lede { margin-top: 24px; font-size: 19px; color: var(--ink-soft); max-width: 460px; }
.hero-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-photo-wrap {
  position: relative; justify-self: center;
  width: 340px; height: 420px; border-radius: var(--radius);
  background: #e7e7e4; overflow: hidden; border: 1px solid var(--line);
}
.hero-photo {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.photo-fallback {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 800; color: #b9b9b4; letter-spacing: 2px;
}
.hero-photo-wrap.no-photo .hero-photo { display: none; }
.hero-photo-wrap.no-photo .photo-fallback { display: flex; }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 64px; border-top: 1px solid var(--line); }
.stat { padding: 26px 8px 4px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 28px; }
.stat-num { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat-label { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-soft); }

/* ===== About ===== */
.about-lead { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.5px; max-width: 760px; line-height: 1.25; }
.about-body { margin-top: 22px; font-size: 18px; color: var(--ink-soft); max-width: 720px; }

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 13px 24px; border-radius: 999px; font-size: 15px; font-weight: 600;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #eee; }
.btn-accent { background: var(--orange); color: #fff; }
.btn-accent:hover { filter: brightness(1.07); }
.btn-outline { border: 1px solid #444; color: #fff; }
.btn-outline:hover { border-color: #fff; }

/* ===== Experience timeline ===== */
.timeline { display: flex; flex-direction: column; gap: 4px; }
.role { padding: 24px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr; gap: 4px;
  transition: padding-left .2s ease; }
.role:hover { padding-left: 14px; box-shadow: inset 3px 0 0 var(--orange); }
.role:last-child { border-bottom: none; }
.role-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.role-head h3 { font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
.period { font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.company { font-weight: 600; font-size: 15px; }
.role-desc { color: var(--ink-soft); font-size: 16px; max-width: 760px; }

/* ===== Projects ===== */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.project { border-top: 3px solid var(--line); }
.project:hover { transform: translateY(-4px); border-color: var(--line); border-top-color: var(--orange); box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.project-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.project-index { font-size: 13px; font-weight: 800; color: var(--orange); letter-spacing: 1px; }
.project h3 { font-size: 18px; font-weight: 700; letter-spacing: -.2px; line-height: 1.25; }
.wip { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  background: var(--orange); color: #fff; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.project-env { font-size: 12px; color: var(--ink-soft); margin: -8px 0 12px; letter-spacing: .2px; }
.project-desc { color: var(--ink-soft); font-size: 15px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.tags span { font-size: 12px; color: var(--ink); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }
.project-link { display: inline-block; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--orange); }
.project-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ===== Skills ===== */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-group { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.band-soft .skill-group { background: var(--bg); }
.skill-group h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.skill-group ul { list-style: none; }
.skill-group li { padding: 7px 0; font-size: 15px; color: var(--ink-soft); border-bottom: 1px dashed var(--line); }
.skill-group li:last-child { border-bottom: none; }

/* ===== Remote section ===== */
.remote-eyebrow { font-size: 13px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 600;
  color: var(--orange); margin-bottom: 14px; }
.remote-title { font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; letter-spacing: -1px; color: #fff; }
.remote-title .dot { color: var(--orange); }
.remote-lede { margin-top: 18px; color: rgba(255,255,255,.82); font-size: 18px; max-width: 640px; }
.remote-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 40px;
  border-top: 1px solid var(--line-dark); padding-top: 30px; }
.remote-num { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.3px; color: #fff; margin-bottom: 8px; }
.remote-point p { color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.5; }
@media (max-width: 860px) { .remote-points { grid-template-columns: 1fr 1fr; gap: 22px; } }

/* ===== Strengths ===== */
.strengths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.strength { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; border-left: 4px solid var(--orange); }
.strength h3 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 8px; }
.strength p { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 860px) { .strengths { grid-template-columns: 1fr; } }

/* ===== Contact ===== */
.contact-title { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -1px; }
.band-dark .contact-lede { margin-top: 18px; color: #b5b5b5; font-size: 18px; max-width: 520px; }
.contact-links { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .container { display: flex; justify-content: space-between; padding-top: 26px; padding-bottom: 26px;
  color: var(--ink-soft); font-size: 14px; flex-wrap: wrap; gap: 8px; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo-wrap { order: -1; justify-self: start; width: 150px; height: 180px; }
  .projects, .skills { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--line); padding-left: 8px; }
  .band { padding: 64px 0; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-links a.active::after { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ===== Inner-page helpers ===== */
.page-lead { font-size: 18px; color: var(--ink-soft); max-width: 640px; margin: -22px 0 40px; }
.page-foot { margin-top: 40px; font-size: 15px; color: var(--ink-soft); }
.page-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ===== Key-skills strip (About) ===== */
.key-skills { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.key-skills-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--ink-soft); margin-bottom: 14px; }
.key-skills-lead { font-size: 18px; color: var(--ink); max-width: 680px; margin-bottom: 20px; line-height: 1.45; }
.key-skills-list { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; }
.key-skills-list li { font-size: 14px; font-weight: 600; border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; background: var(--bg); }
.key-skills-more { display: inline-block; margin-top: 18px; font-weight: 600; color: var(--orange); }
.key-skills-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ===== Skill levels ===== */
.skills-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.skill-group li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sk-name { color: var(--ink); }
.lvl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.lvl-expert       { background: var(--ink);  color: #fff; }
.lvl-advanced     { background: #fde7e4; color: var(--orange); border-color: #f6c9c3; }
.lvl-intermediate { background: var(--bg-soft); color: var(--ink-soft); border-color: var(--line); }
.lvl-beginner     { background: #fff; color: var(--ink-soft); border-color: var(--line); }

/* ===== Contact page ===== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-intro .contact-links { flex-direction: column; align-items: flex-start; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.field input, .field textarea {
  font-family: var(--font); font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(217,45,32,.12);
}
.field textarea { resize: vertical; min-height: 130px; }
.contact-form .btn { align-self: flex-start; margin-top: 4px; cursor: pointer; }
.form-errors { background: #fde7e4; border: 1px solid #f6c9c3; color: var(--orange);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 22px; }
.form-errors ul { margin: 0; padding-left: 18px; }
.form-errors li { font-size: 14px; }

/* ===== Flash messages ===== */
.flash { border-bottom: 1px solid var(--line); }
.flash .container { padding-top: 14px; padding-bottom: 14px; font-size: 15px; font-weight: 600; }
.flash-notice { background: #e9f7ef; color: #1b7a43; }
.flash-alert  { background: #fde7e4; color: var(--orange); }
