/* ============================================================
   Water Resources & Fluid Mechanics Lab — UTH
   Stylesheet v1.0
   ============================================================ */

:root {
  /* Palette — deep marine with cyan accent */
  --ink:        #0a1929;
  --ink-soft:   #142a42;
  --paper:      #f7f5f0;
  --paper-warm: #efeae0;
  --rule:       #d8d2c4;
  --muted:      #5a6a7a;

  --accent:        #0891b2;   /* cyan-600 */
  --accent-deep:   #155e75;   /* cyan-800 */
  --accent-soft:   #cffafe;   /* cyan-100 */
  --highlight:     #fbbf24;   /* amber for callouts */

  /* Typography */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body:    'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Consolas', monospace;

  /* Scale */
  --max:    1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: 'kern', 'liga', 'calt';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-deep); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: .5rem;
}

h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1rem;
}

p { margin-bottom: 1rem; max-width: 68ch; }

p.lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 60ch;
}

.serif { font-family: var(--font-display); font-style: italic; }
.mono  { font-family: var(--font-mono); font-size: 0.85em; }

/* ============================================================
   LAYOUT
   ============================================================ */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding: clamp(3rem, 7vw, 6rem) 0; }

.section-tight { padding: clamp(2rem, 4vw, 3.5rem) 0; }

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-family: var(--font-display);
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand-text span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.nav-primary {
  display: flex;
  gap: 1.6rem;
  align-items: center;
  font-size: 0.92rem;
}

.nav-primary a {
  color: var(--ink);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.nav-primary a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width .25s ease;
}

.nav-primary a:hover::after,
.nav-primary a.active::after { width: 100%; }
.nav-primary a.active { color: var(--accent-deep); }

.lang-toggle {
  display: flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: .5rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.lang-toggle a {
  padding: 6px 10px;
  color: var(--muted);
}

.lang-toggle a.active {
  background: var(--ink);
  color: var(--paper);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--ink);
}

@media (max-width: 880px) {
  .nav-primary {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem var(--gutter) 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px -12px rgba(10,25,41,.15);
  }
  .nav-primary.open { display: flex; }
  .nav-primary a { padding: .85rem 0; border-bottom: 1px solid var(--rule); }
  .nav-primary a:last-child { border-bottom: none; }
  .menu-btn { display: block; }
  .lang-toggle { margin-left: 0; align-self: flex-start; margin-top: .75rem; }
}

/* ============================================================
   HERO — distinctive editorial layout with fluid SVG
   ============================================================ */

.hero {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, var(--accent-soft) 0%, transparent 50%),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-weight: 400;
}

.hero h1 .em {
  font-style: italic;
  color: var(--accent-deep);
  font-weight: 400;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: .35rem;
  align-self: end;
  border-left: 1px solid var(--rule);
  padding-left: 1.5rem;
}

.hero-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-flow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  z-index: 1;
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-meta { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 1.25rem; }
}

/* ============================================================
   PAGE HEADER (subpages)
   ============================================================ */

.page-head {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.page-head::after {
  content: '';
  position: absolute;
  right: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.18;
  pointer-events: none;
}

.page-head h1 { color: var(--paper); position: relative; }
.page-head h4 { color: var(--accent-soft); }
.page-head .crumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
  opacity: 0.7;
  margin-bottom: 1rem;
}
.page-head .crumb a { color: var(--accent-soft); }

/* ============================================================
   CARDS / GRIDS
   ============================================================ */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 880px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: white;
  border: 1px solid var(--rule);
  padding: 1.75rem;
  border-radius: var(--radius);
  transition: transform .25s, box-shadow .25s;
  position: relative;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -20px rgba(10,25,41,.18);
}

.card-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: .75rem;
}

.card h3 { margin-bottom: .65rem; }

.card p {
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 0;
}

/* Research areas — distinct visual rhythm */
.research-card {
  border-top: 3px solid var(--accent);
  padding: 2rem 1.75rem;
  background: white;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.research-card .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
  color: var(--accent-deep);
  margin-bottom: .5rem;
}

/* Member cards */
.member {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.member:last-child { border-bottom: none; }

.member-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
}

.member-role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.member-detail {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: .25rem;
}

/* ============================================================
   PUBLICATIONS LIST
   ============================================================ */

.pub-list { list-style: none; }

.pub-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.pub-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: .35rem;
  display: block;
}

.pub-authors {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: .25rem;
}

.pub-venue {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

/* ============================================================
   COURSE TABLE
   ============================================================ */

.course-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.course-table th,
.course-table td {
  text-align: left;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}

.course-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--paper-warm);
}

.course-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.semester-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

/* ============================================================
   STATS BAR
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2rem 0;
  margin: 2rem 0;
}

.stat {
  text-align: left;
  padding: 0 1.5rem;
  border-right: 1px solid var(--rule);
}

.stat:last-child { border-right: none; }

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--accent-deep);
  line-height: 1;
  margin-bottom: .5rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .stat { border-right: none; padding: 0; }
  .stat:nth-child(odd) { border-right: 1px solid var(--rule); padding-right: 1rem; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: 0.85rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  font-size: 0.92rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  transition: all .2s;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn .arrow {
  display: inline-block;
  transition: transform .2s;
}

.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   TWO-COLUMN INFO BLOCK (for identity/about)
   ============================================================ */

.info-block {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.info-block:last-child { border-bottom: none; }

.info-block h4 { margin-top: .25rem; }

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

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.site-footer h4 { color: var(--accent-soft); }
.site-footer a { color: var(--paper); opacity: 0.85; }
.site-footer a:hover { opacity: 1; color: var(--accent-soft); }
.site-footer p { color: rgba(247, 245, 240, 0.7); font-size: 0.92rem; }

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: 0.92rem;
}

.footer-bottom {
  border-top: 1px solid rgba(247, 245, 240, 0.12);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(247, 245, 240, 0.5);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 1rem;
}

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

/* ============================================================
   UTILITIES & ANIMATIONS
   ============================================================ */

.divider {
  height: 1px;
  background: var(--rule);
  margin: 2rem 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: 99px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--ink-soft);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp .8s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .25s; }
.delay-3 { animation-delay: .4s; }

/* Subtle wave SVG animation */
@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-30px); }
}

.hero-flow svg { animation: drift 12s ease-in-out infinite; }


.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.footer-logo {
  width: 46px;
  height: 46px;
}
