/* Notion-inspired Personal Website CSS */

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Notion-inspired color palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f7f6f3;
  --bg-tertiary: #f1f1ef;
  --text-primary: #37352f;
  --text-secondary: #687076;
  --text-muted: #9b9a97;
  --border-color: #e9e9e7;
  --accent-color: #2383e2;
  --accent-hover: #1a6bb8;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --border-radius-large: 12px;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

/* Base Typography */
body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout Container */
#wrapper {
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto;
  padding: 0 24px;
  background-color: var(--bg-primary);
}

/* Header Section */
#top {
  height: auto !important;
  margin-bottom: 32px;
  text-align: center;
  padding: 40px 0;
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 100%
  );
  border-radius: var(--border-radius-large);
  margin-top: 24px;
}

#top img {
  max-width: 100%;
  height: auto !important;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

/* Navigation Menu */
#menu {
  height: auto !important;
  margin-bottom: 32px;
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

#menu ul {
  height: auto !important;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  flex-wrap: wrap;
}

#menu li {
  flex: 1;
  min-width: 120px;
}

#menu a {
  display: block;
  padding: 16px 24px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  border-right: 1px solid var(--border-color);
}

#menu li:last-child a {
  border-right: none;
}

#menu a:hover {
  background-color: var(--bg-secondary);
  color: var(--accent-color);
}

/* Main Content */
#content {
  width: 100% !important;
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-large);
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

/* Typography Hierarchy */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-tertiary);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
  color: var(--text-primary);
  line-height: 1.7;
}

/* Profile Section */
.profile-section {
  margin-bottom: 40px;
}

.profile-image {
  text-align: center;
  margin-bottom: 32px;
}

.profile-image img {
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

.profile-content {
  max-width: 700px;
  margin: 0 auto;
}

.profile-content .intro {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.7;
}

.profile-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: justify;
}

/* Content Sections - Notion Style */
#maintable {
  width: 100% !important;
  border-collapse: collapse;
  margin-top: 32px;
}

#maintable tr {
  display: block;
  margin-bottom: 48px;
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-large);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-light);
  overflow: hidden;
}

#maintable td {
  display: block;
  padding: 0;
  border: none;
  background-color: transparent;
}

#maintable td:first-child {
  width: 100%;
  padding: 24px 32px 16px 32px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

#maintable td:first-child h2 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

#maintable td:last-child {
  padding: 32px;
  background-color: var(--bg-primary);
}

/* Lists */
ul {
  margin-left: 20px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.6;
}

ul ul {
  margin-top: 8px;
  margin-bottom: 8px;
}

ul ul li {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Links */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Highlighted Content */
mark {
  background-color: transparent !important;
  color: var(--text-primary) !important;
  padding: 2px 4px;
  border-radius: 4px;
  letter-spacing: 0.5px !important;
  font-weight: 600;
}

/* Emphasis */
em {
  font-style: italic;
  color: var(--text-secondary);
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* Video Containers */
iframe {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  margin: 16px 0;
  max-width: 100%;
  height: auto;
}

/* Footer */
#footer {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 32px;
  border: 1px solid var(--border-color);
}

#footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Contact Page Styles */
.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
  max-width: 800px;
}

.contact-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-large);
  padding: 32px;
  box-shadow: var(--shadow-light);
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.2s ease;
}

.contact-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.contact-details {
  flex: 1;
}

.contact-details h3 {
  margin: 0 0 12px 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-details p {
  margin: 0;
  line-height: 1.6;
  color: var(--text-secondary);
}

.contact-details a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-details strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  #wrapper {
    padding: 0 16px;
  }

  #content {
    padding: 24px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .profile-image img {
    max-width: 150px;
  }

  .profile-content {
    max-width: 100%;
  }
  
  .profile-content p {
    text-align: left;
  }

  #maintable td:first-child {
    padding: 20px 24px 12px 24px;
    font-size: 0.9rem;
  }

  #maintable td:last-child {
    padding: 24px;
  }

  #menu ul {
    flex-direction: column;
  }

  #menu a {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  #menu li:last-child a {
    border-bottom: none;
  }

  iframe {
    width: 100% !important;
    height: 250px !important;
  }
  
  /* Contact page mobile styles */
  .contact-card {
    padding: 24px;
    gap: 16px;
  }
  
  .contact-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }
  
  .contact-details h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  #content {
    padding: 16px;
  }

  #maintable tr {
    margin-bottom: 32px;
  }

  #maintable td:first-child {
    padding: 16px 20px 12px 20px;
  }

  #maintable td:last-child {
    padding: 20px;
  }
}

/* Print Styles */
@media print {
  #wrapper {
    max-width: none;
    width: 100%;
    padding: 0;
  }

  #menu,
  #footer {
    display: none;
  }

  #content {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  iframe {
    display: none;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States for Better Accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --bg-primary: #ffffff;
    --bg-secondary: #f0f0f0;
    --text-primary: #000000;
    --text-secondary: #333333;
    --border-color: #666666;
    --accent-color: #0000ee;
  }
}
