/* ============================================================
   melrestori.com — shared styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

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

:root {
  --orange:      #D35529;
  --orange-dark: #B84420;
  --orange-pale: #FEF0E8;
  --dark:        #1C1C1C;
  --text:        #444444;
  --muted:       #777777;
  --light:       #F8F7F6;
  --border:      #E8E8E8;
  --white:       #FFFFFF;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.06);
  --shadow:      0 4px 24px rgba(0,0,0,.10);
  --radius:      10px;
  --max-w:       1080px;
  --font:        'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', sans-serif;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.75;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img  { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Typography ───────────────────────────────────────────── */

h1, h2, h3, h4 {
  color: var(--dark);
  line-height: 1.2;
  font-weight: 600;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

/* ── Navigation ───────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 2rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--orange);
  letter-spacing: -.01em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.nav-social {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-left: 1rem;
}
.nav-social a {
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color .2s;
}
.nav-social a:hover { color: var(--orange); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .72rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: background .18s, color .18s, transform .12s, border-color .18s;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

.btn-outline {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}
.btn-outline:hover {
  background: var(--orange);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--orange);
  border-color: var(--white);
  flex-shrink: 0;
}
.btn-white:hover {
  background: var(--orange-pale);
  border-color: var(--orange-pale);
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding: 5rem 0 4.5rem;
  background: var(--white);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  background: var(--orange-pale);
  color: var(--orange);
  font-size: .72rem;
  font-weight: 700;
  padding: .3rem .9rem;
  border-radius: 20px;
  margin-bottom: 1.1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero-text h1 { margin-bottom: .4rem; }
.hero-subtitle {
  font-size: clamp(.95rem, 2vw, 1.2rem);
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--orange-pale);
  box-shadow: 0 0 0 8px var(--orange-pale), var(--shadow);
  flex-shrink: 0;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

/* ── Sections ─────────────────────────────────────────────── */

.section     { padding: 5rem 0; }
.section-alt { background: var(--light); }

.section-header { margin-bottom: 2.75rem; }
.section-label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .6rem;
}
.section-desc {
  color: var(--muted);
  font-size: 1rem;
  max-width: 580px;
  margin-top: .5rem;
}

/* ── Timeline ─────────────────────────────────────────────── */

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

.timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1.25rem;
}
.timeline-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: .4rem;
}
.timeline-dot::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}
.timeline-dot::after {
  content: '';
  flex: 1;
  width: 2px;
  background: var(--border);
  margin-top: .5rem;
  min-height: 1rem;
}
.timeline-item:last-child .timeline-dot::after { display: none; }

.timeline-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.timeline-card h3 {
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: .2rem;
}
.timeline-company {
  font-size: .85rem;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: .8rem;
}
.timeline-card ul {
  list-style: disc;
  padding-left: 1.2rem;
}
.timeline-card li {
  font-size: .875rem;
  color: var(--text);
  margin-bottom: .3rem;
  line-height: 1.55;
}
.timeline-card li:last-child { margin-bottom: 0; }

.timeline-link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .85rem;
  color: var(--orange);
  font-weight: 600;
}
.timeline-link:hover { text-decoration: underline; }

/* ── Stack ────────────────────────────────────────────────── */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 2.5rem;
}
.tool-group h4 {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .65rem;
  font-weight: 600;
}
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.tag {
  background: var(--white);
  border: 1px solid var(--border);
  padding: .3rem .7rem;
  border-radius: 20px;
  font-size: .8rem;
  color: var(--text);
  font-weight: 500;
}

/* ── Teaching callout ─────────────────────────────────────── */

