:root {
  --bg: #f8f9fa;               /* Premium clean off-white architectural background */
  --text: #0f172a;             /* Deep slate-black for pristine readability */
  --muted: #475569;            /* High accessibility slate gray body text */
  --light-gray: rgba(15, 23, 42, 0.08); /* Precision semi-transparent border lines */
  --soft-bg: #ffffff;          /* Pure white card backgrounds */
  --accent: #ea580c;           /* Energetic warm architectural orange */
  --accent-muted: #c2410c;     /* Darker complementary orange tone */
}

* {
  box-sizing: border-box;
  border-radius: 0 !important; /* Strictly no rounded corners anywhere */
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  background-color: var(--bg);
  background-image: 
    linear-gradient(rgba(15, 23, 42, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.015) 1px, transparent 1px);
  background-size: 50px 50px; /* Highly detailed architectural grid background */
  color: var(--muted);
  line-height: 1.5; /* Tight, compact, clean line height */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.8;
}

.container {
  max-width: 1320px; /* Enhanced width span for pristine alignment on modern large monitors */
  margin: 0 auto;
  padding: 0 50px;
}

/* HEADER - see header.php <style> block for .tb and .sh rules */
/* HERO */
.hero {
  padding: 90px 0 70px;
  border-bottom: 1px solid var(--light-gray);
  background-color: transparent; /* Seamless grid background */
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.1;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 0.92; /* Extra tight line spacing on big statements */
  letter-spacing: -0.06em;
  font-weight: 800;
  color: var(--text);
}

.hero-sub {
  margin: 6px 0 10px;
  max-width: 600px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.35; /* Tightened paragraph line spacing */
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn.primary {
  background: var(--text);
  color: #ffffff;
  border: 1px solid var(--text);
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--light-gray);
}

.sso-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.sso {
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--light-gray);
  background: rgba(15, 23, 42, 0.03);
  color: var(--text);
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-logo {
  width: 100%;
  max-width: 320px;
  height: auto;
  border: 1px solid var(--light-gray);
  padding: 14px;
  background: var(--soft-bg);
}

/* SECTION STRUCTURE (Asymmetric Grid Layout) */
.section-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 60px 0;
  border-bottom: 1px solid var(--light-gray);
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-muted);
  line-height: 1.1;
}

.section-content h2 {
  margin: 0 0 20px;
  font-size: 1.8rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text);
}

/* PROJECT CARDS */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-item {
  background-color: var(--soft-bg);
  border: 1px solid var(--light-gray);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.project-item h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

.project-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.35;
}

.project-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-item .button {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  border-bottom: 2px solid var(--text);
  padding-bottom: 2px;
}

/* EXCEL-LIKE CLEAN ROWS FOR TIMELINE (Education/Experience/Publications) */
.timeline-rows {
  display: flex;
  flex-direction: column;
}

.timeline-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--light-gray);
}

.timeline-row:first-child {
  padding-top: 0;
}

.timeline-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.time-meta {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-muted);
  letter-spacing: 0.05em;
}

