/* ============================================================
   arash-hajikhani.com — shared stylesheet
   Design tokens taken from the original Hostinger build:
   accent #457B9D, dark #0d141a, Roboto (headings) + Open Sans (body)
   ============================================================ */

:root {
  --accent: #457b9d;
  --accent-hover: #35617d;
  --dark: #0d1b2b;
  --dark-soft: #16283c;
  --navy: #1d3557;
  --text: #1d1e20;
  --text-muted: #4a5158;
  --light: #ffffff;
  --bg-tint: #f2f5f7;
  --border: #dadce0;
  --font-heading: "Roboto", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
  --max-width: 1200px;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--light);
}

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

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; }

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: 1296px;
  margin: 0 auto;
  padding: 0 72px;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--light);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.2px;
}

.site-nav { display: flex; gap: 28px; align-items: center; }

.site-nav a {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--accent); }
.site-nav a.active { border-bottom-color: var(--text); }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.2s; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: var(--light);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 24px; width: 100%; border-bottom: 1px solid var(--border); }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--dark);
  color: var(--light);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 480px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero h1 { color: var(--light); margin-bottom: 18px; }
.hero p { color: #c8d2da; font-size: 1.1rem; max-width: 46ch; }

.hero-photo { position: relative; }
.hero-photo img {
  width: 100%;
  clip-path: polygon(0 0, 88% 0, 100% 100%, 12% 100%);
}

.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--accent);
  color: var(--light);
  padding: 13px 32px;
  border-radius: 40px;
  border: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent-hover); color: var(--light); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: var(--light); }

