/* ============================================================
   Aili Alamdari — Portfolio
   Clean, warm, professional. Beige background, navy accents.
   ============================================================ */

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

:root{
  --bg: #F6F1E6;
  --card: #FFFFFF;
  --bg-alt: #EFE7D3;
  --navy: #142B4D;
  --navy-2: #1E3E6B;
  --navy-deep: #0A1830;
  --ink: #1D1B16;
  --muted: #7C7462;
  --line: #E6DEC9;

  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;

  --max: 1160px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20,20,10,.04), 0 12px 28px -18px rgba(20,20,10,.18);
  --shadow-hover: 0 1px 2px rgba(20,20,10,.05), 0 22px 40px -18px rgba(20,20,10,.24);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: inherit; }
h1,h2,h3,h4{ font-family: var(--display); margin:0; letter-spacing: -0.015em; font-weight:600; }
p{ margin:0; }
button{ font-family: inherit; cursor:pointer; }
::selection{ background: var(--navy); color: #fff; }
:focus-visible{ outline: 2px solid var(--navy); outline-offset: 3px; }

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

.eyebrow{
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-2);
  margin-bottom: 14px;
}

/* ---------------- Topbar ---------------- */
.topbar{
  position: sticky; top:0; z-index: 60;
  background: rgba(246,241,230,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap{ display:flex; align-items:center; justify-content:space-between; height: 72px; }
.brand{ display:flex; align-items:center; gap:11px; text-decoration:none; color: var(--ink); }
.brand-mark{
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--navy);
  display:flex;align-items:center;justify-content:center;
  font-family: var(--display); font-size: 13px; font-weight:700; color:#fff;
  flex-shrink:0;
}
.brand-name{ font-family: var(--display); font-weight: 600; font-size: 16.5px; }
.brand-name span{ color: var(--muted); font-weight:400; font-family: var(--body); font-size: 14px; }

nav.mainnav{ display:flex; align-items:center; gap: 32px; }
nav.mainnav a.navlink{
  font-family: var(--body); font-weight:500; font-size: 14.5px;
  text-decoration:none; color: var(--ink); position:relative; padding: 4px 0;
}
nav.mainnav a.navlink::after{
  content:""; position:absolute; left:0; right:100%; bottom:-3px; height:2px; background:var(--navy);
  transition: right .25s ease;
}
nav.mainnav a.navlink:hover::after, nav.mainnav a.navlink.active::after{ right:0; }

.btn{
  font-family: var(--body); font-weight:600; font-size: 14.5px;
  text-decoration:none; display:inline-flex; align-items:center; gap:8px;
  padding: 11px 20px; border: 1.5px solid var(--navy); color: var(--navy);
  background: transparent; border-radius: 100px;
  transition: background .18s ease, color .18s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:hover{ background: var(--navy); color: #fff; }
.btn.solid{ background: var(--navy); color: #fff; }
.btn.solid:hover{ background: var(--navy-2); }

.navburger{
  display:none; width: 40px; height: 40px; border: 1px solid var(--line);
  background: var(--card); border-radius: 8px; align-items:center; justify-content:center;
}
.navburger .bars{ width: 16px; height: 10px; position:relative; }
.navburger .bars i{ position:absolute; left:0; right:0; height:1.6px; background:var(--navy); border-radius:1px; }
.navburger .bars i:nth-child(1){ top:0; }
.navburger .bars i:nth-child(2){ top:4px; }
.navburger .bars i:nth-child(3){ top:8px; }

/* ---------------- Hero ---------------- */
.hero{ padding-top: 64px; }
.hero-center{ max-width: 700px; margin: 0 auto; text-align:center; padding: 44px 0 92px; }
.hero-avatar{
  width: 232px; height: 232px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 24px; display:block; box-shadow: var(--shadow);
}
.hero-center .hero-sub{ margin-left:auto; margin-right:auto; }
.hero-center .hero-cta{ justify-content:center; }
.hero-grid{
  display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items:center;
  padding-bottom: 60px;
}
.hero h1{
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.08;
}
.hero h1 em{
  font-style: normal; color: var(--navy); position:relative;
}
.hero-sub{
  margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 46ch; line-height:1.6;
}
.hero-cta{ margin-top: 30px; display:flex; gap: 14px; flex-wrap:wrap; }
.hero-stats{ margin-top: 46px; display:flex; gap: 40px; flex-wrap:wrap; }
.stat b{ display:block; font-family: var(--display); font-size: 30px; color: var(--navy); }
.stat span{ font-size: 13px; color: var(--muted); }

.hero-fig{
  position: relative; border-radius: var(--radius); overflow:hidden;
  box-shadow: var(--shadow); background: var(--card);
}
.hero-fig img{ width:100%; height:100%; object-fit:cover; aspect-ratio: 4/3.4; }

/* ---------------- Section chrome ---------------- */
section{ padding: 96px 0; }
.section-alt{ background: var(--bg-alt); }
.section-head{
  display:flex; justify-content:space-between; align-items:flex-end; gap: 24px; margin-bottom: 44px;
}
.section-head h2{ font-size: clamp(28px, 3.2vw, 38px); }
.section-note{ max-width: 34ch; color: var(--muted); font-size: 15px; text-align:right; }

/* ---------------- Project cards ---------------- */
.projects-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pcard{
  display:block; text-decoration:none; color:inherit;
  border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow);
  transition: box-shadow .25s ease, transform .25s ease;
  overflow: hidden;
}
.pcard:hover{ box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.pcard-media{ position:relative; aspect-ratio: 4/3; overflow:hidden; background: var(--bg-alt); }
.pcard-media img{ width:100%; height:100%; object-fit: cover; transition: transform .5s ease; }
.pcard:hover .pcard-media img{ transform: scale(1.045); }
.pcard-body{ padding: 24px 24px 26px; }
.pcard-body h3{ font-size: 21px; margin-bottom:10px; }
.pcard-body p{ color: var(--muted); font-size: 14.5px; line-height:1.6; }
.pcard-tags{ display:flex; gap:8px; flex-wrap:wrap; margin-top: 18px; }
.tag{
  font-size: 12px; font-weight:600; color: var(--navy-2);
  background: var(--bg-alt); padding: 5px 11px; border-radius: 100px;
}
.pcard-arrow{
  margin-top:18px; font-size:13.5px; font-weight:600; color: var(--navy);
  display:flex; align-items:center; gap:8px;
}
.pcard-arrow svg{ transition: transform .2s ease; }
.pcard:hover .pcard-arrow svg{ transform: translateX(4px); }

/* ---------------- Experience ---------------- */
.exp-list{ display:flex; flex-direction:column; gap: 14px; }
.exp-card{
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow:hidden;
}
.exp-row{
  display:flex; align-items:center; gap: 18px;
  padding: 22px 26px; cursor:pointer;
}
.exp-logo{
  width: 46px; height:46px; border-radius: 50%;
  object-fit: cover; flex-shrink:0; box-shadow: 0 0 0 1px var(--line);
}
.exp-main{ flex:1; min-width:0; }
.exp-main b{ display:block; font-size: 16px; font-weight:600; }
.exp-main span{ display:block; font-size: 13.5px; color: var(--muted); margin-top:2px; }
.exp-period{ font-size: 13.5px; color: var(--muted); font-weight:500; white-space:nowrap; }
.exp-caret{ color: var(--muted); transition: transform .2s ease; flex-shrink:0; }
.exp-card.open .exp-caret{ transform: rotate(45deg); }
.exp-detail{ max-height:0; overflow:hidden; transition: max-height .3s ease; }
.exp-detail-inner{ padding: 0 26px 26px 90px; }
.exp-detail-inner ul{ margin:0; padding-left: 18px; color: var(--ink); font-size: 14.5px; line-height:1.7; }
.exp-detail-inner li{ margin-bottom:9px; }
.exp-detail-inner li:last-child{ margin-bottom:0; }

/* ---------------- Skills ---------------- */
.skills-strip{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skills-col{ background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px; }
.skills-col h4{ font-size: 13px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color: var(--navy-2); margin-bottom:10px; }
.skills-col p{ font-size: 14.5px; line-height:1.6; color: var(--ink); }

/* ---------------- Footer ---------------- */
footer{ background: var(--navy-deep); color: #DCE3EC; padding: 76px 0 32px; }
.footer-top{
  display:grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 44px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.12);
}
footer h3{ font-size: 32px; color:#fff; }
.footer-sub{ color:#9AA7B8; margin-top:14px; max-width:40ch; font-size:15px; line-height:1.6; }
.footer-col h4{ font-size: 13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:#8592A4; margin-bottom:16px; }
.footer-col a{ display:block; text-decoration:none; color:#DCE3EC; font-size: 15px; padding: 7px 0; }
.footer-col a:hover{ color:#fff; }
.footer-bottom{ display:flex; justify-content:space-between; padding-top: 26px; font-size: 13px; color:#6E7A8C; flex-wrap:wrap; gap:10px; }

/* ---------------- Project detail view ---------------- */
.pv-hero{ padding: 40px 0 0; }
.pv-back{
  font-size: 14px; font-weight:600; color: var(--muted); text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
}
.pv-back:hover{ color: var(--navy); }
.pv-head{ margin-top: 24px; display:flex; justify-content:space-between; align-items:flex-end; gap: 30px; flex-wrap:wrap; }
.pv-head h1{ font-size: clamp(32px, 4.6vw, 48px); max-width: 18ch; }
.pv-meta{ display:flex; gap: 32px; flex-wrap:wrap; }
.pv-meta div span{ display:block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.pv-meta div b{ font-size:14.5px; font-weight:600; }

.pv-figure{
  margin-top: 36px; border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow);
}
.pv-figure img{ width:100%; }
.pv-figure figcaption{
  font-size: 13px; color: var(--muted); padding: 14px 18px;
  background: var(--card); border-top: 1px solid var(--line);
}

.pv-body{ display:grid; grid-template-columns: 200px 1fr; gap: 60px; margin-top: 74px; align-items:start; }
.pv-label{ font-size: 13px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color: var(--navy-2); position: sticky; top: 96px; }
.pv-block{ max-width: 68ch; }
.pv-block + .pv-block{ margin-top:58px; }
.pv-block h3{ font-size: 23px; margin-bottom: 16px; }
.pv-block p{ color: var(--ink); font-size: 15.5px; line-height:1.75; }
.pv-block p + p{ margin-top:14px; }
.pv-block ul{ margin: 14px 0 0; padding-left: 20px; }
.pv-block li{ font-size: 15.5px; line-height:1.7; margin-bottom:9px; }

.problem-list{ list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.problem-list li{
  display:flex; gap:14px; align-items:flex-start;
  border-radius: var(--radius-sm); padding: 16px 18px; font-size: 14.5px;
  background: var(--bg-alt);
}
.problem-list li i{ font-style:normal; font-weight:700; color: var(--navy); flex-shrink:0; }

.callout{
  border-radius: var(--radius-sm); padding: 16px 20px; margin-top: 20px;
  background: var(--bg-alt); color: var(--navy); font-weight:600; font-size: 15px;
}

.gallery{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 22px; }
.gallery.two{ grid-template-columns: repeat(2, 1fr); }
.gallery.one{ grid-template-columns: minmax(240px, 440px); justify-content:center; }
.gallery figure{ margin:0; border-radius: var(--radius-sm); overflow:hidden; box-shadow: var(--shadow); background:var(--card); }
.gallery img{ width:100%; cursor: zoom-in; aspect-ratio: 4/3; object-fit: cover; }
.gallery figcaption{ font-size: 13px; color: var(--muted); padding: 12px 14px 14px; }

.data-table{ width:100%; border-collapse: collapse; margin-top: 12px; font-size: 14.5px; border-radius: var(--radius-sm); overflow:hidden; }
.data-table th, .data-table td{ padding: 11px 14px; text-align:left; border-bottom: 1px solid var(--line); }
.data-table thead th{ background: var(--navy); color: #fff; font-size: 12.5px; text-transform:uppercase; letter-spacing:.03em; font-weight:600; }
.data-table tbody tr:nth-child(even){ background: var(--bg-alt); }
.data-table .best{ font-weight:700; color: var(--navy); }

.chart-block{ margin-top: 28px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.chart-block h4{ font-size: 14.5px; font-weight:600; color: var(--ink); margin-bottom: 18px; }
.bars{ display:flex; align-items:flex-end; gap: 16px; height: 190px; padding: 0 4px; border-bottom: 1.5px solid var(--line); }
.bar-col{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; }
.bar{ width: 58%; background: var(--bg-alt); border-radius: 6px 6px 0 0; position:relative; transition: height 1s cubic-bezier(.2,.8,.2,1); }
.bar.win{ background: var(--navy); }
.bar-val{ position:absolute; top:-22px; left:0; right:0; text-align:center; font-size: 12px; font-weight:600; color: var(--ink); }
.bar-label{ margin-top:10px; font-size: 12.5px; color: var(--muted); text-align:center; font-weight:500; }

.conclusion-card{
  margin-top: 28px; border-radius: var(--radius); padding: 24px 26px;
  background: var(--navy); color:#fff;
}
.conclusion-card h4{ font-size: 13px; text-transform:uppercase; letter-spacing:.04em; color:#AFC1DB; margin-bottom:10px; font-weight:700; }
.conclusion-card p{ font-size: 15px; line-height:1.7; color:#EDF1F7; }

.pv-nextprev{ margin-top: 96px; padding-top: 0; display:flex; justify-content:space-between; gap: 20px; }
.np-link{
  text-decoration:none; color:inherit; flex:1; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.np-link:hover{ box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.np-link span{ font-size: 12.5px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.03em; }
.np-link b{ display:block; margin-top:8px; font-size:19px; font-family: var(--display); }
.np-link.right{ text-align:right; }

/* ---------------- Lightbox ---------------- */
.lightbox{
  position:fixed; inset:0; z-index: 100; background: rgba(10,24,48,.94);
  display:none; align-items:center; justify-content:center; padding: 40px;
}
.lightbox.open{ display:flex; }
.lightbox img{ max-width: 92vw; max-height: 86vh; border-radius: 10px; }
.lightbox-close{
  position:absolute; top:24px; right:28px; width:44px;height:44px;
  border: 1px solid rgba(255,255,255,.3); background:transparent; color:#fff;
  font-size:20px; border-radius:50%;
}

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

/* ---------------- Responsive ---------------- */
@media (max-width: 980px){
  nav.mainnav{ display:none; }
  .navburger{ display:flex; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-fig{ order:-1; }
  .projects-grid{ grid-template-columns: 1fr 1fr; }
  .footer-top{ grid-template-columns: 1fr; }
  .pv-body{ grid-template-columns: 1fr; gap: 20px; }
  .pv-label{ position:static; }
  .skills-strip{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .projects-grid{ grid-template-columns: 1fr; }
  .exp-row{ flex-wrap:wrap; }
  .exp-period{ order:4; width:100%; padding-left:64px; }
  .exp-detail-inner{ padding-left: 26px; }
  .gallery{ grid-template-columns: 1fr 1fr; }
  .skills-strip{ grid-template-columns: 1fr; }
  .pv-nextprev{ flex-direction:column; }
  .section-head{ flex-direction:column; align-items:flex-start; }
  .section-note{ text-align:left; }
}
