/* =========================================================
   GLOBAL RESET (Meyer reset)
   ========================================================= */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, centre,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video{
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section{
  display: block;
}
body{ line-height: 1; }
ol, ul{ list-style: none; }
blockquote, q{ quotes: none; }
blockquote::before, blockquote::after,
q::before, q::after{ content: ""; }
table{ border-collapse: collapse; border-spacing: 0; }
*{ box-sizing: border-box; }

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root{
  --ink: #111111;
  --ink-strong: #083D77;
  --accent: #DA4167;
  --brand: #24DAEB;
  --brand-strong: #25b9eb;

  --bg: #ffffff;
  --card-bg: #ffffff;
  --card-border: #dfeaf1;

  --obj-1: #7c5cff;
  --obj-2: #34d399;
  --obj-3: #f59e0b;

  --glow: 0 10px 30px rgba(0,0,0,.18);

  --maxw: 1100px;
  --gutter: 20px;
}

/* =========================================================
   BASE TYPE AND PAGE SETUP
   ========================================================= */
html, body{
  height: 100%;
}

body{
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  background: radial-gradient(circle at top, #f9fcff 0, #ffffff 55%);
  color: var(--ink);
  line-height: 1.6;

  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
}

/* repeating SVG background */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("images/background.svg");
  background-repeat: repeat;
  background-size: 500px;
  opacity: 0.4;
  z-index: -1;
}

main{
  flex: 1;
  color: var(--ink-strong);
  max-width: var(--maxw);
  margin: 60px auto;
  padding: 0 var(--gutter);
  text-align: left;
}

/* Headings */
h1, h2, h3, nav a{
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* =========================================================
   HEADER
   ========================================================= */
header{
  background: #fff;
  border-bottom: 1px solid var(--accent);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

h1{
  font-size: 1.6rem;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  background: none;
  color: var(--ink-strong);
}

header a{
  display: inline-block;
  margin: 0;
  padding: 5px;
}
header img{
  max-width: 100%;
  height: auto;
  width: 150px;
}
header a:hover img{
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

/* =========================================================
   NAV (if used elsewhere)
   ========================================================= */
nav ul{
  display: flex;
  gap: 14px;
}
nav ul li{
  position: relative;
}
nav ul li > a{
  display: block;
  text-decoration: none;
  font-weight: 600;
  color: #ffffff;
  background: #47cfff;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background .2s ease;
}
nav ul li > a:hover{
  background: var(--brand-strong);
}
nav ul ul{
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #f4fbff;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 0;
  min-width: 220px;
  z-index: 10;
  flex-direction: column;
}
nav ul li:hover > ul{
  display: flex;
}
nav ul ul li a{
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  padding: 8px 14px;
}
nav ul ul li a:hover{
  background: #47cfff;
  color: #ffffff;
}

/* =========================================================
   HERO LAYOUT: HERO LEFT + PROJECTS SIDEBAR RIGHT
   ========================================================= */
#hero-layout{
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 140px;   /* was 60px */
  align-items: start;
}

/* hero container on the left */
#intro{
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 0 80px;
}

/* Wrapper around selfie + icons */
#intro-portrait{
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

/* Selfie image */
#intro-portrait > img{
  width: 100%;
  height: auto;
  display: block;
}

/* Base style for sprite icons */
.corner-link{
  position: absolute;
  width: 140px;
  height: 140px;
  background-image: url("images/icons-sprite.svg");
  background-repeat: no-repeat;
  background-size: 560px 140px;
  transition: transform .2s ease;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.1));
}

/* Sprite positions */
.icon-home    { background-position:    0px 0; }
.icon-about   { background-position: -140px 0; }
.icon-modules { background-position: -280px 0; }
.icon-contact { background-position: -420px 0; }

/* Labels under icons */
.corner-link span{
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px;

  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;

  background: var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

/* Corner placements */
.corner-top-left{
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
}
.corner-top-right{
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
}
.corner-bottom-left{
  bottom: 100px;
  left: -60px;
  transform: translate(-50%, 50%);
}
.corner-bottom-right{
  bottom: 100px;
  right: -40px;
  transform: translate(50%, 50%);
}

/* Hover animations per corner */
.corner-top-left:hover{
  transform: translate(-50%, -50%) scale(1.06);
}
.corner-top-right:hover{
  transform: translate(50%, -50%) scale(1.06);
}
.corner-bottom-left:hover{
  transform: translate(-50%, 50%) scale(1.06);
}
.corner-bottom-right:hover{
  transform: translate(50%, 50%) scale(1.06);
}

/* Modules dropdown group */
.corner-group{
  position: absolute;
}
.corner-dropdown{
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #f4fbff;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 0;
  min-width: 220px;
  z-index: 50;
}
.corner-dropdown li a{
  display: block;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
}
.corner-dropdown li a:hover{
  background: #47cfff;
  color: #fff;
}
.corner-group:hover .corner-dropdown{
  display: block;
}

/* =========================================================
   PROJECTS SIDEBAR (RIGHT)
   ========================================================= */
#projects-sidebar{
  align-self: start;
  padding-top: 0px;
}

#projects-sidebar h2{
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.mini-doodle{
  width: 120px;
  vertical-align: middle;
}

#projects-sidebar .projects-intro{
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0.8;
  margin: 12px 0 24px;
}

/* Card look for each project */
#projects-sidebar article{
  background: #fff;
  border-radius: 20px;
  padding: 18px 20px 22px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.03);
  position: relative;
  margin-bottom: 18px;
}

#projects-sidebar article h3{
  font-size: 1rem;
  margin-bottom: 4px;
}

#projects-sidebar article p{
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* =========================================================
   GENERIC CARD STYLES FOR OTHER PAGES
   (objects page etc.)
   ========================================================= */
