/* ==========================================================
   Portfolio — clean & minimal theme
   Palette, spacing, and type scale are defined as CSS variables
   below — change these first if you want to retheme the site.
=========================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f5;
  --text: #1a1a1a;
  --text-muted: #5b5b5b;
  --border: #e4e4e0;
  --accent: #2f5d50;      /* primary accent — swap for your color */
  --accent-soft: #e8f0ed;
  --max-width: 960px;
  --radius: 10px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.logo span { color: var(--accent); }

.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 48px 24px 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.hero-photo {
  justify-self: end;
}
.hero-photo-frame {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  border: 3px solid var(--accent-soft);
}
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero-role {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.hero-text {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}
.hero-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}
.hero-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 6px 16px rgba(47, 93, 80, 0.25); }
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--accent); }
.btn-lg { padding: 14px 30px; font-size: 1rem; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-title span {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 500;
}
.section-sub {
  color: var(--text-muted);
  margin: 0 0 40px;
  max-width: 560px;
}

/* ---------- About ---------- */
.about-text {
  margin-top: 32px;
  max-width: 700px;
}
.about-text p { color: var(--text-muted); margin: 0 0 16px; }

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 32px;
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.project-card:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.project-media {
  aspect-ratio: 16 / 9;
  background: var(--accent-soft);
  position: relative;
}
.project-media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.project-media.no-img { display: flex; align-items: center; justify-content: center; }
.project-media.no-img::after {
  content: "Add a screenshot\A assets/projectN.png";
  white-space: pre;
  text-align: center;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.project-media.no-img img { display: none; }
.project-body { padding: 20px; }
.project-body h4 { margin: 0 0 8px; font-size: 1.1rem; }
.project-body p { margin: 0 0 14px; color: var(--text-muted); font-size: 0.95rem; }
.tech-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
}
.tech-tags li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
}
.project-links {
  display: flex;
  gap: 18px;
}
.project-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.project-links a:hover { text-decoration: underline; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.skill-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.skill-group h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}
.skill-group p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.skill-group ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.92rem; }
.skill-group li { margin-bottom: 5px; }
.skill-group li:last-child { margin-bottom: 0; }

/* ---------- Highlights ---------- */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 32px;
}
.highlights-grid .project-card { background: var(--bg); }
.highlight-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.highlight-card h4 { margin: 0 0 10px; font-size: 1.05rem; }
.highlight-card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.highlight-media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
}
.highlight-media-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--accent-soft);
}
.highlight-media-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

/* ---------- Timeline ---------- */
.timeline-group-title {
  font-family: var(--font-mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  margin: 32px 0 0;
}
.timeline-group-title-spaced { margin-top: 48px; }
.timeline {
  margin-top: 20px;
  border-left: 2px solid var(--border);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-alt);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 6px;
}
.timeline-body h4 { margin: 0 0 10px; font-size: 1.05rem; }
.timeline-body ul { margin: 0; padding-left: 20px; color: var(--text-muted); }
.timeline-body li { margin-bottom: 6px; }

/* ---------- Contact ---------- */
.contact-section { text-align: center; }
.contact-section .section-sub { margin-left: auto; margin-right: auto; }
.contact-links { justify-content: center; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.site-footer p {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Project Detail Pages ---------- */
.project-detail { padding-top: 40px; }
.project-detail .wrap { max-width: 760px; }
.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.back-link:hover { text-decoration: underline; }
.project-detail-title {
  margin: 20px 0 6px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.project-detail-meta {
  color: var(--text-muted);
  margin: 0 0 32px;
}
.project-detail-media {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  background: var(--accent-soft);
}
.project-detail-media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.project-detail h3 {
  font-size: 1.2rem;
  margin: 32px 0 12px;
}
.project-detail h3:first-of-type { margin-top: 0; }
.project-detail p, .project-detail li { color: var(--text-muted); }
.project-detail ul { padding-left: 20px; margin: 0 0 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .project-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .highlights-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { justify-self: center; }
  .hero-photo-frame { width: 140px; height: 140px; }
}

@media (max-width: 640px) {
  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 24px 56px; }
  .section { padding: 64px 0; }
}
