/* elesawy.net — static site styles */
:root {
  --navy-950: #071322;
  --navy-900: #0b1a2b;
  --navy-800: #12263d;
  --navy-700: #1c3552;
  --ink: #0f1c2b;
  --text: #33465a;
  --muted: #64778b;
  --line: #dfe5ec;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --accent: #0fa3a3;
  --accent-600: #0b8686;
  --accent-soft: #e2f5f4;
  --pin: #f2a53a;
  --on-dark: #e7eef6;
  --on-dark-muted: #9fb2c6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 26, 43, .05), 0 8px 24px rgba(11, 26, 43, .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.75rem, 3.2vw, 2.5rem); letter-spacing: -.01em; }
h3 { font-size: 1.05rem; font-weight: 600; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.3rem; border-radius: 10px; font-weight: 600; font-size: .95rem;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  transition: background .2s, transform .2s, border-color .2s;
}
.btn:hover { background: var(--accent-600); border-color: var(--accent-600); text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(231, 238, 246, .3); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(231, 238, 246, .55); }
.btn-sm { padding: .5rem .95rem; font-size: .88rem; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-scrolled { background: rgba(7, 19, 34, .86); backdrop-filter: saturate(140%) blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; font-weight: 600; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  font-family: var(--serif); font-size: 1rem; color: #fff;
  background: linear-gradient(135deg, var(--accent), #136d8f);
}
.menu { display: flex; align-items: center; gap: 1.8rem; }
.menu a:not(.btn) { color: var(--on-dark-muted); font-size: .93rem; font-weight: 500; }
.menu a:not(.btn):hover, .menu a.is-current { color: #fff; text-decoration: none; }
.menu-btn { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 9px; right: 9px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, top .25s; }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  background: radial-gradient(1200px 600px at 80% 10%, #16395a 0%, transparent 60%), var(--navy-950);
  padding: 140px 0 56px;
}
.contours { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(15, 163, 163, .16); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.35fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.4rem;
  font-size: .85rem; color: var(--on-dark-muted); padding: .35rem .8rem;
  border: 1px solid rgba(231, 238, 246, .14); border-radius: 999px; background: rgba(255,255,255,.03);
}
.pin { width: 8px; height: 8px; border-radius: 50%; background: var(--pin); box-shadow: 0 0 0 4px rgba(242, 165, 58, .2); }
.hero h1 {
  font-family: var(--serif); font-weight: 600; color: #fff;
  font-size: clamp(2.4rem, 5.4vw, 4.1rem); letter-spacing: -.02em; line-height: 1.06; margin-bottom: 1.4rem;
}
.hero h1 em { font-style: normal; color: #7fd8d4; }
.h1-label {
  display: block; font-family: var(--sans); font-size: .95rem; font-weight: 600; letter-spacing: .02em;
  color: var(--on-dark-muted); line-height: 1.4; margin-bottom: 1rem;
}
.lede { font-size: 1.1rem; max-width: 40em; color: #c7d4e2; margin: 0 0 2rem; }
.lede strong { color: #fff; font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; }

.portrait { margin: 0; justify-self: end; width: 100%; max-width: 400px; }
.portrait-frame {
  position: relative; aspect-ratio: 11 / 13; border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, #1d4364, #0d2238);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; position: relative; z-index: 1; }
.portrait-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: 6rem; color: rgba(255,255,255,.18);
}
.coord {
  display: flex; justify-content: space-between; margin-top: .8rem;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; color: var(--on-dark-muted);
}

.stats {
  position: relative; margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(231, 238, 246, .12);
}
.stats > div { padding: 24px 24px 0 0; }
.stats > div + div { padding-left: 24px; border-left: 1px solid rgba(231, 238, 246, .12); }
.stats dt { font-family: var(--serif); font-size: 1.9rem; color: #fff; font-weight: 600; line-height: 1.1; }
.stats dd { margin: .35rem 0 0; font-size: .88rem; color: var(--on-dark-muted); }

/* Sections */
.section { padding: 110px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 52px; }
.kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-600); margin: 0 0 .9rem; }
.sub { font-size: 1.08rem; color: var(--muted); margin: 1rem 0 0; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.pillar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 30px 28px; box-shadow: var(--shadow);
}
.pillar-icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-600); margin-bottom: 18px;
}
.pillar-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pillar h3 { font-size: 1.15rem; margin-bottom: 14px; }
.pillar li, .project li { list-style: none; position: relative; padding-left: 18px; margin: .5rem 0; font-size: .97rem; }
.pillar li::before, .project li::before {
  content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%;
  border: 1.5px solid var(--accent);
}

/* Tabs */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 30px; }
.tabs button {
  font: inherit; font-size: .92rem; font-weight: 500; color: var(--muted);
  padding: .55rem 1rem; border-radius: 8px; border: 0; background: transparent; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(11,26,43,.12); }
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.skill h3 { margin-bottom: .7rem; }
.skill p { margin: 0; font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span, .tags span {
  font-size: .8rem; font-weight: 500; padding: .28rem .62rem; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
}
.tabpanel[hidden] { display: none; }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer;
  padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.filter.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.project:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9d4df; }
.project[hidden] { display: none; }
.loc { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-600); margin: 0 0 .6rem; }
.project h3 { font-size: 1.1rem; margin-bottom: .6rem; }
.project ul { flex: 1; }
.project li { font-size: .93rem; }
.project strong { color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px dashed var(--line); }
.tags span { background: var(--accent-soft); border-color: transparent; color: var(--accent-600); }

/* Credentials */
.section-dark { background: var(--navy-900); color: var(--on-dark); }
.section-dark h2 { color: #fff; }
.section-dark .kicker { color: #7fd8d4; }
.creds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.creds li {
  list-style: none; display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid rgba(231, 238, 246, .1);
}
.cred-k { font-family: var(--serif); font-size: 1.2rem; color: #fff; font-weight: 600; }
.cred-v { color: var(--on-dark-muted); font-size: .97rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.contact-cards { display: grid; gap: 14px; }
.contact-card {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); transition: border-color .2s, transform .2s;
}
a.contact-card:hover { text-decoration: none; border-color: var(--accent); transform: translateX(3px); }
.cc-label { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cc-value { font-weight: 600; overflow-wrap: anywhere; text-align: right; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }
.muted { color: var(--muted); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* Responsive */
@media (max-width: 1000px) {
  .projects, .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr 300px; gap: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: min(1160px, 100% - 32px); }
  .menu-btn { display: block; }
  .menu {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-950); padding: 8px 16px 20px; border-bottom: 1px solid rgba(255,255,255,.08);
    display: none;
  }
  .menu.is-open { display: flex; }
  .menu a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
  .menu .btn { margin-top: 14px; justify-content: center; }
  .nav.menu-open { background: var(--navy-950); }
  .hero { padding: 96px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  /* Compact round avatar instead of the tall portrait card */
  .portrait { order: -1; justify-self: start; width: 104px; max-width: none; margin-bottom: 22px; }
  .portrait-frame {
    aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(127, 216, 212, .55);
    box-shadow: 0 0 0 6px rgba(15, 163, 163, .12), 0 12px 30px rgba(0,0,0,.35);
  }
  .portrait-frame img { transform: scale(1.9); transform-origin: 50% 24%; }
  .portrait-fallback { font-size: 2.2rem; }
  .coord { display: none; }
  .eyebrow { font-size: .8rem; border-radius: 12px; align-items: flex-start; line-height: 1.45; margin-bottom: 1.1rem; }
  .pin { margin-top: .32rem; flex: none; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.1; margin-bottom: 1.1rem; }
  .lede { font-size: 1rem; margin-bottom: 1.6rem; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
  .stats { margin-top: 40px; }
  .stats dt { font-size: 1.35rem; }
  .stats dd { font-size: .82rem; }
  .h1-label { font-size: .82rem; margin-bottom: .7rem; }
  .section-head { margin-bottom: 36px; }
  .sub { font-size: 1rem; }
  /* Tabs scroll horizontally instead of wrapping */
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { white-space: nowrap; flex: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { white-space: nowrap; flex: none; }
  .project, .skill { padding: 22px; }
  .creds li { padding: 16px 0; }
  .contact-card { padding: 18px 20px; }
  .footer-inner { justify-content: center; text-align: center; }
  .stats > div { padding: 18px 12px 0 0; }
  .stats > div + div { padding-left: 12px; }
  .stats dt { font-size: 1.5rem; }
  .section { padding: 76px 0; }
  .pillars, .projects, .skill-grid, .creds, .contact { grid-template-columns: 1fr; }
  .contact { gap: 32px; }
  .creds li { grid-template-columns: 1fr; gap: 4px; }
  .pillar { padding: 24px; }
}
