/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  text-align: center;
  font-family: Optima, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  /* base colour plus a subtle modern gradient overlay */
  background: linear-gradient(135deg, rgba(227,245,255,0.65), rgba(255,255,255,0.95)), var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Add blank space at the very top so the nav/logo sits lower on the page */
body { padding-top: 3.5rem; }

/* Color variables */
:root {
  /* Eggshell background, white surfaces, muted text in Optima-like gray */
  --color-bg: #E3F5FF;      /* eggshell / pale blue */
  --color-surface: #FFFFFF; /* white for cards/sections */
  --color-text: #727b80;    /* main text color as requested */
  --color-heading: #2f393b; /* slightly darker for headings */
  --color-accent: #5b6b72;  /* subtle accent */
  --color-muted: #9aa3a6;
  /* modern UI tokens */
  --radius: 12px;
  --card-shadow: 0 8px 20px rgba(47,57,59,0.06);
  --nav-shadow: 0 6px 20px rgba(47,57,59,0.04);
}

/* Visually hidden but accessible text for screen readers */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Layout containers */
header, main, footer {
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  /* keep surfaces visually seamless with the page background */
  background-color: transparent;
}

/* Header / Typography */
header {
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

h1 {
  font-size: 3rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.83rem; /* ~+4pt equivalent increase */
  font-weight: 400;
  color: var(--color-muted);
}

/* Paragraphs and general text */
p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

/* Links / accent color usage */
a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: auto;
  padding-bottom: 1rem;
}

.responsive-img {
  width: 100%;           /* fill its container */
  max-width: 100%;       /* never exceed container */
  height: auto;          /* keep aspect ratio */
  display: block;        /* allows centering with margin */
  margin: 0.75rem 0;     /* small vertical spacing */
  border-radius: 8px;    /* rounded corners */
  object-fit: cover;     /* crop gracefully if container forces different aspect */
}

/* -------------------
   NAVBAR BASE
-------------------- */
.navbar {
  width: 100%;                     /* spans entire browser */
  background-color: transparent;
  border-bottom: none;
  padding: 0.5rem 0;               /* vertical padding */
}


.nav-container {
  width: 90%;                       /* responsive on smaller screens */
  margin: 0 auto;                   /* centers it */
  display: flex;
  flex-direction: column;           /* stack logo above menu */
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  position: relative;               /* kept for any absolute children */
}

.logo {
  font-weight: 700;
  text-decoration: none;
  color: var(--color-heading);
  font-size: 3.2rem; /* larger site title per request */
  display: inline-block;
  margin-bottom: 0.25rem; /* small gap between logo and menu */
}

/* subtle logo interaction */
.logo:hover,
.logo:focus {
  transform: translateY(-2px);
  letter-spacing: 0.6px;
  transition: transform 180ms ease, letter-spacing 180ms ease;
}

/* -------------------
   DROPDOWN MENU
-------------------- */

/* The container that holds the button and the dropdown */
/* Simple horizontal nav menu (replaces dropdown) */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  display: inline-block;
  padding: 0.5rem 0.6rem;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 120ms ease, color 120ms ease;
  font-weight: 600;
  font-size: 1.05rem; /* slightly larger subsection/nav labels */
}

/* animated underline for nav links */
.nav-menu li a {
  position: relative;
}
.nav-menu li a::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  bottom: -6px;
  width: 60%;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1);
  transform-origin: center;
}
.nav-menu li a:hover::after,
.nav-menu li a:focus::after,
.nav-menu li a.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Active / current page styling */
.nav-menu li a.active {
  font-weight: 700;
  color: var(--color-heading);
  background-color: rgba(91,107,114,0.08);
  box-shadow: inset 0 -2px 0 rgba(91,107,114,0.08);
}

.nav-menu li a:hover,
.nav-menu li a:focus {
  background-color: rgba(91,107,114,0.06);
  color: var(--color-heading);
}

/* make nav compact on small screens */
@media (max-width: 600px) {
  .nav-container { width: 95%; }
  .nav-menu { gap: 0.5rem; font-size: 0.95rem; }
  .logo { font-size: 2rem; }
  .nav-menu li a { font-size: 0.95rem; }
  h2 { font-size: 1.4rem; }
  .hero-card h1 { font-size: 1.9rem; }
}

