/* 1. DESIGN TOKENS
   These variables control the professional palette and shared sizes.
   Changing a variable updates every rule that uses it. */
:root {
  --paper: #f7f8f4;
  --ink: #182b27;
  --muted: #51615a;
  --accent: #087a55;
  --line: #d5ddd5;
  --soft: #e9eee6;
  --white: #ffffff;
  --radius: 18px;
  --content-width: 1180px;
}

/* 2. BASE RULES
   border-box includes padding and borders inside an element's width. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

/* Keep hidden views hidden even if another rule sets display: flex/grid. */
[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  font-weight: 600;
}

h3 {
  font-size: 1.6rem;
  font-weight: 600;
}

p + p {
  margin-top: 1rem;
}

a {
  color: inherit;
  text-underline-offset: 5px;
}

a:hover {
  color: var(--accent);
}

button {
  font: inherit;
}

/* 3. SHARED LAYOUT
   min() limits the width on large displays.
   clamp() smoothly scales spacing between a minimum and maximum. */
.wrap {
  width: min(
    var(--content-width),
    calc(100% - clamp(32px, 7vw, 96px))
  );
  margin-inline: auto;
}

.section {
  padding-block: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.muted,
.small-label {
  color: var(--muted);
}

.small-label {
  font-size: 0.83rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 44px;
  padding: 13px 20px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--ink);
  color: var(--white);
}

.text-link {
  font-size: 0.87rem;
  font-weight: 600;
}

.text-link span {
  margin-left: 6px;
}

/* 4. ACCESSIBILITY
   Focus outlines help keyboard users locate the active control. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 110;
  padding: 10px 18px;
  background: var(--paper);
}

.skip-link:focus {
  top: 12px;
}

/* Visually hidden content is still available to screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 5. HEADER AND VIEW BUTTON */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-block: 25px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.monogram {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-left: auto;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.82rem;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

.side-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.side-switch:hover {
  background: var(--soft);
}

.side-switch:disabled {
  cursor: wait;
}

/* 6. PROFESSIONAL INTRODUCTION
   minmax(0, ...) allows columns to shrink without causing overflow. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(64px, 9vw, 120px);
}

.hero h1 {
  font-size: clamp(2.65rem, 4.7vw, 4.45rem);
  font-weight: 600;
  line-height: 1.07;
}

.hero h1 span {
  color: var(--accent);
}

.intro {
  max-width: 540px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 1.03rem;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.focus-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  box-shadow: 0 18px 50px #182b2708;
}

.focus-row {
  display: flex;
  gap: 18px;
  padding-block: 21px;
  border-top: 1px solid var(--line);
}

.number {
  padding-top: 3px;
  color: var(--accent);
  font-size: 0.73rem;
}

.focus-row h2 {
  font-size: 1.27rem;
  letter-spacing: -0.025em;
}

.focus-row p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}

.panel-note {
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.71rem;
  letter-spacing: 0.04em;
}

/* 7. ABOUT AND PROJECTS */
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 70px;
}

.section-copy {
  max-width: 64ch;
  color: var(--muted);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.project-art {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  padding: 28px 32px;
  background:
    radial-gradient(ellipse at 90% 20%, #23724f, transparent 65%),
    #19382f;
  color: #e7eedb;
}

.art-label,
.art-caption {
  font-size: 0.66rem;
  letter-spacing: 0.13em;
}

.art-monogram {
  font-size: 7rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.09em;
}

.art-monogram span {
  color: #63efb5;
}

.project-copy {
  align-self: center;
  padding: clamp(24px, 4vw, 52px);
}

.project-copy .eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.project-copy > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--paper);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--soft);
  font-size: 0.7rem;
}

/* 8. CYBERSECURITY, CONTACT, AND FOOTER */
.security-card {
  padding-left: 28px;
  border-left: 3px solid var(--accent);
}

.security-card h3 {
  margin-top: 19px;
  margin-bottom: 15px;
}

.security-card p {
  font-size: 0.94rem;
}

.security-card .text-link {
  display: inline-block;
  margin-top: 22px;
}

.contact-section {
  padding-block: 58px;
  border-block: 1px solid var(--line);
  background: var(--soft);
}

.contact-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}

.contact-inner p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--muted);
}

