/* Modern visual layer, loaded after application.css.
   Re-skins the existing Foundation 4 markup (colors, type, spacing, cards)
   without touching layout/JS-dependent classes (.top-bar, .expanded, etc). */

:root {
  --color-bg: #f6f7fb;
  --color-surface: #ffffff;
  --color-text: #1f2933;
  --color-text-muted: #5b6472;
  --color-border: #e3e6ec;
  --color-accent: #2454e0;
  --color-accent-dark: #17348f;
  --color-nav-bg: #0b1120;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 24px -12px rgba(15, 23, 42, 0.18);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--color-accent); color: #ffffff; }

a { color: var(--color-accent); }
a:hover, a:focus { color: var(--color-accent-dark); }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-sans); letter-spacing: -0.01em; }

.main .content { padding-top: 2.5rem; padding-bottom: 4rem; }

/* Top navigation */
.top-bar,
.top-bar.expanded { background: var(--color-nav-bg); }
.top-bar .name h1 a { letter-spacing: -0.01em; }
.top-bar-section ul { background: transparent; }
.top-bar-section ul li > a { background: transparent; color: #cbd2e1; }
.top-bar-section ul li > a:hover,
.top-bar-section ul li > a.hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.top-bar-section ul li.active > a,
body.portfolio .top-bar-section ul li.portfolio > a,
body.resume .top-bar-section ul li.resume > a,
body.blog .top-bar-section ul li.blog > a { color: var(--color-accent); }
.top-bar-section .divider,
.top-bar-section [role="separator"] { border-top-color: transparent; border-bottom-color: rgba(255, 255, 255, 0.08); }

/* Homepage hero */
.profile-row {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2.5rem;
}
.profile img {
  box-shadow: var(--shadow-md);
  border: 4px solid var(--color-surface);
}
.bio h2 { font-size: 2rem; margin-bottom: 0.25rem; }
.bio h3 { color: var(--color-accent); font-weight: 600; font-size: 1.125rem; }
.bio p { color: var(--color-text-muted); line-height: 1.7; }

.featured-element-row { margin-top: 2.5rem; }
.featured-element-row section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.featured-element-row section:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.featured-element-row h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.featured-element-row h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.featured-element-row h3 a { color: var(--color-text); }
.featured-element-row p { color: var(--color-text-muted); }

/* Portfolio */
.main .content > h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.main .content > p:first-of-type { color: var(--color-text-muted); margin-bottom: 2rem; }
section.row.project {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
section.row.project:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
section.row.project h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
section.row.project p strong { color: var(--color-accent-dark); font-weight: 600; }
section.row.project p:last-child { color: var(--color-text-muted); margin-bottom: 0; }

/* Resume */
body.resume .main .content > h1 { font-size: 2.25rem; margin-bottom: 0.25rem; }
body.resume .main .content > h2 { font-size: 1.125rem; color: var(--color-accent); font-weight: 600; margin-bottom: 1rem; }
body.resume .main .content > p { color: var(--color-text-muted); }
.sep { color: var(--color-border); margin: 0 0.6em; }

body.resume .content > section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
}
body.resume .content > section > h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}
.resume-entry { padding-left: 1rem; border-left: 3px solid var(--color-border); margin-bottom: 1.75rem; }
.resume-entry:last-child { margin-bottom: 0; }
.resume-entry h3 { font-size: 1.15rem; margin-bottom: 0.15rem; }
.resume-entry h4 { font-size: 1rem; color: var(--color-accent-dark); margin-top: 1.1rem; margin-bottom: 0.15rem; }
.resume-entry p strong { color: var(--color-text-muted); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.03em; }
body.resume .content > section > h3 {
  font-size: 1rem;
  color: var(--color-accent-dark);
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}
body.resume .content > section > h3:first-child { margin-top: 0; }
body.resume .content ul { padding-left: 1.25rem; list-style: disc; }
body.resume .content ul li { margin-bottom: 0.4rem; color: var(--color-text-muted); }

/* Footer */
#footer {
  background: transparent;
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  margin-top: 2rem;
  color: var(--color-text-muted);
}
#footer a { color: var(--color-text-muted); text-decoration: underline; }
#footer a:hover { color: var(--color-accent); }

@media print {
  .top-bar, #footer, #root_footer { display: none !important; }
  body.resume section { box-shadow: none; border-color: #ddd; }
}
