/* =========================================================
   FREDDIE MONTILLA JR. - PORTFOLIO
   Mobile-first CSS. The base styles are for small screens.
   All responsive rules are grouped at the bottom in one desktop breakpoint.
   ========================================================= */

/* Reusable colors, borders, and sizes used throughout the website. */

:root {
  --navy: #040b18;
  --navy-light: #0b1d34;
  --card: #0d223c;
  --blue: #3b82f6;
  --cyan: #38bdf8;
  --white: #f8fbff;
  --text: #d7e4f2;
  --muted: #8ea4bd;
  --line: rgba(148, 184, 220, 0.16);
  --radius: 18px;
}

/* -------------------- RESET / BASE -------------------- */

/* Resets default spacing and keeps element sizing predictable. */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Makes anchor-link navigation scroll smoothly between sections. */

html {
  scroll-behavior: smooth;
}

/* Sets the main font, text color, page background, and prevents horizontal overflow. */

body {
  min-width: 320px;
  overflow-x: hidden;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.13),
      transparent 28rem
    ),
    linear-gradient(180deg, var(--navy), #071426);
}

/* Keeps images responsive and prevents them from overflowing their containers. */

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Removes the default link underline and uses the surrounding text color. */

a {
  color: inherit;
  text-decoration: none;
}

/* Removes the default bullet style from lists. */

ul {
  list-style: none;
}

/* Shows a clear outline when navigating with the keyboard. */

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

/* Centers page content and limits its maximum width. */

.container {
  width: min(100% - 2rem, 1160px);
  margin-inline: auto;
}

/* Adds consistent spacing to each main page section. */

.section {
  padding: 2rem 0;
  scroll-margin-top: 76px;
}

/* Shared text color and line spacing for all headings. */

h1,
h2,

/* Smaller heading size used inside content blocks. */

h3 {
  color: var(--white);
  line-height: 1.12;
}

/* Main hero heading size. */

h1 {
  margin-top: 0;
  font-size: clamp(3rem, 15vw, 4.5rem);
}

/* Adds the blue-to-cyan gradient effect to part of the main name. */

