/* public/css/styles.css
   Plain CSS, no build tools — every page loads this one file (linked in
   views/partials/head.ejs). It's organized top to bottom as:
     1. CSS variables (colors, spacing) — change these to re-theme the whole site
     2. Reset / base styles
     3. Layout helpers (container, sections)
     4. Reusable components (buttons, cards, pills, timeline)
     5. Page-specific bits (hero, header, footer)
*/

/* ---------- 1. Variables ---------- */
:root {
  --color-bg: #ffffff;
  --color-text: #1d1d1f;       /* Apple's near-black, softer than pure #000 */
  --color-text-muted: #6e6e73; /* Apple's muted gray for secondary text */
  --color-accent: #0071e3;     /* Apple's signature blue */
  --color-accent-hover: #0077ed;
  --color-border: #d2d2d7;
  --color-surface: #f5f5f7;    /* light gray section background, like apple.com */
  --radius: 18px;
  --max-width: 1100px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

/* ---------- 2. Reset / base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.narrow {
  max-width: 720px;
}

.section {
  padding: 72px 0;
}

.section-title {
  font-size: 28px;
  margin-bottom: 32px;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

@media (max-width: 700px) {
  .two-column {
    grid-template-columns: 1fr;
  }
}

/* ---------- 4. Reusable components ---------- */

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 980px; /* Apple's fully-rounded "pill" button shape */
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--color-accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: #eaeaec;
  color: var(--color-text);
}

/* Cards (used for skills, projects, blog previews) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius);
  padding: 28px;
}

.card-title {
  font-size: 18px;
  margin-bottom: 12px;
}

/* Pills (small rounded tags, used for individual skills) */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 980px;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Timeline (used for work experience) */
.timeline-item {
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
}

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

.timeline-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-heading h3 {
  font-size: 20px;
  margin: 0;
}

.timeline-dates {
  color: var(--color-text-muted);
  font-size: 14px;
  white-space: nowrap;
}

.timeline-company {
  color: var(--color-text-muted);
  margin: 4px 0 12px;
}

.timeline-highlights li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
}

.timeline-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

.plain-list li {
  margin-bottom: 16px;
}

.link-arrow {
  display: inline-block;
  margin-top: 24px;
  font-weight: 500;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.contact-form label {
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
}

/* Visually hides the honeypot field from real visitors without using
   display:none/visibility:hidden — some spam bots specifically check for
   those and skip filling the field in, defeating the trap. This keeps it
   painted off-screen instead, which most simple bots don't check for. */
.honeypot-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-family);
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background-color: var(--color-surface);
}

.contact-form button {
  margin-top: 20px;
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

/* Success/error banner shown above the contact form after a submission
   (see the "status" object passed into contact.ejs by routes/pages.js). */
.form-status {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
  margin-top: 20px;
}

.form-status-success {
  background-color: #e7f7ec;
  color: #1c6b34;
}

.form-status-error {
  background-color: #fdecec;
  color: #a51c1c;
}

/* ---------- 5. Page-specific ---------- */

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

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

.brand {
  font-weight: 600;
  color: var(--color-text);
  font-size: 16px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  color: var(--color-text);
  font-size: 14px;
}

.site-nav a:hover {
  color: var(--color-text-muted);
}

/* Highlights whichever nav link matches the current page (see header.ejs,
   which compares each link's href to res.locals.currentPath). */
.site-nav a.active {
  color: var(--color-accent);
  font-weight: 600;
}

/* Hero (homepage) */
.hero {
  padding: 120px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top; /* shift the crop up so the whole head/hair shows */
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 4px solid #ffffff;
  outline: 1px solid var(--color-border);
}

.eyebrow {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 56px;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 400;
  color: var(--color-text-muted);
}

.hero-tagline {
  max-width: 560px;
  margin: 16px auto 32px;
  font-size: 18px;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Simple hero used on inner pages (about/projects/blog/resume/contact) */
.page-hero {
  padding: 96px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

/* Section background alternation for visual rhythm */
.summary-section,
.experience-section {
  background-color: var(--color-bg);
}

.skills-section {
  background-color: var(--color-surface);
}

.summary-text {
  max-width: 720px;
  font-size: 18px;
  color: var(--color-text-muted);
}

/* Call to action band */
.cta-section {
  background-color: var(--color-text);
  color: #ffffff;
  text-align: center;
}

.cta-inner h2 {
  font-size: 32px;
}

.cta-inner p {
  color: #a1a1a6;
  margin-bottom: 24px;
}

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

.footer-contact {
  margin-top: 4px;
}

/* Social icon links (GitHub/LinkedIn) — used in the footer, homepage hero,
   and resume page via partials/social-links.ejs */
.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--color-text-muted);
  background-color: var(--color-surface);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
  background-color: var(--color-accent);
  color: #ffffff;
}

/* The footer sits on a light background already, so its icons can be a touch
   more subtle than the ones on the hero. */
.site-footer .social-links {
  margin-top: 16px;
}

/* Responsive tweaks */
@media (max-width: 700px) {
  .hero h1 {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .site-nav {
    gap: 14px;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 0;
  }
}
