/* ============================================================
   Personal Academic Page – F. S. Alanova
   University of Zaragoza | Ropert / SUR Lab
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary:   #1a4e8c;   /* Unizar blue */
  --color-accent:    #e8a020;   /* warm gold   */
  --color-bg:        #f8f9fb;
  --color-surface:   #ffffff;
  --color-text:      #2c3e50;
  --color-muted:     #6b7a8d;
  --color-border:    #dde3ec;
  --radius:          8px;
  --shadow-sm:       0 1px 4px rgba(0,0,0,.08);
  --shadow-md:       0 4px 16px rgba(0,0,0,.10);
  --max-width:       960px;
  --font-body:       'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

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

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

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

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 4rem 0; }
section:nth-child(even) { background: var(--color-surface); }

/* ── Navigation ───────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  box-shadow: var(--shadow-md);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--color-accent); text-decoration: none; }

/* ── Hero / About ─────────────────────────────────────────── */
#about {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0d3066 100%);
  color: #fff;
  padding: 5rem 0 4rem;
}

.about-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.about-photo {
  flex-shrink: 0;
}

.photo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 3px solid rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255,255,255,.7);
  overflow: hidden;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.about-text h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.about-text .title {
  font-size: 1.05rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: .5rem;
}

.about-affiliation {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  color: rgba(255,255,255,.8);
  margin-bottom: .25rem;
}

.about-affiliation .icon { font-size: 1.1rem; }

.about-bio {
  margin-top: 1.25rem;
  max-width: 600px;
  color: rgba(255,255,255,.85);
  font-size: .97rem;
}

.about-links {
  margin-top: 1.5rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  transition: opacity .2s, transform .15s;
  cursor: pointer;
  border: none;
}
.btn:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; }

.btn-outline {
  border: 2px solid rgba(255,255,255,.6);
  color: #fff;
  background: transparent;
}
.btn-accent {
  background: var(--color-accent);
  color: #fff;
}

/* ── Section Titles ───────────────────────────────────────── */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2rem;
  padding-bottom: .6rem;
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}

/* ── Research Interests ───────────────────────────────────── */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.interest-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.interest-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.interest-card .icon {
  font-size: 2rem;
  margin-bottom: .6rem;
}

.interest-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: .4rem;
}

.interest-card p {
  font-size: .88rem;
  color: var(--color-muted);
}

/* ── Publications ─────────────────────────────────────────── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pub-item {
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.pub-item .pub-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: .25rem;
}

.pub-item .pub-authors {
  font-size: .875rem;
  color: var(--color-muted);
  margin-bottom: .2rem;
}

.pub-item .pub-venue {
  font-size: .875rem;
  color: var(--color-primary);
  font-style: italic;
}

.pub-item .pub-links {
  margin-top: .6rem;
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--color-primary);
  color: #fff;
}
.tag-outline {
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
}

/* ── News / Updates ───────────────────────────────────────── */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.news-date {
  flex-shrink: 0;
  font-size: .8rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-top: .15rem;
  min-width: 70px;
}

.news-content {
  font-size: .93rem;
  color: var(--color-text);
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.contact-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-muted);
  margin-bottom: .15rem;
}

.contact-value {
  font-size: .95rem;
  font-weight: 500;
  color: var(--color-text);
}

.contact-value a { color: var(--color-primary); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.75);
  text-align: center;
  padding: 1.5rem;
  font-size: .85rem;
}
footer a { color: var(--color-accent); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .about-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .about-affiliation, .about-links { justify-content: center; }
  .about-text h1 { font-size: 1.7rem; }
  .nav-links { gap: .85rem; }
  .nav-links a { font-size: .8rem; }
}