h1 span {
  background: linear-gradient(90deg, #b8d5ff, var(--cyan));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* Section heading size and spacing. */

h2 {
  font-size: clamp(2rem, 10vw, 3rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1.1rem;
}

/* Uses the muted text color for paragraph content. */

p {
  color: var(--muted);
}

/* Small uppercase labels used above section and project headings. */

.section-kicker,
.project-label {
  color: var(--cyan);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Adds space below each section heading. */

.section-heading {
  margin-bottom: 2rem;
}

/* Arranges heading content using a simple grid layout. */

.section-heading-row {
  display: grid;
  gap: 0.8rem;
}

/* Keeps the section description readable without stretching too wide. */

.section-note {
  max-width: 480px;
}

/* -------------------- HEADER / NAVIGATION -------------------- */

/* Keeps the navigation bar visible at the top while scrolling. */

.site-header {
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 11, 24, 0.92);
  backdrop-filter: blur(14px);
  position: sticky;
}

/* Places the brand and navigation controls on opposite sides of the header. */

.nav-wrap {
  display: flex;
  align-items: center;
  min-height: 70px;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

/* Aligns the ScriptHex brand content in one row. */

.brand {
  display: inline-flex;
  align-items: center;
}

/* Wrapper for the ScriptHex logo image. */

.brand-mark {
  display: block;
}

/* Controls the displayed size of the ScriptHex logo. */

.brand-mark img {
  display: block;
  width: 150px;
  height: auto;
}

/* Creates the mobile hamburger menu button. */

.hamburger {
  display: flex;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Creates the three horizontal lines inside the hamburger button. */

.hamburger span {
  border-radius: 10px;
  background: #c8d8e8;
  width: 20px;
  height: 2px;
  transition: 0.2s ease;
}

/* Hidden checkbox used to open and close the CSS-only mobile menu. */

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Styles and hides the mobile navigation panel until the menu is opened. */

.main-nav {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: min(200px, calc(100vw - 2rem));
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 20, 38, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 45px rgba(47, 57, 76, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: 0.2s ease;
}

/* Shows the mobile navigation when the hidden checkbox is checked. */

.nav-toggle:checked ~ .main-nav {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Turns the hamburger lines into an X when the menu is open. */

.nav-toggle:checked + .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle:checked + .hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-toggle:checked + .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Arranges the navigation links vertically on mobile. */

.nav-links {
  display: grid;
  gap: 0.2rem;
}

/* Styles each navigation link. */

.nav-links a {
  display: block;
  padding: 0.4rem 1rem;
  border-radius: 9px;
  color: #b7c8da;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Highlights navigation links when hovered or keyboard-focused. */

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(59, 130, 246, 0.1);
  color: var(--white);
}

/* -------------------- BUTTONS -------------------- */

/* Shared button style used by the hero and other action links. */

.btn {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: transform 0.2s ease;
}

/* Slightly enlarges buttons when hovered or keyboard-focused. */

.btn:hover,
.btn:focus-visible {
  transform: scale(1.06);
}

/* Primary blue call-to-action button. */

.btn-primary {
  border-color: transparent;
  background: linear-gradient(110deg, var(--blue), #139fe7);
  color: white;
  box-shadow: 0 14px 32px rgba(59, 130, 246, 0.2);
}

/* Secondary button used for downloading the resume. */

.resume-btn {
  background: rgba(255, 255, 255, 0.02);
  color: #dbe9f7;
}

/* -------------------- HERO -------------------- */

/* Main home section that fills most of the first screen. */

.hero {
  position: relative;
  min-height: calc(100svh - 64px);
  padding: 1.2rem 0 1.5rem;
}

/* Controls the mobile order of the intro, profile, and description. */

.hero-grid {
  display: grid;
  grid-template-areas: "intro" "visual" "details";
  gap: 0.9rem;
}

/* Places the introduction text in the intro grid area. */

.hero-intro {
  grid-area: intro;
}

/* Places the description and action buttons in the details grid area. */

.hero-details {
  grid-area: details;
  text-align: left;
}

/* Small introductory label shown above the name. */

.intro-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--cyan);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Decorative line displayed beside the introductory label. */

.intro-label-line {
  width: 28px;
  height: 1px;
  background: var(--cyan);
}

/* Styles the short role or tagline below the name. */

.hero-role {
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* Controls the size and width of the hero description. */

.hero-text {
  max-width: 610px;
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Arranges the hero action buttons and adds spacing between them. */

.hero-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

/* Acts as the positioning area for the profile card, orbit circles, and floating tags. */

.hero-visual {
  position: relative;
  grid-area: visual;
  display: grid;
  min-height: 205px;
  place-items: center;
}

/* Main decorative profile card containing the photo and profile information. */

.profile-shell {
  position: relative;
  z-index: 2;
  width: min(300px, 90%);
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 24px;
  background: linear-gradient(
    145deg,
    rgba(16, 42, 73, 0.96),
    rgba(6, 20, 38, 0.96)
  );
  box-shadow:
    0 30px 80px rgba(0, 7, 20, 0.38),
    0 0 80px rgba(59, 130, 246, 0.08);
  transform: rotate(1deg);
  transition:
    transform 0.35s ease,
    border-color 0.35s ease;
}

/* Straightens and slightly lifts the profile card on hover. */

.profile-shell:hover {
  border-color: rgba(96, 165, 250, 0.42);
  transform: rotate(0deg) translateY(-5px);
}

/* Wrapper used to position the profile photo and its decorative frame. */

.profile-photo-wrap {
  position: relative;
  width: 130px;
  margin: 0 auto;
}

/* Creates the tilted outline behind the profile photo. */

.profile-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 22px;
  transform: rotate(-5deg);
}

/* Sizes and crops the profile photo inside the card. */

.profile-photo-wrap img {
  position: relative;
  z-index: 1;
  width: 130px;
  aspect-ratio: 1;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 19px;
  object-fit: cover;
  background: #0a1a30;
}

/* Creates the top bar of the profile card similar to a browser window. */

.profile-topbar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
}

/* Places the three window control dots in one row. */

.window-dots {
  display: flex;
  gap: 5px;
}

/* Sets the common size and circular shape of the window dots. */

.window-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Gives each profile-card window dot its own color. */

.window-dots #dot1 {
  background: rgb(250, 28, 28);
}

.window-dots #dot2 {
  background: rgb(255, 221, 2);
}

.window-dots #dot3 {
  background: rgb(38, 255, 0);
}

/* Styles the portfolio.html label in the profile card top bar. */

.file-name {
  color: #6f8ca9;
  font-family: Consolas, monospace;
  font-size: 0.68rem;
}

/* Centers the profile photo and text inside the profile card. */

.profile-body {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
}

/* Small green online-status indicator attached to the profile photo. */

.status-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: #34d399;
}

/* Decorative profile-card skill text tags such as HTML5, CSS3, and Git. */

.floating-tag {
  position: absolute;
  z-index: 3;
  display: block;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(8, 24, 43, 0.92);
  color: #b9d6f6;
  font-family: Consolas, monospace;
  font-size: 0.6rem;
  font-weight: 700;
}

/* Positions the floating skill tags around the profile card on mobile. */

.tag-html {
  top: 12%;
  left: 3%;
  transform: rotate(-7deg);
}

.tag-css {
  top: 42%;
  right: 2%;
  transform: rotate(7deg);
}

.tag-git {
  bottom: 10%;
  left: 2%;
  transform: rotate(-7deg);
}

/* Shared style for the decorative background glow shapes in the hero. */

.hero-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

/* Large outlined glow placed on the upper-right side of the hero. */

.hero-glow-one {
  top: 4rem;
  right: -12rem;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(96, 165, 250, 0.1);
}

/* Soft radial glow placed near the lower-left side of the hero. */

.hero-glow-two {
  bottom: -12rem;
  left: -10rem;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.08),
    transparent 70%
  );
}

/* Shared circular outline used behind the profile card. */

.orbit {
  position: absolute;
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 50%;
}

/* Controls the size of the outer orbit circle. */

.orbit-one {
  width: min(290px, 100%);
  aspect-ratio: 1;
}

/* Controls the size and dashed style of the inner orbit circle. */

.orbit-two {
  width: min(220px, 76%);
  aspect-ratio: 1;
  border-style: dashed;
}

/* Styles the decorative developer code text inside the profile card. */

.code-line {
  color: #6f8ca9;
  font-family: Consolas, monospace;
  font-size: 0.72rem;
}

/* Highlights the developer tags using the cyan accent color. */

.code-line span {
  color: var(--cyan);
}

/* Hides the extra profile text on mobile to keep the card compact. */

.profile-body .code-line,
.profile-body h2,
.profile-body > p:not(.code-line) {
  display: none;
}

/* Hides the desktop scroll indicator on mobile screens. */

.scroll-cue {
  display: none;
}

/* -------------------- ABOUT -------------------- */

/* Gives the About section its own background and divider lines. */

.about {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 20, 38, 0.45);
}

