/* ===================================================================
 * # custom block grid STACK breakpoints
 *
 * ------------------------------------------------------------------- */
@media screen and (max-width: 1000px) {
  .block-1000-full > .column {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
@media screen and (max-width: 900px) {
  .block-900-full > .column {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
/* ===================================================================
 * # base style overrides
 *
 * ------------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* Type families (variable fonts, two-family system)
   * --font-display : editorial serif for headings
   * --font-text/ui : modern grotesque for body & interface */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --color-primary: #0b0a15;
  --color-primary-light: #1a1925;
  --color-accent: #f9861a;
  --color-accent-hover: #e67a17;
  --color-secondary: #544d9d;
  --color-secondary-light: #6a63b3;
  --color-text: #111014;
  --color-text-light: #ffffff;
  --color-gray: #6f6f78;
  --color-gray-light: #efefef;
  --color-gray-dark: #333333;

  /* Layered surfaces (light context) for subtle elevation */
  --surface-1: #ffffff;
  --surface-2: #f7f6f9;
  --surface-3: #eeecf2;

  /* Layered surfaces (dark context) */
  --surface-dark-1: #131127;
  --surface-dark-2: #1b1934;
  --surface-dark-3: #242145;
  --hairline-dark: rgba(255, 255, 255, 0.09);

  /* Theme-aware tokens for the About section (the only light-capable
   * section). Defaults are the light palette; the dark-mode blocks at
   * the end of this file swap in the --about-dark-* values via
   * prefers-color-scheme and the [data-theme] override the header's
   * sun/moon toggle writes. The dark values live here, once, so the
   * two swap blocks are pure plumbing that can't drift. */
  --about-bg: #ffffff;
  --about-panel: #b3c2c1;
  --about-line: #302c59;
  --about-heading: var(--color-text);
  --about-body: var(--color-text);
  --about-dark-bg: var(--surface-dark-1);
  --about-dark-panel: var(--surface-dark-3);
  --about-dark-line: var(--surface-dark-3);
  --about-dark-heading: var(--color-text-light);
  --about-dark-body: rgba(255, 255, 255, 0.82);

  /* Signature gradient (violet -> amber) */
  --gradient-brand: linear-gradient(
    120deg,
    var(--color-secondary) 0%,
    var(--color-accent) 100%
  );

  /* Radii */
  --radius-sm: 0.6rem;
  --radius-md: 1.2rem;
  --radius-lg: 2rem;
  --radius-pill: 999px;

  /* Soft elevation shadows */
  --shadow-sm: 0 1px 2px rgba(11, 10, 21, 0.06),
    0 2px 8px rgba(11, 10, 21, 0.06);
  --shadow-md: 0 4px 12px rgba(11, 10, 21, 0.08),
    0 12px 32px rgba(11, 10, 21, 0.1);
  --shadow-lg: 0 18px 48px rgba(11, 10, 21, 0.18);

  /* Add common spacing variables */
  --spacing-xs: 0.8rem;
  --spacing-sm: 1.6rem;
  --spacing-md: 2.4rem;
  --spacing-lg: 3.2rem;
  --spacing-xl: 4.8rem;
  /* Add common transition variables */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}
/* Optimize base styles */
html {
  font-size: 62.5%; /* 10px base */
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Native smooth scrolling for anchor navigation (replaces the old JS
   implementation). Gated on reduced-motion so those users get instant
   jumps; .target-section's scroll-margin-top handles the header offset. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
@media screen and (max-width: 400px) {
  html {
    font-size: 10.5px; /* Improved from 9.444px for better readability on small devices */
  }
}
html,
body {
  height: 100%;
}
body {
  background: var(--color-primary);
  font-family: var(--font-text);
  font-size: 1.8rem;
  line-height: 1.778;
  color: var(--color-text);
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}
/* Prevent body scroll when mobile menu is open */
body.menu-is-open {
  overflow: hidden;
}
/* ------------------------------------------------------------------- 
 * ## links
 * ------------------------------------------------------------------- */
a {
  color: var(--color-accent);
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}
a:hover,
a:focus,
a:active {
  color: var(--color-secondary);
}
a:hover,
a:active {
  outline: 0;
}
/* ===================================================================
 * # typography & general theme styles
 * 
 * ------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-style: normal;
  color: var(--color-text);
  -webkit-font-variant-ligatures: common-ligatures;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
}
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4 {
  margin-top: 6rem;
  margin-bottom: 1.6rem;
}
@media screen and (max-width: 600px) {
  h1,
  .h1,
  h2,
  .h2,
  h3,
  .h3,
  h4,
  .h4 {
    margin-top: 5.6rem;
  }
}
h5,
.h5,
h6,
.h6 {
  margin-top: 4.8rem;
  margin-bottom: 1.2rem;
}
@media screen and (max-width: 600px) {
  h5,
  .h5,
  h6,
  .h6 {
    margin-top: 4.4rem;
    margin-bottom: 0.8rem;
  }
}
h1,
.h1 {
  font-size: 3.6rem;
  line-height: 1.222;
}
@media screen and (max-width: 600px) {
  h1,
  .h1 {
    font-size: 3.3rem;
  }
}
h2,
.h2 {
  font-size: 3.2rem;
  line-height: 1.25;
}
h3,
.h3 {
  font-size: 2.4rem;
  line-height: 1.167;
}
h4,
.h4 {
  font-size: 2.1rem;
  line-height: 1.333;
}
h5,
.h5 {
  font-size: 1.8rem;
  line-height: 1.333;
}
h6,
.h6 {
  font-size: 1.6rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
}
p img {
  margin: 0;
}
p.lead {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 2.4rem;
  line-height: 1.833;
  margin-bottom: 3.6rem;
  color: var(--color-text);
}
@media screen and (max-width: 1200px) {
  p.lead {
    font-size: 2.2rem;
  }
}
@media screen and (max-width: 600px) {
  p.lead {
    font-size: 2.1rem;
  }
}
em,
i,
strong,
b {
  font-size: inherit;
  line-height: inherit;
}
em,
i {
  font-family: var(--font-text);
  font-style: italic;
}
strong,
b {
  font-family: var(--font-text);
  font-weight: 700;
}
small {
  font-size: 1.2rem;
  line-height: inherit;
}
/* -------------------------------------------------------------------
 * ## Lists
 * ------------------------------------------------------------------- */
ol {
  list-style: decimal;
}
ul {
  list-style: disc;
}
li {
  display: list-item;
}
ol,
ul {
  margin-left: 1.6rem;
}
ul li {
  padding-left: 0.4rem;
}
ul ul,
ul ol,
ol ol,
ol ul {
  margin: 0.8rem 0 0.8rem 1.6rem;
}
/* -------------------------------------------------------------------
 * ## Spacing
 * ------------------------------------------------------------------- */
button,
.btn {
  margin-bottom: 1.6rem;
}
figure,
p,
ul,
ol,
dl {
  margin-bottom: 3.2rem;
}
/* ===================================================================
 * # buttons
 *
 * ------------------------------------------------------------------- */
.btn,
button {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.6rem;
  height: 6rem;
  line-height: 5.6rem;
  padding: 0 3.2rem;
  margin: 0 0.4rem 1.6rem 0;
  color: var(--color-text-light);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-accent);
  border: 0.2rem solid var(--color-accent);
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn::before,
button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-accent-hover);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  z-index: -1;
}
.btn:hover::before,
button:hover::before,
.btn:focus::before,
button:focus::before {
  transform: translateX(0);
}
.btn:hover,
button:hover,
.btn:focus,
button:focus {
  color: var(--color-text-light);
  outline: 0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(249, 134, 26, 0.3);
}
/* Add active state for buttons */
.btn:active,
button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(249, 134, 26, 0.2);
}
/* Add focus styles for accessibility */
.btn:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
/* ===================================================================
 * # Common and Reusable Styles
 *
 * ------------------------------------------------------------------- */
.subhead {
  /* family/weight set explicitly: subheads are <p> elements styled as
   * labels, so they don't inherit the heading defaults */
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.286;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-top: 0;
  margin-bottom: 6rem;
  color: var(--color-accent);
}
.display-1 {
  font-size: 4.8rem;
  line-height: 1.333;
}
.section-intro {
  position: relative;
  margin-bottom: 12rem;
  padding: 0 2rem;
}
.section-intro .display-1 {
  margin-top: 0;
  position: relative;
  z-index: 2;
}
.section-intro .subhead {
  position: relative;
  z-index: 2;
  margin-bottom: 3rem;
}
/* Dark background sections */
.h-dark-bg {
  color: var(--color-text-light);
  background: var(--color-primary);
  position: relative;
}
.h-dark-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(84, 77, 157, 0.1) 0%,
    rgba(11, 10, 21, 0) 100%
  );
  pointer-events: none;
}
.h-dark-bg .section-intro .display-1 {
  color: var(--color-text-light);
}
.h-dark-bg p.lead {
  color: rgba(255, 255, 255, 0.9);
}
.right-vert-line {
  width: 2px;
  height: 20rem;
  background-color: #302c59;
  -webkit-transform: translate3d(50%, 0, 0);
  transform: translate3d(50%, 0, 0);
  position: absolute;
  top: 0;
  right: 11.2rem;
}
/* ------------------------------------------------------------------- 
 * responsive:
 * common and reusable styles
 * ------------------------------------------------------------------- */
