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

:root {
  --bg:      #0f1117;
  --surface: #181c27;
  --border:  #252b3b;
  --accent:  #4f8ef7;
  --text:    #e2e6f0;
  --muted:   #8892a4;
  --radius:  6px;
  --max-w:   820px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

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

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

/* Header */
header {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
}

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

.name {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 6px;
}

.tagline {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 28px;
}

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

.links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.15s, color 0.15s;
}

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

/* Section headings */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.rule {
  width: 32px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 32px;
  border-radius: 2px;
}

/* About */
.about-text {
  color: var(--muted);
  max-width: 640px;
  font-size: 15px;
}

.about-text p + p { margin-top: 14px; }

.about-text a {
  color: var(--accent);
  text-decoration: none;
}

.about-text a:hover { text-decoration: underline; }

.about-text strong { color: var(--text); }

/* Experience */
.timeline { display: flex; flex-direction: column; gap: 32px; }

.job {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 24px;
}

@media (max-width: 540px) {
  .job { grid-template-columns: 1fr; }
  .job-meta { margin-bottom: 6px; }
}

.job-meta { padding-top: 3px; }

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

.job-org {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.job-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.job-desc {
  color: var(--muted);
  font-size: 14px;
}

/* StrathWorks */
.strathworks-intro {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 48px;
}

.strathworks-intro a {
  color: var(--accent);
  text-decoration: none;
}

.strathworks-intro a:hover { text-decoration: underline; }

.projects { display: flex; flex-direction: column; gap: 24px; }

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  transition: border-color 0.15s;
}

.project-card:hover { border-color: #3a4460; }

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.project-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.project-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  padding-top: 3px;
  flex-shrink: 0;
}

.project-link:hover { text-decoration: underline; }

.project-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(79, 142, 247, 0.1);
  color: var(--accent);
  border: 1px solid rgba(79, 142, 247, 0.2);
  letter-spacing: 0.03em;
}

/* Contact page */
.contact-page {
  padding: 64px 0 96px;
}

.contact-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 24px;
}

.contact-heading {
  margin-bottom: 36px;
}

.contact-intro {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px;
}

@media (max-width: 480px) {
  .contact-card { padding: 24px 20px; }
}

/* Fields */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}

.field-row .field {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #3d4559;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.12);
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

/* Turnstile */
.cf-turnstile {
  margin-bottom: 20px;
}

/* Submit button */
.contact-card button[type="submit"] {
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 11px 28px;
  transition: opacity 0.15s;
  width: 100%;
}

.contact-card button[type="submit"]:hover {
  opacity: 0.88;
}

/* Notices */
.form-notice {
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 13px 16px;
}

.form-notice--error {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.form-notice--error a {
  color: #fca5a5;
  text-decoration: underline;
}

/* Success state */
.contact-sent {
  text-align: center;
  padding: 16px 0 8px;
}

.contact-sent-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.contact-sent-body {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 28px;
}

.contact-back {
  display: inline-block;
  padding: 9px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

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

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--muted);
  font-size: 13px;
}

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

footer a {
  color: var(--muted);
  text-decoration: none;
}

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