section article a{
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--glow);
  transform: translateZ(0);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  isolation: isolate;
}
section article a:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
}
section article a::after{
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 60% at 100% 0%, rgba(255,255,255,.18), transparent 50%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
section article a:hover::after{
  opacity: 1;
}
section article img{
  width: 100%;
  height: clamp(180px, 22vw, 240px);
  object-fit: cover;
  display: block;
  border-bottom: 0;
  transition: transform .35s ease;
}
section article a:hover img{
  transform: scale(1.04);
}

/* =========================================================
   OVERRIDES FOR SIDEBAR GO ICON LINKS
   ========================================================= */
/* kill card styles & overlay for the go icon links */
#projects-sidebar article > a.go-link{
  display: block;
  align-items: right;
  margin-top: -4px;   /* space below text */
  margin-left: auto;  /* push to the right */
  width: auto;
  height: auto;
  background: none;
  padding: 0;
  border: none;
  box-shadow: none;
}

#projects-sidebar article > a.go-link::after{
  content: none;
}

/* icon itself */
#projects-sidebar article > a.go-link img{
  width: 80px;
  height: auto;
  display: block;
  object-fit: contain;
}

/* hover animation for icon */
#projects-sidebar article > a.go-link:hover{
  transform: translateX(4px);
  transition: transform .25s ease;
}

/* =========================================================
   ABOUT ME PAGE GRID
   ========================================================= */
#about-me{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
  margin-top: 28px;
}

#about-me .about-inline{
  width: 180px;
  margin: 20px auto;
  display: block;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer{
  text-align: center;
  color: var(--ink-strong);
  font-size: 0.85rem;
  margin-top: 60px;
  border-top: 1px solid var(--accent);
  padding: 20px 0;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px){
  #hero-layout{
    grid-template-columns: 1fr;
    gap: 40px;
  }

  #projects-sidebar{
    padding-top: 0;
  }

  #intro{
    padding: 40px 0 40px;
  }
}

@media (max-width: 700px){
  nav ul{
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 520px){
  h1{
    font-size: 1.3rem;
  }
}
/* =========================================================
   MOBILE TWEAKS FOR HERO + CARDS
   ========================================================= */
@media (max-width: 600px){

    /* Fix sprite positions for the smaller sprite on mobile */
  .icon-home    { background-position:    0px 0; }
  .icon-about   { background-position:  -90px 0; }
  .icon-modules { background-position: -180px 0; }
  .icon-contact { background-position: -270px 0; }

  /* overall spacing */
  main{
  margin-top: 100px    padding: 0 16px;
  }

  /* hero selfie smaller */
  #intro{
    padding: 32px 0 32px;
  }

  #intro-portrait{
    max-width: 200px;
  }

  /* icons smaller */
  .corner-link{
    width: 90px;
    height: 90px;
    background-size: 360px 90px;
  }

  /* labels tighter to the icon */
  .corner-link span{
    font-size: 11px;
    padding: 4px 8px;
    /* instead of sitting a full icon-height below,
       we nudge them just a little below the sprite */
    top: 80%;
    margin-top: 20px;
  }

  /* mobile positions – push icons out of the selfie frame */
  .corner-top-left{
    top: -10px;   /* higher */
    left: 0px;
  }

  .corner-top-right{
    top: -20px;
    right: 0px;
  }

  .corner-bottom-left{
    bottom: 30px;  /* a bit outside the frame */
    left: -40px;
  }

  .corner-bottom-right{
    bottom: -45px;
    right: 0px;
  }

   /* More breathing room between hero and Latest Projects */
  #projects-sidebar{
    margin-top: 100px;   /* tweak this number to taste */
  }
}

/* =========================================================
   THREE DESIGNED OBJECTS LAYOUT (no classes)
   Pattern: main > h1 + p + section
   ========================================================= */

/* Page heading on objects page */
main > h1 + p {
  /* intro paragraph immediately after the h1 */
  font-size: 1rem;
  opacity: 0.85;
  margin: 6px 0 22px;
}

/* The section that comes right after that intro paragraph */
main > h1 + p + section {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Make each card a bit softer */
main > h1 + p + section article a {
  border-radius: 22px;
}

/* Images in those cards */
main > h1 + p + section article img {
  border-radius: 22px 22px 0 0;
  height: 260px;
  object-fit: cover;
}

/* Titles inside the cards */
main > h1 + p + section article h2 {
  font-size: 1rem;
  padding: 10px 16px 2px;
}

/* Descriptions inside the cards */
main > h1 + p + section article p {
  font-size: 0.95rem;
  padding: 0 16px 14px 16px;
}

/* =========================================================
   GLOBAL HEADER (matches your objects header style)
   ========================================================= */

header{
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--accent);
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
}

/* Name style */
header h1{
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink-strong);
}

/* Nav layout */
nav ul{
  display: flex;
  gap: 8px;
}

nav ul li{
  position: relative;
}

/* Nav pills */
nav ul li > a{
  display: block;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease;
}

/* Active tab for Three Designed Objects */
nav a[href*="objects.html"]{
  background: var(--brand);
  color: #fff;
}

/* Other tabs softer */
nav a[href]:not([href*="objects.html"]){
  background: #e4f7ff;
  color: var(--ink-strong);
}

nav a[href]:not([href*="objects.html"]):hover{
  background: var(--brand-strong);
  color: #fff;
  transform: translateY(-1px);
}

/* =========================================================
   CLEAN CONTENT LINKS — GLOBAL FIX
   ========================================================= */

main a{
  color: var(--ink-strong);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color .2s ease, color .2s ease;
}

/* hover: simple underline that matches brand vibe */
main a:hover{
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* visited links should NOT turn purple */
main a:visited{
  color: var(--ink-strong);
}