/* Arranges the About section content using CSS Grid. */

.about-grid {
  display: grid;
  gap: 1.5rem;
}

/* Controls the width and alignment of the About text. */

.about-content {
  max-width: 740px;
  text-align: left;
}

/* Adds spacing between consecutive paragraphs in the About section. */

.about-content > p + p {
  margin-top: 1rem;
}

/* Styles the opening paragraph of the About section. */

.about-lead {
  color: #b9cce0;
  font-size: 1.05rem;
}

/* -------------------- SKILLS -------------------- */

/* Places skill icons in a flexible row that wraps when space runs out. */

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

/* Adds space above the first skill group after the section description. */

.skill-group:first-of-type {
  margin-top: 2rem;
}

/* Adds vertical spacing between Front-end, Backend, and Database skill groups. */

.skill-group + .skill-group {
  margin-top: 2rem;
}

/* Stacks each skill icon and label vertically and prepares it for a smooth hover effect. */

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: transform 0.2s ease;
}

/* Lifts and slightly enlarges the whole skill item on hover or keyboard focus. */

.skill-card:hover,
.skill-card:focus-visible {
  transform: translateY(-4px) scale(1.1);
}

/* Sets a consistent size for all technology icons. */

.skill-icon img {
  width: 30px;
  height: 30px;
}

/* Adds a small accent line beside each skill category title. */

.skill-group h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.skill-group h3::after {
  content: "";
  width: 35px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.5;
}

/* Adds a soft glow to the skill icon on hover. */

.skill-card:hover img,
.skill-card:focus-visible img {
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
}

/* Changes the skill label color together with the hover movement. */

.skill-card h6 {
  transition: color 0.2s ease;
}

.skill-card:hover h6,
.skill-card:focus-visible h6 {
  color: var(--cyan);
}

/* -------------------- PROJECTS -------------------- */

/* Adds a divider line above the Projects section. */

.projects {
  border-top: 1px solid var(--line);
}

.featured-project {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(13, 34, 60, 0.48);
}

/* Creates a consistent preview area for project screenshots and placeholders. */

.project-preview {
  min-height: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(rgba(96, 165, 250, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.04) 1px, transparent 1px),
    #08182d;
  background-size: 30px 30px;
}

/* Controls the project preview image size on mobile. */

.project-preview img {
  width: 100%;
  height: 160px;
  object-fit: contain;
}

/* Keeps each project's text content grouped below the preview on mobile. */