/* Hero area (index) */
.hero {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem 0;
}
.hero-card {
  width: 90%;
  max-width: 980px;
  background: rgba(255,255,255,0.85);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  text-align: center;
  backdrop-filter: blur(4px);
}
.hero-card h1 {
  font-size: 2.6rem; /* slightly larger hero title (subsection) */
  margin-bottom: 0.5rem;
  color: var(--color-heading);
}
.hero-card p { color: var(--color-text); }

/* Two-column content layout used on About, Music, Contact pages */
.two-col {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
  margin: 1.5rem auto;
  width: 90%;
  max-width: 1000px;
}
.two-col .text {
  flex: 1 1 480px;
  text-align: left;
  /* make the text area feel like a card */
  background: var(--color-surface);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.two-col .image {
  flex: 0 0 320px;
}
.two-col img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* image treatment */
.two-col .image img {
  transition: transform 260ms ease, box-shadow 260ms ease;
  box-shadow: 0 10px 30px rgba(47,57,59,0.06);
}
.two-col .image img:hover,
.two-col .image img:focus {
  transform: scale(1.02);
}

@media (max-width: 800px) {
  .two-col { flex-direction: column; width: 95%; }
  /* Ensure image column becomes fluid on small screens so images scale correctly */
  .two-col .image { order: 2; flex: 1 1 auto; width: 100%; max-width: none; }
  .two-col .text { padding: 0.9rem; }
  .hero-card { padding: 1rem; }
}

/* CV link styling to make it more visible */
.cv-inline {
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: underline;
}
.cv-inline:hover,
.cv-inline:focus { color: var(--color-heading); }

/* Footer / social icons */
.site-footer {
  padding: 1rem 0 2rem;
}
.social-icons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.social-icons li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  color: var(--color-text);
  background: transparent;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.social-icons li a:hover,
.social-icons li a:focus {
  transform: translateY(-3px);
  background-color: rgba(47,57,59,0.06);
  color: var(--color-heading);
}
.social-icons svg {
  width: 24px;
  height: 24px;
  display: block;
  /* allow both filled and stroked icons to pick up the current color */
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
}

.social-icons img.social-icon-img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  filter: none; /* keep natural colour in PNGs */
}

/* subtle hover style for social tiles */
.social-icons li a:hover,
.social-icons li a:focus {
  transform: translateY(-4px) scale(1.02);
  background-color: rgba(47,57,59,0.06);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .logo, .nav-menu li a, .two-col .image img, .social-icons li a { transition: none !important; }
}

/* -------------------
   MODAL / CONTACT FORM
-------------------- */
.modal {
  position: fixed;
  inset: 0;
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 1200;
}
.modal[aria-hidden="false"] { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12,20,24,0.45);
  backdrop-filter: blur(2px);
}
.modal-dialog {
  position: relative;
  max-width: 680px;
  width: calc(100% - 2rem);
  margin: 1.5rem;
  z-index: 1201;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-inner {
  background: var(--color-surface);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 20px 50px rgba(15,25,30,0.25);
  width: 100%;
  text-align: left;
}
.modal-inner h2 { margin: 0 0 0.25rem; color: var(--color-heading); }
.modal-inner .modal-sub { color: var(--color-muted); margin-bottom: 0.75rem; }
.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1202;
}
.modal-inner input[type="text"],
.modal-inner input[type="email"],
.modal-inner textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(47,57,59,0.08);
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
}
.modal-inner textarea { resize: vertical; }
.modal-actions { display:flex; gap:0.5rem; align-items:center; margin-top:0.5rem; }
.btn-primary {
  background: linear-gradient(180deg,var(--color-accent), var(--color-heading));
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(47,57,59,0.08);
  color: var(--color-heading);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}
.contact-success { text-align: center; }
.contact-success p { margin-bottom: 0.75rem; }

@media (max-width: 520px) {
  .modal-inner { padding: 1rem; border-radius: 10px; }
  .modal-close { right: 8px; top: 8px; }
}

/* Inline validation styles */
.field-error {
  color: #c23b34; /* friendly error red */
  font-size: 0.95rem;
  margin-top: 0.35rem;
  min-height: 1.1em; /* reserve a small space so layout doesn't jump */
  display: block;
}
.input-error {
  border-color: #c23b34 !important;
  box-shadow: 0 0 0 4px rgba(194,59,52,0.06);
}

.form-error { color: #c23b34; margin-bottom: 0.75rem; }
