/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&display=swap');

/* =============================
   DESIGN TOKENS
============================= */
:root {
  /* Background */
  --bg:           #fdfaf7;
  --bg-surface:   #ffffff;
  --bg-card:      #ffffff;
  --bg-card-hover:#fff8f2;

  /* Borders */
  --border:       #e8ddd3;
  --border-hover: #f4845f;

  /* Accents */
  --accent:        #e8914a;   /* light open amber-orange */
  --accent-light:  rgba(232,145,74,0.09);
  --accent-deep:   #c4702a;
  --accent-blue:   #2d6da8;   /* contrast blue for links/badges */
  --accent-green:  #1a6e45;

  /* Text */
  --text-primary:  #1a1410;
  --text-secondary:#3d3028;
  --text-muted:    #7a6a5c;
  --heading:       #120e0a;

  /* Radii */
  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 18px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(30,15,5,0.07);
  --shadow-md: 0 6px 22px rgba(30,15,5,0.09);
  --shadow-lg: 0 14px 40px rgba(30,15,5,0.12);
}

/* =============================
   RESET & BASE
============================= */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 5% 0%,   rgba(201,95,30,0.06)  0, transparent 45%),
    radial-gradient(ellipse at 95% 100%, rgba(45,109,168,0.04) 0, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

/* =============================
   TYPOGRAPHY
============================= */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--heading);
  margin-top: 0;
}

h1 { font-size: 2.6rem; line-height: 1.14; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.25rem; }

p, li { color: var(--text-secondary); font-size: 1.0rem; line-height: 1.75; }

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.18s ease;
}
a:hover { color: var(--accent); }

a.skip-to-content {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* =============================
   ANIMATIONS
============================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================
   HEADER (hide default Cayman)
============================= */
.page-header { display: none !important; }

/* =============================
   NAVIGATION — warm cream bar
============================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
  /* warm tinted glass */
  background: rgba(253,250,247,0.90);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 2px 10px rgba(30,15,5,0.06);
}

.nav-links {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  height: 56px;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.94rem;
  letter-spacing: 0.015em;
  padding: 0.42rem 1.15rem;
  border-radius: var(--radius-sm);
  transition: color 0.18s ease, background 0.18s ease;
  text-decoration: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 50%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.22s ease;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-links a.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-links .sep {
  color: var(--border);
  margin: 0 0.15rem;
  font-size: 0.9rem;
  user-select: none;
}

.nav-cv {
  margin-left: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cv:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(232,145,74,0.28);
}

.nav-cv::after { display: none !important; }

/* =============================
   LAYOUT — full-width content
============================= */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 3rem 5rem;
}

/* =============================
   HERO — spans full content width
============================= */
.hero-banner {
  padding: 3.5rem 0 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
  animation: fadeUp 0.6s ease-out both;
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 4rem;
  flex-wrap: wrap;
}

/* Profile column */
.profile-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 195px;
}

.hero-pic {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(201,95,30,0.10), var(--shadow-md);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hero-pic:hover {
  box-shadow: 0 0 0 8px rgba(201,95,30,0.14), var(--shadow-lg);
  transform: scale(1.025);
}

.profile-info { margin-top: 1rem; width: 100%; }

.profile-name {
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 0.25rem;
}

.profile-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
  line-height: 1.4;
}

.profile-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.profile-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.profile-links a i { font-size: 1.02rem; }

.profile-links a:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201,95,30,0.18);
}

/* Hero text — takes all remaining width */
.hero-content {
  flex: 1 1 0;
  min-width: 0;
  padding-top: 0.3rem;
}

.hero-content h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--heading);
  margin-bottom: 0.35rem;
  line-height: 1.1;
}

.tagline {
  font-size: 1.1rem !important;
  font-weight: 500;
  color: var(--accent) !important;
  margin-bottom: 0.85rem !important;
  letter-spacing: 0.01em;
}

.subtext {
  font-size: 1.0rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 680px;
  margin-bottom: 1.4rem;
}

.hero-banner h1 {
  font-size: 2.2rem;
  border: none;
  padding: 0;
  display: block;
  color: var(--heading);
}

/* =============================
   SECTION BOX
============================= */
.section-box {
  background: transparent;
  padding: 0;
  max-width: 100%;
  margin: 0;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeUp 0.6s ease-out both;
  text-align: center;
}

.section-box h1 {
  font-size: 1.65rem;
  margin-bottom: 1.4rem;
  color: var(--heading);
  border-bottom: none;
  padding: 0;
}

.section-box h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.2rem;
  color: var(--heading);
}

.tagline,
.section-box p,
.section-box li {
  font-size: 1.0rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* =============================
   SECTION TITLE
============================= */
.section-title {
  font-size: 1.5rem !important;
  font-weight: 700;
  color: var(--heading) !important;
  margin-bottom: 0.35rem !important;
  letter-spacing: -0.3px;
}

.section-title::after {
  content: '';
  display: block;
  width: 34px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  border-radius: 2px;
  margin: 0.45rem auto 0;
}

/* =============================
   NEWS ITEMS
============================= */
.news-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.4rem 0 0.65rem;
}

.news-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 640px;
}

.news-item {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.78rem 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: default;
  text-align: left;
}

.news-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.news-date {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.12rem 0.5rem;
  border-radius: 99px;
  margin-bottom: 0.28rem;
}

.news-item p {
  margin: 0;
  color: var(--text-secondary) !important;
  font-size: 0.91rem !important;
  line-height: 1.55;
}