.project-details {
  min-width: 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.project-tags li {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #a9bfd5;
  font-family: Consolas, monospace;
  font-size: 0.68rem;
}

.text-link {
  display: inline-flex;
  gap: 0.4rem;
}

.text-link a {
  padding: 0.3rem 0.55rem;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: #8cc6ff;
  transition: transform 0.2s ease;
}

/* Slightly enlarges each project link when hovered. */

.livedemo-link:hover,
.livedemo-link:focus-visible,
.github-link:hover,
.github-link:focus-visible {
  border: 1px solid var(--cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  transform: scale(1.1);
}

/* Hides the radio buttons used to control the project carousel. */

.project-slider input {
  display: none;
}

/* Hides all project cards until one is selected. */

.featured-project {
  display: none;
}

/* Shows the selected project card. */

#project-1:checked ~ .project-track .project-one,
#project-2:checked ~ .project-track .project-two,
#project-3:checked ~ .project-track .project-three,
#project-4:checked ~ .project-track .project-four {
  display: grid;
}

/* Places the project navigation arrows at the bottom of each card. */

.project-arrows {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

/* First project: Next arrow only, so move it to the right. */

.project-one .project-arrows {
  justify-content: flex-end;
}

/* Last project: Previous arrow only, so keep it on the left. */

.project-four .project-arrows {
  justify-content: flex-start;
}

/* Styles the Previous and Next project controls. */

.project-arrows label {
  display: grid;
  border: 1px solid var(--line);
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--cyan);
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.project-arrows label:hover,
.project-arrows label:focus-visible {
  border: 1px solid var(--cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  transform: scale(1.1);
}

/* -------------------- CONTACT -------------------- */

/* Adds a divider and spacing to the Contact section. */

.contact {
  border-top: 1px solid var(--line);
  padding-bottom: 3.5rem;
}

#gmail {
  margin-top: 1rem;
}

/* Holds both Gmail icons in the same position. */

.gmail-icons {
  position: relative;
  width: 28px;
  height: 28px;
}

/* Keeps both Gmail icons the same size. */

.gmail-icons img {
  position: absolute;
  width: 28px;
  height: 28px;
  inset: 0;
  transition: opacity 0.2s ease;
}

/* Shows the normal Gmail icon by default. */

.gmail-default {
  opacity: 1;
}

/* Hides the colored Gmail icon by default. */

.gmail-hover {
  opacity: 0;
}

/* Changes the Gmail icon when the Email button is hovered. */

#gmail:hover .gmail-default,
#gmail:focus-visible .gmail-default {
  opacity: 0;
}

#gmail:hover .gmail-hover,
#gmail:focus-visible .gmail-hover {
  opacity: 1;
}

/* Places the social media buttons in one compact row. */

.contact-cards {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* Styles each social media button. */

.contact-card {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Controls the size and default color of the social media icons. */

.contact-icon img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  filter: brightness(0) invert(0.75);
  transition: filter 0.2s ease;
}

/* Adds a glow and movement when a social button is hovered. */

.contact-card:hover,
.contact-card:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
  transform: translateY(-4px);
}

/* Brightens the GitHub icon on hover. */

.contact-card:hover img[alt="GitHub logo"],
.contact-card:focus-visible img[alt="GitHub logo"] {
  filter: brightness(0) invert(1);
}

/* Gives the LinkedIn icon its blue color on hover. */

.contact-card:hover img[alt="LinkedIn logo"],
.contact-card:focus-visible img[alt="LinkedIn logo"] {
  filter: invert(34%) sepia(90%) saturate(1168%) hue-rotate(176deg)
    brightness(88%) contrast(98%);
}

/* Gives the Facebook icon its blue color on hover. */

.contact-card:hover img[alt="Facebook logo"],
.contact-card:focus-visible img[alt="Facebook logo"] {
  filter: invert(40%) sepia(96%) saturate(1900%) hue-rotate(201deg)
    brightness(98%) contrast(94%);
}

/* -------------------- FOOTER -------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: #030a14;
}

.footer-wrap {
  display: flex;
  min-height: 90px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-align: center;
}

.footer-wrap p,
.back-to-top {
  color: #7089a3;
  font-family: Consolas, monospace;
  font-size: 0.7rem;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: var(--cyan);
}

/* -------------------- DESKTOP -------------------- */