.timeline-desc h4 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.timeline-institution {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.timeline-body {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* SKILLS */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills-grid span {
  padding: 8px 12px;
  background-color: var(--soft-bg);
  border: 1px solid var(--light-gray);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

/* CONTACT INFO */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.contact-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-box label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-muted);
}

.contact-box span {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.contact-box a {
  align-self: flex-start;
  border-bottom: 1px solid var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

/* FOOTER */
.site-footer {
  padding: 50px 0;
  border-top: 1px solid var(--light-gray);
  background-color: var(--soft-bg);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .container {
  display: flex;
  flex-direction: column; /* Force vertical stacking of matrix grid and copyright line */
  align-items: stretch;
}

.footer-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border: 1px solid var(--light-gray);
  background: var(--soft-bg);
  padding: 3px;
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--text);
  color: #fff;
  z-index: 200;
  border-top: 1px solid var(--light-gray);
}

.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.cookie-banner .cookie-text {
  font-size: 0.82rem;
  color: #ccc;
}

.cookie-banner .cookie-text a {
  color: #fff;
  text-decoration: underline;
}

.cookie-banner .actions {
  display: flex;
  gap: 10px;
}

.cookie-banner button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
}

.cookie-banner .manage {
  color: #ccc;
  border: 1px solid rgba(255,255,255,0.2);
}

.cookie-banner .accept {
  background: #ffffff;
  color: #0f172a; /* Deep slate-black fallback to ensure high-contrast visibility over absolute white */
}

/* RESPONSIVE STYLING */
@media (max-width: 900px) {
  .section-row {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 0;
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 20px;
  }
  
  .hero {
    padding: 40px 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .hero-copy {
    align-items: center;
  }
  
  .hero-visual {
    justify-content: center;
    order: -1; /* Place your photo at the top on small mobile devices for standard visual priority */
  }
  
  .hero-logo {
    width: min(82vw, 320px);
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    text-align: center;
  }

  .hero-sub {
    text-align: center;
    font-size: 0.96rem;
  }

  .hero-ctas {
    justify-content: center;
    width: 100%;
  }

  .hero-ctas .btn {
    flex: 1;
    text-align: center;
    min-width: 130px;
  }

  .sso-row {
    justify-content: center;
    width: 100%;
  }
  
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .blog-list {
    width: 100%;
  }

  .blog-post {
    width: 100% !important;
    display: block !important;
    padding: 18px !important;
  }

  .blog-post > div {
    display: block !important;
    width: 100%;
  }

  .blog-post > div > div {
    width: 100%;
    flex: none !important;
  }

  .blog-post > div > a {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 16px;
  }

  .site-footer {
    background: #0f172a;
    color: #e2e8f0;
  }

  .site-footer .container {
    flex-direction: column;
    gap: 24px;
    text-align: left;
    align-items: flex-start;
  }

  .footer-layout-matrix {
    grid-template-columns: 1fr !important;
    gap: 24px;
    width: 100%;
    margin-bottom: 34px !important;
    text-align: left;
  }

  .footer-layout-matrix div {
    align-items: flex-start;
    text-align: left;
  }

  .footer-layout-matrix div div {
    justify-content: flex-start;
  }

  .footer-layout-matrix > div:first-child > div:first-child {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-layout-matrix > div:first-child > p {
    max-width: 300px;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .footer-links-list {
    justify-items: start;
    gap: 8px !important;
  }

  .site-footer > .container > div:last-child {
    width: 100%;
    justify-content: flex-start !important;
    text-align: left;
    padding-top: 18px !important;
  }

  .site-footer > .container > div:last-child > p {
    width: 100%;
    text-align: left;
  }

  .site-footer > .container > div:last-child > div {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-brand-copy {
    display: block !important;
    margin-top: 8px !important;
    max-width: 100% !important;
    text-align: left;
  }
  
  .cookie-banner .container {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 12px 20px;
  }
  
  .cookie-banner .actions {
    width: 100%;
    justify-content: stretch;
  }

  .cookie-banner .actions button {
    flex: 1;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   SKELETON SHIMMER IMAGE LOADING SYSTEM
   ═══════════════════════════════════════════════════════════════════ */
.img-skeleton-wrap {
  position: relative;
  overflow: hidden;
  background-color: #e2e8f0;
  display: block;
}

.img-skeleton-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: skeleton-sweep 1.6s infinite ease-in-out;
  z-index: 2;
  pointer-events: none;
}

@keyframes skeleton-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.img-skeleton-wrap img,
.img-skeleton-wrap picture img {
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter;
  display: block;
  width: 100%;
  height: 100%;
}

.img-skeleton-wrap.loaded::before,
.img-skeleton-wrap.is-loaded::before {
  display: none !important;
}

.img-skeleton-wrap.loaded,
.img-skeleton-wrap.is-loaded {
  background-color: transparent !important;
}

.img-skeleton-wrap.loaded img,
.img-skeleton-wrap.loaded picture img,
.img-skeleton-wrap.is-loaded img,
.img-skeleton-wrap.is-loaded picture img {
  opacity: 1 !important;
  filter: blur(0) !important;
}

@media (prefers-reduced-motion: reduce) {
  .img-skeleton-wrap::before {
    animation: none !important;
    display: none !important;
  }
  .img-skeleton-wrap img,
  .img-skeleton-wrap picture img {
    transition: none !important;
    filter: none !important;
    opacity: 1 !important;
  }
}

