/* Fonts */
@font-face {
  font-family: 'Theinhardt';
  src: url('/assets/fonts/Theinhardt-Regular.woff2') format('woff2'),
       url('/assets/fonts/Theinhardt-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Theinhardt';
  src: url('/assets/fonts/Theinhardt-Medium.woff2') format('woff2'),
       url('/assets/fonts/Theinhardt-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Base styles */
:root {
  --background-color: #a8e0e0;
  --background-gradient: linear-gradient(135deg, #a8e0e0 0%, #c4f0f0 50%, #a8e0e0 100%);
  --text-color: #2c3e50;
  --text-secondary: #546e7a;
  --link-color: #2c3e50;
  --link-hover-color: #16a085;
  --accent-color: #16a085;
  --accent-light: #48c9b0;
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(255, 255, 255, 0.9);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --container-width: 800px;
  --spacing-unit: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Myriad Pro', 'Helvetica Neue', 'Helvetica', 'Arial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(ellipse at top right, rgba(255, 200, 180, 0.3), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(180, 230, 240, 0.4), transparent 50%),
    radial-gradient(ellipse at top left, rgba(200, 240, 235, 0.35), transparent 60%),
    linear-gradient(135deg,
      #b8d8e8 0%,
      #a8e0e0 20%,
      #d0f0e8 40%,
      #c4f0f0 60%,
      #a8d8e0 80%,
      #b8e0d8 100%
    );
  background-attachment: fixed;
  color: var(--text-color);
  line-height: 1.7;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 350 350' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='4.8' numOctaves='6' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

.container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-top: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  margin-top: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
  color: var(--accent-color);
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  margin-top: 1.25rem;
}

p {
  margin-bottom: 1rem;
  text-align: center;
  line-height: 1.8;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: var(--link-hover-color);
}

a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Header */
header {
  margin-bottom: 2.5rem;
  text-align: center;
}

header h1 {
  font-family: 'Theinhardt', 'Myriad Pro', 'Helvetica Neue', sans-serif;
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* Page Layout - Sidebar + Main Content */
.page-layout {
  position: relative;
  width: 100%;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: clamp(6rem, 10vh, 8rem);
  left: calc(50% - 300px - 4rem - 200px);
  width: 200px;
  overflow: visible;
}

.profile-image {
  width: 100%;
  max-width: clamp(150px, 15vw, 180px);
  height: auto;
  object-fit: cover;
  margin-bottom: clamp(0.75rem, 1.5vh, 1rem);
  display: block;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.bio-section {
  margin-top: clamp(0.5rem, 1vh, 0.75rem);
}

.bio-section h2 {
  font-size: clamp(0.75rem, 0.8vw, 0.8rem);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 clamp(0.5rem, 1vh, 0.75rem);
}

.bio-section p {
  font-size: clamp(0.8rem, 0.85vw, 0.85rem);
  line-height: 1.5;
  margin-bottom: clamp(0.5rem, 1vh, 0.75rem);
  text-align: left;
  color: var(--text-color);
}

.affiliation,
.supervisors {
  font-size: clamp(0.75rem, 0.8vw, 0.8rem);
  color: var(--text-secondary);
  margin-bottom: clamp(0.3rem, 0.5vh, 0.4rem);
  line-height: 1.4;
}

.contact {
  font-size: clamp(0.8rem, 0.85vw, 0.85rem);
  color: var(--text-secondary);
  margin-bottom: clamp(0.5rem, 1vh, 0.75rem);
}

/* Navigation */
.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0 0 1rem;
}

.site-nav a {
  transition: color 0.2s ease;
  font-weight: 400;
}

.site-nav a:hover {
  color: var(--accent-color);
}

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

/* Social links */
.social-links {
  display: flex;
  flex-direction: column;
  gap: clamp(0.25rem, 0.5vh, 0.35rem);
  margin: clamp(0.5rem, 1vh, 0.75rem) 0 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: clamp(0.75rem, 0.8vw, 0.8rem);
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--accent-color);
}

.social-link svg {
  width: clamp(12px, 1.2vw, 14px);
  height: clamp(12px, 1.2vw, 14px);
}

.social-icon {
  width: 16px;
  height: 16px;
  filter: grayscale(100%);
}

/* Main Content */
.main-content {
  width: 600px;
  margin: 0 auto;
}

/* Section divider - News Section */
.section-divider {
  margin: 2.5rem 0 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 1.5rem;
}

.section-divider h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

/* News list */
.news-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
}

.news-list li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.5;
}

.news-list li:last-child {
  margin-bottom: 0;
}

.emoji {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Sections */
section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

section:last-of-type {
  border-bottom: none;
}

section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
  text-align: center;
}

section p {
  line-height: 1.7;
  text-align: center;
}

section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

section li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  position: relative;
  padding-left: 1.25rem;
}

section li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

section a {
  color: var(--accent-color);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s ease;
}

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

/* Publications section */
#publications p {
  text-align: left;
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-size: 0.9rem;
}

