/* ============ Iman Hosseini — Portfolio (Reprise-inspired, light) ============ */
:root {
  --bg: #ffffff;
  --bg-deep: #f6f8fb;
  --navy: #14213d;
  --card: #ffffff;
  --card-hover: #ffffff;
  --line: #e8ecf3;
  --text: #1b2a4a;
  --muted: #64708a;
  --accent: #13730b;
  --accent-soft: rgba(69, 184, 100, 0.1);
  --yellow: #f4c150;
  --purple: #8b5cf6;
  --teal: #2dd4bf;
  --orange: #fb923c;
  --pink: #f472b6;
  --blue: #60a5fa;
  --serif: "Times New Roman", Times, serif;
  --sans: "Times New Roman", Times, serif;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(20, 33, 61, 0.1);
  --shadow-soft: 0 6px 18px rgba(20, 33, 61, 0.06);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
.container { width: min(1140px, 92%); margin: 0 auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 700; font-size: 1.12rem; color: var(--navy); white-space: nowrap; flex-shrink: 0; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: var(--accent);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800; font-size: 0.9rem; color: #fff;
}
.nav-links { display: flex; gap: 20px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--text); font-size: 0.88rem; font-weight: 500; white-space: nowrap;
  padding: 5px 2px; border-bottom: 2px solid transparent; transition: 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-cta {
  background: var(--accent); color: #fff !important; padding: 8px 18px !important;
  border-radius: 8px; border: none !important; font-weight: 600;
  box-shadow: 0 8px 20px rgba(69, 184, 100, 0.3);
}
.nav-cta:hover { filter: brightness(1.08); }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: 0.3s; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 70px; position: relative; overflow: hidden; background: var(--bg-deep); }
.hero::after {
  content: ""; position: absolute; right: -160px; top: -160px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(69,184,100,0.1), transparent 70%);
}
.eyebrow {
  color: var(--accent); font-weight: 600; letter-spacing: 0.06em;
  font-size: 0.95rem; margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 700; color: var(--navy);
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.18; max-width: 820px;
}
.hero h1 strong { color: var(--accent); font-weight: 800; }
.hero p.lede { color: var(--muted); max-width: 620px; margin: 22px 0 32px; font-size: 1.05rem; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 600;
  padding: 13px 30px; border-radius: 8px; font-size: 0.95rem;
  box-shadow: 0 10px 25px rgba(69, 184, 100, 0.3); transition: 0.2s; border: 0; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn.ghost { background: transparent; border: 1.5px solid #d5dbe7; box-shadow: none; color: var(--navy); margin-left: 12px; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 64px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; text-align: center; box-shadow: var(--shadow-soft); }
.stat b { font-family: var(--serif); font-size: 2rem; color: var(--accent); display: block; }
.stat span { color: var(--muted); font-size: 0.85rem; }

/* ---------- Sections ---------- */
section { padding: 76px 0; }
.section-head { margin-bottom: 44px; }
.section-head h2 {
  font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--navy);
  font-weight: 700; line-height: 1.25; max-width: 760px;
}
.section-head h2 strong { color: var(--accent); }
.section-head p { color: var(--muted); max-width: 640px; margin-top: 12px; }
.alt { background: var(--bg-deep); }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; transition: 0.25s;
  box-shadow: var(--shadow-soft);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.08rem; margin: 16px 0 8px; font-weight: 600; color: var(--navy); }
.card p { color: var(--muted); font-size: 0.92rem; }
.icon-dot {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.35rem;
}
.dot-yellow { background: var(--yellow); } .dot-purple { background: var(--purple); }
.dot-orange { background: var(--orange); } .dot-teal { background: var(--teal); }
.dot-pink { background: var(--pink); } .dot-blue { background: var(--blue); }
.dot-red { background: var(--accent); }