@media screen and (min-width: 900px) {
  /* Gives sections more vertical space on larger screens. */
  .section {
    padding: 5rem 0;
  }
  /* Changes the mobile navigation into a horizontal desktop navigation. */
  .hamburger {
    display: none;
  }
  .main-nav {
    position: static;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  /* Prepares each navigation link for the animated underline. */
  .nav-links a {
    position: relative;
    display: block;
    padding: 0.4rem 1rem;
    border-radius: 9px;
    color: #b7c8da;
    font-size: 0.9rem;
    font-weight: 600;
  }
  /* Creates the hidden underline. */
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 2px;
    height: 2px;
    background: var(--cyan);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
  }
  /* Keeps the desktop hover clean while the underline grows from the center. */
  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: transparent;
    color: var(--white);
  }
  /* Makes the underline grow when hovered or focused. */
  .nav-links a:hover::after,
  .nav-links a:focus-visible::after {
    transform: scaleX(1);
  }
  /* Places the hero text and profile card beside each other. */
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    grid-template-areas: "intro visual" "details visual";
    align-items: center;
    gap: 3rem;
  }
  .hero {
    min-height: calc(100vh - 70px);
    padding: 4rem 0;
  }
  .hero-details {
    text-align: left;
  }
  .hero-visual {
    min-height: 520px;
  }
  /* Makes the profile card larger on desktop. */
  .profile-shell {
    width: min(390px, 100%);
  }
  .profile-body {
    padding: 2.5rem 2.2rem 2.7rem;
  }
  .profile-photo-wrap {
    width: 170px;
  }
  .profile-photo-wrap img {
    width: 170px;
  }
  /* Shows the profile information that is hidden on mobile. */
  .profile-body .code-line,
  .profile-body h2,
  .profile-body > p:not(.code-line) {
    display: block;
  }
  /* Makes the decorative circles larger on desktop. */
  .orbit-one {
    width: 440px;
  }
  .orbit-two {
    width: 340px;
  }
  /* Makes the floating skill tags slightly larger. */
  .floating-tag {
    padding: 0.55rem 0.8rem;
    font-size: 0.72rem;
  }
  .tag-html {
    top: 13%;
    left: 8%;
    transform: rotate(-7deg);
  }
  .tag-css {
    top: 32%;
    right: 3%;
    transform: rotate(6deg);
  }
  .tag-git {
    bottom: 14%;
    left: 3%;
    transform: rotate(4deg);
  }
  /* Makes hero buttons use only the width they need. */
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
  }
  .btn {
    width: auto;
  }
  /* Aligns the About section for larger screens. */
  .about-content {
    text-align: left;
  }
  /* Keeps the section title and description together on desktop. */
  .section-heading-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  /* Arranges Front-end, Backend, and Database into three desktop columns. */
  #skills .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1000px;
    gap: 3rem;
  }
  /* Keeps the Skills heading across the full width of the three columns. */
  #skills .section-heading {
    grid-column: 1 / -1;
  }
  /* Removes the mobile vertical spacing between skill groups on desktop. */
  #skills .skill-group:first-of-type,
  #skills .skill-group + .skill-group {
    margin-top: 0;
  }
  /* Gives the skill icons more breathing room on desktop. */
  #skills .skills-row {
    gap: 1.5rem;
    margin-top: 1.2rem;
  }
  /* Makes technology icons slightly larger on desktop. */
  #skills .skill-icon img {
    width: 38px;
    height: 38px;
  }
  /* Arranges one featured project above three smaller project cards. */
  .project-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1000px;
    margin-inline: auto;
    gap: 1.5rem;
  }
  /* Shows every project card on desktop. */
  .project-track .featured-project {
    display: grid;
    width: 100%;
    margin-bottom: 0;
  }
  /* Places the featured project image and details side by side. */
  .project-one {
    grid-column: 1 / -1;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    max-width: 860px;
    margin-inline: auto;
    gap: 2rem;
  }
  /* Gives the featured project a larger preview without stretching it. */
  .project-one .project-preview {
    min-height: 240px;
  }
  .project-one .project-preview img {
    height: 240px;
  }
  /* Vertically centers the featured project information. */
  .project-one .project-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  /* Keeps the three smaller project previews compact. */
  .project-two .project-preview,
  .project-three .project-preview,
  .project-four .project-preview {
    min-height: 150px;
  }
  .project-two .project-preview img,
  .project-three .project-preview img,
  .project-four .project-preview img {
    height: 150px;
  }
  /* Hides the mobile carousel arrows on desktop. */
  .project-arrows {
    display: none;
  }
  #gmail {
    width: 100%;
  }
  /* Aligns the contact section neatly on desktop. */
  .contact-shell {
    text-align: center;
  }
  .contact-copy {
    max-width: 650px;
    margin-inline: auto;
  }
  /* Places footer content on opposite sides on desktop. */
  .footer-wrap {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
