:root {
  --bg: #0f1115;
  --bg-panel: #171a20;
  --text: #e9ebf0;
  --text-muted: #8a92a3;
  --accent-warm: #e2954a;
  --accent-cool: #4f8fef;
  --border: rgba(255,255,255,0.08);
  --font-display: "Fraunces", serif;
  --font-body: "Work Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

a { color: inherit; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(15,17,21,0.9);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
}

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

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible { color: var(--text); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding-top: 96px;
  padding-bottom: 96px;
  min-height: 70vh;
}

.hero-role {
  color: var(--accent-cool);
  font-size: 15px;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 1.02;
  margin: 0 0 24px;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 46ch;
  margin: 0 0 32px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent-warm);
  color: #16130d;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 4px;
  border: none;
  font-size: 16px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-primary:hover { background: #eda05e; }
.btn-primary:active { transform: translateY(1px); }

.hero-graphic { display: flex; justify-content: center; }

.node-graph { width: 100%; max-width: 420px; }

.node-graph .edges line {
  stroke: rgba(255,255,255,0.16);
  stroke-width: 1.4;
  stroke-dasharray: 6 500;
  animation: draw 2.4s ease-out forwards;
}

.node-graph .nodes circle {
  opacity: 0;
  animation: appear 0.6s ease-out forwards;
  animation-delay: 1.4s;
}

.node-graph .n-warm { fill: var(--accent-warm); }
.node-graph .n-cool { fill: var(--accent-cool); }

@keyframes draw {
  from { stroke-dasharray: 6 500; stroke-dashoffset: 0; }
  to { stroke-dasharray: 500 500; stroke-dashoffset: 0; }
}

@keyframes appear {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .node-graph .edges line,
  .node-graph .nodes circle {
    animation: none;
    stroke-dasharray: none;
    opacity: 1;
  }
}

/* ---------- shared section styling ---------- */

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

.section-label {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 32px;
}

/* ---------- about ---------- */

.about-body {
  max-width: 68ch;
  color: var(--text-muted);
}

.about-body p { margin: 0 0 20px; }
.about-body p:last-child { margin-bottom: 0; }

/* ---------- skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.skills-group h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list li {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.tag-list li:hover { border-color: var(--accent-cool); }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
}

.contact-info p {
  color: var(--text-muted);
  max-width: 32ch;
  margin: 0 0 24px;
}

.contact-link {
  display: block;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 16px;
  transition: color 0.2s ease;
}

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

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

.field { display: flex; flex-direction: column; gap: 8px; }

.field label { font-size: 14px; color: var(--text-muted); }

.field input,
.field textarea {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent-cool);
  outline-offset: 1px;
}

.field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .btn-primary { align-self: flex-start; }

.form-status {
  min-height: 20px;
  font-size: 14px;
  margin: 0;
}

.form-status.success { color: #7fd88f; }
.form-status.error { color: #e8756a; }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .hero-graphic { order: -1; max-width: 260px; margin: 0 auto; }
  .skills-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
  .main-nav { gap: 16px; }
}
