:root {
  --ink: #09284d;
  --blue: #087cc0;
  --cyan: #11b6e9;
  --violet: #705fe7;
  --paper: #f7fbff;
  --muted: #60778d;
  --line: rgba(12, 67, 116, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 4%, rgba(17, 182, 233, .22), transparent 32rem),
    radial-gradient(circle at 2% 96%, rgba(112, 95, 231, .15), transparent 30rem),
    #d8ebfb;
  font-family: "DM Sans", sans-serif;
}

.page-shell {
  width: min(1320px, calc(100% - 40px));
  margin: 20px auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 30px;
  background:
    linear-gradient(rgba(45, 122, 181, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 122, 181, .05) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  box-shadow: 0 28px 90px rgba(22, 68, 112, .18);
}

.page-nav {
  min-height: 84px;
  padding: 18px clamp(22px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 251, 255, .76);
  backdrop-filter: blur(14px);
}

.brand-link { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 700 16px "Manrope", sans-serif; }
.brand-link img { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 7px 18px rgba(20, 77, 124, .12); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 9px 13px; border-radius: 999px; color: #45657f; text-decoration: none; font: 700 13px "Manrope", sans-serif; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { color: var(--blue); background: rgba(8, 124, 192, .09); }

.page-hero {
  position: relative;
  padding: clamp(54px, 8vw, 108px) clamp(22px, 5.5vw, 78px) clamp(45px, 6vw, 78px);
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  top: -175px;
  right: -80px;
  border: 1px solid rgba(8, 124, 192, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(8,124,192,.035), 0 0 0 118px rgba(8,124,192,.025);
}

.iot-page .page-hero::after { border-color: rgba(112,95,231,.19); box-shadow: 0 0 0 58px rgba(112,95,231,.04), 0 0 0 118px rgba(112,95,231,.025); }
.hero-kicker { margin: 0 0 16px; color: var(--blue); font: 700 13px "Manrope", sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.iot-page .hero-kicker { color: var(--violet); }
.page-hero h1 { max-width: 900px; margin: 0; font: 600 clamp(48px, 7vw, 92px)/.98 "Manrope", sans-serif; letter-spacing: -.065em; }
.page-hero h1 em { color: var(--blue); font-style: normal; }
.iot-page .page-hero h1 em { color: var(--violet); }
.hero-intro { max-width: 740px; margin: 25px 0 0; color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.65; }

.portfolio-section { padding: 0 clamp(22px, 5.5vw, 78px) clamp(62px, 7vw, 90px); }
.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 23px; padding-top: 24px; border-top: 1px solid var(--line); }
.section-bar h2 { margin: 0; font: 700 14px "Manrope", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.section-bar span { color: #7890a6; font-size: 13px; }

.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.skill-tile {
  min-height: 290px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(10, 78, 130, .12);
  border-radius: 22px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 34px rgba(20, 70, 110, .075);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.skill-tile:hover { transform: translateY(-4px); border-color: rgba(8,124,192,.3); box-shadow: 0 20px 42px rgba(20,70,110,.13); }
.iot-page .skill-tile:hover { border-color: rgba(112,95,231,.34); }

.tile-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 17px; color: var(--blue); background: linear-gradient(145deg, rgba(17,182,233,.13), rgba(8,124,192,.07)); }
.iot-page .tile-icon { color: var(--violet); background: linear-gradient(145deg, rgba(112,95,231,.15), rgba(17,182,233,.08)); }
.tile-icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile-meta { margin: 26px 0 8px; color: #7a91a6; font: 700 11px "Manrope", sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.skill-tile h3 { margin: 0; font: 650 clamp(23px, 2.1vw, 30px)/1.08 "Manrope", sans-serif; letter-spacing: -.035em; }
.skill-tile > p:last-of-type { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.58; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 22px; }
.tag-row span { padding: 6px 9px; border-radius: 999px; color: #4f708a; background: #edf6fc; font-size: 12px; line-height: 1; }
.iot-page .tag-row span { color: #5e59a5; background: #f0effd; }

.page-footer { padding: 24px clamp(22px, 5.5vw, 78px); display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: #718a9f; font-size: 12px; }
.page-footer a { color: var(--ink); text-decoration: none; font-weight: 700; }

@media (max-width: 980px) { .tile-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) {
  .page-shell { width: 100%; margin: 0; border: 0; border-radius: 0; }
  .page-nav { align-items: flex-start; }
  .brand-link span { display: none; }
  .nav-links { flex-wrap: wrap; justify-content: flex-end; }
  .nav-links a { padding: 8px 9px; font-size: 12px; }
  .page-hero h1 { font-size: clamp(46px, 15vw, 66px); }
  .tile-grid { grid-template-columns: 1fr; }
  .skill-tile { min-height: 270px; }
  .section-bar span { display: none; }
  .page-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