.callout {
  background: var(--orange);
  border-radius: var(--radius);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.callout h2 { color: var(--white); margin-bottom: .4rem; font-size: 1.25rem; }
.callout p  { color: rgba(255,255,255,.85); }

/* ── Education ────────────────────────────────────────────── */

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.edu-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.edu-degree {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .25rem;
}
.edu-school { color: var(--muted); font-size: .9rem; }

/* ── Page hero (interior pages) ───────────────────────────── */

.page-hero {
  background: var(--light);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0;
}
.page-hero h1 { margin-bottom: .5rem; }
.page-hero p  { color: var(--muted); font-size: 1rem; max-width: 560px; }

/* ── Experience list (resume style) ──────────────────────── */

.experience-list { display: flex; flex-direction: column; }

.exp-group {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.exp-group:first-child { border-top: 1px solid var(--border); }

.exp-company {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  padding-top: .05rem;
}

.exp-roles { display: flex; flex-direction: column; gap: .25rem; }

.exp-role {
  font-size: .95rem;
  color: var(--dark);
  font-weight: 500;
}

.exp-link {
  font-size: .8rem;
  color: var(--orange);
  font-weight: 600;
}
.exp-link:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .exp-group {
    grid-template-columns: 1fr;
    gap: .3rem;
    padding: .85rem 0;
  }
}

/* ── Portfolio cards ──────────────────────────────────────── */

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.project-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.project-visual {
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* decorative circles */
.project-visual::before,
.project-visual::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.project-visual::before { width: 220px; height: 220px; right: -50px; top: -60px; }
.project-visual::after  { width: 130px; height: 130px; left: 20px; bottom: -40px; }

.project-visual svg {
  width: 60px;
  height: 60px;
  color: rgba(255,255,255,.92);
  position: relative;
  z-index: 1;
}

.project-body { padding: 1.6rem; }

.project-tags {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}
.project-tag {
  background: var(--orange-pale);
  color: var(--orange);
  font-size: .72rem;
  font-weight: 700;
  padding: .22rem .6rem;
  border-radius: 20px;
  letter-spacing: .03em;
}

.project-body h3 {
  font-size: 1.05rem;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: .9rem;
}
.project-body ul { padding: 0; }
.project-body li {
  font-size: .875rem;
  color: var(--text);
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: .45rem;
  line-height: 1.5;
}
.project-body li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}

/* ── Course cards ─────────────────────────────────────────── */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.course-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.course-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.course-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-body h3 {
  font-size: 1rem;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: .6rem;
}
.course-body p {
  font-size: .875rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.6;
  margin-bottom: 1.15rem;
}
.course-body .btn {
  align-self: flex-start;
  font-size: .85rem;
  padding: .55rem 1.1rem;
}
.course-tool-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .75rem;
  font-size: .82rem;
  color: var(--orange);
  font-weight: 600;
}
.course-tool-link:hover { text-decoration: underline; }

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  background: var(--dark);
  padding: 3rem 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
}
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a {
  font-size: .875rem;
  color: rgba(255,255,255,.55);
  transition: color .2s;
}
.footer-nav a:hover { color: var(--orange); }

.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  color: rgba(255,255,255,.55);
  display: flex;
  align-items: center;
  transition: color .2s;
}
.footer-social a:hover { color: var(--orange); }

.footer-copy {
  width: 100%;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 860px) {
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* mobile nav */
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: .5rem 0;
    box-shadow: var(--shadow);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: .75rem 1.5rem;
    border-bottom: none;
  }
  .nav-social { display: none; }
  .nav-toggle  { display: flex; }

  /* hero */
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    order: -1;
  }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-cta  { justify-content: center; }

  /* timeline */
  .timeline-item { grid-template-columns: 1fr; gap: 0; }
  .timeline-dot  { display: none; }
  .timeline-card { border-left: 4px solid var(--orange); }

  /* courses */
  .courses-grid { grid-template-columns: 1fr; }

  /* callout */
  .callout {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
  .btn-white { align-self: center; }

  /* footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .footer-nav { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 768px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .tools-grid { grid-template-columns: 1fr; }
  .edu-grid   { grid-template-columns: 1fr; }
  .hero-photo { width: 165px; height: 165px; }
}
