/* ==========================================================================
   1. VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
  --bg-color: #fcfbf9;
  --text-color: #1c1c1e;
  --border-color: #e5e5e0;
  --accent-color: #085c8c;
  --text-muted: #555558;
  
  /* Handcrafted ease for smooth transitions without looking sluggish */
  --fluid-transition: background-color 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                     color 0.25s cubic-bezier(0.25, 1, 0.5, 1),
                     border-color 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Scoped directly to HTML node to eliminate theme loading lag */
html.dark-mode {
  --bg-color: #121214;
  --text-color: #f5f5f7;
  --border-color: #2a2a2e;
  --accent-color: #3297d3;
  --text-muted: #a1a1a6;
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLES
   ========================================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--fluid-transition);
}

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

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
header {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 20px 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Minimalistic, tactile buttons instead of standard AI rounded blocks */
.nav-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 4px;
  color: var(--text-color);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--fluid-transition);
}

.nav-btn:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
}

/* Intentional monochrome image filters to maintain design balance */
.social-icon img {
  width: 15px;
  height: 15px;
  filter: grayscale(1) opacity(0.8);
  transition: filter 0.2s ease;
}

.nav-btn:hover.social-icon img {
  filter: invert(1) grayscale(1) opacity(1);
}

html.dark-mode .nav-btn img {
  filter: invert(1) grayscale(1) opacity(0.8);
}

html.dark-mode .nav-btn:hover.social-icon img {
  filter: invert(0) grayscale(1) opacity(1);
}

/* ==========================================================================
   4. LAYOUT & CONTENT SECTIONS
   ========================================================================== */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 100px 24px;
}

#intro-profile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 70px;
  gap: 28px;
}

#profile-image {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: var(--fluid-transition);
}

h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 300;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
  transition: var(--fluid-transition);
}

h1 span {
  font-style: italic;
  color: var(--accent-color);
  font-weight: 400;
}

/* Editorial, asymmetrical borders instead of symmetric cards */
.content-section {
  margin-bottom: 50px;
  border-top: 1px solid var(--border-color);
  padding-top: 28px;
  transition: var(--fluid-transition);
}

h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0;
  margin-bottom: 18px;
  color: var(--accent-color);
  transition: var(--fluid-transition);
}

p {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0 0 20px 0;
  transition: var(--fluid-transition);
}

/* Clean illustration framings */
.showcase-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  margin-top: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.02);
  transition: var(--fluid-transition);
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
footer {
  margin-top: 100px;
  border-top: 1px solid var(--border-color);
  padding-top: 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  transition: var(--fluid-transition);
}

footer p {
  font-size: 0.88rem;
  margin: 0;
}

.contact-link {
  color: var(--text-color);
  text-decoration: underline;
  text-underline-offset: 5px;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 580px) {
  h1 { 
    font-size: 2.1rem; 
  }
  
  #intro-profile {
    margin-bottom: 50px;
    gap: 20px;
  }
  
  header {
    padding-top: 25px;
  }
  
  footer { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 12px;
  }
}