#publications p strong {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  display: block;
  margin-bottom: 0.25rem;
  position: relative;
  padding-left: 1.5rem;
}

#publications p strong a {
  color: var(--text-color);
  text-decoration: none;
}

#publications p strong a:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

#publications p strong::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: #8b7aa8;
  font-size: 0.85rem;
  top: 0.15rem;
}

#publications p + p {
  margin-top: 2.25rem;
}

#publications hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 2rem 0;
}

/* Talks section */
#talks p {
  text-align: left;
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-size: 0.9rem;
}

#talks p strong {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  display: block;
  margin-bottom: 0.25rem;
  position: relative;
  padding-left: 1.5rem;
}

#talks p strong::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: #8b7aa8;
  font-size: 0.85rem;
  top: 0.15rem;
}

#talks p + p {
  margin-top: 2.25rem;
}

#talks .slides-link {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.85rem;
}

#talks .slides-link:hover {
  text-decoration: underline;
}

#talks .slides-link svg {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 3px;
}

/* Publications section */
#publications .paper-link {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.85rem;
}

#publications .paper-link:hover {
  text-decoration: underline;
}

#publications .paper-link svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 3px;
}

/* Teaching section */
#teaching p {
  text-align: left;
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-size: 0.9rem;
}

#teaching p strong {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  display: block;
  margin-bottom: 0.25rem;
  position: relative;
  padding-left: 1.5rem;
}

#teaching p strong::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: #8b7aa8;
  font-size: 0.85rem;
  top: 0.15rem;
}

#teaching p + p {
  margin-top: 2.25rem;
}

/* Posts list page */
.posts-list {
  max-width: 600px;
  margin: 0 auto;
}

.post-item {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  line-height: 1.4;
  text-align: center;
}

.post-item h2 a {
  color: var(--text-color);
  text-decoration: none;
}

.post-item h2 a:hover {
  color: var(--accent-color);
}

.post-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  text-align: center;
}

.post-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-color);
  text-align: center;
}

/* Individual post page */
.post-content {
  max-width: 650px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.post-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.post-body {
  font-size: 0.95rem;
  line-height: 1.7;
}

.post-body h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-color);
}

.post-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-color);
}

.post-body p {
  margin-bottom: 1rem;
}

.post-body ul, .post-body ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.post-body a {
  color: var(--accent-color);
  text-decoration: underline;
}

.post-body a:hover {
  color: var(--link-hover-color);
}

.post-body code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Monaco', 'Courier New', monospace;
}

.post-body pre {
  background: rgba(0, 0, 0, 0.05);
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-body pre code {
  background: none;
  padding: 0;
}

/* Page content */
.page-content, .project-content {
  max-width: 650px;
  margin: 0 auto;
}

/* Fun page - wider images */
.fun-page {
  max-width: 900px;
}

.fun-page img {
  width: 100%;
  height: auto;
  margin: 1rem 0;
  display: block;
}

/* Styled link buttons */
.link-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.link-card {
  color: var(--accent-color);
  font-weight: 400;
  transition: color 0.2s ease;
  text-decoration: underline;
  text-decoration-color: transparent;
}

.link-card:hover {
  text-decoration-color: var(--accent-color);
}

/* Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
  :root {
    --container-width: 720px;
  }

  section {
    padding: clamp(1.25rem, 3vw, 2rem);
  }
}

/* Tablets and smaller screens */
@media (max-width: 1200px) {
  .sidebar {
    left: 2rem;
  }

  .main-content {
    width: 500px;
  }
}

@media (max-width: 1000px) {
  .main-content {
    width: 450px;
  }

  .sidebar {
    left: 1.5rem;
    width: 180px;
  }

  .profile-image {
    max-width: 180px;
  }
}

/* Large phones */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  .page-layout {
    padding: 0 1rem;
  }

  .sidebar {
    position: static;
    text-align: center;
    width: 100%;
    max-width: 300px;
    max-height: none;
    margin: 0 auto 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    overflow-y: visible;
  }

  .profile-image {
    max-width: 200px;
    margin: 0 auto 1.5rem;
  }

  .bio-section p,
  .affiliation,
  .supervisors,
  .contact {
    text-align: center;
  }

  .social-links {
    align-items: center;
  }

  .main-content {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }

  .site-nav {
    gap: 1rem;
  }
}