:root {
    --surface: #fbf7ec;       /* card white */
    --hairline: #ddd2bb;      /* sepia rule lines */
    --text-color: #1a1a1a;
    --bg-filter: none;
    --bg-image: url('assets/light-background.png');
    --frame-clr: #4d95f5;
}

[data-theme="dark"] {
    --surface: #0c0d10;
    --hairline: #3a3d42;
    --text-color: #ebf5ff;
    --bg-filter: brightness(0.5) saturate(0.85);
    --bg-image: url('assets/dark-background.jpg');
    --frame-clr: #19265b;
    --w7-w-grad: linear-gradient(to right,#35353566,#0000001a,#16161633),var(--w7-w-bg);
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    min-height: 100vh;
    color: var(--text-color);
    transition: color .3s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--bg-image);
    background-size: cover;
    filter: var(--bg-filter);
    transition: filter .3s ease;
    z-index: -1;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    background: var(--surface);
    color: var(--text-color);
    padding: 10px 16px;
    z-index: 1000;
    border-radius: 4px;
}
.skip-link:focus {
    left: 10px;
    top: 10px;
}

.container {
  display: grid;
  min-height: 100vh;
  gap: 15px;
  margin-top: 25px;
  margin-right: 100px;
  margin-left: 100px;
  grid-template-columns: 1fr;
  grid-template-rows: 120px 1fr;
  grid-template-areas: 
    "hd"
    "main";
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas: 
      "hd"
      "main";
      margin: 0px;
  }
  main {
    margin-bottom: 50px;
  }
}

@media (max-width: 480px) {
  .container {
    margin-top: 10px;
  }
  main > h1, .headings {
    font-size: 22px;
  }
}

@font-face{
  font-family: "Helvetica Neue Medium";
  src: url("assets/HelveticaNeue Medium.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

.headings {
  font-size: 35px;
}
.skill-title {
  font-size: 25px;
  margin: 0 0 6px;
}

header { grid-area: hd; padding: 10px; min-height: 40px; }
main { grid-area: main; min-height: 70vh; padding: 10px; font-family: "Helvetica Neue Medium", Arial, sans-serif}
h1, h2, p {
  font-family: "Helvetica Neue Medium", Arial, sans-serif;
  color: var(--text-color);
}
main > h1 {
  font-size: 25px;
}
p {
  font-size: 15px;
}

nav > ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 20px;
  justify-content: center;
  padding: 0;
  margin: 0;
}
header nav {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.nav-link {
  cursor: pointer;
}

.frame-parent {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* two cards per row */
    grid-template-rows: auto auto; 
    align-items: stretch;
    gap: 8px;
}

@media (max-width: 600px) {
  .frame-parent {
    grid-template-columns: 1fr; /* stack to a single column on narrow screens */
  }
  #frame-3 {
    grid-column: 1; 
  }
}

.frame-1 > h2 {
  font-size: 25px;
  margin: 0px;
}
.frame-1 {
  padding: 10px;
  background-color: transparent;
}

.frame-2 > h2 {
  font-size: 25px;
  margin: 0px;
}
.frame-2 {
  padding: 10px;
}
.frame-3 > h2 {
  font-size: 25px;
  margin: 0px;
}
.frame-3 {
  padding: 10px;
}

#bar1 {
  width: 85%;
}
#bar2 {
  width: 70%;
}
#bar3 {
  width: 60%;
}

/* cards fill cell; hover scale */
#frame-1,
#frame-2,
#frame-3 {
  height: 100%;
  display: flex;
  transition: transform .25s ease, box-shadow .25s ease;
  transform-origin: center;
}
#frame-3 {
  grid-column: 1 / -1; /* full width */
  grid-row: 2;
}
#frame-1:hover,
#frame-2:hover,
#frame-3:hover,
#frame-1:focus-within,
#frame-2:focus-within,
#frame-3:focus-within {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
  #frame-1, #frame-2, #frame-3 {
    transition: none;
  }
  #frame-1:hover, #frame-2:hover, #frame-3:hover {
    transform: none;
  }
  .win7 [role="progressbar"].animate > div:before {
    animation: none;
  }
}

#frame-1 > .win7,
#frame-2 > .win7,
#frame-3 > .win7,
#frame-1 .background,
#frame-2 .background,
#frame-3 .background,
#frame-1 .window,
#frame-2 .window,
#frame-3 .window {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

