/* ==========================================================================
   Ganiyat Yakub — Front-End Engineer Portfolio
   A warm, editorial design system. No templates, no neon.
   ========================================================================== */

:root {
  --paper: #f6f1e8;
  --paper-raised: #fffdf9;
  --ink: #1c1a16;
  --ink-soft: #5c5750;
  --ink-faint: #8d8778;
  --line: rgba(28, 25, 20, 0.14);
  --line-soft: rgba(28, 25, 20, 0.08);
  --accent: #b1481f;
  --accent-ink: #7e3115;
  --accent-soft: #ecd9c6;
  --dark: #17140f;
  --dark-paper: #f0e9dc;
  --dark-line: rgba(240, 233, 220, 0.14);
  --dark-ink-soft: #b4ab9b;
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  --max: 1120px;
  --gutter: clamp(24px, 6vw, 64px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
  font-weight: 600;
}

p { margin: 0; }

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

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

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

.section {
  padding: clamp(64px, 10vw, 128px) 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.01em;
}

.section-head p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- Header ---------- */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(246, 241, 232, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.brand-role {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.menu-link {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  font-size: 18px;
}

.main-nav .main-menu {
  display: flex;
  gap: 36px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

@media (max-width: 860px) {
  .menu-link { display: flex; }

  .main-nav {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
  }

  .main-nav .main-menu {
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 24px;
  }

  .main-nav .main-menu li {
    border-bottom: 1px solid var(--line-soft);
  }

  .main-nav a {
    display: block;
    padding: 16px 0;
  }
}

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

.main-banner {
  padding: 150px 0 0;
  background: var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding-bottom: 72px;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 7px 14px;
  margin-bottom: 28px;
}

.availability-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f8a5b;
  box-shadow: 0 0 0 3px rgba(79, 138, 91, 0.18);
}

.header-text .kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.header-text h1 {
  font-size: clamp(40px, 6vw, 66px);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero-subtext {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 54ch;
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

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

.btn-secondary {
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--ink);
  color: var(--paper);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  position: relative;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.hero-links a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.hero-links i { font-size: 15px; }

.email-toast {
  position: absolute;
  bottom: -38px;
  left: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--paper);
  background: var(--ink);
  padding: 7px 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.email-toast.show { opacity: 1; }

.hero-photo {
  position: relative;
  justify-self: center;
}

.hero-photo .photo-backing {
  position: absolute;
  inset: 18px -18px -18px 18px;
  background: var(--accent-soft);
  z-index: 0;
}

.hero-photo .photo-frame {
  position: relative;
  z-index: 1;
  width: min(360px, 78vw);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.hero-photo .photo-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  position: relative;
  z-index: 1;
}

@media (max-width: 860px) {
  .main-banner.section { padding-top: 120px; }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-photo {
    order: -1;
    justify-self: stretch;
    width: 100%;
    max-width: 380px;
    margin: 0 auto 8px;
  }
  .hero-photo .photo-backing { inset: 14px -14px -14px 14px; }
  .hero-photo .photo-frame { width: 100%; }
}

/* ---------- Stats strip ---------- */

.stats-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 32px var(--gutter);
  border-left: 1px solid var(--line);
}

.stat:first-child { border-left: none; }

.stat .stat-number {
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  color: var(--accent-ink);
}

.stat .stat-label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat { border-bottom: 1px solid var(--line); padding: 24px var(--gutter); }
}

@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

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

.about-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 6vw, 80px);
}

.about-lead {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
}

.about-text p {
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.8;
  margin-bottom: 20px;
}

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

.about-text strong { color: var(--ink); font-weight: 600; }

blockquote.pull-quote {
  margin: 28px 0 0;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  font-family: var(--display);
  font-size: 18px;
  font-style: normal;
  color: var(--ink);
  line-height: 1.5;
}

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

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

.timeline {
  position: relative;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-dates {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  padding-top: 4px;
}

.timeline-body h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-org {
  font-size: 13.5px;
  color: var(--accent-ink);
  font-weight: 500;
  margin-bottom: 12px;
}

.timeline-body p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.timeline-footnote {
  padding-top: 28px;
  font-size: 13.5px;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

@media (max-width: 640px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

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

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.skills-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.skills-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}

.skills-label i { color: var(--accent); font-size: 15px; }

.skills-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills-items span {
  font-size: 13.5px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 6px 13px;
  background: var(--paper-raised);
}

@media (max-width: 700px) {
  .skills-row { grid-template-columns: 1fr; gap: 12px; }
}

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

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -28px rgba(28, 25, 20, 0.35);
}

.project-card-image {
  position: relative;
  height: 180px;
  background-color: var(--ink);
  background-size: cover;
  background-position: center;
}

.project-card-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper-raised);
  padding: 6px 11px;
}

