/**
 * HTMAA Portfolio - Academic Minimalist Stylesheet
 * Inspired by Adin Rimland's clean academic style with bracelet navigation
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Minion+Pro:ital,wght@0,400;0,700;1,400&display=swap');

/* Note: Sainte Solombe is not available on Google Fonts, using similar alternative */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,300;0,400;0,700;1,400&display=swap');

:root {
  /* Academic minimalist palette */
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --accent: #c41e3a; /* Deep red from bracelet */
  --accent-secondary: #20bde4; /* Better turquoise shade */
  --border: #e0e0e0;
  --hover: #f8f9fa;
  --code-bg: #f8f9fa;
  
  /* Typography families */
  --font-main-title: 'Playfair Display', serif; /* Alternative to Sainte Solombe */
  --font-subtitle: 'Poppins', sans-serif;
  --font-body: 'Minion Pro', serif;
  
  /* Typography scale */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}

* { 
  box-sizing: border-box; 
}

html, body {
  margin: 0; 
  padding: 0;
  background: var(--bg); 
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: var(--font-size-base);
}

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

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

/* ====== Academic Layout with Sidebar ====== */
.layout { 
  display: grid; 
  grid-template-columns: 400px 1fr; 
  min-height: 100vh; 
}

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

/* ====== Sidebar ====== */
.sidebar {
  background: transparent;
  border-right: none;
  padding: var(--space-8);
  position: sticky; 
  top: 0; 
  align-self: start;
  height: 100dvh; 
  overflow: auto;
}

.top-badge {
  font-family: var(--font-subtitle);
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--muted);
  background: var(--hover);
  padding: var(--space-1) var(--space-3);
  border-radius: 12px;
  display: inline-block;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.back-home-btn {
  font-family: var(--font-subtitle);
  font-size: var(--font-size-sm);
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: var(--space-1) var(--space-2);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.back-home-btn:hover {
  color: var(--accent);
  background: var(--hover);
  text-decoration: none;
}

/* ====== Bracelet Container ====== */
.bracelet-container {
  position: relative;
  margin: var(--space-6) 0;
  display: flex;
  justify-content: center;
}

.bracelet-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  display: block;
  object-fit: contain;
}


/* ====== Floating Weeks Alternative ====== */
.bracelet-with-weeks {
  position: relative;
  margin: var(--space-6) 0;
  display: flex;
  justify-content: center;
}

.floating-weeks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 10;
  background: transparent;
  padding: 0;
  border-radius: 0;
  backdrop-filter: none;
}

.floating-week {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
  background: transparent;
  border-radius: 0;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  box-shadow: none;
  width: auto;
  height: auto;
}

.floating-week:hover {
  background: transparent;
  transform: translateX(2px);
  box-shadow: none;
}

.floating-week:hover .week-number {
  transform: scale(1.1);
}

.floating-week:hover .week-title {
  color: var(--accent);
  text-decoration: underline;
}

/* Positioning for each week on bracelet beads */
.floating-week:nth-child(1) {
  top: 8%;
  left: 35%;
}

.floating-week:nth-child(2) {
  top: 22%;
  left: 30%;
}

.floating-week:nth-child(3) {
  top: 36%;
  left: 40%;
}

.floating-week:nth-child(4) {
  top: 50%;
  left: 30%;
}

.floating-week:nth-child(5) {
  top: 64%;
  left: 40%;
}

.week-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: 300;
  color: white;
  flex-shrink: 0;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.floating-week:nth-child(1) .week-number,
.floating-week:nth-child(3) .week-number,
.floating-week:nth-child(5) .week-number {
  background: var(--accent);
}

.floating-week:nth-child(2) .week-number,
.floating-week:nth-child(4) .week-number {
  background: var(--accent-secondary);
}

.week-title {
  font-family: var(--font-main-title);
  font-size: var(--font-size-base);
  color: var(--muted);
  font-weight: 300;
  transition: color 0.3s ease, text-decoration 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .sidebar { 
    position: static; 
    height: auto; 
    border-right: none; 
    border-bottom: 1px solid var(--border); 
  }
}

.site-title {
  font-family: var(--font-main-title);
  font-size: var(--font-size-2xl);
  font-weight: 300;
  color: var(--text);
  margin: 0 0 var(--space-2);
  letter-spacing: -0.025em;
}

.site-subtitle {
  font-family: var(--font-subtitle);
  color: var(--muted);
  margin: 0 0 var(--space-6);
  font-size: var(--font-size-sm);
}


/* ====== Navigation Links ====== */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.nav-links a {
  font-size: var(--font-size-sm);
  font-weight: 400;
  color: var(--muted);
  transition: color 0.2s ease;
  text-decoration: none;
}

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