#frame-1 .window-body,
#frame-2 .window-body,
#frame-3 .window-body {
  flex: 1;
}

/* scroll-reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.window.glass.active {max-width: 100%; --w7-w-bg: var(--frame-clr);}

.window-body {
  --w7-surface: var(--surface);
}
/* hard overrides for buttons in dark mode */
[data-theme="dark"] .win7 button,
[data-theme="dark"] .win7 [role="button"] {
  background: linear-gradient(#3a3d42 45%, #33363b 45%, #1f2124) !important;
  border-color: #55585e !important;
  color: #f0f0f0 !important;
}
[data-theme="dark"] .win7 button:not(:disabled):hover:before,
[data-theme="dark"] .win7 [role="button"]:not(:disabled):hover:before {
  background: linear-gradient(#4a4e55, #35383e) !important;
}
[data-theme="dark"] .win7 button:not(:disabled).active:after,
[data-theme="dark"] .win7 button:not(:disabled):active:after,
[data-theme="dark"] .win7 [role="button"]:not(:disabled).active:after,
[data-theme="dark"] .win7 [role="button"]:not(:disabled):active:after {
  background: linear-gradient(#2c2f33, #1a1c1f) !important;
}
[data-theme="dark"] .win7 button:disabled,
[data-theme="dark"] .win7 [role="button"]:disabled {
  background: #2c2f33 !important;
  border-color: #45484d !important;
  color: #7a7d82 !important;
}


.win7 {
  /* type + shared element tokens */
  --w7-font: 9pt "Segoe UI", "SegoeUI", "Noto Sans", sans-serif;
  --w7-surface: #f0f0f0;
  /* button face colours + borders */
  --w7-el-bg: #f2f2f2;
  --w7-el-bg-d: #f4f4f4;
  --w7-el-bg-s-1: #ebebeb;
  --w7-el-bg-s-2: #cfcfcf;
  --w7-el-sd: inset 0 0 0 1px #fffc;
  --w7-el-sd-a: inset 1px 1px 0 #0003, inset -1px 1px 0 #0001;
  --w7-el-bd: #8e8f8f;
  --w7-el-bd-h: #3c7fb1;
  --w7-el-bd-a: #6d91ab;
  --w7-el-bd-d: #adb2b5;
  --w7-el-bdr: 3px;
  --w7-el-c-d: #838383;
  --w7-el-grad: linear-gradient(var(--w7-el-bg) 45%, var(--w7-el-bg-s-1) 45%, var(--w7-el-bg-s-2));
  --w7-el-grad-h: linear-gradient(#eaf6fd 45%, #bee6fd 0, #a7d9f5);
  --w7-el-grad-a: linear-gradient(#e5f4fc, #c4e5f6 30% 50%, #98d1ef 50%, #68b3db);
  /* window frame tokens */
  --w7-w-space: 6px;
  --w7-w-bd: #000000b3;
  --w7-w-bdr: 6px;
  --w7-w-bg: #4580c4;
  /* glass scanline streaks */
  --w7-w-glass: linear-gradient(135deg, #fff5 70px, transparent 100px),
                linear-gradient(225deg, #fff5 70px, transparent 100px),
                linear-gradient(54deg, #0002 0 4%, #6661 6% 6%, #0002 8% 10%, #0002 15% 16%, #aaa1 17% 18%, #0002 23% 24%, #bbb2 25% 26%, #0002 31% 33%, #0002 34% 34.5%, #bbb2 36% 40%, #0002 41% 41.5%, #bbb2 44% 45%, #bbb2 46% 47%, #0002 48% 49%, #0002 50% 50.5%, #0002 56% 56.5%, #bbb2 57% 63%, #0002 67% 69%, #bbb2 69.5% 70%, #0002 73.5% 74%, #bbb2 74.5% 79%, #0002 80% 84%, #aaa2 85% 86%, #0002 87%, #bbb1 90%) left center / 100vw 100vh no-repeat fixed;
  --w7-w-grad: linear-gradient(to right, #ffffff66, #0000001a, #ffffff33), var(--w7-w-bg);
  /* progress bar fill colours */
  --w7-pg-bg: #0bd82c;
  --w7-pg-bg-paused: #e6df1b;
  --w7-pg-bg-error: #ef0000;
}

/* ---- window frame ---- */

.win7 .window {
  border: 1px solid var(--w7-w-bd);
  border-radius: var(--w7-w-bdr);
  box-shadow: 2px 2px 10px 1px var(--w7-w-bd), inset 0 0 0 1px #fffa;
  font: var(--w7-font);
  position: relative;
  z-index: 0;
}

/* the glass sheen layer sits behind the content inside the frame */
.win7 .window:before {
  background: linear-gradient(transparent 20%, #ffffffb3 40%, transparent 41%), var(--w7-w-grad);
  background-color: var(--w7-w-bg);
  border-radius: var(--w7-w-bdr);
  box-shadow: inset 0 0 0 1px #fffd;
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -1;
}

.win7 .window-body {
  background: var(--w7-surface);
  border: 1px solid var(--w7-w-bd);
  box-shadow: 0 0 0 1px #fff9;
  margin: var(--w7-w-space);
  margin-top: 0;
}

.win7 .window-body.has-space {
  padding: var(--w7-w-space);
}

/* blur what's behind the glass */
.win7 .window.glass:before {
  opacity: .6;
}

.win7 .window.glass:after {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: var(--w7-w-bdr);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -10;
}

/* title bar */

.win7 .title-bar {
  align-items: center;
  background: var(--w7-w-grad);
  background-color: var(--w7-w-bg);
  border: 1px solid var(--w7-w-bd);
  border-radius: var(--w7-w-bdr) var(--w7-w-bdr) 0 0;
  box-shadow: inset 0 0 0 1px #fff9;
  display: flex;
  font: var(--w7-font);
  justify-content: space-between;
  padding: var(--w7-w-space);
  padding-top: 0;
}

.win7 .window.glass > .title-bar {
  background: var(--w7-w-glass);
  background-attachment: fixed;
}

.win7 .window > .title-bar {
  border: 0;
  box-shadow: inset 0 1px 0 #fffd, inset 1px 0 0 #fffd, inset -1px 0 0 #fffd;
}

.win7 .title-bar-text {
  color: #000;
  letter-spacing: 0;
  line-height: 15px;
  padding-top: var(--w7-w-space);
  /* stacked white glow that keeps the text readable over the glass */
  text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff,
               0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff;
}

/* buttons */

.win7 button,
.win7 [role="button"] {
  background: var(--w7-el-grad);
  border: 1px solid var(--w7-el-bd);
  border-radius: var(--w7-el-bdr);
  box-shadow: var(--w7-el-sd);
  box-sizing: border-box;
  color: #222;
  font: var(--w7-font);
  min-height: 23px;
  min-width: 75px;
  padding: 0 12px;
  position: relative;
  text-align: center;
  z-index: 0;
}

.win7 button:after,
.win7 button:before,
.win7 [role="button"]:after,
.win7 [role="button"]:before {
  content: "";
  height: 100%;
  left: 0;
  margin: 0;
  opacity: 0;
  padding: 0;
  position: absolute;
  top: 0;
  transition: opacity .3s;
  width: 100%;
  z-index: -1;
}

.win7 button:before,
.win7 [role="button"]:before {
  background: var(--w7-el-grad-h);
  border-radius: var(--w7-el-bdr);
  box-shadow: var(--w7-el-sd);
}

.win7 button:after,
.win7 [role="button"]:after {
  background: var(--w7-el-grad-a);
  border-radius: 2px;
  box-shadow: var(--w7-el-sd-a);
}

.win7 button:not(:disabled):hover,
.win7 [role="button"]:not(:disabled):hover {
  border-color: var(--w7-el-bd-h);
  transition: border-color .3s;
}

.win7 button:not(:disabled):hover:before,
.win7 [role="button"]:not(:disabled):hover:before {
  opacity: 1;
  transition: opacity .3s;
}

.win7 button:not(:disabled):not(:hover),
.win7 [role="button"]:not(:disabled):not(:hover) {
  border-color: var(--w7-el-bd);
  transition: border-color 1s linear;
}

.win7 button:not(:disabled):not(:hover):before,
.win7 [role="button"]:not(:disabled):not(:hover):before {
  opacity: 0;
  transition: opacity 1s linear;
}

.win7 button:not(:disabled):active,
.win7 button:not(:disabled).active,
.win7 [role="button"]:not(:disabled):active,
.win7 [role="button"]:not(:disabled).active {
  border-color: var(--w7-el-bd-a);
  transition: border-color .3s;
}

.win7 button:not(:disabled):active:after,
.win7 button:not(:disabled).active:after,
.win7 [role="button"]:not(:disabled):active:after,
.win7 [role="button"]:not(:disabled).active:after {
  opacity: 1;
  transition: opacity .3s;
}

.win7 button:disabled,
.win7 [role="button"]:disabled {
  background: var(--w7-el-bg-d);
  border-color: var(--w7-el-bd-d);
  color: var(--w7-el-c-d);
}

.win7 button:focus-visible,
.win7 [role="button"]:focus-visible {
  box-shadow: inset 0 0 0 2px #98d1ef;
  outline: 1px dotted #000;
  outline-offset: -4px;
}

/* glow for keyboard focus*/
.win7 button:focus,
.win7 [role="button"]:focus {
  animation: win7-focus-pulse 1s ease infinite alternate;
  background-image: var(--w7-el-grad-h);
  border-color: #5586a3;
}

@keyframes win7-focus-pulse {
  from { box-shadow: inset 0 0 3px 1px #34deffdd; }
  to   { box-shadow: inset 0 0 1px 1px #34deffdd; }
}

/* progress bars */

.win7 [role="progressbar"] {
  background: radial-gradient(circle at 0 50%, #0000001f 10px, transparent 30px),
              radial-gradient(circle at 100% 50%, #0000001f 10px, transparent 30px),
              linear-gradient(180deg, #f3f3f3af, #fcfcfcaf 3px, #dbdbdbaf 6px, #cacacaaf 0, #d5d5d5af),
              #ddd;
  border: 1px solid var(--w7-el-bd);
  border-radius: var(--w7-el-bdr);
  box-shadow: inset 0 0 0 1px #f3f3f388, 0 0 0 1px #eaeaea88;
  height: 15px;
  margin: 2px 0;
  overflow: hidden;
}

.win7 [role="progressbar"] > div {
  background-color: var(--w7-pg-bg);
  background-image: linear-gradient(180deg, #f3f3f3af, #fcfcfcaf 3px, #dbdbdbaf 6px, transparent 0),
                    radial-gradient(circle at 0 50%, #0000002f 10px, transparent 30px),
                    radial-gradient(circle at 100% 50%, #0000002f 10px, transparent 30px),
                    linear-gradient(180deg, transparent 65%, #ffffff55),
                    linear-gradient(180deg, transparent 6px, #cacaca33 0, #d5d5d533);
  box-shadow: inset 0 0 0 1px #ffffff1f;
  height: 100%;
  overflow: hidden;
}

.win7 [role="progressbar"].paused > div {
  background-color: var(--w7-pg-bg-paused);
}

.win7 [role="progressbar"].error > div {
  background-color: var(--w7-pg-bg-error);
}

.win7 [role="progressbar"].animate > div:before {
  animation: win7-bar-sheen 3s linear infinite;
  background: linear-gradient(90deg, transparent, #ffffff80, transparent 40%);
  content: "";
  display: block;
  height: 100%;
}

@keyframes win7-bar-sheen {
  0%  { transform: translateX(-40%); }
  60% { transform: translateX(100%); }
  100%{ transform: translateX(100%); }
}

/* ---- print ----*/
@media print {
  body::before {
    display: none;
  }
  .win7 .window,
  .win7 .window-body,
  .win7 .title-bar {
    background: #ffffff;
    border: 0;
    box-shadow: none;
  }
  .win7 .window:before,
  .win7 .window.glass:after {
    display: none;
  }

  .win7 .window .title-bar {
    display: none;
  }

  header nav {
    display: none;
  }
  h1, h2, p {
    color: #000;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .frame-parent {
    grid-template-columns: 1fr;
  }

  .win7 [role="progressbar"] > div {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* link-as-button tweaks: same chrome as real buttons */
.win7 a[role="button"] {
  display: inline-block;
  text-decoration: none;
  line-height: 21px;
}
.win7 a[role="button"]:visited {
  color: #222;
}
[data-theme="dark"] .win7 a[role="button"]:visited {
  color: #f0f0f0 !important;
}