.project-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 26px;
}

.project-card-body h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.project-card-body p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 22px;
}

.project-card-btn {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
}

.project-card-btn::after {
  content: "\2192";
  transition: transform 0.2s ease;
}

.project-card-btn:hover::after { transform: translateX(3px); }

.lamisplus    { background-image: url("../images/Lamisplus.png"); }
.cousin       { background-image: url("../images/realcousins.png"); }
.admoni       { background-image: url("../images/admoni.jpg"); }
.african      { background-image: url("../images/african.jpg"); }
.eschool      { background-image: url("../images/eschool.jpg"); }
.eazi-rent    { background-image: url("../images/eazi-rent.jpg"); }

.project-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.project-modal.open { display: flex; }

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 20, 15, 0.6);
}

.project-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -20px rgba(23, 20, 15, 0.45);
  padding: 44px;
}

.project-modal-panel .category {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.project-modal-panel h3 {
  font-size: 24px;
  margin-bottom: 18px;
}

.project-modal-panel p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 14px;
}

.project-modal-panel .stack {
  color: var(--ink);
}

.project-modal-panel .result {
  padding: 16px 18px;
  background: var(--paper);
  border-left: 2px solid var(--accent);
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.project-modal-close:hover {
  color: var(--ink);
  border-color: var(--ink);
}

body.modal-open { overflow: hidden; }

.link-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.link-container a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

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

.link-container img { width: 16px; height: 16px; }

@media (max-width: 500px) {
  .project-modal-panel { padding: 30px 22px; }
}

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

.contact {
  background: var(--dark);
  color: var(--dark-paper);
}

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

.contact h2 {
  color: var(--dark-paper);
  font-size: clamp(30px, 4vw, 46px);
  max-width: 680px;
  letter-spacing: -0.01em;
}

.contact .contact-intro {
  margin-top: 18px;
  max-width: 60ch;
  color: var(--dark-ink-soft);
  font-size: 17px;
  line-height: 1.7;
}

.contact-con {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--dark-line);
}

.contact-entity a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 500;
  color: var(--dark-paper);
}

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

.contact-entity i { color: var(--accent); font-size: 18px; }

.social-row {
  display: flex;
  gap: 16px;
  margin-top: 36px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--dark-line);
  color: var(--dark-paper);
  font-size: 18px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

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

footer {
  background: var(--dark);
  color: var(--dark-ink-soft);
  border-top: 1px solid var(--dark-line);
  padding: 24px 0;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 860px) {
  .section { padding: 56px 0; }
}

/* ---------- Mobile type scale ---------- */

@media (max-width: 640px) {
  body { font-size: 15px; }

  .header-text h1 { font-size: 36px; }
  .hero-subtext { font-size: 16px; line-height: 1.65; }

  .section-head h2 { font-size: 26px; }
  .section-head p { font-size: 15px; }

  .about-lead { font-size: 19px; }
  .about-text p { font-size: 15px; }
  blockquote.pull-quote { font-size: 16px; }

  .timeline-body h3 { font-size: 17px; }
  .timeline-body p { font-size: 14px; }
  .timeline-org { font-size: 13px; }

  .skills-items span { font-size: 13px; }

  .project-card-body h3 { font-size: 17px; }
  .project-card-body p { font-size: 13.5px; }

  .project-modal-panel h3 { font-size: 20px; }
  .project-modal-panel p { font-size: 14px; }

  .contact h2 { font-size: 28px; }
  .contact .contact-intro { font-size: 15px; }
}
