/* Global reset overrides */
body, body * {
  color: #000 !important;
  font-weight: bold !important;
}
h1, h2, h3, h4, h5, h6, .brand h1, section h2 {
  color: #000 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: #000 !important;
  text-shadow: none !important;
}

/* Theme variables */
:root {
  --bg: linear-gradient(135deg, #f9f5e3 0%, #f3e7d9 100%);
  --surface: #ffffffcc;
  --surface-dark: #2e304dbb;
  --text: #23234b;
  --muted: #7a7a94;
  --accent: #f0a500;
  --accent2: #f3be76;
  --radius: 1.1rem;
  --shadow: 0 6px 28px 0 rgba(80,60,60,0.10), 0 1.5px 6px 0 rgba(0,0,0,0.04);
  --transition: 0.4s cubic-bezier(.37,.84,.44,1);
}
:root.dark {
  --bg: linear-gradient(135deg, #23234b 0%, #393966 100%);
  --surface: #2e304dbb;
  --surface-dark: #1b1c30cc;
  --text: #f5f5f5;
  --muted: #c5c6d0;
  --accent: #f0a500;
  --accent2: #e7b659;
}

html, body {
  height: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  margin:0;
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height:1.7;
  position: relative;
  transition: background 0.8s;
}

.page {
  max-width: 1100px;
  margin: auto;
  padding: 2rem 1.2rem 1.2rem 1.2rem;
  background: transparent;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0 1.2rem 0;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(3px);
}
.brand h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent);
  text-shadow: 0 1px 10px #f0a50022;
}
.brand p { margin:0; color:var(--muted); font-size:1rem; }

nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  position: relative;
}

nav a, nav button {
  background: transparent;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), color 0.2s;
  position: relative;
  z-index: 2;
}
nav a:hover, nav button:hover {
  background: var(--accent2);
  color: #222;
  box-shadow: 0 2px 16px 0 #f3be7620;
  transform: translateY(-2px) scale(1.04);
}

/* Hamburger menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  width: 2.4rem;
  height: 2.4rem;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 21;
  margin-left: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3.5px;
  margin: 4px 0;
  background: var(--accent);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Hero section */