@media screen and (max-width: 1200px) {
  .right-vert-line {
    right: 9rem;
  }
}
@media screen and (max-width: 900px) {
  .right-vert-line {
    height: 16rem;
    right: 6.2rem;
  }
}
@media screen and (max-width: 600px) {
  .subhead {
    font-size: 1.3rem;
  }
  .right-vert-line {
    height: 12rem;
    right: 5rem;
  }
}
/* ===================================================================
 * # site header
 *
 * ------------------------------------------------------------------- */
.s-header {
  z-index: 100;
  width: 100%;
  height: 8.8rem;
  position: fixed;
  top: 0;
  left: 0;
  background-color: transparent;
  transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  padding: 2rem 0;
}
.s-header.sticky {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--color-primary);
  height: 8.8rem;
  z-index: 500;
  padding: 0;
  transition: background-color 0.5s cubic-bezier(0.215, 0.61, 0.355, 1),
    padding 0.5s cubic-bezier(0.215, 0.61, 0.355, 1),
    box-shadow 0.5s ease-in-out;
}
/* Active link styles */
.header-nav a.current {
  color: var(--color-text-light);
}
.s-header.sticky .header-nav a {
  color: rgba(255, 255, 255, 0.6);
}
.header-content {
  height: 8.8rem;
  position: relative;
}
/* -------------------------------------------------------------------
 * ## main navigation
 * ------------------------------------------------------------------- */