.contact-inner .actions {
  margin-top: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-block: 26px;
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer p + p {
  margin: 0;
}

/* 9. CREATIVE SIDE
   JavaScript changes data-side on body.
   These variables recolor the shared header and footer automatically. */
body[data-side="creative"] {
  --paper: #071b16;
  --ink: #e8fff4;
  --muted: #a6c9bc;
  --accent: #63efb5;
  --line: #284d3e;
  --soft: #102e23;

  background:
    radial-gradient(ellipse at 80% 25%, #104532, transparent 55%),
    var(--paper);
}

.creative-view {
  min-height: 78vh;
  padding-block: clamp(60px, 8vw, 104px);
}

.creative-heading {
  max-width: 760px;
}

.creative-heading h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.creative-heading h1 span {
  color: var(--accent);
  font-style: italic;
}

.creative-intro {
  max-width: 46ch;
  margin-top: 28px;
  color: var(--muted);
}

.empty-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  margin-top: 52px;
  padding: 40px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #123b2b88, #071b1666);
  text-align: center;
}

.gallery-mark {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 2.3rem;
}

.empty-gallery .muted {
  margin-top: 5px;
  font-size: 0.85rem;
}

.creative-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-align: right;
  text-transform: uppercase;
}

/* 10. EMERALD BURNING TRANSITION
   A dark curtain covers the page while JavaScript swaps the views.
   A jagged gradient edge gives the impression of glowing burning paper.
   This is a stylized wipe, not a physical fire simulation. */
.burn-curtain {
  position: fixed;
  inset: -10vh -15vw;
  z-index: 100;
  background: #04130f;
  pointer-events: none;
}

/* The bright, irregular edge of the curtain. */
.burn-curtain::after {
  content: "";
  position: absolute;
  inset: 0 -24px 0 auto;
  width: 64px;
  background: linear-gradient(
    90deg,
    #04130f,
    #0b7147 45%,
    #44f4a0 72%,
    #d6ffe5 83%,
    #21bb78 94%
  );
  clip-path: polygon(
    0 0, 62% 0, 85% 4%, 48% 9%, 96% 15%,
    60% 21%, 80% 27%, 49% 32%, 98% 38%,
    57% 44%, 86% 50%, 45% 56%, 94% 62%,
    64% 69%, 85% 75%, 48% 82%, 98% 88%,
    67% 94%, 80% 100%, 0 100%
  );
}

/* A soft glow extends beyond the jagged edge. */
.burn-curtain::before {
  content: "";
  position: absolute;
  inset: 0 -44px 0 auto;
  width: 100px;
  background: radial-gradient(
    ellipse,
    #33ee9966,
    transparent 70%
  );
}

/* 11. RESPONSIVE LAYOUT
   Stack columns when there is not enough space for them side by side. */
@media (max-width: 900px) {
  .site-header nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .side-switch {
    margin-left: auto;
  }

  .hero,
  .two-column,
  .project-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    gap: 36px;
  }

  .two-column {
    gap: 28px;
  }

  .project-art {
    min-height: 260px;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-header {
    gap: 12px;
  }

  .brand {
    gap: 8px;
    font-size: 0.8rem;
  }

  .monogram {
    width: 30px;
    height: 30px;
  }

  .side-switch {
    padding-inline: 12px;
    font-size: 0.75rem;
  }

  .focus-panel {
    padding: 24px;
  }

  .creative-heading h1 {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }
}

/* 12. REDUCED MOTION
   Respect the visitor's accessibility preference.
   JavaScript also checks this and switches views instantly. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .burn-curtain {
    display: none !important;
  }
}
/* 13. APPROVED MATRIX DESIGN
   The restrained palette uses one emerald accent. System fonts keep the
   site usable offline; monospace is limited to navigation and small labels.
   Later rules override the earlier light design for easy comparison. */
