/* Combined Styles for Yusuke Hashimoto Website */
/* This file combines variables.css, components.css, and styles.css for better compatibility */

/* ===== CSS Variables (from variables.css) ===== */
:root {
  /* ===== Color System ===== */
  /* Primary Colors */
  --color-primary: #1a252f;        /* Dark Navy - Headers, Main text */
  --color-primary-light: #2c3e50;  /* Navy - Secondary headers */
  --color-primary-lighter: #34495e; /* Light Navy - Borders */
  
  /* Secondary Colors */
  --color-secondary: #4a5f7a;      /* Blue Gray - Accents */
  --color-secondary-light: #5d6d7e; /* Light Blue Gray - Body text */
  --color-secondary-lighter: #7f8c8d; /* Lighter Gray - Subtle text */
  
  /* Neutral Colors */
  --color-white: #ffffff;
  --color-background: #f8f9fa;     /* Light Gray Background */
  --color-surface: #ffffff;        /* Card backgrounds */
  --color-border: #e9ecef;         /* Border Color */
  --color-shadow: rgba(0, 0, 0, 0.05);
  --color-shadow-hover: rgba(0, 0, 0, 0.1);
  
  /* Text Colors */
  --color-text-primary: var(--color-primary);
  --color-text-secondary: var(--color-secondary-light);
  --color-text-light: var(--color-secondary-lighter);
  --color-text-inverse: var(--color-white);
  
  /* Status Colors */
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-error: #e74c3c;
  --color-info: #3498db;
  
  /* Accent Colors for Different Sections */
  --color-accent-research: #3498db;
  --color-accent-publication: #2ecc71;
  --color-accent-dx: #9b59b6;
  --color-accent-nanomaterial: #e67e22;
  
  /* ===== Typography ===== */
  /* Font Families */
  --font-family-primary: 'Georgia', 'Times New Roman', serif;
  --font-family-secondary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
  
  /* Font Sizes */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-md: 1.1rem;     /* 17.6px */
  --font-size-lg: 1.25rem;    /* 20px */
  --font-size-xl: 1.5rem;     /* 24px */
  --font-size-2xl: 1.8rem;    /* 28.8px */
  --font-size-3xl: 2.4rem;    /* 38.4px */
  --font-size-4xl: 3rem;      /* 48px */
  
  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;
  --line-height-loose: 1.8;
  
  /* Letter Spacing */
  --letter-spacing-tight: -0.5px;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.3px;
  
  /* ===== Spacing System ===== */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */
  --spacing-4xl: 6rem;     /* 96px */
  
  /* ===== Layout ===== */
  --max-width-content: 1200px;
  --max-width-narrow: 800px;
  --max-width-wide: 1400px;
  
  /* ===== Borders ===== */
  --border-width: 1px;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-full: 9999px;
  
  /* ===== Shadows ===== */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
  
  /* ===== Transitions ===== */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* ===== Z-index Scale ===== */
  --z-index-dropdown: 100;
  --z-index-sticky: 200;
  --z-index-fixed: 300;
  --z-index-modal-backdrop: 400;
  --z-index-modal: 500;
  --z-index-popover: 600;
  --z-index-tooltip: 700;
}

/* ===== Dark Mode Variables ===== */
@media (prefers-color-scheme: dark) {
  :root {
    /* Primary Colors - Dark Mode */
    --color-primary: #e0e6ed;
    --color-primary-light: #c5d0db;
    --color-primary-lighter: #aab4c0;
    
    /* Secondary Colors - Dark Mode */
    --color-secondary: #8b9dc3;
    --color-secondary-light: #9aabcc;
    --color-secondary-lighter: #a8b8d5;
    
    /* Neutral Colors - Dark Mode */
    --color-white: #0d1117;
    --color-background: #0d1117;
    --color-surface: #161b22;
    --color-border: #30363d;
    --color-shadow: rgba(0, 0, 0, 0.3);
    --color-shadow-hover: rgba(0, 0, 0, 0.5);
    
    /* Text Colors - Dark Mode */
    --color-text-primary: #e6edf3;
    --color-text-secondary: #8b949e;
    --color-text-light: #6e7681;
    --color-text-inverse: #0d1117;
  }
}

/* Manual Dark Mode Toggle */
[data-theme="dark"] {
  /* Primary Colors - Dark Mode */
  --color-primary: #e0e6ed;
  --color-primary-light: #c5d0db;
  --color-primary-lighter: #aab4c0;
  
  /* Secondary Colors - Dark Mode */
  --color-secondary: #8b9dc3;
  --color-secondary-light: #9aabcc;
  --color-secondary-lighter: #a8b8d5;
  
  /* Neutral Colors - Dark Mode */
  --color-white: #0d1117;
  --color-background: #0d1117;
  --color-surface: #161b22;
  --color-border: #30363d;
  --color-shadow: rgba(0, 0, 0, 0.3);
  --color-shadow-hover: rgba(0, 0, 0, 0.5);
  
  /* Text Colors - Dark Mode */
  --color-text-primary: #e6edf3;
  --color-text-secondary: #8b949e;
  --color-text-light: #6e7681;
  --color-text-inverse: #0d1117;
}