.header-nav-wrap {
  max-width: 1400px;
  padding-left: 10px;
}
.header-nav {
  list-style: none;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 6rem;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
  margin: 0;
}
.header-nav a {
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}
.header-nav a:hover,
.header-nav a:focus {
  color: var(--color-text-light) !important;
}
.header-nav a.current {
  color: var(--color-text-light) !important;
}
.header-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: right;
}
.header-nav a:hover::after,
.header-nav a.current::after {
  transform: scaleX(1);
  transform-origin: left;
}
.header-nav li {
  display: inline-block;
  padding-left: 0;
  margin: 0 1.5rem;
}
/* Mobile menu styles */
@media screen and (max-width: 900px) {
  .header-nav {
    padding: 2rem 0;
  }
  .header-nav a {
    display: block;
    padding: 1.6rem 0;
    font-size: 1.6rem;
    min-height: 4.4rem;
  }
  .header-nav a::after {
    display: none;
  }
  .header-nav li {
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .header-nav li:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}
/* ------------------------------------------------------------------- 
 * ## mobile menu toggle
 * ------------------------------------------------------------------- */
.header-menu-toggle {
  z-index: 101;
  display: none;
  height: 4.8rem;
  width: 4.8rem;
  line-height: 4.8rem;
  font-family: var(--font-ui);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: var(--color-text-light);
  outline: none;
  transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  position: absolute;
  right: 5.2rem;
  /* Account for header padding (2rem) + center of header-content (4.4rem) */
  top: 6.4rem;
  transform: translateY(-50%);
}
.s-header.sticky .header-menu-toggle {
  /* When sticky, position at 60% for optimal visual alignment */
  top: 60%;
}
.header-menu-toggle:hover,
.header-menu-toggle:focus {
  color: var(--color-text-light);
}
.header-menu-toggle span {
  display: block;
  width: 2.4rem;
  height: 2px;
  background-color: var(--color-text-light);
  -webkit-transition: all 0.5s;
  transition: all 0.5s;
  font: 0/0 a;
  text-shadow: none;
  color: transparent;
  margin-top: -1px;
  position: absolute;
  top: 50%;
  /* centre the 2.4rem lines in the box so the circular hover halo
     wraps the icon symmetrically */
  left: 50%;
  margin-left: -1.2rem;
  right: auto;
  bottom: auto;
}
.header-menu-toggle span::before,
.header-menu-toggle span::after {
  content: "";
  width: 100%;
  height: 100%;
  background-color: inherit;
  -webkit-transition: all 0.5s;
  transition: all 0.5s;
  position: absolute;
  left: 0;
}
.header-menu-toggle span::before {
  top: -0.9rem;
}
.header-menu-toggle span::after {
  bottom: -0.9rem;
}
.header-menu-toggle.is-clicked span {
  background-color: rgba(255, 255, 255, 0);
  -webkit-transition: all 0.1s;
  transition: all 0.1s;
}
.header-menu-toggle.is-clicked span::before,
.header-menu-toggle.is-clicked span::after {
  background-color: white;
}
.header-menu-toggle.is-clicked span::before {
  top: 0;
  -webkit-transform: rotate(135deg);
  transform: rotate(135deg);
}
.header-menu-toggle.is-clicked span::after {
  bottom: 0;
  -webkit-transform: rotate(225deg);
  transform: rotate(225deg);
}
/* --- Mobile Menu Overlay --- */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Dark gray, semi-transparent */
  z-index: 99; /* Below the mobile menu, above the main content */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.menu-is-open .menu-overlay {
  opacity: 1;
  visibility: visible;
}
/*Ensure the header-content is above the grey overlay*/
.menu-is-open .header-content {
  z-index: 100;
}
/* -------------------------------------------------------------------
 * responsive:
 * header
 * ------------------------------------------------------------------- */
@media screen and (max-width: 1800px) {
  .header-nav-wrap {
    max-width: none;
    width: 100%;
    padding-left: 13.2rem;
  }
}
@media screen and (max-width: 900px) {
  .header-content {
    display: block;
    background-color: transparent;
    height: auto;
    width: 100%;
    padding: 8rem 6rem 6rem;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
    position: absolute;
    top: 0;
    left: 0;
    /* Simplified animation for better performance */
    will-change: transform;
    transition: transform 0.3s ease-out, background-color 0.3s ease-out;
  }
  .menu-is-open .header-content {
    transform: translate3d(0, 0, 0);
    background-color: var(--color-primary);
  }
  .header-nav-wrap {
    padding: 0;
    opacity: 0;
    visibility: hidden;
  }
  .header-nav {
    display: block;
    width: 100%;
    padding: 0;
  }
  .header-nav a {
    display: block;
  }
  .header-nav li {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: block;
    margin: 0;
  }
  .header-nav li:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .header-menu-toggle {
    display: block;
    /* Enlarged touch area; the negative margin keeps the visual box
       at 4.8rem (same trick as .theme-toggle) */
    padding: 1.2rem;
    margin: -1.2rem;
  }
  .menu-is-open .header-nav-wrap {
    opacity: 1;
    visibility: visible;
    /* Simplified transition - removed extra transforms and delays */
    transition: opacity 0.2s ease-out 0.1s, visibility 0.2s ease-out 0.1s;
  }
}
@media screen and (max-width: 600px) {
  .header-menu-toggle {
    right: 3.2rem;
  }
  .header-content {
    padding: 8rem 4rem 4rem;
  }
}
@media screen and (max-width: 400px) {
  .header-content {
    padding: 7rem 3rem 3rem;
  }
}
/* ===================================================================
 * # hero
 *
 * ------------------------------------------------------------------- */
.s-hero {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-light) 100%
  );
  position: relative;
  height: 100vh; /* Fallback for browsers that don't support dvh */
  height: 100dvh;
  /* Cap the min-height to the viewport so short landscape phones don't
     get an 800px-tall hero forced taller than the screen. */
  min-height: 800px;
  min-height: min(800px, 100dvh);
  display: flex;
  align-items: center;
  padding-top: 8rem;
  padding-bottom: 8rem;
  overflow: hidden;
}
.s-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.6) 10%,
      rgba(0, 0, 0, 0) 100%
    ),
    url("/images/hero-bg-1920.webp");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.s-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(84, 77, 157, 0.05) 0%,
    rgba(11, 10, 21, 0) 70%
  );
  pointer-events: none;
}
/* -------------------------------------------------------------------
 * ## hero particle cluster
 * ------------------------------------------------------------------- */
.hero-particle-cluster {
  position: absolute;
  left: -200px;
  top: 50%;
  transform: translateY(-50%);
  width: 1400px;
  height: 1400px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%),
                       linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%),
              linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
  mask-composite: intersect;
}
/* Responsive sizing for all breakpoints */
@media screen and (max-width: 1800px) {
  .hero-particle-cluster {
    width: 1200px;
    height: 1200px;
    left: -150px;
  }
}
@media screen and (max-width: 1200px) {
  .hero-particle-cluster {
    width: 900px;
    height: 900px;
    left: -75px;
  }
}
@media screen and (max-width: 900px) {
  .hero-particle-cluster {
    width: 700px;
    height: 700px;
    left: -25px;
  }
}
@media screen and (max-width: 600px) {
  .hero-particle-cluster {
    width: 500px;
    height: 500px;
    left: -75px;
    opacity: 0.6;
  }
}
@media screen and (max-width: 400px) {
  .hero-particle-cluster {
    width: 450px;
    height: 450px;
    left: -100px;
    opacity: 0.5;
  }
}
.hero-content {
  height: 100%;
  max-width: 1400px;
  -ms-flex-align: end;
  -webkit-box-align: end;
  align-items: flex-end;
  padding-top: 20vh;
  padding-bottom: 2vh;
  position: relative;
  z-index: 2;
}
.hero-content h1 {
  font-size: 7rem;
  font-weight: 400;
  line-height: 1.257;
  padding-right: 3.2rem;
  margin-top: 0;
  color: var(--color-text-light);
  position: relative;
}
.hero-content h1::before {
  content: "";
  display: block;
  height: 2px;
  width: 8rem;
  background-color: var(--color-accent);
  position: absolute;
  left: -10.8rem;
  top: 0.55em;
}
/* -------------------------------------------------------------------
 * ## hero contact
 * ------------------------------------------------------------------- */
.hero-contact {
  list-style: none;
  display: -ms-flexbox;
  display: -webkit-box;
  display: flex;
  -ms-flex-flow: row wrap;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  flex-flow: row wrap;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 3.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  margin-top: 8rem;
  margin-left: 0.4rem;
  margin-bottom: 0;
  position: relative;
}
.hero-contact a {
  color: var(--color-text-light);
}
.hero-contact a:hover,
.hero-contact a:focus,
.hero-contact a:active {
  color: var(--color-accent);
}
.hero-contact li {
  padding-left: 0;
}
.hero-contact li::after {
  content: "/";
  color: rgba(255, 255, 255, 0.1);
  margin-left: 0rem;
  margin-right: 1rem;
}
.hero-contact li:last-child::after {
  display: none;
}
/* -------------------------------------------------------------------
 * ## hero scroll
 * ------------------------------------------------------------------- */
