/* Fonts saved with the site (SIL Open Font License, see fonts/OFL-*.txt) */
@font-face { font-family: "Orbitron"; src: url("fonts/orbitron-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Orbitron"; src: url("fonts/orbitron-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Orbitron"; src: url("fonts/orbitron-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("fonts/exo-2-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("fonts/exo-2-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("fonts/exo-2-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("fonts/exo-2-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

/* Colors used on the page. Change them here and they change everywhere. */
:root {
  --orange: #f7a046;
  --lilac:  #c69fd5;
  --blue:   #8fa8e8;
  --peach:  #f2c18d;
  --rose:   #e0838c;
  --gold:   #e3c565;
  --mint:   #9fd3c1;
  --text:   #f8f6f2;       /* near-white text */
  --bar-blue: #316094;     /* the blue of the home icon */

  --glow-blue: #5d8cc4;    /* outline and glow of the menu buttons */
}

/* The whole page */
body {
  max-width: 760px;        /* keeps text from getting too wide */
  margin: 24px auto;       /* centers the page */
  padding: 0 16px;
  background-color: #000000;
  color: var(--text);
  /* Main text font (saved in fonts/) */
  font-family: "Exo 2", sans-serif;
  font-size: 1.05em;
  letter-spacing: 0.2px;
  line-height: 1.6;
}

/* Home icon, then the top bar */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

/* Top bar: rounded on the left, cut straight on the right */
header {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 24px;
  background-color: var(--bar-blue);
  color: var(--text);
  border-radius: 40px 0 0 40px;
}

header .name {
  margin-left: auto;
  text-align: right;
}

/* Home icon (your drawing) in the top-left corner */
.home img {
  display: block;
  border: 2px solid var(--glow-blue);     /* same outline and glow as the menu */
  border-radius: 20%;     /* square with rounded corners */
  box-shadow: 0 0 8px var(--glow-blue);
}

.home:hover img {
  box-shadow: 0 0 14px var(--glow-blue);
}

h1 {
  margin: 0;
  line-height: 1.2;
  font-family: "Orbitron", sans-serif;
  font-size: 1.9em;
  font-weight: 900;       /* extra bold */
  letter-spacing: 2px;
}

/* "tommy" in the top bar links back to the homepage */
h1 a,
h1 a:hover {
  color: inherit;
  text-decoration: none;
}

.tagline {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 0.85em;
  letter-spacing: 1px;
}

/* Two columns: button menu on the left, page content on the right */
.layout {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 90px;               /* space between the buttons and the text */
  align-items: start;
}

/* The menu buttons */
nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

nav a {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: 0.8em;
  padding: 6px 16px;
  line-height: 1.4;
  color: var(--text);
  background-color: #000000;
  border: 2px solid var(--glow-blue);
  border-right: none;
  border-radius: 24px 0 0 24px;
  box-shadow: 0 0 8px var(--glow-blue);   /* soft glow, like a lit console */
  text-align: right;
  font-weight: bold;
  letter-spacing: 1px;
  text-decoration: none;
}

/* The button of the page you're on reaches over to its content */
/* The page you're on is filled with your blue */
nav a[aria-current="page"] {
  background-color: var(--bar-blue);
}

nav a:hover {
  color: var(--text);
  box-shadow: 0 0 14px var(--glow-blue);
}



/* The page content next to the menu */
main p,
main ul {
  margin: 0;
  padding-top: 20px;
}

ul {
  padding-left: 20px;
  list-style: square;
}

/* A line of text with a picture on its left (globe in about me) */
.with-icon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.with-icon img {
  flex-shrink: 0;
}

/* More space after the globe line (about me) */
.with-icon + p {
  margin-top: 0;
  padding-top: 14px;
  margin-bottom: 28px;    /* black space before the bottom bar */
}

/* Space between bullet points */
li + li {
  margin-top: 24px;
}

/* Language names (languages page) */
.lang {
  font-weight: bold;
  font-style: italic;
}

/* Field of study in education bullets */
.field {
  font-size: 18px;
  font-weight: bold;
  font-style: italic;
}

/* Bigger second line in education bullets (the university) */
.second-line {
  font-size: 16px;
}

/* Extra space between bullet points with two lines each (education) */
.spaced li + li {
  margin-top: 32px;
}

/* Tighter lists on long pages (education, languages) */
main ul.compact {
  padding-top: 12px;
  line-height: 1.3;
}

ul.compact li + li {
  margin-top: 12px;
}

/* Education: degree line 16px */
ul.spaced.compact {
  font-size: 16px;
}

ul.spaced.compact li + li {
  margin-top: 10px;
}

li::marker {
  color: var(--orange);
}

/* Links */
a {
  color: var(--blue);
}

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

/* Bottom bar with the Mastodon link inside */
footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* three equal columns, mastodon in the middle */
  justify-items: center;
  align-items: center;
  gap: 12px 16px;
  margin-top: 16px;
  padding: 12px 30px;
  background-color: var(--bar-blue);
  border-radius: 0 0 0 40px;
}

footer a {
  color: var(--text);
}

footer a:hover {
  color: var(--orange);
}

footer svg,
main li svg {
  width: 1.1em;
  height: 1.1em;
  margin-right: 6px;
  vertical-align: -0.15em;
  fill: currentColor;      /* same color as the link */
}

/* Mastodon logo a bit bigger (1.2x) */
footer a[rel="me"] svg {
  width: 1.32em;
  height: 1.32em;
  vertical-align: -0.25em;
}

/* Logos after the text in lists (skills) */
main li svg {
  width: 2.2em;
  height: 2.2em;
  margin-right: 0;
  margin-left: 10px;
  vertical-align: middle;
}

/* On phones: menu buttons in rows above the content */
@media (max-width: 500px) {
  h1 {
    font-size: 1.45em;     /* so "tomoka / tommy" fits on one line next to the icon */
    letter-spacing: 2px;
  }

  .topbar {
    gap: 10px;
  }

  header {
    padding: 8px 16px;
  }

  .home img {
    width: 48px;
    height: 48px;
  }

  .with-icon img {
    width: 96px;           /* smaller globe so the text has room */
    height: 96px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  footer {
    grid-template-columns: 1fr;            /* stacked on phones */
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  nav a {
    border-radius: 24px;
    text-align: center;
  }

  nav a {
    border-right: 2px solid var(--glow-blue);
  }
}
