:root {
  --ink: #102a36;
  --muted: #61727a;
  --accent: #075c6b;
  --accent-light: #dcecef;
  --paper: #ffffff;
  --wash: #f2f6f6;
  --dark: #0c2731;
  --line: #dbe4e6;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(8, 38, 48, 0.12);
  --container: 1160px;
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #e7f0f2;
  --muted: #aabcc1;
  --accent: #63b9c8;
  --accent-light: #183b43;
  --paper: #0b1d24;
  --wash: #102830;
  --dark: #06151b;
  --line: #29434a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.7; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.16; }
h2 { margin-bottom: 16px; font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.04em; }
h3 { margin-bottom: 10px; font-size: 1.25rem; }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), 980px); }
.section { padding: 110px 0; }
.section-heading { margin-bottom: 48px; }
.section-heading.centered { max-width: 700px; margin-right: auto; margin-bottom: 58px; margin-left: auto; text-align: center; }
.section-kicker { margin-bottom: 10px; color: var(--accent); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
.section-heading h2::after { display: block; width: 54px; height: 3px; margin-top: 18px; background: var(--accent); content: ""; }
.section-heading.centered h2::after { margin-right: auto; margin-left: auto; }
.lead { max-width: 880px; color: #405760; font-size: 1.08rem; }
.date, .category { color: var(--accent); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1000; padding: 10px 16px; color: white; background: var(--accent); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.hero { position: relative; min-height: 720px; overflow: hidden; color: white; background: linear-gradient(90deg, rgba(5, 25, 31, 0.78), rgba(5, 25, 31, 0.24)), url("assets/images/hero.jpg") center 35% / cover no-repeat; }
.hero::after { position: absolute; inset: 0; z-index: 0; background: linear-gradient(0deg, rgba(7, 38, 47, 0.25), transparent 55%); content: ""; }
.site-nav { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; min-height: 94px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.nav-links { display: flex; align-items: center; gap: 34px; padding: 0; margin: 0 0 0 auto; list-style: none; }
.nav-links a { position: relative; font-size: 0.83rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-links a::after { position: absolute; right: 0; bottom: -8px; left: 0; height: 2px; background: white; content: ""; transform: scaleX(0); transition: transform 180ms ease; }
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }
.menu-toggle { display: none; }
.theme-toggle { display: grid; width: 42px; height: 42px; margin-left: 24px; place-items: center; color: white; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 50%; background: rgba(7, 39, 48, 0.25); cursor: pointer; transition: background 180ms ease, transform 180ms ease; }
.theme-toggle:hover, .theme-toggle:focus-visible { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.theme-icon { font-size: 1.25rem; line-height: 1; }
.hero-content { position: relative; z-index: 2; display: flex; min-height: 500px; align-items: flex-start; justify-content: center; flex-direction: column; padding-bottom: 55px; }
.eyebrow { margin-bottom: 14px; color: #d8e4e6; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.hero h1 { max-width: 700px; margin-bottom: 8px; font-size: clamp(3.7rem, 8vw, 7.8rem); font-weight: 300; letter-spacing: -0.065em; }
.hero-title { margin-bottom: 34px; font-size: clamp(0.88rem, 2vw, 1.2rem); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.hero-actions { display: flex; gap: 10px; }
.hero-actions a { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.58); border-radius: 50%; font-weight: 800; transition: 180ms ease; }
.hero-actions a:hover, .hero-actions a:focus-visible { color: var(--accent); background: white; transform: translateY(-3px); }
.waves { position: absolute; right: 0; bottom: -1px; left: 0; z-index: 3; height: 105px; pointer-events: none; }
.wave { position: absolute; right: 0; bottom: 0; left: 0; height: 100%; background-repeat: repeat-x; background-position: bottom; background-size: auto 100%; }
.wave-back { opacity: 0.55; background-image: url("assets/images/wave-top.png"); }
.wave-middle { opacity: 0.75; background-image: url("assets/images/wave-mid.png"); }
.wave-front { background-image: url("assets/images/wave-bottom.png"); }

.intro-section { padding-top: 90px; }
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 70px; margin-top: 65px; }
.skill-column { position: relative; padding-top: 22px; border-top: 1px solid var(--line); }
.skill-column .number { position: absolute; top: -22px; right: 0; color: #e5edef; font-size: 4rem; font-weight: 800; line-height: 1; }
.skill-column p { position: relative; max-width: 440px; color: var(--muted); font-size: 0.92rem; }
.check-list { display: grid; gap: 8px; padding: 0; margin: 26px 0 0; list-style: none; }
.check-list li { position: relative; padding-left: 25px; font-size: 0.9rem; }
.check-list li::before { position: absolute; top: 0.48em; left: 0; width: 9px; height: 9px; border: 2px solid var(--accent); border-radius: 50%; content: ""; }

.industries-section { background: var(--wash); }
.industry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.industry-card { overflow: hidden; background: white; box-shadow: 0 14px 40px rgba(10, 49, 61, 0.08); }
.industry-card .image-wrap { height: 370px; overflow: hidden; }
.industry-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.65); transition: transform 500ms ease, filter 300ms ease; }
.industry-card:hover img { filter: saturate(1); transform: scale(1.04); }
.industry-copy { position: relative; min-height: 190px; padding: 30px; }
.industry-copy > span { position: absolute; top: 26px; right: 28px; color: #d7e3e5; font-size: 2rem; font-weight: 800; }
.industry-copy h3 { max-width: 75%; }
.industry-copy p { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }

.timeline { position: relative; display: grid; gap: 12px; }
.timeline::before { position: absolute; top: 30px; bottom: 30px; left: 118px; width: 1px; background: var(--line); content: ""; }
.experience-item { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; transition: box-shadow 180ms ease; }
.experience-item:hover { box-shadow: 0 10px 30px rgba(10, 49, 61, 0.07); }
.experience-toggle { display: grid; width: 100%; grid-template-columns: 150px 1fr 34px; align-items: center; gap: 24px; padding: 22px 24px; color: var(--ink); text-align: left; border: 0; background: transparent; cursor: pointer; }
.experience-toggle .date { margin: 0; }
.role { display: grid; gap: 4px; }
.role small { color: var(--muted); }
.toggle-icon { display: grid; width: 30px; height: 30px; place-items: center; color: white; border-radius: 50%; background: var(--dark); font-size: 1.2rem; }
.experience-detail { padding: 0 82px 24px 198px; color: var(--muted); font-size: 0.92rem; }
.experience-detail p { margin: 0; }
.gallery { position: relative; overflow: hidden; margin-top: 52px; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery-track { display: flex; transition: transform 420ms cubic-bezier(.2,.7,.2,1); }
.gallery-track img { width: 25%; min-width: 25%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery-button { position: absolute; top: 50%; display: grid; width: 40px; height: 40px; place-items: center; color: var(--ink); border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.9); box-shadow: 0 4px 15px rgba(0,0,0,.15); cursor: pointer; transform: translateY(-50%); }
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }

.education-section { background: var(--wash); }
.education-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; }
.education-card { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 30px; min-height: 240px; padding: 40px; background: white; }
.education-card img { max-height: 90px; margin: auto; object-fit: contain; }
.education-card p:last-child { margin-bottom: 0; color: var(--muted); }
.software-section { color: white; background: var(--dark); }
.software-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 80px; }
.software-section .section-kicker { color: #85c0ca; }
.software-section p:last-child { color: #b5c6cb; }
.software-section img { padding: 26px; border-radius: var(--radius); background: white; box-shadow: var(--shadow); }

.sample-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.sample-card { grid-column: span 2; overflow: hidden; border: 1px solid var(--line); background: white; }
.sample-card:nth-child(4) { grid-column: 2 / span 2; }
.sample-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sample-card h3 { padding: 22px; margin: 0; font-size: 1rem; }

.testimonials-section { color: white; background: var(--dark); }
.light-heading .section-kicker { color: #88c4ce; }
.light-heading h2::after { background: #88c4ce; }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card { position: relative; min-height: 350px; padding: 36px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.04); transition: transform 180ms ease, background 180ms ease; }
.testimonial-card:hover { background: rgba(255,255,255,.08); transform: translateY(-4px); }
.testimonial-card img { width: 58px; height: 58px; margin-bottom: 24px; border: 2px solid #8ebcc4; border-radius: 50%; object-fit: cover; }
.testimonial-card .quote { position: absolute; top: 26px; right: 30px; color: #7aaab3; font-family: Georgia, serif; font-size: 4rem; line-height: 1; }
.testimonial-card blockquote { margin: 0 0 22px; color: #cad6d9; font-size: 0.9rem; }
.testimonial-card strong { font-size: 0.8rem; letter-spacing: 0.04em; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.blog-card { overflow: hidden; border: 1px solid var(--line); background: white; box-shadow: 0 12px 40px rgba(10, 49, 61, 0.07); }
.blog-card > a { display: block; overflow: hidden; }
.blog-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 400ms ease; }
.blog-card:hover img { transform: scale(1.04); }
.blog-copy { padding: 28px; }
.blog-copy h3 { min-height: 72px; font-size: 1.12rem; }
.blog-copy > p:not(.category) { color: var(--muted); font-size: 0.9rem; }
.text-link { color: var(--accent); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }

.fiverr-section { padding: 65px 0; background: var(--wash); }
.fiverr-inner { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 45px; }
.fiverr-inner img { max-height: 80px; object-fit: contain; }
.fiverr-inner h2 { max-width: 650px; margin: 0; font-size: clamp(1.5rem, 3vw, 2.35rem); }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 0 26px; color: white; border-radius: 99px; background: #1dbf73; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; box-shadow: 0 10px 30px rgba(29,191,115,.25); transition: transform 180ms ease; }
.button:hover { transform: translateY(-3px); }

.site-footer { padding: 38px 0; color: #b8c8cc; background: #071b22; font-size: 0.78rem; }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; }
.footer-grid img { width: 52px; height: 52px; object-fit: contain; }
.footer-grid nav { display: flex; gap: 25px; }
.footer-grid p { justify-self: end; margin: 0; }
.scroll-top { position: fixed; right: 22px; bottom: 22px; z-index: 10; display: grid; width: 44px; height: 44px; place-items: center; color: white; border: 0; border-radius: 50%; background: var(--accent); box-shadow: 0 8px 25px rgba(0,0,0,.2); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(15px); transition: 180ms ease; }
.scroll-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

.inner-header { color: white; background: var(--dark); }
.inner-header .site-nav { border-bottom-color: rgba(255, 255, 255, 0.16); }
.inner-section { min-height: calc(100vh - 238px); }
.inner-section .section-heading h1,
.article-hero h1 { margin-bottom: 20px; font-size: clamp(2.6rem, 6vw, 5rem); letter-spacing: -0.045em; line-height: 1.04; }
.inner-section .section-heading > p:last-child { max-width: 660px; margin-inline: auto; color: var(--muted); }
.article-page { padding: 90px 0 110px; }
.article-hero { padding-bottom: 42px; border-bottom: 1px solid var(--line); }
.article-content { padding-top: 55px; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.85; overflow-wrap: anywhere; }
.article-content > * { max-width: 760px; margin-right: auto; margin-left: auto; }
.article-content > figure,
.article-content > .wp-block-image,
.article-content > .wp-block-gallery,
.article-content > .wp-block-embed { max-width: 900px; }
.article-content h2,
.article-content h3,
.article-content h4 { margin-top: 2.2em; font-family: Inter, "Segoe UI", Arial, sans-serif; }
.article-content h2 { font-size: clamp(1.7rem, 4vw, 2.45rem); }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; }
.article-content img { width: auto; height: auto; margin: 34px auto; border-radius: 10px; }
.article-content figure { margin-top: 42px; margin-bottom: 42px; }
.article-content figcaption { margin-top: -24px; color: var(--muted); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 0.78rem; text-align: center; }
.article-content blockquote { padding: 18px 24px; border-left: 4px solid var(--accent); color: var(--muted); background: var(--wash); }
.article-content iframe { display: block; width: 100%; max-width: 900px; min-height: 420px; margin: 38px auto; border: 0; }
.article-content table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 0.9rem; }
.article-content th,
.article-content td { padding: 12px; border: 1px solid var(--line); text-align: left; }
.article-footer-nav { padding-top: 45px; margin-top: 55px; border-top: 1px solid var(--line); }
.blog-index-grid .blog-copy h2 { min-height: 86px; margin-bottom: 10px; font-size: 1.25rem; letter-spacing: -0.02em; }
.blog-index-grid .blog-card img { background: var(--wash); }
.contact-grid { display: grid; grid-template-columns: 1fr 0.85fr; align-items: start; gap: 75px; }
.contact-grid .section-heading { margin-bottom: 0; }
.contact-grid .section-heading > p:last-child { margin-inline: 0; }
.contact-card { padding: 42px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--wash); box-shadow: var(--shadow); }
.contact-card a { color: var(--accent); font-size: 1.05rem; font-weight: 750; overflow-wrap: anywhere; }
.contact-label { margin: 28px 0 5px; color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.contact-label:first-child { margin-top: 0; }
.contact-note { padding-top: 28px; margin: 32px 0 0; color: var(--muted); border-top: 1px solid var(--line); }
.centered-message { padding-block: 50px; text-align: center; }
.secondary-button { margin-top: 18px; background: var(--accent); }
.gallery-button:disabled { cursor: not-allowed; opacity: 0.4; }
a:focus-visible,
button:focus-visible { outline: 3px solid #8ed6e2; outline-offset: 4px; }

[data-theme="dark"] .industry-card,
[data-theme="dark"] .experience-item,
[data-theme="dark"] .education-card,
[data-theme="dark"] .sample-card,
[data-theme="dark"] .blog-card { background: #132c34; }
[data-theme="dark"] .industry-card img,
[data-theme="dark"] .sample-card img,
[data-theme="dark"] .blog-card img { filter: brightness(0.84) saturate(0.75); }
[data-theme="dark"] .industry-card:hover img,
[data-theme="dark"] .blog-card:hover img { filter: brightness(0.94) saturate(1); }
[data-theme="dark"] .education-card img,
[data-theme="dark"] .software-section img { padding: 12px; border-radius: 8px; background: #f4f7f7; }
[data-theme="dark"] .intro-section .lead { color: var(--muted); }
[data-theme="dark"] .toggle-icon { color: #092029; background: var(--accent); }

@media (max-width: 900px) {
  .section { padding: 82px 0; }
  .hero { min-height: 650px; background-position: 60% center; }
  .skills-grid, .education-grid { gap: 28px; }
  .industry-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .industry-card:last-child, .blog-card:last-child { grid-column: 1 / -1; width: calc(50% - 12px); justify-self: center; }
  .industry-card .image-wrap { height: 300px; }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .sample-card { grid-column: span 3; }
  .sample-card:nth-child(4) { grid-column: span 3; }
  .sample-card:last-child { grid-column: 2 / span 4; }
  .software-grid { gap: 38px; }
  .education-card { grid-template-columns: 1fr; }
  .fiverr-inner { grid-template-columns: 100px 1fr; }
  .fiverr-inner .button { grid-column: 2; justify-self: start; }
  .contact-grid { gap: 38px; }
}

@media (max-width: 680px) {
  .container, .narrow { width: min(calc(100% - 30px), var(--container)); }
  .section { padding: 68px 0; }
  h2 { font-size: 2.15rem; }
  .site-nav { min-height: 76px; }
  .menu-toggle { position: relative; z-index: 2; display: grid; width: 44px; height: 44px; place-content: center; gap: 5px; color: white; border: 0; background: transparent; cursor: pointer; }
  .menu-toggle > span:not(.sr-only) { display: block; width: 24px; height: 2px; background: currentColor; }
  .nav-links { position: absolute; top: 76px; right: 0; left: 0; display: none; align-items: stretch; gap: 0; padding: 12px; color: var(--ink); border-radius: 0 0 12px 12px; background: white; box-shadow: var(--shadow); }
  .nav-links.open { display: grid; }
  .nav-links a { display: block; padding: 14px; }
  .nav-links a::after { display: none; }
  .theme-toggle { order: 2; margin-right: 2px; margin-left: auto; }
  .menu-toggle { order: 3; }
  .nav-links { order: 4; }
  [data-theme="dark"] .nav-links { background: #132c34; }
  .hero { min-height: 620px; background-position: 63% center; }
  .hero::before { position: absolute; inset: 0; z-index: 1; background: rgba(5, 25, 31, 0.22); content: ""; }
  .hero h1 { font-size: 3.7rem; }
  .hero-content { min-height: 440px; justify-content: flex-end; padding-bottom: 85px; }
  .hero-title { max-width: 280px; font-size: 0.78rem; }
  .waves { height: 65px; }
  .skills-grid, .industry-grid, .education-grid, .software-grid, .testimonial-grid, .blog-grid { grid-template-columns: 1fr; }
  .industry-card:last-child, .blog-card:last-child { grid-column: auto; width: 100%; }
  .industry-card .image-wrap { height: 320px; }
  .experience-toggle { grid-template-columns: 1fr 32px; gap: 10px; padding: 20px; }
  .experience-toggle .date { grid-column: 1 / -1; }
  .timeline::before { display: none; }
  .experience-detail { padding: 0 60px 22px 20px; }
  .gallery-track img { width: 50%; min-width: 50%; }
  .sample-grid { grid-template-columns: 1fr; }
  .sample-card, .sample-card:nth-child(4), .sample-card:last-child { grid-column: auto; }
  .software-grid { gap: 35px; }
  .testimonial-card { min-height: auto; }
  .fiverr-inner { grid-template-columns: 1fr; text-align: center; }
  .fiverr-inner img { margin: auto; }
  .fiverr-inner .button { grid-column: auto; justify-self: center; }
  .footer-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-grid p { justify-self: center; }
  .article-page { padding: 65px 0 80px; }
  .article-content { padding-top: 38px; font-size: 1rem; }
  .article-content iframe { min-height: 240px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