.social-links { display: flex; gap: 16px; align-items: center; }
.social-links a { color: var(--light); opacity: 0.85; }
.social-links a:hover { opacity: 1; color: var(--light); }
.social-links svg { width: 22px; height: 22px; fill: currentColor; }
.social-links.dark-icons a { color: var(--text); }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .hero-photo img { clip-path: none; max-height: 420px; object-fit: cover; width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tint { background: var(--bg-tint); }
.section-dark { background: var(--dark); color: var(--light); }
.section-dark h2, .section-dark h3 { color: var(--light); }
.section-dark p { color: #c8d2da; }

.section-intro { max-width: 70ch; color: var(--text-muted); font-size: 1.05rem; margin-bottom: 40px; }

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Card grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 28px;
}

.card {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(13, 20, 26, 0.12); }

.card img { width: 100%; height: 210px; object-fit: cover; }

.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { color: var(--text); }
.card-body p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.card-body .card-link { margin-top: auto; font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; }

a.card { color: inherit; }

/* ---------- Split (image + text) rows ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split + .split { margin-top: 64px; }
.split img { border-radius: var(--radius); width: 100%; }
.split.reverse .split-media { order: 2; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}

/* ---------- Publications list ---------- */
.pub-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.pub-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 18px 22px;
  background: var(--light);
}
.pub-item .pub-venue { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }
.pub-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.pub-item p { margin: 6px 0 0; font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Blog article ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 56px 24px; }
.article h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin-bottom: 12px; }
.article .article-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }
.article h2 { font-size: 1.6rem; margin: 40px 0 14px; }
.article h3 { margin: 28px 0 10px; }
.article img { border-radius: var(--radius); margin: 28px auto; }
.article ul, .article ol { margin: 0 0 1em 1.4em; }
.article blockquote {
  border-left: 4px solid var(--accent);
  padding: 8px 20px;
  margin: 24px 0;
  color: var(--text-muted);
  background: var(--bg-tint);
  border-radius: 0 6px 6px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #c8d2da;
  padding: 56px 0 32px;
  margin-top: 0;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.site-footer h3 { color: var(--light); margin-bottom: 10px; }
.site-footer h4 {
  color: var(--light);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.site-footer a { color: #c8d2da; }
.site-footer a:hover { color: var(--light); }

.subscribe-form { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 12px; }
.subscribe-form input[type="email"] {
  width: 100%;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid #33424e;
  background: var(--light);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.subscribe-form input[type="email"]::placeholder { color: #8a929a; }

.footer-bottom {
  border-top: 1px solid #22303b;
  margin-top: 44px;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #7d8b96;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 760px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Original-layout building blocks ---------- */

/* Slate-gray section (homepage blog teaser) */
.section-gray { background: #878d9c; color: var(--light); }
.section-gray h2, .section-gray h3 { color: var(--light); }
.section-gray p { color: #f0f2f4; }

/* Underlined heading links, as in the original */
.link-title a, a.link-title {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}
.link-title a:hover, a.link-title:hover { color: var(--accent); }

/* Centered section headers (projects/blog-teaser style) */
.section-head-center { text-align: center; margin-bottom: 48px; }
.section-head-center .section-intro { margin: 14px auto 0; max-width: 56ch; }

/* Image-left / text-right feature rows (My Work, publications) */
.feature-row {
  display: grid;
  grid-template-columns: 46% 1fr;
  gap: 8%;
  align-items: start;
}
.feature-row + .feature-row { margin-top: 72px; }
.feature-row img { width: 100%; border-radius: var(--radius); }
.feature-row .feature-text h3 { font-size: 1.45rem; margin-bottom: 16px; }
.feature-row .feature-text p { color: var(--text-muted); text-align: justify; }

/* Publication rows: smaller image column */
.pub-row { grid-template-columns: 30% 1fr; gap: 6%; }

@media (max-width: 860px) {
  .feature-row, .pub-row { grid-template-columns: 1fr; gap: 20px; }
}

/* Project blocks (projects page): two images, then title + desc + outline button */
.project-block { margin-top: 72px; }
.project-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.project-images img { width: 100%; border-radius: 6px; border: 1px solid var(--border); }
.project-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  margin-top: 26px;
}
.project-meta h3 { font-size: 1.45rem; margin-bottom: 12px; }
.project-meta p { color: var(--text-muted); text-align: justify; max-width: 72ch; margin: 0; }
.btn-pill-outline {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--light);
  border: 1px solid #c9ccd1;
  border-radius: 40px;
  padding: 13px 44px;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-pill-outline:hover { border-color: var(--accent); color: var(--accent); }

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

/* Flat borderless cards (blog index, about projects grid) */
.flat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px 44px;
}
.flat-card { color: inherit; display: block; }
.flat-card img { width: 100%; aspect-ratio: 16/9.5; object-fit: cover; border-radius: 4px; }
.flat-card h3 { font-size: 1.1rem; margin: 16px 0 6px; }
.flat-card .flat-sub { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.flat-card:hover h3 { color: var(--accent); }

@media (max-width: 760px) {
  .flat-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Two side-by-side text columns (about page) */
.text-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
}
.text-cols h3 { font-size: 1rem; margin-bottom: 14px; }
.text-cols p { color: var(--text-muted); text-align: justify; }
@media (max-width: 760px) { .text-cols { grid-template-columns: 1fr; } }

/* White card form (Get in Touch) */
.form-card {
  background: var(--light);
  border-radius: 12px;
  padding: 32px 36px;
  max-width: 480px;
  margin: 36px auto 0;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
  text-align: left;
}
.form-card label {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  margin: 14px 0 6px;
}
.form-card input, .form-card textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #c9ccd1;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--light);
}
.form-card .btn { display: block; margin: 22px auto 0; }

/* ---------- Video background sections ---------- */
.video-section { position: relative; overflow: hidden; }
.video-section > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.video-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 43, 0.65);
  z-index: 1;
}
.video-section > .container { position: relative; z-index: 2; }

/* ---------- Scroll-reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: none; }

/* Hero entrance (plays on load, no observer needed) */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes hero-photo-in {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: none; }
}
.hero h1 { animation: hero-rise 0.7s ease both; }
.hero p { animation: hero-rise 0.7s ease 0.15s both; }
.hero .hero-actions { animation: hero-rise 0.7s ease 0.3s both; }
.hero-photo img { animation: hero-photo-in 0.9s ease 0.1s both; }

/* Image zoom on card hover */
.card { --img-zoom: 1; }
.card img { transition: transform 0.45s ease; }
.card:hover img { transform: scale(1.06); }

/* Animated nav underline */
.site-nav a { position: relative; border-bottom: 0; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav a:hover::after { transform: scaleX(1); background: var(--accent); }
.site-nav a.active::after { transform: scaleX(1); }
@media (max-width: 760px) {
  .site-nav a::after { display: none; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1, .hero p, .hero .hero-actions, .hero-photo img { animation: none; }
  .card img { transition: none; }
  html { scroll-behavior: auto; }
}