/* =============================
   PROJECT CARDS
============================= */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  align-items: stretch;
  width: 100%;
  max-width: 980px;
  margin: 1.4rem auto 0;
}

.project-card {
  width: 100%;
  text-align: left;
  padding: 1.45rem 1.85rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: default;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  opacity: 0;
  transition: opacity 0.2s;
}

.project-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.project-card:hover::before { opacity: 1; }

.project-card h3 { font-size: 1.08rem; color: var(--heading); margin-bottom: 0.28rem; }

.project-card p {
  color: var(--text-secondary) !important;
  font-size: 0.92rem !important;
  margin: 0.22rem 0;
  line-height: 1.65;
}

.project-card em { color: var(--text-muted) !important; font-style: italic; }

.conference-note {
  display: block;
  margin-top: 0.38rem;
  font-size: 0.82rem !important;
  color: var(--accent-green) !important;
  font-weight: 600;
}

/* =============================
   GENERIC CARDS
============================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin: 1.4rem auto 0;
  max-width: 980px;
}

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

.card {
  background: var(--bg-surface);
  padding: 1.35rem 1.65rem;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card h2 { font-size: 1.2rem; margin-bottom: 0.35rem; color: var(--heading); }
.card a { color: var(--accent-blue); font-weight: 600; }
.card a:hover { color: var(--accent); text-decoration: underline; }

/* =============================
   PHOTOGRAPHY
============================= */
.photo-carousel {
  width: 100%;
  max-width: 820px;
  margin: 1rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#carousel-image {
  max-width: 760px;
  max-height: 560px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--border);
}

@media (max-width: 768px) {
  .photo-carousel { max-width: 100%; }
  #carousel-image { max-width: 100%; max-height: 400px; }
}

.photo-caption {
  text-align: center;
  font-size: 0.9rem !important;
  color: var(--text-muted) !important;
  margin-top: 0.4rem;
}

.photo-link { color: var(--accent) !important; font-weight: 600; }
.photo-link:hover { color: var(--accent-deep) !important; }

.photography-title { text-align: center !important; width: 100%; }
.no-underline { text-decoration: none !important; }
.no-underline:hover { text-decoration: none !important; }

#random-image {
  width: 100%; height: 750px; object-fit: cover;
  display: block; margin: 0 auto;
  border-radius: var(--radius-lg);
}

.photo-single {
  width: 100%; max-width: 840px; max-height: 720px;
  margin: 1.5rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 1.2rem;
}

.photo-item { display: block; overflow: hidden; border-radius: var(--radius-md); }
.photo-item img {
  width: 100%; max-height: 500px; object-fit: cover;
  display: block; border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.photo-item:hover img { transform: scale(1.04); box-shadow: 0 10px 28px rgba(30,15,5,0.14); }

@media (max-width: 768px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* =============================
   SAYINGS — inline quote block
============================= */
.sayings-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem auto 0;
  max-width: 680px;
  width: 100%;
}

.sayings-list li {
  font-family: 'Playfair Display', serif !important;
  font-size: 1.02rem !important;
  font-style: italic;
  color: var(--text-secondary) !important;
  line-height: 1.85;
  padding: 0.9rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 0.6rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, background 0.2s;
}

.sayings-list li:hover {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
}

/* =============================
   HEADER / FOOTER
============================= */
.site-header { display: none; }
.site-footer  { display: none; }

.site-footer-custom {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  margin-top: 5rem;
  border-top: 1.5px solid var(--border);
  font-size: 0.87rem;
}

.social-links a {
  font-size: 1.45rem;
  color: var(--text-muted);
  margin: 0 0.7rem;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}
.social-links a:hover { color: var(--accent); transform: scale(1.15) translateY(-2px); }

/* =============================
   RESPONSIVE
============================= */
@media (max-width: 960px) {
  .main-content { padding: 0 1.5rem 4rem; }
  .hero-banner  { padding: 2.5rem 0 2rem; }
}

@media (max-width: 768px) {
  .hero-inner { gap: 1.5rem; flex-direction: column; align-items: center; }
  .profile-side { width: auto; }
  .hero-content { padding-top: 0; }
  .hero-content h1 { font-size: 2rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.1rem; }
  .news-section { max-width: 100%; }
  .project-card { padding: 1.15rem 1.35rem; }
  .nav-links { padding: 0 1rem; gap: 0; }
  .nav-links a { padding: 0.38rem 0.65rem; font-size: 0.87rem; }
}

/* Fallback nav */
p[align="center"] { margin: 0; }
p[align="center"] a { padding: 0 0.5rem; font-weight: 600; color: var(--accent); }
p[align="center"] a:hover { color: var(--accent-deep); }
nav strong { color: var(--accent); }

/* =============================
   CV MODAL
============================= */
.cv-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.cv-modal.open {
  display: flex;
}

.cv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 24, 18, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cv-modal-box {
  position: relative;
  z-index: 1;
  width: min(820px, 94vw);
  height: min(92vh, 1100px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.22);
  animation: modalIn 0.28s cubic-bezier(0.22,1,0.36,1) both;
}

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

.cv-btn-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(6px);
  color: #555;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cv-btn-close:hover {
  background: #fff;
  color: #222;
  transform: scale(1.08);
}

.cv-modal-body {
  width: 100%;
  height: 100%;
}

.cv-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 600px) {
  .cv-modal-box { width: 100vw; height: 100dvh; border-radius: 0; }
}
