/* ============================================================
   PORTFOLIO – STYLESHEET
   style.css
   
   TABLE OF CONTENTS:
   1.  CSS Variables (design tokens)
   2.  Reset & Base
   3.  Navigation
   4.  Page wrapper
   5.  Hero section
   6.  Buttons
   7.  Stat cards (hero right column)
   8.  Section shared styles
   9.  Skills section
   10. Experience / Timeline
   11. Education cards
   12. About section
   13. Contact section
   14. Footer
   15. Responsive (mobile)
   ============================================================ */


/* ============================================================
   1. CSS VARIABLES – design tokens
   Change these to restyle the whole site at once.
   ============================================================ */
:root {
  /* Colors */
  --bg:       #F7F6F2;   /* warm off-white page background */
  --white:    #FFFFFF;   /* card / input background */
  --ink:      #111110;   /* primary text & dark buttons */
  --ink2:     #4A4A47;   /* secondary text */
  --ink3:     #9A9994;   /* muted text, labels, rules */
  --rule:     rgba(0, 0, 0, 0.09); /* border color used everywhere */
  --pill:     #EEECEA;   /* hover bg on nav links */
  --green:    #1D7A4C;   /* accent (available badge, form success) */
  --green-bg: #E6F4EC;   /* light green badge background */

  /* Typography */
  --serif: 'Clash Display', sans-serif;  /* headings font */
  --sans:  'Inter', sans-serif;          /* body font */

  /* Border radius */
  --radius:    14px;  /* cards, large elements */
  --radius-sm:  8px;  /* inputs, small elements */
}


/* ============================================================
   2. RESET & BASE
   Removes browser default margins/padding, sets global font.
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* smooth scroll when clicking nav links */
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased; /* crisper text on Mac/iOS */
}


/* ============================================================
   3. NAVIGATION
   Sticky top bar that stays visible while scrolling.
   backdrop-filter: blur gives the frosted-glass effect.
   ============================================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 100; /* sit above all other content */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 60px;
  background: rgba(247, 246, 242, 0.88); /* semi-transparent so content shows through */
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--ink2);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  padding: 0.4rem 0.85rem;
  border-radius: 100px; /* fully rounded pill shape */
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: var(--pill);
  color: var(--ink);
}

/* The "Contact" button in the nav — dark filled pill */
.nav-cta {
  background: var(--ink) !important;
  color: var(--white) !important;
  font-weight: 500 !important;
}

.nav-cta:hover {
  background: #2d2d2a !important;
}


/* ============================================================
   4. PAGE WRAPPER
   Centers content and sets max width.
   All sections live inside .page.
   ============================================================ */
.page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 2rem;
}


/* ============================================================
   5. HERO SECTION
   Two-column grid: text on left, stat cards on right.
   align-items: end means both columns bottom-align.
   ============================================================ */
.hero {
  padding: 5rem 0 4rem;
  display: grid;
  grid-template-columns: 1fr auto; /* text takes all space, stats take only what they need */
  gap: 3rem;
  align-items: end;
  border-bottom: 1px solid var(--rule);
}

/* Green "Open to new roles" badge */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

/* The green dot inside the badge — created with CSS, no extra HTML needed */
.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

/* Main H1 heading */
h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.2rem); /* clamp(min, preferred, max) — scales with viewport */
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em; /* tight tracking looks modern on large headings */
  margin-bottom: 1.5rem;
  color: var(--ink);
}

/* The italic "Developer" word in the H1 */
h1 em {
  font-style: italic;
  color: var(--ink3); /* muted color makes it look like a subtitle */
  font-weight: 500;
}

.hero-sub {
  font-size: 1rem;
  color: var(--ink2);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 2rem;
  font-weight: 300; /* light weight for descriptive paragraph */
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}


/* ============================================================
   6. BUTTONS
   Two variants: dark (filled) and ghost (light pill).
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1.4rem;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}

.btn-dark:hover {
  background: #2d2d2a;
  transform: translateY(-1px); /* subtle lift on hover */
}

.btn-ghost {
  background: var(--pill);
  color: var(--ink);
}

.btn-ghost:hover {
  background: #e0ded8;
}


/* ============================================================
   7. STAT CARDS (hero right column)
   Stacked cards showing key numbers.
   Gap of 1px between them creates a "connected" look.
   ============================================================ */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 1px; /* tiny gap so cards look like one group */
  align-self: end;
}

.stat {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 1rem 1.5rem;
  min-width: 180px;
  text-align: right;
  transition: transform 0.15s;
}

/* Rounded corners only on the outermost edges of the group */
.stat:first-child { border-radius: var(--radius) var(--radius) var(--radius-sm) var(--radius-sm); }
.stat:last-child  { border-radius: var(--radius-sm) var(--radius-sm) var(--radius) var(--radius); }
.stat:not(:first-child):not(:last-child) { border-radius: var(--radius-sm); }

.stat:hover {
  transform: translateX(-4px); /* slide left on hover — subtle interaction */
}

.stat-num {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--ink3);
  margin-top: 2px;
}


/* ============================================================
   8. SECTION SHARED STYLES
   Every content section (About, Skills, etc.) uses .section.
   ============================================================ */
.section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--rule);
}

/* Small numbered label above each section heading, e.g. "01 — About" */
.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink3);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* The horizontal rule that extends after the label text */
.section-label::after {
  content: '';
  flex: 1; /* grows to fill remaining width */
  height: 1px;
  background: var(--rule);
}