:root {
  --paper: #091411;
  --ink: #edf4f0;
  --muted: #b0c0b8;
  --accent: #79d9b0;
  --line: #2a3c33;
  --soft: #10231b;
  --white: #071710;
  --content-width: 1280px;
}
body { background: var(--paper); font-family: "Segoe UI", Arial, sans-serif; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.035em; }
.eyebrow, .brand, nav a, .side-switch, .panel-note, .number, .tags, .art-label {
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
}
.eyebrow { font-weight: 400; letter-spacing: .12em; color: var(--muted); }
.site-header { padding-block: 22px; }
.monogram { border: 1px solid var(--accent); border-radius: 2px; background: transparent; color: var(--accent); font-size: .8rem; width: 42px; height: 42px; }
.brand { font-weight: 400; }
.side-switch { border-color: #436b58; border-radius: 5px; font-weight: 400; }
.button { background: var(--accent); color: #071710; font-weight: 600; }
.button:hover { background: #9ce8c8; color: #071710; }
.hero { position: relative; isolation: isolate; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: clamp(32px,5vw,72px); padding-block: clamp(64px,8vw,104px); }
.hero h1 { font-size: clamp(2.6rem,4.1vw,3.65rem); line-height: 1.16; font-weight: 500; }
.hero-copy, .focus-panel { position: relative; z-index: 1; }
.hero-copy { min-width: 0; }
.intro { line-height: 1.8; font-size: 1.05rem; }
.focus-panel { background: #0b1915f5; border: 1px solid var(--line); border-radius: 5px; box-shadow: none; padding: 26px; }
.focus-row { border-color: var(--line); padding-block: 22px; }
.focus-row h2 { font-family: "Cascadia Code", Consolas, monospace; font-size: 1.1rem; font-weight: 400; text-transform: uppercase; color: var(--accent); letter-spacing: .015em; }
.focus-row p { font-size: .9rem; }
.panel-note { border-color: var(--line); letter-spacing: 0; font-size: .75rem; }
.motion-toggle { display: inline-block; margin-top: 15px; padding: 8px 0; min-height: 38px; border: 0; color: var(--muted); background: transparent; font: .72rem "Cascadia Code",Consolas,monospace; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.motion-toggle:hover { color: var(--accent); }
/* The canvas never intercepts clicks. A mask fades the code before it
   reaches the reading area. Text and the opaque panel sit above it. */
.matrix-rain { position: absolute; z-index: 0; top: 0; right: 0; width: 54%; height: 100%; opacity: .44; pointer-events: none; mask-image: linear-gradient(to right, transparent, #000 42%), linear-gradient(to bottom, #000 65%, transparent); mask-composite: intersect; }
.section { padding-block: clamp(48px,6vw,76px); }
.project-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.project-card { display: flex; flex-direction: column; min-width: 0; border-radius: 5px; background: #0c1914; }
.project-art { min-height: 180px; padding: 20px 24px; background: linear-gradient(120deg,#10261c,#0b1713); color: #8eb5a1; justify-content: flex-start; gap: 20px; }
.terminal-bar { display: flex; gap: 6px; align-items: center; font: .65rem Consolas,monospace; color: #a2b8ac; }
.terminal-bar i { width: 6px; height: 6px; border-radius: 50%; background: #5a8d72; }
.terminal-bar span { margin-left: 8px; }
.project-art pre { margin: 0; font: .78rem/1.65 Consolas,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.project-copy { width: 100%; padding: 26px; }
.project-copy h3 { font-size: 1.45rem; }
.project-copy .eyebrow { margin-bottom: 16px; font-size: .65rem; }
.badge { border-color: #3b5a49; background: #102319; color: #a8ddbd; }
.tags li { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.project-copy .project-availability { font-size: .78rem; color: var(--muted); }
.contact-section { background: #0e2018; }
.site-footer { font-size: .75rem; }
/* Creative mode keeps its own expressive heading and slightly richer green. */
body[data-side="creative"] { --paper: #081b14; --ink: #e8fff4; --muted: #b3cebf; --accent: #82e0b1; --line: #2c4b3a; --soft: #102e23; }
/* Responsive foundations now; device-specific polish can follow later. */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0,1fr); }
  .matrix-rain { width: 70%; opacity: .25; }
  .hero-copy { padding: 16px; margin: -16px; background: #091411ef; }
  .project-grid { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .matrix-rain { opacity: .18; }
}

/* 14. SCARLET CREATIVE SIDE
   A bright red environment distinguishes creative work from emerald IT work.
   White text and pale accents retain contrast on the deeper red surface. */
body[data-side="creative"] {
  --paper: #ae1029;
  --ink: #fff9f5;
  --muted: #ffe0e1;
  --accent: #fff1e8;
  --line: #ffffff55;
  --soft: #89142a;
  background: radial-gradient(ellipse at 78% 8%, #f13e50 0, transparent 60%),
              linear-gradient(140deg, #bd1530, #98102a);
}
body[data-side="creative"] .side-switch { border-color: #ffffff88; }
body[data-side="creative"] .creative-heading h1 span { color: #fff4ea; }
body[data-side="creative"] .empty-gallery {
  background: linear-gradient(145deg, #7b0b2255, #a90f2933);
  border-color: #ffffff66;
}
body[data-side="creative"] .creative-note,
body[data-side="creative"] .creative-intro,
body[data-side="creative"] .eyebrow { color: var(--muted); }

/* Contact form: visible labels, native validation, and a single-column
   layout on small screens keep the form usable without JavaScript. */
.contact-form { margin-top: 32px; display: grid; gap: 20px; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.contact-form label { display: grid; gap: 8px; min-width: 0; font-weight: 600; }
.contact-form input:not([type="hidden"]), .contact-form textarea {
  width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: #091813; color: #effaf4; font: inherit;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible {
  outline: 2px solid #6ee7b7; outline-offset: 3px;
}
.contact-form .button { justify-self: start; cursor: pointer; font: inherit; }
.contact-form p { max-width: 75ch; font-size: .875rem; }
.contact-form p a { text-decoration: underline; }
@media (max-width: 640px) { .contact-fields { grid-template-columns: 1fr; } }