/* ===== Common Components (from components.css) ===== */

/* ===== Page Container ===== */
.container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--wide {
  max-width: var(--max-width-wide);
}

/* ===== Section Component ===== */
.section {
  padding: var(--spacing-3xl) 0;
  border-bottom: var(--border-width) solid var(--color-border);
}

.section:last-child {
  border-bottom: none;
}

.section__header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.section__title {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
  font-weight: var(--font-weight-normal);
  letter-spacing: var(--letter-spacing-tight);
}

.section__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  line-height: var(--line-height-relaxed);
}

/* ===== Card Component ===== */
.card {
  background: var(--color-white);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}

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

.card__header {
  padding: var(--spacing-lg);
  border-bottom: var(--border-width) solid var(--color-border);
  background: var(--color-background);
}

.card__title {
  font-size: var(--font-size-xl);
  color: var(--color-primary);
  margin: 0;
  font-weight: var(--font-weight-medium);
}

.card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--spacing-xs);
}

.card__body {
  padding: var(--spacing-lg);
}

.card__footer {
  padding: var(--spacing-lg);
  border-top: var(--border-width) solid var(--color-border);
  background: var(--color-background);
}

/* Card Variants */
.card--primary {
  border-color: var(--color-primary);
}

.card--primary .card__header {
  background: var(--color-primary);
  color: var(--color-white);
}

.card--primary .card__title {
  color: var(--color-white);
}

/* ===== Button Component ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  text-decoration: none;
  border: var(--border-width) solid transparent;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 44px;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Button Variants */
.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

.btn--secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-background);
  border-color: var(--color-primary);
}

.btn--large {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-lg);
}

.btn--small {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-sm);
  min-height: 36px;
}

/* ===== Grid Component ===== */
.grid {
  display: grid;
  gap: var(--spacing-xl);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== List Component ===== */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list__item {
  padding: var(--spacing-md) 0;
  border-bottom: var(--border-width) solid var(--color-border);
}

.list__item:last-child {
  border-bottom: none;
}

/* ===== Tag Component ===== */
.tag {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--color-background);
  color: var(--color-text-secondary);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: var(--color-secondary);
  color: var(--color-white);
}

.tag--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ===== Utility Classes ===== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }
.mt-5 { margin-top: var(--spacing-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }
.mb-5 { margin-bottom: var(--spacing-2xl); }

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  
  .section {
    padding: var(--spacing-2xl) 0;
  }
  
  .section__title {
    font-size: var(--font-size-xl);
  }
  
  .card__header,
  .card__body,
  .card__footer {
    padding: var(--spacing-md);
  }
  
  .grid {
    gap: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .btn {
    width: 100%;
  }
}

/* ===== Base Styles (from styles.css) ===== */

/* Common Base Styles */
*, *::before, *::after { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-family-primary);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  background: var(--color-background);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* Skip to content link for accessibility */
.skip-to-content {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-md);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  border-radius: var(--border-radius-sm);
  z-index: var(--z-index-tooltip);
}

.skip-to-content:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  overflow: visible;
}

/* Header Styles */
header {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-xl) 0;
  border-bottom: 3px solid var(--color-primary-lighter);
  position: relative;
  overflow: visible;
  transition: all var(--transition-base);
  z-index: var(--z-index-sticky);
}

.header-content {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  position: relative;
}

header h1 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-md);
  font-weight: var(--font-weight-normal);
  letter-spacing: var(--letter-spacing-wide);
}

nav {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: center;
}

nav[role="navigation"] {
  margin: 0;
}

nav a {
  color: var(--color-text-inverse);
  text-decoration: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-base);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

nav a:hover, nav a[aria-current="page"] {
  background: var(--color-secondary);
  color: var(--color-white);
}

nav a:focus {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* Main Content */
main {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

/* Footer Styles */
footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-2xl) 0;
  margin-top: var(--spacing-4xl);
  text-align: center;
  border-top: 3px solid var(--color-primary-lighter);
}

footer p {
  margin: var(--spacing-xs) 0;
  opacity: 0.9;
}

footer a {
  color: var(--color-white);
  text-decoration: underline;
}

footer a:hover {
  text-decoration: none;
}

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
  header {
    padding: var(--spacing-lg) 0;
  }
  
  header h1 {
    font-size: var(--font-size-2xl);
  }
  
  nav {
    justify-content: center;
    gap: var(--spacing-sm);
  }

  nav a {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
  }
}

@media (max-width: 600px) {
  nav {
    gap: var(--spacing-xs);
  }
  
  nav a {
    padding: var(--spacing-sm) var(--spacing-sm);
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: var(--spacing-md) 0;
  }
  
  header h1 {
    font-size: var(--font-size-xl);
  }
  
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    justify-content: center;
  }

  nav a {
    flex: 1 0 auto;
    min-width: 75px;
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-sm);
    font-size: 0.85rem;
  }
}