.hero {
  margin: 3.5rem 0 2.5rem 0;
  text-align: center;
  animation: fadeInUp 0.9s 0.1s both;
}
.hero h2 {
  font-size: 2.35rem;
  margin: 0.5rem 0 0.6rem 0;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.hero p {
  color: var(--muted);
  font-size: 1.12rem;
  margin-bottom: 0;
}

section {
  margin: 3rem 0;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1.1s both;
}
section:nth-of-type(2) { animation-delay: 0.1s; }
section:nth-of-type(3) { animation-delay: 0.2s; }
section:nth-of-type(4) { animation-delay: 0.3s; }
section:nth-of-type(5) { animation-delay: 0.4s; }
section:nth-of-type(6) { animation-delay: 0.5s; }

section h2 {
  margin-bottom: 1rem;
  font-size: 1.65rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  padding-bottom: .23rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg,#fff7c9 60%,#f0a50010 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Accordion styles */
.accordion {
  margin-top: 1rem;
  width: 100%;
}
.accordion-btn {
  background: linear-gradient(90deg, var(--accent), var(--accent2) 90%);
  color: #222;
  font-weight: 700;
  border: none;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
  transition: background var(--transition), box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow);
  position: relative;
}
.accordion-btn:after {
  content: '▼';
  float: right;
  font-size: 1rem;
  transition: transform var(--transition);
}
.accordion-btn.active:after {
  transform: rotate(-180deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
  margin-top: 0.5rem;
  box-shadow: var(--shadow);
  padding: 0 1.2rem;
  opacity: 0.2;
  transition: max-height 0.5s cubic-bezier(.36,1.4,.63,1), padding 0.3s, opacity 0.6s;
}
.accordion-content.active {
  max-height: 2000px;
  padding: 1.1rem 1.2rem 1.3rem 1.2rem;
  opacity: 1;
  animation: fadeIn 0.8s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(60px);}
  to { opacity: 1; transform: translateY(0);}
}

.card {
  background: var(--surface);
  padding: 1.22rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, transform 0.2s;
  animation: fadeInUp 0.8s both;
}
.card:hover {
  box-shadow: 0 6px 32px 0 #f0a50030;
  transform: translateY(-3px) scale(1.012);
}
.card h3 { margin: .2rem 0 0.3rem 0; font-weight: 600; }
.card p { margin: .2rem 0; color: var(--muted); font-size: 1.02rem; }

.skills-list, .experience, .certs, .projects {
  display: grid;
  gap: 1.1rem;
}
.skills-list { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.skills-list .card { text-align: center; font-weight: 600; font-size: 1.09rem; }

.socials {
  display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.2rem;
  justify-content: center;
}
.socials a {
  background: linear-gradient(90deg, var(--accent), var(--accent2) 90%);
  color: #222;
  text-decoration: none;
  padding: .62rem 1.35rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
  transition: background var(--transition), box-shadow 0.23s, transform 0.17s;
  box-shadow: var(--shadow);
  display: inline-block;
}
.socials a:hover {
  background: linear-gradient(90deg, #f7c045, #f0a500 95%);
  color: #23234b;
  box-shadow: 0 2px 18px 0 #f0a50025;
  transform: scale(1.06);
}

/* Contact form */
.contact-form {
  margin: 2rem auto 0 auto;
  max-width: 420px;
  background: var(--surface);
  padding: 2rem 1.5rem 1.2rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  animation: fadeInUp 1s 0.2s both;
}
.contact-form label {
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text);
  font-size: 1.07rem;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 7px;
  border: 1.5px solid #ddd7;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff9;
  transition: border 0.2s;
  resize: none;
  box-sizing: border-box;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border: 1.5px solid var(--accent);
  background: #fff;
}
.contact-form textarea {
  min-height: 110px;
  resize: vertical;
}
.contact-form button {
  width: 100%;
  padding: 0.85rem 1rem;
  background: linear-gradient(90deg, var(--accent), var(--accent2) 90%);
  color: #23234b;
  font-weight: 700;
  border: none;
  border-radius: 7px;
  font-size: 1.08rem;
  cursor: pointer;
  transition: background var(--transition), box-shadow 0.21s, transform 0.15s;
  box-shadow: var(--shadow);
  margin-top: 0.3rem;
}
.contact-form button:hover {
  background: linear-gradient(90deg, #f7c045, #f0a500 95%);
  color: #23234b;
  box-shadow: 0 2px 16px 0 #f0a50023;
  transform: scale(1.02);
}
.contact-form .form-success {
  color: #1ab71a;
  font-weight: 700;
  margin-top: 0.8rem;
  text-align: center;
  font-size: 1.08rem;
}
.contact-form .form-error {
  color: #e03c3c;
  font-weight: 700;
  margin-top: 0.8rem;
  text-align: center;
  font-size: 1.08rem;
}

footer {
  margin-top: 3rem;
  font-size: .98rem;
  color: var(--muted);
  text-align: center;
  padding: 1rem 0 0.2rem 0;
  opacity: 0.92;
}

/* Responsive */
@media (max-width: 780px) {
  .page { padding: 2rem 0.5rem 0.6rem 0.5rem; }
  header { flex-direction: column; align-items: flex-start; gap: 0.7rem;}
  .brand h1 { font-size: 1.36rem;}
  nav { flex-direction: column; gap: 0.1rem; background: var(--surface); box-shadow: var(--shadow); position: absolute; top: 60px; right: 0; min-width: 170px; border-radius: 0 0 14px 14px; }
  nav.open { display: flex;}
  .nav-toggle { display:flex;}
  .hero h2 { font-size: 1.45rem;}
  .skills-list { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .contact-form { padding: 1.2rem 0.5rem; }
}
@media (max-width: 500px) {
  section h2 { font-size: 1.18rem; }
  .page { padding: 1rem 0.1rem;}
  .hero h2 { font-size: 1.1rem;}
  .card { padding: 0.85rem 0.6rem;}
  .socials a { font-size: 0.92rem;}
  .contact-form { padding: 0.8rem 0.2rem; }
}