.hero-scroll {
  position: absolute;
  right: 8rem;
  bottom: 10rem;
  z-index: 2;
}
.hero-scroll::after {
  content: "";
  display: block;
  width: 2px;
  height: 7rem;
  background-color: white;
  -webkit-transform: translate3d(50%, 0, 0);
  transform: translate3d(50%, 0, 0);
  position: absolute;
  right: 50%;
  bottom: -10rem;
}
.hero-scroll .scroll-link,
.hero-scroll .scroll-link svg path {
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}
.hero-scroll .scroll-link {
  text-decoration: none;
  border: 0 none;
  display: block;
  height: 6.4rem;
  width: 6.4rem;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  margin: 0;
  position: relative;
}
.hero-scroll .scroll-link svg {
  height: 1.2rem;
  width: 1.2rem;
  position: absolute;
  -webkit-transform: translate3d(-50%, -50%, 0);
  transform: translate3d(-50%, -50%, 0);
  left: 50%;
  top: 50%;
}
.hero-scroll .scroll-link svg path {
  fill: var(--color-text-light);
}
.hero-scroll .scroll-link:hover,
.hero-scroll .scroll-link:focus {
  background-color: var(--color-accent);
}
/* -------------------------------------------------------------------
 * ## animate intro content
 * ------------------------------------------------------------------- */
/* -------------------------------------------------------------------
 * responsive:
 * hero
 * ------------------------------------------------------------------- */