/* Section heading (h2) */
h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 2.5rem;
  color: var(--ink);
}


/* ============================================================
   9. SKILLS SECTION
   Horizontal rows: category label on left, pill tags on right.
   ============================================================ */
.skills-wrap {
  display: flex;
  flex-direction: column;
}

.skill-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.skill-row:last-child {
  border-bottom: none;
}

/* Fixed-width category label column */
.skill-cat {
  width: 180px;
  flex-shrink: 0; /* never shrinks below 180px */
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink2);
  padding-top: 4px; /* aligns with tag text */
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Individual skill pill */
.tag {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  color: var(--ink2);
  transition: all 0.12s;
}

.tag:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}


/* ============================================================
   10. EXPERIENCE / TIMELINE
   Two-column grid per job: date on left, content on right.
   Items start hidden (opacity: 0) and animate in via JS
   when they enter the viewport (.visible class is added).
   ============================================================ */
.exp-list {
  display: flex;
  flex-direction: column;
}

.exp-item {
  display: grid;
  grid-template-columns: 160px 1fr; /* fixed date column + flexible content */
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);

  /* Initial state — invisible and slightly shifted down */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s, transform 0.45s;
}

/* JS adds this class when the item scrolls into view */
.exp-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.exp-item:last-child {
  border-bottom: none;
}

.exp-period {
  font-size: 0.78rem;
  color: var(--ink3);
  padding-top: 4px;
  line-height: 1.5;
}

/* Company name — small, uppercase, muted */
.exp-company {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

/* Job title */
.exp-role {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.exp-bullets li {
  font-size: 0.85rem;
  color: var(--ink2);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.55;
}

/* Em dash bullet — CSS-generated, no extra HTML */
.exp-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--ink3);
  font-size: 0.7rem;
  top: 3px;
}


/* ============================================================
   11. EDUCATION CARDS
   Auto-fit grid — cards wrap to new rows on small screens.
   ============================================================ */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.edu-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.edu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
}

.edu-year {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.edu-degree {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.edu-school {
  font-size: 0.82rem;
  color: var(--ink2);
  margin-bottom: 0.75rem;
}

.edu-notes {
  font-size: 0.78rem;
  color: var(--ink3);
  line-height: 1.6;
}


/* ============================================================
   12. ABOUT SECTION
   Two-column grid: bio text left, certifications right.
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.about-body {
  font-size: 0.92rem;
  color: var(--ink2);
  line-height: 1.8;
  font-weight: 300;
}

.about-body p + p {
  margin-top: 1rem; /* space between paragraphs */
}

/* 2×2 grid of language pills */
.lang-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.lang-pill {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
}

.lang-name  { font-weight: 500; color: var(--ink); }
.lang-level { color: var(--ink3); font-size: 0.72rem; margin-top: 1px; }

/* Numbered certification list */
.certs {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.cert-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--ink2);
  line-height: 1.4;
}

.cert-item:last-child { border-bottom: none; }

.cert-num {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink3);
  flex-shrink: 0;
  margin-top: 2px;
  width: 20px;
}


/* ============================================================
   13. CONTACT SECTION
   Two-column: contact info/links left, form right.
   ============================================================ */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-blurb {
  font-size: 0.9rem;
  color: var(--ink2);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Each contact row (email, phone, github, linkedin) */
.c-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--ink);
  font-weight: 400;
  transition: all 0.15s;
}

/* Invert colors on hover — row goes dark */
.c-link:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.c-link:hover .c-link-badge { color: rgba(255, 255, 255, 0.5); }
.c-link:hover .c-link-arrow { opacity: 1; transform: translate(2px, -2px); }

.c-link-left { display: flex; align-items: center; gap: 0.75rem; }

/* Small label like "Email", "Phone", "GitHub" */
.c-link-badge {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink3);
  width: 56px;
}

/* ↗ arrow on the right */
.c-link-arrow {
  font-size: 0.9rem;
  opacity: 0.3;
  transition: all 0.15s;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink3);
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.88rem;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical; /* textarea can be resized vertically only */
}

.field input:focus,
.field textarea:focus {
  border-color: var(--ink); /* dark border on focus instead of browser default blue glow */
}


/* ============================================================
   14. FOOTER
   Simple one-line footer with three items spread across.
   ============================================================ */
footer {
  padding: 2.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--ink3);
}


/* ============================================================
   15. RESPONSIVE — mobile (max-width: 720px)
   Collapses multi-column layouts into single-column stacks.
   ============================================================ */
@media (max-width: 720px) {

  /* Tighten nav padding, hide links (no hamburger menu added — keep it simple) */
  nav { padding: 0 1.25rem; }
  .nav-links { display: none; }

  /* Hero goes single column */
  .hero { grid-template-columns: 1fr; padding: 3rem 0; }

  /* Stat cards go horizontal row instead of stacked column */
  .hero-stats { flex-direction: row; flex-wrap: wrap; }
  .stat { min-width: 0; flex: 1; text-align: left; border-radius: var(--radius-sm) !important; }

  /* Skills: stack category above tags */
  .skill-row { flex-direction: column; gap: 0.5rem; }
  .skill-cat { width: auto; }

  /* Experience: single column */
  .exp-item { grid-template-columns: 1fr; gap: 0.5rem; }

  /* About and Contact: single column */
  .about-grid,
  .contact-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Tighter page padding on small screens */
  .page { padding: 0 1.25rem; }

  /* Stack footer items */
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