/* ---------- Colorful project tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  border-radius: var(--radius); padding: 34px 26px; min-height: 190px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #14213d; transition: 0.25s; position: relative; overflow: hidden;
}
.tile:hover { transform: translateY(-5px) scale(1.01); box-shadow: var(--shadow); }
.tile .t-icon { font-size: 2rem; position: absolute; top: 22px; left: 24px; }
.tile h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.tile span { font-size: 0.8rem; font-weight: 600; opacity: 0.75; margin-top: 4px; }
.t-yellow { background: var(--yellow); } .t-orange { background: var(--orange); }
.t-teal { background: var(--teal); } .t-pink { background: var(--pink); }
.t-blue { background: var(--blue); } .t-purple { background: var(--purple); color: #fff; }
.t-red { background: var(--accent); color: #fff; }

/* ---------- About strip ---------- */
.about-flex { display: flex; gap: 34px; align-items: center; margin-top: 40px; flex-wrap: wrap; }
.avatar {
  width: 130px; height: 130px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 2.6rem; font-weight: 800; color: #fff;
  box-shadow: var(--shadow);
}
.about-flex h3 { font-family: var(--serif); font-size: 1.35rem; margin-bottom: 6px; color: var(--navy); }
.socials { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.socials a { color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: 0.2s; display: inline-flex; align-items: center; gap: 7px; }
.socials a:hover { color: var(--accent); }
.s-icon { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.s-linkedin { color: #0a66c2; }
.icon-dot .s-icon { width: 20px; height: 20px; fill: #fff; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 10px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.t-item { position: relative; padding: 0 0 42px 40px; }
.t-item::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.t-item .t-date { color: var(--accent); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.t-item h3 { font-family: var(--serif); font-size: 1.3rem; margin: 6px 0 2px; color: var(--navy); }
.t-item .t-org { color: var(--muted); font-weight: 500; font-size: 0.95rem; margin-bottom: 10px; }
.t-item p, .t-item li { color: var(--muted); font-size: 0.94rem; }
.t-item ul { padding-left: 20px; margin-top: 8px; }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 20px;
}
.tag.alt-tag { background: rgba(96, 165, 250, 0.12); color: #3b82f6; }

/* ---------- Publications ---------- */
.pub { display: flex; gap: 22px; align-items: flex-start; }
.pub-num {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 800; color: var(--accent);
  line-height: 1; min-width: 44px;
}
.pub h3 { font-size: 1.05rem; margin: 0 0 8px; font-weight: 600; line-height: 1.45; color: var(--navy); }

/* ---------- Blog ---------- */
.post { max-width: 800px; }
.post + .post { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line); }
.post h2 { font-family: var(--serif); font-size: 1.7rem; line-height: 1.3; margin: 8px 0 6px; color: var(--navy); }
.post .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 18px; }
.post p { color: var(--muted); margin-bottom: 16px; }
.post h4 { margin: 22px 0 8px; font-size: 1.02rem; color: var(--navy); }

/* ---------- Contact / collab ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-list { list-style: none; margin-top: 22px; }
.contact-list li { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; color: var(--muted); }
.contact-list .icon-dot { width: 42px; height: 42px; font-size: 1.05rem; flex-shrink: 0; }
.contact-list a { color: var(--navy); font-weight: 500; }
.contact-list a:hover { color: var(--accent); }
form .field { margin-bottom: 16px; }
form label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
form input, form textarea, form select {
  width: 100%; background: var(--bg-deep); border: 1px solid #dfe3ea;
  border-radius: 8px; padding: 12px 14px; color: var(--text);
  font-family: var(--sans); font-size: 0.95rem;
}
form input:focus, form textarea:focus, form select:focus { outline: none; border-color: var(--accent); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, rgba(69,184,100,0.08), rgba(139,92,246,0.08));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 46px 40px; display: flex; justify-content: space-between;
  align-items: center; gap: 26px; flex-wrap: wrap;
}
.cta-band h2 { font-family: var(--serif); font-size: 1.7rem; line-height: 1.3; max-width: 560px; color: var(--navy); }
.cta-band p { color: var(--muted); margin-top: 6px; max-width: 560px; }

/* ---------- Footer (dark navy, like template) ---------- */
footer { background: var(--navy); padding: 44px 0 30px; margin-top: 40px; }
footer .logo { color: #fff; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.foot-links a { color: #aeb8cf; font-size: 0.85rem; }
.foot-links a:hover { color: var(--accent); }
.copy { color: #8a95af; font-size: 0.82rem; margin-top: 22px; text-align: center; }
.copy a { color: var(--accent); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Page header ---------- */
.page-head { padding: 70px 0 30px; background: var(--bg-deep); }
.page-head h1 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; color: var(--navy); }
.page-head p { color: var(--muted); max-width: 660px; margin-top: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links {
    position: fixed; inset: 62px 0 auto 0; flex-direction: column;
    background: #ffffff; padding: 24px 6%; gap: 16px;
    border-bottom: 1px solid var(--line); display: none; align-items: flex-start;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .burger { display: block; }
}
@media (max-width: 900px) {
  .grid-3, .tiles { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .tiles, .stats { grid-template-columns: 1fr; }
  .btn.ghost { margin-left: 0; margin-top: 12px; }
  .hero { padding: 60px 0 50px; }
}