@media screen and (max-width: 1800px) {
  .hero-content {
    max-width: 1200px;
  }
  .hero-content h1 {
    font-size: 6.3rem;
  }
  .hero-content h1::before {
    width: 6rem;
    left: -8.8rem;
  }
}
@media screen and (max-width: 1200px) {
  .hero-content h1 {
    font-size: 6rem;
    padding-top: 3.2rem;
  }
  .hero-content h1::before {
    width: 6rem;
    top: 0;
    left: 0;
  }
  .hero-scroll {
    right: 6rem;
  }
  .hero-scroll::after {
    height: 8rem;
  }
  .hero-scroll .scroll-link {
    height: 6rem;
    width: 6rem;
  }
}
@media screen and (max-width: 1000px) {
  .hero-content h1 {
    font-size: 5.6rem;
  }
  .hero-contact {
    font-size: 1.1rem;
  }
}
@media screen and (max-width: 900px) {
  .hero-content h1 {
    font-size: 4.8rem;
  }
  .hero-contact {
    padding-right: 7.2rem;
  }
  .hero-scroll {
    right: 3.6rem;
  }
  .hero-scroll .scroll-link {
    height: 5.2rem;
    width: 5.2rem;
  }
}
@media screen and (max-width: 600px) {
  .s-hero {
    min-height: 600px;
  }
  .hero-content h1 {
    font-size: 4.6rem;
    /* Ensure text wraps naturally when line breaks are hidden */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .hero-content h1 br {
    display: none;
  }
  .hero-contact {
    font-size: 1rem;
  }
  .hero-scroll {
    right: 2.4rem;
  }
}
@media screen and (max-width: 400px) {
  .s-hero {
    min-height: 500px;
  }
  .hero-content h1 {
    font-size: 4rem;
  }
}
/* ===================================================================
 * # about section
 *
 * ------------------------------------------------------------------- */
.s-about {
  background-color: var(--color-text-light);
  position: relative;
}
.s-about .right-vert-line {
  background-color: #302c59;
}
.s-about__section--profile {
  padding-top: 14rem;
  padding-bottom: 6rem;
  min-height: 108rem;
  position: relative;
}
.s-about__section--profile::before {
  content: "";
  display: block;
  background-color: #b3c2c1;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: calc(50% + 12vw);
}
.s-about__section--profile .row {
  position: relative;
}
.s-about__section--profile .profile-pic {
  width: 24vw;
  position: absolute;
  top: 8rem;
  left: calc(50% + 80px);
  /* Add smooth transitions for better mobile experience */
  opacity: 1;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
/* -------------------------------------------------------------------
 * responsive:
 * about
 * ------------------------------------------------------------------- */
@media screen and (max-width: 1200px) {
  .s-about__section--profile::before {
    left: 75%;
  }
  .s-about__section--profile .profile-pic {
    width: 26vw;
    right: 0;
    left: auto;
  }
}
@media screen and (max-width: 900px) {
  .s-about__section--profile {
    padding-top: 14rem;
    padding-bottom: 0;
    min-height: 0;
  }
  .s-about__section--profile::before {
    display: none;
  }
  /* Use opacity and visibility for smoother transition */
  .s-about__section--profile .profile-pic {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
/* ===================================================================
 * # skills section
 *
 * ------------------------------------------------------------------- */
.s-skills {
  padding-top: 14rem;
  padding-bottom: 4rem;
  background-color: #1d1b37;
  position: relative;
}
.s-skills__content {
  position: relative;
}
.s-skills__leftcol p.lead {
  max-width: 90%;
  font-size: 2.2rem;
  line-height: 1.6;
}
@media screen and (max-width: 600px) {
  .s-skills__leftcol p.lead {
    font-size: 2rem;
  }
}
.s-skills .section-intro .display-1 {
  font-size: 4rem;
}
@media screen and (max-width: 900px) {
  .s-skills .section-intro .display-1 {
    font-size: 3.6rem;
  }
}
@media screen and (max-width: 600px) {
  .s-skills .section-intro .display-1 {
    font-size: 3.2rem;
  }
}
.s-skills .vert-line {
  width: 2px;
  height: 20rem;
  background-color: white;
  -webkit-transform: translate3d(50%, 0, 0);
  transform: translate3d(50%, 0, 0);
  position: absolute;
  bottom: -10rem;
  right: 11.2rem;
}
/* ------------------------------------------------------------------- 
 * ## skills list
 * ------------------------------------------------------------------- */
.skills-list {
  list-style: none;
  padding-left: 20px;
  margin: 8.8rem 0 0 0;
  counter-reset: ctr;
}
.skills-list h3 {
  color: var(--color-text-light);
}
.skills-list__item {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-left: 0;
}
.skills-list__item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
/* ------------------------------------------------------------------- 
 * responsive:
 * skills
 * ------------------------------------------------------------------- */
@media screen and (max-width: 1200px) {
  .skills-list {
    padding-left: 10px;
  }
  .s-skills .vert-line {
    right: 9rem;
  }
}
@media screen and (max-width: 1000px) {
  .s-skills .vert-line {
    height: 12rem;
  }
  .s-skills__content .column {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .s-skills__content .s-skills__leftcol {
    flex: 0 0 75%;
    max-width: 75%;
    padding-bottom: 0;
  }
  .s-skills__content .s-skills__leftcol p.lead {
    max-width: none;
  }
  .skills-list {
    padding-left: 0;
    margin: 0;
  }
}
@media screen and (max-width: 900px) {
  .s-skills {
    padding-top: 14rem;
  }
  .section-intro {
    margin-bottom: 6rem;
  }
  .s-skills__content .s-skills__leftcol {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .s-skills .vert-line {
    right: 6.2rem;
  }
}
@media screen and (max-width: 600px) {
  .s-skills .vert-line {
    right: 5rem;
  }
}
/* ===================================================================
 * # footer
 *
 * ------------------------------------------------------------------- */
.s-footer {
  padding-top: 14rem;
  padding-bottom: 8rem;
  background-color: var(--color-primary);
  position: relative;
  scroll-margin-top: 0;
}
.s-footer__main {
  padding-bottom: 4.8rem;
}
.s-footer__main .section-intro {
  margin-bottom: 4.8rem;
}
.s-footer .footer-contacts {
  margin-top: 7.2rem;
  margin-left: 8.33333%;
}
@media screen and (max-width: 900px) {
  .s-footer .footer-contacts {
    margin-left: 0;
    padding-left: 2rem;
  }
}
@media screen and (max-width: 600px) {
  .s-footer .footer-contacts {
    padding-left: 1.6rem;
  }
}
@media screen and (max-width: 400px) {
  .s-footer .footer-contacts {
    padding-left: 1.2rem;
  }
}
.footer-contact-block {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 3.2rem;
}
.s-footer .right-vert-line {
  background-color: var(--color-accent);
}
.s-footer__bottom {
  font-family: var(--font-ui);
  color: rgba(255, 255, 255, 0.5);
  margin-top: 8rem;
}
/* -------------------------------------------------------------------
 * ## contact block
 * ------------------------------------------------------------------- */
.footer-contact-block a {
  color: var(--color-text-light);
}
.footer-contact-block a:hover,
.footer-contact-block a:focus {
  color: var(--color-accent);
}
.footer-contact-block__content,
.footer-contact-block__list li {
  padding: 0.8rem 0;
}
.footer-contact-block__list {
  list-style: none;
  margin-top: 0.4rem;
  margin-left: 0;
}
.footer-contact-block__list li {
  padding-left: 0;
}
.footer-contact-block__header {
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}
/* ------------------------------------------------------------------- 
 * ## copyright
 * ------------------------------------------------------------------- */
.ss-copyright {
  z-index: 2;
  position: relative;
}
.ss-copyright a {
  color: var(--color-text-light);
}
.ss-copyright a:hover,
.ss-copyright a:focus {
  color: var(--color-accent);
}
.ss-copyright span {
  font-size: 1.5rem;
  display: inline-block;
}
.ss-copyright span::after {
  content: "|";
  display: inline-block;
  padding: 0 0.8rem 0 1rem;
  color: rgba(255, 255, 255, 0.1);
}
.ss-copyright span:last-child::after {
  display: none;
}
/* ------------------------------------------------------------------- 
 * ## go top
 * ------------------------------------------------------------------- */
.page-anchor {
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  -webkit-transform: translate3d(0, 200%, 0);
  transform: translate3d(0, 200%, 0);
  -webkit-transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  position: fixed;
  bottom: 4.4rem;
  right: 8rem;
}
.page-anchor a {
  text-decoration: none;
  border: 0 none;
  display: block;
  height: 6.4rem;
  width: 6.4rem;
  border-radius: 50%;
  background-color: var(--color-text);
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
  position: relative;
}
.page-anchor a:hover,
.page-anchor a:focus {
  background-color: var(--color-accent);
}
/* Pulse effect on hover */
.page-anchor.link-is-visible a:hover {
  animation: pulse 1.5s ease-in-out infinite;
}
.page-anchor svg {
  height: 1.2rem;
  width: 1.2rem;
  position: absolute;
  -webkit-transform: translate3d(-50%, -50%, 0);
  transform: translate3d(-50%, -50%, 0);
  left: 50%;
  top: 50%;
}
.page-anchor svg path {
  fill: var(--color-text-light);
}
.page-anchor.link-is-visible {
  opacity: 1;
  visibility: visible;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}
/* ------------------------------------------------------------------- 
 * responsive:
 * footer
 * ------------------------------------------------------------------- */
@media screen and (max-width: 1200px) {
  .page-anchor {
    right: 6rem;
  }
  .page-anchor a {
    height: 6rem;
    width: 6rem;
  }
}
@media screen and (max-width: 900px) {
  .s-footer {
    padding-top: 14rem;
    scroll-margin-top: 8rem;
  }
  .s-footer__main {
    padding-bottom: 4.8rem;
  }
  .s-footer__main .section-intro {
    margin-bottom: 4.8rem;
  }
  .footer-contacts {
    margin-top: 4.8rem;
    margin-left: 0;
  }
  .footer-contact-block {
    margin-bottom: 3.2rem;
  }
  .s-footer__main .column {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .ss-copyright {
    padding-right: 10rem;
  }
  .page-anchor {
    right: 3.6rem;
  }
  .page-anchor a {
    height: 5.2rem;
    width: 5.2rem;
  }
}
@media screen and (max-width: 600px) {
  .ss-copyright {
    padding-right: 8rem;
  }
  .page-anchor {
    right: 2.4rem;
    bottom: 4rem;
  }
}
/* Responsive Design Improvements */
/* Base responsive adjustments */
@media screen and (max-width: 1200px) {
  .section-intro {
    margin-bottom: 10rem;
  }
}
@media screen and (max-width: 900px) {
  .section-intro {
    margin-bottom: 8rem;
  }
  /* Improve mobile navigation */
  .header-nav {
    padding: 2rem 0;
  }
  .header-nav a {
    font-size: 1.6rem;
    padding: 1.2rem 0;
  }
  .header-nav li {
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  /* Adjust hero section for mobile */
  .hero-content {
    padding-top: 15vh;
  }
  .hero-content h1 {
    font-size: 4.8rem;
    padding-right: 0;
  }
  .hero-contact {
    margin-top: 6rem;
    font-size: 1.1rem;
  }
}
@media screen and (max-width: 600px) {
  .section-intro {
    margin-bottom: 6rem;
  }
  /* Improve mobile footer */
  .s-footer {
    padding-top: 10rem;
    padding-bottom: 6rem;
  }
  .footer-contact-block {
    font-size: 2.4rem;
  }
  .ss-copyright span {
    display: block;
    margin-bottom: 1rem;
  }
  .ss-copyright span::after {
    display: none;
  }
}
/* Improve touch targets for mobile */
@media (hover: none) {
  .header-nav a,
  .footer-contact-block a {
    padding: 1.2rem 2rem;
  }
  .header-menu-toggle {
    padding: 1.2rem;
  }
}
/* Optimize animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Use hardware acceleration for animations */
.hero-content,
.hero-contact,
.hero-scroll,
.skills-list__item {
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}
/* Optimize transitions */
.header-nav a,
.hero-contact a,
.footer-contact-block a,
.skills-list__item-header {
  transition: color var(--transition-normal),
    border-color var(--transition-normal),
    transform var(--transition-normal),
    opacity var(--transition-normal);
}
/* Hero entrance animation (.ss-loaded is added by main.js on init).
 * Explicit easing keyword: using var(--transition-normal) here would
 * smuggle its 0.3s duration in as an animation-delay, and with no
 * backwards fill the hero would flash visible, blank out, then fade. */
html.ss-loaded .hero-content {
  animation: fadeIn 0.8s ease-in-out forwards;
}
/* ===================================================================
 * # web animations enhancements
 *
 * ------------------------------------------------------------------- */

/* Hero Section Animations */
/* Typewriter effect for hero heading */
html.ss-loaded .hero-content h1 {
  opacity: 1;
}

/* Ensure heading displays properly during typewriter effect */
.hero-content h1 span {
  display: inline;
}

/* Contact links staggered animation (gated on .js so the links stay
   visible if JavaScript never runs) */
html.js .hero-contact li {
  opacity: 0;
  transform: scale(0.8) translateY(10px);
}

html.ss-loaded .hero-contact li {
  animation: scaleAndFadeIn 0.5s ease-in-out forwards;
}

html.ss-loaded .hero-contact li:nth-child(1) { animation-delay: 0.3s; }
html.ss-loaded .hero-contact li:nth-child(2) { animation-delay: 0.4s; }
html.ss-loaded .hero-contact li:nth-child(3) { animation-delay: 0.5s; }
html.ss-loaded .hero-contact li:nth-child(4) { animation-delay: 0.6s; }

@keyframes scaleAndFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Navigation Improvements */

.s-header.sticky .header-nav a {
  transition: color 0.3s ease-in-out;
}

/* Profile Section Animations */
/* Parallax scroll effect for profile image */
@media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
  .profile-pic img {
    will-change: transform;
  }
}

/* Skills Section Animations */
/* Hover lift effect for skill cards */
.skills-list__item {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  padding-left: 1.6rem;
}

.skills-list__item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skills-list__item-header {
  transition: all 0.3s ease-in-out;
}

/* Micro-interactions */
/* Link hover effects - enhanced underline */
.hero-contact a,
.footer-contact-block__list a {
  position: relative;
  display: inline-block;
  transition: color 0.3s ease-in-out;
}

.hero-contact a::before,
.footer-contact-block__list a::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-in-out;
}

.hero-contact a:hover::before,
.footer-contact-block__list a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* Smooth color transitions on all links */
a {
  transition: color 0.3s ease-in-out;
}

/* Scroll indicator bounce animation */
.hero-scroll .scroll-link {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

.hero-scroll .scroll-link:hover {
  animation: scrollBounce 2s ease-in-out infinite paused, pulse 1.5s ease-in-out infinite;
  background-color: var(--color-accent);
}

/* Pulse animation for back-to-top and scroll indicator */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(249, 134, 26, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(249, 134, 26, 0);
  }
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-scroll .scroll-link,
  .page-anchor a:hover {
    animation: none !important;
  }
}

/* ===================================================================
 * # MODERNIZATION LAYER (2026 refresh)
 *
 * Appended last so it wins the cascade over the legacy rules above
 * without rewriting them. Groups: fluid type, depth/material,
 * glass header, skills cards, scroll reveal, scroll progress,
 * dark-mode adaptation.
 * ------------------------------------------------------------------- */

/* ---- Anchor offset so fixed-header jumps land below the header ----
 * Covers native hash navigation and reduced-motion users (the JS
 * smooth-scroll already compensates for everyone else). */
.target-section {
  scroll-margin-top: 8.8rem;
}

/* ---- Display serif (Source Serif 4) applied only to showcase text ----
 * Body, nav, labels and minor headings stay on the sans (Inter),
 * matching the original sans intent; the big editorial statements
 * get the variable serif. */
.hero-content h1,
.display-1,
.skills-list__item-header h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
}

/* ---- Fluid typography (clamp-based, truly responsive) ---- */
h1, .h1 {
  font-size: clamp(2.8rem, 1.9rem + 2.6vw, 3.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h2, .h2 {
  font-size: clamp(2.6rem, 1.9rem + 2vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
h3, .h3 {
  font-size: clamp(2rem, 1.6rem + 1.2vw, 2.6rem);
  line-height: 1.22;
}

.display-1 {
  font-size: clamp(3.4rem, 1.9rem + 3.1vw, 4.8rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.s-skills .section-intro .display-1 {
  font-size: clamp(3.2rem, 2.1rem + 2.4vw, 4.4rem);
}
.hero-content h1 {
  font-size: clamp(3.8rem, 1rem + 6.1vw, 7.2rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
p.lead {
  font-size: clamp(1.9rem, 1.5rem + 0.9vw, 2.4rem);
  line-height: 1.6;
}
.subhead {
  letter-spacing: 0.32em;
}

/* Comfortable measure for prose */
.s-about .section-intro p,
.s-skills__leftcol p.lead {
  max-width: 68ch;
}

/* Match the Skills intro paragraph to the About body-copy size */
.s-skills__leftcol p.lead {
  font-size: 1.8rem;
  line-height: 1.778;
}

/* ---- Brand-gradient underline on nav links (hover + active) ---- */
.header-nav a::after {
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
}
/* Keep the active link's underline persistently visible */
.header-nav a.current::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---- Glassmorphism on the sticky header ---- */
.s-header.sticky {
  background-color: rgba(11, 10, 21, 0.6);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .s-header.sticky {
    background-color: var(--color-primary);
  }
}

/* ---- Softer, rounder buttons with the brand gradient ---- */
.btn,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
  border-radius: var(--radius-pill);
  letter-spacing: 0.18em;
}

/* ===================================================================
 * # Skills as a responsive card grid
 * (accordion retired; every panel is always visible)
 * ------------------------------------------------------------------- */
.s-skills {
  background-color: var(--surface-dark-1);
}
/* Full-width card grid sits in its own row below the intro */
.s-skills__grid {
  margin-top: 2rem;
}
.skills-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ctr;
}
@media screen and (max-width: 900px) {
  .skills-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media screen and (max-width: 600px) {
  .skills-list {
    grid-template-columns: 1fr;
  }
}
.skills-list__item {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-dark-2);
  border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-md);
  padding: 3.2rem;
  margin: 0;
  overflow: hidden;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.215, 0.61, 0.355, 1),
    box-shadow 0.35s ease, border-color 0.35s ease;
}
.skills-list__item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.skills-list__item:hover,
.skills-list__item:focus-within {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-lg);
}
.skills-list__item:hover::before,
.skills-list__item:focus-within::before {
  transform: scaleX(1);
}
.skills-list__item-header {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  /* right padding keeps two-line titles clear of the ghost numeral */
  padding: 0 6.4rem 1.6rem 0;
  cursor: default;
}
.skills-list__icon {
  flex: 0 0 auto;
  width: 4.8rem;
  height: 4.8rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background-color: rgba(249, 134, 26, 0.12);
  color: var(--color-accent);
  transition: background-color 0.35s ease, color 0.35s ease;
}
@media (hover: hover) {
  .skills-list__item:hover .skills-list__icon {
    background-color: var(--color-accent);
    color: var(--color-text-light);
  }
}
.skills-list__icon svg {
  width: 2.4rem;
  height: 2.4rem;
  stroke: currentColor;
  fill: none;
}
.skills-list__item-header h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 2.4rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  padding-left: 0;
  margin: 0;
  /* static so the ghost numeral's containing block is the card itself */
  position: static;
}
/* Oversized ghost numeral in the card corner — echoes the editorial
 * serif numbering of the original template's accordion. */
.skills-list__item-header h3::before {
  content: counter(ctr, decimal-leading-zero);
  counter-increment: ctr;
  position: absolute;
  top: 1.6rem;
  right: 2.4rem;
  left: auto;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 6.4rem;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.06);
  margin: 0;
  pointer-events: none;
  transition: color 0.35s ease;
}
.skills-list__item:hover h3::before,
.skills-list__item:focus-within h3::before {
  color: rgba(249, 134, 26, 0.18);
}
/* ---- tool chips: scannable summary of each card ---- */
.skills-list__tags {
  display: flex;
  flex-flow: row wrap;
  gap: 0.8rem;
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
}
.skills-list__tags li {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.2rem;
  display: list-item;
}
.skills-list__item-body {
  display: block;
  padding: 0;
}
.skills-list__item-body p {
  font-size: 1.6rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

/* ===================================================================
 * # Scroll-reveal (native IntersectionObserver replaces AOS)
 * ------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
  }
  [data-reveal].reveal-in {
    opacity: 1;
    transform: none;
  }
}

/* ===================================================================
 * # Scroll progress indicator
 * ------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--gradient-brand);
  z-index: 600;
  pointer-events: none;
}

/* ===================================================================
 * # Dark-mode adaptation + theme toggle
 * The page is predominantly dark already; the single light-capable
 * section (About) follows the system scheme by default, and the
 * header's sun/moon toggle can override it via [data-theme] on <html>
 * (persisted in localStorage by main.js).
 * ------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --about-bg: var(--about-dark-bg);
    --about-panel: var(--about-dark-panel);
    --about-line: var(--about-dark-line);
    --about-heading: var(--about-dark-heading);
    --about-body: var(--about-dark-body);
  }
}
html[data-theme="dark"] {
  --about-bg: var(--about-dark-bg);
  --about-panel: var(--about-dark-panel);
  --about-line: var(--about-dark-line);
  --about-heading: var(--about-dark-heading);
  --about-body: var(--about-dark-body);
}
html[data-theme="light"] {
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
}

.s-about {
  background-color: var(--about-bg);
  transition: background-color var(--transition-normal);
}
.s-about__section--profile::before {
  background-color: var(--about-panel);
  transition: background-color var(--transition-normal);
}
.s-about .section-intro :is(h2, h3, h4),
.s-about .section-intro .display-1 {
  color: var(--about-heading);
}
.s-about .section-intro .subhead {
  color: var(--color-accent);
}
.s-about .section-intro p {
  color: var(--about-body);
}
.s-about .right-vert-line {
  background-color: var(--about-line);
}

/* ---- sun/moon toggle button (sits in the fixed header) ----
 * Heavy resets because the global button styles turn <button> into a
 * large pill CTA. */
.theme-toggle {
  display: grid;
  place-items: center;
  height: 4.4rem;
  width: 4.4rem;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0;
  line-height: 1;
  box-shadow: none;
  overflow: visible;
  cursor: pointer;
  z-index: 101;
  position: absolute;
  right: 6rem;
  top: 6.4rem;
  transform: translateY(-50%);
  transition: color var(--transition-normal),
    background-color var(--transition-normal);
}
.theme-toggle::before {
  content: none;
}
.theme-toggle:hover,
.theme-toggle:focus,
.theme-toggle:active {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-text-light);
  transform: translateY(-50%);
  box-shadow: none;
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.s-header.sticky .theme-toggle {
  /* sticky header drops its 2rem padding, so true-centre the icon on
   * the 8.8rem bar (the nav links sit at exactly 50%) */
  top: 50%;
}

/* ---- hamburger menu toggle as a real <button> ----
 * Same heavy-reset treatment as .theme-toggle: neutralise the global
 * pill-CTA button styles so the hamburger geometry defined above
 * (absolute position, translateY(-50%) centring) still applies, and
 * mirror the theme toggle's circular hover halo for a cohesive header. */
.header-menu-toggle {
  background: transparent;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  overflow: visible;
  transition: color var(--transition-normal),
    background-color var(--transition-normal);
}
.header-menu-toggle::before {
  content: none;
}
.header-menu-toggle:hover,
.header-menu-toggle:focus,
.header-menu-toggle:active {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-text-light);
  transform: translateY(-50%);
  box-shadow: none;
}
.header-menu-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.theme-toggle svg {
  width: 2rem;
  height: 2rem;
  stroke: currentColor;
  fill: none;
}
/* Show the icon for the theme a click would switch TO: sun while dark,
 * moon while light. Default (no override) follows the system scheme. */
.theme-toggle__icon--sun {
  display: none;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle__icon--sun {
    display: block;
  }
  html:not([data-theme="light"]) .theme-toggle__icon--moon {
    display: none;
  }
}
html[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}
html[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}
/* Quarter-turn entrance for the incoming icon when the theme is
 * switched. main.js retriggers .is-switching on each click, so the
 * animation never runs on page load; gated on reduced motion like
 * every other animation. */
@media (prefers-reduced-motion: no-preference) {
  .theme-toggle.is-switching .theme-toggle__icon {
    animation: theme-icon-in 0.45s cubic-bezier(0.215, 0.61, 0.355, 1);
  }
}
@keyframes theme-icon-in {
  from {
    transform: rotate(-90deg) scale(0.6);
    opacity: 0;
  }
  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}
/* Mobile: sit beside the hamburger and mirror its geometry exactly —
 * same 4.8rem box, same padding/negative-margin trick, same top values
 * — so the two icons share a baseline; heavier strokes match the
 * hamburger's visual weight. */
@media screen and (max-width: 900px) {
  .theme-toggle {
    height: 4.8rem;
    width: 4.8rem;
    padding: 1.2rem;
    margin: -1.2rem;
    right: 12rem;
    top: 6.4rem;
  }
  .s-header.sticky .theme-toggle {
    top: 60%;
  }
  .theme-toggle svg {
    width: 2.4rem;
    height: 2.4rem;
    stroke-width: 2;
  }
}
@media screen and (max-width: 600px) {
  .theme-toggle {
    right: 10rem;
  }
}

/* ===================================================================
 * # Contact section icons
 * Inline line-icons reuse the skill-card icon language for a
 * consistent, more scannable footer.
 * ------------------------------------------------------------------- */
.footer-contact-block__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.footer-contact-block__icon {
  display: inline-grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: rgba(249, 134, 26, 0.12);
  color: var(--color-accent);
}
.footer-contact-block__icon svg {
  width: 1.8rem;
  height: 1.8rem;
  stroke: currentColor;
  fill: none;
}

/* ===================================================================
 * # Landscape phones (short viewports)
 *
 * The whole layout is tuned for portrait: tall hero min-heights, large
 * vertical section paddings (14rem) and a 108rem About min-height. In
 * landscape on a phone the viewport is only ~350-430px tall, so that
 * portrait rhythm pushes content far off-screen and forces excessive
 * scrolling, which is what makes it hard to read.
 *
 * These rules collapse the vertical rhythm so a screenful of content
 * actually fits. They are gated on viewport HEIGHT (not width) and
 * `orientation: landscape`, so tall tablets in landscape keep the full
 * portrait treatment and only genuinely short screens are affected.
 * ------------------------------------------------------------------- */
@media screen and (max-height: 600px) and (orientation: landscape) {
  /* Hero: still fill the screen, but driven by the viewport height
     instead of the portrait 800px min-height (which overflowed short
     landscape screens). Reduced padding keeps the content clear of the
     fixed header while staying vertically centred. */
  .s-hero {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    padding-top: 11rem;
    padding-bottom: 5rem;
  }
  .hero-content {
    height: auto;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
  }
  .hero-content h1 {
    font-size: clamp(2.8rem, 1.6rem + 4vw, 4.6rem);
    line-height: 1.1;
  }
  /* The three hard line breaks make the heading too tall here; let the
     text reflow to the available width instead. */
  .hero-content h1 br {
    display: none;
  }
  .hero-contact {
    margin-top: 3.2rem;
  }
  /* Not enough vertical room for the scroll cue without overlapping. */
  .hero-scroll {
    display: none;
  }

  /* Trim the oversized top paddings on the stacked sections so each
     section starts near the top of the screen. */
  .s-about__section--profile {
    padding-top: 11rem;
    padding-bottom: 4rem;
    min-height: 0;
  }
  .s-skills {
    padding-top: 11rem;
  }
  .s-footer {
    padding-top: 11rem;
  }
  .section-intro {
    margin-bottom: 5rem;
  }
}

/* ---- Open mobile menu on short landscape screens ----
 * The open menu panel is absolutely positioned with large padding and
 * no scrolling, so on a short landscape viewport its lower items (the
 * contact button) fall below the fold and get clipped. Cap the panel to
 * the viewport, let it scroll, and tighten the spacing so it fits.
 * Scoped to <=900px width so it only touches the actual mobile menu. */
@media screen and (max-width: 900px) and (max-height: 600px) and (orientation: landscape) {
  .header-content {
    padding-top: 7rem;
    padding-bottom: 3rem;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .header-nav a {
    padding: 1.1rem 0;
    min-height: 0;
  }
}

/* ===================================================================
 * # Small portrait phones — readability tweaks
 *
 * The grid stacks a 5.5% row margin (.row is 89% wide), 20px of column
 * padding and — below 400px — another 20px of row padding. On a ~360px
 * phone that is ~120px of combined side gutter, squeezing prose into a
 * cramped ~240px column. Reclaiming that width gives long paragraphs
 * room to breathe, which is the main portrait readability win.
 * ------------------------------------------------------------------- */
@media screen and (max-width: 600px) {
  .row {
    width: 92%;
  }
  /* Keep the hero heading from running edge-to-edge on small screens. */
  .hero-content h1 {
    padding-right: 0;
  }
  /* A touch more breathing room between stacked skill cards. */
  .skills-list {
    gap: 2rem;
  }
}
@media screen and (max-width: 400px) {
  /* base.css already adds a 20px gutter to .row here, so go full width
     and let that single gutter (plus column padding) do the spacing. */
  .row {
    width: 100%;
  }
}

/* ===================================================================
 * # accessibility helpers
 * ------------------------------------------------------------------- */
.u-screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
/* Skip link: off-screen until keyboard focus lands on it */
.skip-link {
  position: fixed;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 700;
  padding: 1.2rem 2rem;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.4;
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--color-text-light);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===================================================================
 * # copy-email button (footer)
 * Heavy resets because the global button styles turn <button> into a
 * large pill CTA. Revealed by main.js only when the Clipboard API is
 * available.
 * ------------------------------------------------------------------- */
.copy-email {
  display: inline-grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  padding: 0;
  margin: 0 0 0 1.2rem;
  vertical-align: middle;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0;
  line-height: 1;
  box-shadow: none;
  overflow: visible;
  position: relative;
  cursor: pointer;
  transition: color var(--transition-normal),
    background-color var(--transition-normal),
    border-color var(--transition-normal);
}
.copy-email::before {
  content: none;
}
/* keep the hidden attribute authoritative (display above would beat
 * the normalize [hidden] rule otherwise) */
.copy-email[hidden] {
  display: none;
}
.copy-email:hover,
.copy-email:focus,
.copy-email:active {
  background-color: rgba(255, 255, 255, 0.14);
  color: var(--color-text-light);
  transform: none;
  box-shadow: none;
}
.copy-email:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.copy-email svg {
  width: 1.7rem;
  height: 1.7rem;
  stroke: currentColor;
  fill: none;
}
.copy-email__icon--check {
  display: none;
}
.copy-email.is-copied {
  color: var(--color-accent);
  border-color: rgba(249, 134, 26, 0.5);
}
.copy-email.is-copied .copy-email__icon--copy {
  display: none;
}
.copy-email.is-copied .copy-email__icon--check {
  display: block;
}
/* "Copied!" bubble (the global button ::before is disabled above, so
 * ::after is free for this) */
.copy-email::after {
  content: "Copied!";
  position: absolute;
  bottom: calc(100% + 0.8rem);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background-color: var(--color-accent);
  color: var(--color-text-light);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.copy-email.is-copied::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ===================================================================
 * # hero heading no-JS fallback
 * Hide the heading only when JS is running (the typewriter reveals it);
 * if main.js never executes, html keeps .no-js and the heading shows.
 * The typewriter sets an inline opacity:1 the moment it starts.
 * ------------------------------------------------------------------- */
html.js .hero-content h1 {
  opacity: 0;
}