/* ====== Main Content ====== */
main { 
  padding: var(--space-12); 
  max-width: 1000px; 
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  margin: var(--space-8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ====== Academic Typography ====== */
h1 {
  font-family: var(--font-main-title);
  font-size: var(--font-size-4xl);
  font-weight: 300;
  margin: 0 0 var(--space-6);
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h2 {
  font-family: var(--font-main-title);
  font-size: var(--font-size-2xl);
  font-weight: 400;
  margin: var(--space-12) 0 var(--space-6);
  color: var(--text);
  letter-spacing: -0.025em;
}

h3 {
  font-family: var(--font-subtitle);
  font-size: var(--font-size-xl);
  font-weight: 500;
  margin: var(--space-8) 0 var(--space-4);
  color: var(--text);
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: 500;
  margin: var(--space-6) 0 var(--space-3);
  color: var(--text);
}

p { 
  line-height: 1.7; 
  color: var(--text);
  margin: var(--space-4) 0;
  font-size: var(--font-size-base);
}

/* ====== Academic Sections ====== */
.section {
  margin: var(--space-16) 0;
}

.section-header {
  margin-bottom: var(--space-8);
}

.section-title {
  font-family: var(--font-main-title);
  font-size: var(--font-size-3xl);
  font-weight: 300;
  margin: 0 0 var(--space-2);
  color: var(--text);
}

.section-subtitle {
  font-family: var(--font-subtitle);
  font-size: var(--font-size-lg);
  color: var(--muted);
  margin: 0;
  font-weight: 400;
}

/* ====== Hero Section ====== */
.hero {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: var(--space-12);
  align-items: center;
  margin-bottom: var(--space-16);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border);
}

.hero-content h1 {
  font-family: var(--font-main-title);
  font-size: var(--font-size-4xl);
  font-weight: 300;
  margin: 0 0 var(--space-2);
  color: var(--text);
}

.hero-content h2 {
  font-family: var(--font-main-title);
  font-size: var(--font-size-lg);
  font-weight: 400;
  margin: 0 0 var(--space-4);
  color: var(--muted);
}

.hero-content p {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.avatar {
  width: 180px; 
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  justify-self: end;
}

/* ====== Academic Lists ====== */
ul, ol {
  padding-left: var(--space-6);
  margin: var(--space-4) 0;
}

li {
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

/* ====== Photo Grid ====== */
.grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
  gap: var(--space-4); 
  margin: var(--space-8) 0;
}

figure { 
  margin: 0; 
  padding: 0;
  position: relative; 
  overflow: hidden; 
  border-radius: 6px; 
  border: none;
  background: transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Week pages - natural aspect ratio */
.section .grid figure {
  aspect-ratio: auto;
}

figure:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

figure img { 
  width: 100%; 
  height: auto;
  object-fit: cover; 
  display: block;
  margin: 0;
  padding: 0;
}

/* ====== Videos ====== */
video {
  max-width: 900px;
  width: 90%;
  height: auto;
  display: block;
  margin: var(--space-8) auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

figure video {
  width: 100%;
  margin: 0 auto;
}

/* YouTube embeds and iframes */
.video-embed iframe,
iframe.videos {
  max-width: 900px;
  width: 90%;
  height: 500px;
  display: block;
  margin: var(--space-8) auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Center standalone images */
.section img:not(figure img) {
  display: block;
  margin: var(--space-6) auto;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

figure figcaption {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--muted);
  background: var(--bg);
  font-style: italic;
}

/* ====== Code Blocks ====== */
pre {
  background: var(--code-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: var(--space-4);
  overflow: auto;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

code { 
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  background: var(--code-bg);
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ====== Callout Boxes ====== */
.callout {
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-6);
  margin: var(--space-6) 0;
}

.callout h3 {
  font-family: var(--font-subtitle);
  font-size: var(--font-size-lg);
  font-weight: 500;
  margin: 0 0 var(--space-3);
  color: var(--text);
}

.callout p {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.callout .btn {
  margin-top: var(--space-3);
}

/* ====== Week Cards with Background Images ====== */
.week-card {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  min-height: 250px;
  transition: all 0.4s ease;
}

.week-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  transition: background 0.4s ease;
  z-index: 1;
}

.week-card:hover::before {
  background: rgba(255, 255, 255, 0.3);
}

.week-card-content {
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
}

.week-card:hover .week-card-content {
  text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9);
}

.week-card h3 {
  color: var(--text);
  font-weight: 600;
}

.week-card:hover h3 {
  color: var(--text);
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 1);
}
.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border-radius: 4px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn:hover { 
  background: var(--accent); 
  color: white; 
  text-decoration: none; 
}

/* ====== Week Pages ====== */
.wk-hero {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-12);
}

.wk-hero h1 {
  font-size: var(--font-size-3xl);
  font-weight: 300;
  margin: 0 0 var(--space-2);
  color: var(--text);
}

.wk-hero p {
  font-size: var(--font-size-lg);
  color: var(--muted);
  margin: 0;
}

/* ====== Footer ====== */
footer { 
  margin: var(--space-20) 0 var(--space-8); 
  color: var(--muted); 
  font-size: var(--font-size-sm); 
  text-align: center; 
  border-top: 1px solid var(--border);
  padding-top: var(--space-8);
}

/* ====== Responsive Design ====== */
@media (max-width: 768px) {
  .header-with-bracelet {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-6);
  }
  
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .avatar {
    justify-self: center;
  }
  
  .bracelet-bead {
    width: 28px;
    height: 28px;
    font-size: var(--font-size-xs);
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  main {
    padding: var(--space-8);
  }
}

@media (max-width: 480px) {
  .bracelet-bead {
    width: 24px;
    height: 24px;
  }
  
  .hero-content h1 {
    font-size: var(--font-size-3xl);
  }
  
  .site-title {
    font-size: var(--font-size-2xl);
  }
}
