/* ==========================================================================
   John Leinard Javier — Portfolio v1 "Minimal / Dark"
   Shared stylesheet for index.html and resume.html
   ========================================================================== */

:root {
  --bg: #0a0e14;
  --bg-alt: #0f1420;
  --surface: #11161f;
  --surface-hover: #151b26;
  --border: #1f2733;
  --border-hover: #2a3444;
  --text: #e6e9ef;
  --text-dim: #9aa4b2;
  --text-faint: #626d7d;
  --accent: #2dd4bf;
  --accent-dim: #1fa896;
  --accent-soft: rgba(45, 212, 191, 0.1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max-width: 1080px;
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.mono {
  font-family: var(--font-mono);
}

.accent {
  color: var(--accent);
}

section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 40px;
}

/* ---------- Top nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.nav-brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.15s ease;
}

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

.nav-links .btn {
  color: var(--bg);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 20px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06110f;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-text {
  color: var(--text-dim);
  padding: 12px 4px;
}

.btn-text:hover {
  color: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 120px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  display: block;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.14;
  margin-bottom: 10px;
}

.hero-role {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 18px;
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  align-items: center;
}

.hero-photo {
  flex-shrink: 0;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  padding: 6px;
  position: relative;
  box-shadow: 0 0 0 1px var(--border), 0 20px 40px -12px rgba(45, 212, 191, 0.18);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ---------- About ---------- */

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

.about-text p {
  color: var(--text-dim);
  margin-bottom: 18px;
  max-width: 720px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* ---------- Skills ---------- */

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

.skill-group h3 {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  font-weight: 500;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface);
  transition: all 0.15s ease;
}

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

/* ---------- Projects ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.card-visual {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

.card-visual img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
}

.card:hover .card-visual img {
  transform: scale(1.035);
}

.card-index {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(10, 14, 20, 0.75);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 5px;
  z-index: 2;
}

.card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.card-desc {
  color: var(--text-dim);
  font-size: 0.94rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.card-tags span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 5px;
}

.card-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-link:hover {
  color: var(--text);
}

/* ---------- Experience ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.timeline-item:first-child {
  border-top: none;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  padding-top: 3px;
}

.timeline-role h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 12px;
  display: block;
}

.timeline-role p {
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 620px;
}

/* ---------- Contact / Footer ---------- */

.contact-section {
  text-align: center;
}

.contact-section .section-title {
  margin-bottom: 20px;
}

.contact-lede {
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 36px;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer {
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.footer-inner a {
  color: var(--text-dim);
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .about-grid,
  .skills-groups {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

@media (max-width: 700px) {
  section {
    padding: 64px 0;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-photo {
    width: 150px;
    height: 150px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-actions .btn {
    justify-content: center;
  }
}
