:root {
  --ink: #172127;
  --muted: #68777b;
  --paper: #f7f7f4;
  --white: #fff;
  --lime: #d7f76c;
  --orange: #ff835d;
  --blue: #b8dded;
  --line: #dce2df;
  --header: rgba(247, 247, 244, 0.9);
  --shadow: 0 18px 50px rgba(20, 35, 38, 0.08);
  --radius: 22px;
  --icon-filter: invert(12%) sepia(13%) saturate(1390%) hue-rotate(155deg) brightness(94%) contrast(91%);
}
html[data-theme="dark"] {
  --ink: #edf3ee;
  --muted: #a8b7b2;
  --paper: #111916;
  --white: #19241f;
  --lime: #d7f76c;
  --orange: #ff9b79;
  --blue: #31515b;
  --line: #31423b;
  --header: rgba(17, 25, 22, 0.9);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --icon-filter: invert(96%) sepia(7%) saturate(537%) hue-rotate(74deg) brightness(103%) contrast(91%);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Poppins, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  transition:
    background 0.3s,
    color 0.3s;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
.site-shell {
  max-width: 1600px;
  margin: auto;
  overflow: hidden;
}
.site-header {
  height: 82px;
  padding: 0 clamp(20px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--header);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 10;
  transition:
    background 0.3s,
    border-color 0.3s;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: var(--paper);
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.site-nav {
  display: flex;
  gap: 29px;
}
.site-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  padding: 7px 0;
}
.site-nav a.active,
.site-nav a:hover {
  color: var(--muted);
}
.site-nav a:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.site-nav a.active:after {
  transform: scaleX(1);
  transform-origin: left;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  isolation: isolate;
  will-change: transform;
  transition:
    transform 0.16s ease,
    border-color 0.3s,
    color 0.3s,
    background 0.3s,
    box-shadow 0.3s;
}
.theme-toggle:hover {
  transform: rotate(12deg) scale(1.04);
  border-color: var(--orange);
  box-shadow: 0 5px 14px rgba(20, 35, 38, 0.12);
}
.theme-toggle:active {
  transform: scale(0.92);
}
.theme-toggle:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
.theme-toggle span {
  position: absolute;
  line-height: 1;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.25s ease,
    color 0.3s ease;
}
.theme-toggle .sun-icon {
  font-size: 20px;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.theme-toggle .moon-icon {
  font-size: 19px;
  opacity: 0;
  transform: rotate(-45deg) scale(0.65);
}
html[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(45deg) scale(0.65);
}
html[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: var(--ink);
  color: var(--paper);
  padding: 11px 17px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s,
    color 0.3s;
}
.header-cta span,
.button span {
  font-size: 16px;
}
.header-cta-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  margin-left: -1px;
  margin-top: -1px;
}
.header-cta:hover,
.button:hover {
  transform: translateY(-3px);
  background: var(--orange);
  color: #172127;
}
.menu-toggle {
  display: none;
}
.page-section {
  padding: clamp(50px, 8vw, 120px) clamp(20px, 8vw, 130px);
  min-height: calc(100vh - 183px);
}
#page-content {
  transition: opacity 0.25s;
}
.is-loading {
  opacity: 0.4;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 20px;
}
.eyebrow span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  margin-right: 7px;
}
.page-heading h1,
.about-intro h1,
.contact-heading h1 {
  font-size: clamp(40px, 6vw, 83px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  margin: 0;
}
.page-heading em,
.about-intro em,
.contact-heading em,
.hero-copy em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: #899d70;
}
.page-heading > p:last-child,
.about-intro > p:last-child,
.contact-heading > p:last-child {
  max-width: 590px;
  color: var(--muted);
  margin: 28px 0 0;
}
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px clamp(20px, 5vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  transition: border-color 0.3s;
}
.site-footer p {
  margin: 0;
}
.scroll-top {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 19px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s;
  z-index: 30;
}
.scroll-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.error-state {
  text-align: center;
  padding: 160px 20px;
}
.reveal {
  animation: rise 0.6s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .contact-form {
  background: var(--white);
}
html[data-theme="dark"] .tags span {
  background: #293730;
}
html[data-theme="dark"] .values {
  background: #20342c;
}
html[data-theme="dark"] .values .eyebrow {
  color: #b8d1bd;
}
html[data-theme="dark"] .values div > p {
  color: #c4d2ca;
}
html[data-theme="dark"] .profile-card {
  background: #305158;
}
html[data-theme="dark"] .profile-image {
  background: linear-gradient(155deg, #547078, #1c2c30);
}
html[data-theme="dark"] .floating-card.award-card {
  background: #23322c;
}
html[data-theme="dark"] .hero-footer {
  border-color: var(--line);
}
html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea {
  color: var(--ink);
}
html[data-theme="dark"] .project-aqua .project-visual {
  background: #365764;
}
html[data-theme="dark"] .project-pcic .project-visual {
  background: #526943;
}
html[data-theme="dark"] .project-hris .project-visual {
  background: #454960;
}
html[data-theme="dark"] .project-sk .project-visual {
  background: #915745;
}
@media (max-width: 900px) {
  .site-header {
    height: 70px;
  }
  .brand {
    min-width: 0;
    order: 1;
  }
  .brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .header-cta {
    display: none;
  }
  .header-actions {
    margin-left: auto;
    order: 2;
  }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 0;
    padding: 8px;
    margin-left: 12px;
    cursor: pointer;
    order: 3;
    z-index: 12;
  }
  .menu-toggle i {
    height: 2px;
    width: 22px;
    background: var(--ink);
    display: block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    padding: 22px;
    background: var(--paper);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 16px;
    order: 4;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    width: max-content;
  }
  .site-nav a:after {
    bottom: -2px;
  }
  .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .page-section {
    min-height: calc(100vh - 190px);
  }
}
