/*==============================================================
  MAYKON JONATTAN — PORTFOLIO STYLESHEET (main.css)
  Based on the BootstrapMade "FolioOne" template, heavily customized.

  TABLE OF CONTENTS  (search for the number, e.g. "# 3.2", to jump)

  1. SETTINGS
     1.1  Fonts
     1.2  Design tokens (all CSS variables)
     1.3  Color presets

  2. BASE
     2.1  Reset
     2.2  Page body & background glow
     2.3  Links & headings
     2.4  Sections & glass surfaces
     2.5  Section titles
     2.6  Utility classes

  3. SHARED COMPONENTS (used on every page)
     3.1  Header
     3.2  3D cube logo
     3.3  Navigation – desktop (mobile menu: see 5.2)
     3.4  "Next page" button (.btn-next)
     3.5  Tags / pills
     3.6  Footer
     3.7  Scroll-to-top button

  4. PAGES
     4.1  Home      (index.html)
     4.2  About     (about.html)
     4.3  Skills    (skills.html)
     4.4  Resume    (resume.html)
     4.5  Portfolio (portfolio.html)
     4.6  Contact   (contact.html)
     4.7  Keyboard focus

  5. MOBILE (every small-screen rule lives here)
     5.1  Shared (sections, titles)
     5.2  Navigation menu
     5.3  Home
     5.4  About
     5.5  Resume
     5.6  Contact
==============================================================*/


/*==============================================================
  # 1. SETTINGS
==============================================================*/

/*--------------------------------------------------------------
  # 1.1 Fonts
  Roboto, Raleway and Poppins are loaded by the <link> tag in
  each HTML page. Monospace labels use the system monospace font.
--------------------------------------------------------------*/


/*--------------------------------------------------------------
  # 1.2 Design tokens
  Every CSS variable of the site lives here. Change a value once
  and it updates everywhere.
--------------------------------------------------------------*/
:root {
  /* Fonts */
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Raleway", sans-serif;
  --nav-font: "Poppins", sans-serif;

  /* Global colors */
  --background-color: #101a20; /* page background */
  --default-color: #e7f2f7;    /* body text */
  --heading-color: #ffffff;    /* headings */
  --accent-color: #007bff;     /* brand blue: buttons, links, highlights */
  --surface-color: #14243f;    /* background of boxed elements (cards, badges) */
  --contrast-color: #ffffff;   /* text on top of accent-colored backgrounds */

  /* Text shades */
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;

  /* Navigation menu */
  --nav-color: #ffffff;        /* menu links */
  --nav-hover-color: #1387c1;  /* menu links on hover / active page */

  /* Neon accents */
  --neon-blue: #06b6d4;
  --neon-purple: #4f46e5;

  /* Glass effect */
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(255, 255, 255, 0.25);
  --shimmer-color: rgba(255, 255, 255, 0.4);

  /* Motion */
  --transition-smooth: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  --transition-fast: 0.15s ease;

  /* 3D cube logo */
  --cube-size: 52px;
  --cube-half: calc(var(--cube-size) / 2);
  --cube-accent: #06b6d4;
  --cube-hover-accent: #4f46e5;
  --cube-glass-bg: rgba(10, 25, 47, 0.6);
  --cube-speed-normal: 12s;
  --cube-speed-fast: 3s;       /* spin speed on hover */

  /* Tech grid hover glow (About page) */
  --card-primary: #00d4ff;
}


/*--------------------------------------------------------------
  # 1.3 Color presets
  Add .dark-background to a section to use these colors there.
--------------------------------------------------------------*/
.dark-background {
  --background-color: #0b1419;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --surface-color: #252525;
  --contrast-color: #ffffff;
}


/*==============================================================
  # 2. BASE
==============================================================*/

/*--------------------------------------------------------------
  # 2.1 Reset
--------------------------------------------------------------*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}


/*--------------------------------------------------------------
  # 2.2 Page body & background glow
--------------------------------------------------------------*/
/* Full-height column so the footer always sits at the bottom */
body {
  color: var(--default-color);
  font-family: var(--default-font);
  background-color: #0a1118;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Blue and pink glows in the corners, fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(79, 70, 229, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(219, 39, 119, 0.08) 0%, transparent 45%);
  z-index: -1;
  pointer-events: none;
}

.main {
  flex: 1 0 auto;
}


/*--------------------------------------------------------------
  # 2.3 Links & headings
--------------------------------------------------------------*/
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 25%);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}


/*--------------------------------------------------------------
  # 2.4 Sections & glass surfaces
--------------------------------------------------------------*/
/* Sections are transparent so the body glow shows through */
section,
.section {
  color: var(--default-color);
  background: transparent;
  padding: 60px 0;
  scroll-margin-top: 100px;
  overflow: clip;
}

/*--------------------------------------------------------------
  # 2.5 Section titles
  The big title + subtitle at the top of each page,
  with a small accent line on each side of the title.
--------------------------------------------------------------*/
.section-title {
  text-align: center;
  padding-bottom: 60px;
  position: relative;
}

.section-title h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
  position: relative;
}

.section-title h1:before,
.section-title h1:after {
  content: "";
  width: 50px;
  height: 2px;
  background: var(--accent-color);
  display: inline-block;
  vertical-align: middle;
}

.section-title h1:before {
  margin-right: 15px;
}

.section-title h1:after {
  margin-left: 15px;
}


.section-title p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 900px;
  margin: 0 auto;
  text-wrap: balance;
}


/*--------------------------------------------------------------
  # 2.6 Utility classes
--------------------------------------------------------------*/
.letter-spacing-2 {
  letter-spacing: 2px;
}

/* Small detail line under the title */
.text-muted {
  color: #6c757d !important;
  font-style: italic;
}


/*==============================================================
  # 3. SHARED COMPONENTS
==============================================================*/

/*--------------------------------------------------------------
  # 3.1 Header
--------------------------------------------------------------*/
.header {
  --background-color: rgba(255, 255, 255, 0);
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 15px 0;
  transition: all 0.5s;
  z-index: 997;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
}

/* Header background once the page is scrolled */
.scrolled .header {
  --background-color: rgba(16, 26, 32, 0.9);
}

/* Empty block on the right that balances the logo, so the menu stays centered (desktop only) */
.header .header-spacer {
  width: 100px;
}


/*--------------------------------------------------------------
  # 3.2 3D cube logo
  The spinning cube in the top-left corner of the header.
--------------------------------------------------------------*/
.cube-scene {
  width: var(--cube-size);
  height: var(--cube-size);
  perspective: 600px;
  margin-left: clamp(20px, 15vw, 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.2));
  transition: filter 0.5s ease;
  cursor: pointer;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;

  animation: rotateDataCube var(--cube-speed-normal) infinite linear;
  will-change: transform;
}

/* Spins faster on hover */
.cube-scene:hover .cube {
  animation-duration: var(--cube-speed-fast);
}

/* Glowing light in the middle of the cube */
.cube-core {
  position: absolute;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  background: var(--cube-accent);
  filter: blur(12px);
  opacity: 0.6;
  border-radius: 50%;
  transform: translateZ(0);
  animation: corePulse 3s ease-in-out infinite alternate;
}

@keyframes corePulse {
  from {
    transform: scale(0.8) translateZ(0);
    opacity: 0.4;
  }

  to {
    transform: scale(1.2) translateZ(0);
    opacity: 0.8;
  }
}

.cube-face {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--cube-glass-bg);
  border: 1.5px solid rgba(6, 182, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cube-accent);
  font-size: 1rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  backface-visibility: visible;
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s, transform 0.4s;
  box-shadow: inset 0 0 12px rgba(6, 182, 212, 0.1);
  transform: var(--face) translateZ(var(--cube-half));
}

/* Each face is turned to its side of the cube */
.face-front { --face: rotateY(0deg); }
.face-back { --face: rotateY(180deg); }
.face-right { --face: rotateY(90deg); }
.face-left { --face: rotateY(-90deg); }
.face-top { --face: rotateX(90deg); }
.face-bottom { --face: rotateX(-90deg); }


/* Endless rotation; odd angles make the spin look less mechanical */
@keyframes rotateDataCube {
  0% {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }

  25% {
    transform: rotateX(107deg) rotateY(193deg) rotateZ(41deg);
  }

  50% {
    transform: rotateX(281deg) rotateY(-83deg) rotateZ(167deg);
  }

  75% {
    transform: rotateX(143deg) rotateY(317deg) rotateZ(-97deg);
  }

  100% {
    transform: rotateX(360deg) rotateY(720deg) rotateZ(360deg);
  }
}

/* Hover: purple glow */
.cube-scene:hover {
  filter: drop-shadow(0 0 25px rgba(79, 70, 229, 0.6));
}

.cube-scene:hover .cube-face {
  border-color: var(--cube-hover-accent);
  background: rgba(79, 70, 229, 0.25);
  box-shadow: inset 0 0 20px rgba(79, 70, 229, 0.5);
  /* Slightly bigger cube on hover */
  transform: scale(1.1) var(--face) translateZ(calc(var(--cube-half) * 1.1));
}

.cube-scene:hover .cube-core {
  background: var(--cube-hover-accent);
  filter: blur(20px);
  transform: scale(1.8);
  opacity: 1;
}


/*--------------------------------------------------------------
  # 3.3 Navigation – desktop (1200px and wider, mobile menu is in 5.2)
--------------------------------------------------------------*/
@media (min-width: 1200px) {
  .navmenu {
    padding: 0;
  }

  .navmenu ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
  }

  .navmenu li {
    position: relative;
  }

  .navmenu>ul>li {
    white-space: nowrap;
    padding: 15px 28px 15px 0;
  }

  .navmenu>ul>li:last-child {
    padding-right: 0;
  }

  .navmenu a,
  .navmenu a:focus {
    color: var(--nav-color);
    font-size: 15px;
    padding: 0 2px;
    font-family: var(--nav-font);
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: 0.3s;
    position: relative;
  }

  .navmenu>ul>li>a:before {
    content: "";
    position: absolute;
    height: 2px;
    bottom: -6px;
    left: 0;
    background-color: var(--nav-hover-color);
    visibility: hidden;
    width: 0px;
    transition: all 0.3s ease-in-out 0s;
  }

  .navmenu a:hover:before,
  .navmenu li:hover>a:before,
  .navmenu .active:before {
    visibility: visible;
    width: 25px;
  }

  .navmenu li:hover>a,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--nav-hover-color);
  }

}


/*--------------------------------------------------------------
  # 3.4 "Next page" button (.btn-next)
  Glass button at the bottom of a page that leads to the next one.
--------------------------------------------------------------*/
.btn-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;

  padding: 0.9rem 2.4rem;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;

  font-family: system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;

  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-radius: 10px;
  border: 1px solid var(--glass-border);

  box-shadow:
    0 4px 12px -6px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.03);

  transition:
    transform var(--transition-smooth),
    background-color var(--transition-smooth),
    border-color var(--transition-smooth),
    box-shadow var(--transition-smooth);

  will-change: transform;
}

/* Shimmer layer */
.btn-next::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.05),
      var(--shimmer-color),
      rgba(255, 255, 255, 0.05),
      transparent);
  transition: transform 0.6s ease;
  pointer-events: none;
}

/* Hover */
.btn-next:hover {
  transform: translateY(-4px) scale(1.02);
  background: var(--glass-hover);
  border-color: var(--glass-border-hover);

  box-shadow:
    0 20px 40px -15px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.btn-next:hover::before {
  transform: translateX(100%);
}

/* Active */
.btn-next:active {
  transform: translateY(-1px) scale(0.98);
  transition: transform var(--transition-fast);
}

/* Focus */
.btn-next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* Icons */
.btn-next i {
  font-size: 1.1em;
  opacity: 0.6;
  transition:
    transform var(--transition-smooth),
    opacity var(--transition-smooth);
}

.btn-next:hover i {
  opacity: 1;
  transform: translateX(3px) rotate(-12deg);
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  .btn-next,
  .btn-next::before,
  .btn-next i {
    transition: none !important;
    transform: none !important;
  }
}


/*--------------------------------------------------------------
  # 3.5 Tags / pills
  Small rounded labels (About timeline and Portfolio cards).
  Portfolio cards set their own colors with inline styles.
--------------------------------------------------------------*/
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1rem;
  margin-bottom: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 400;
  font-family: monospace;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.35);
  color: #93c5fd;
}


/*--------------------------------------------------------------
  # 3.6 Footer
--------------------------------------------------------------*/
.site-footer {
  background: rgba(10, 17, 24, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.footer-roles {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.footer-roles .dot {
  color: var(--accent-color);
  margin: 0 5px;
}

.footer-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
}

.footer-icon:hover {
  transform: translateY(-3px) scale(1.05);
  color: white;
}

/* Brand colors on hover */
.footer-icon.linkedin:hover {
  background: #0077B5;
  box-shadow: 0 5px 15px rgba(0, 119, 181, 0.4);
}

.footer-icon.github:hover {
  background: #333;
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.05);
}

.footer-icon.email:hover {
  background: #ea4335;
  box-shadow: 0 5px 15px rgba(234, 67, 53, 0.4);
}

.footer-legal {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer-legal .dot {
  margin: 0 6px;
}

.footer-legal a {
  color: inherit;
}


/*--------------------------------------------------------------
  # 3.7 Scroll-to-top button
--------------------------------------------------------------*/
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--accent-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: var(--contrast-color);
  line-height: 0;
}

.scroll-top:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  color: var(--contrast-color);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  bottom: 15px;
}


/*==============================================================
  # 4. PAGES
==============================================================*/

/*--------------------------------------------------------------
  # 4.1 Home (index.html)
--------------------------------------------------------------*/

/* ── Hero: layout and text ─────────────────────────────────── */
.hero {
  padding: 60px 0;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
}

.hero .hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
  line-height: 1.2;
}

/* "I'm" stays quieter so the name stands out */
.hero .hero-content h1 .intro {
  font-weight: 500;
  color: var(--text-muted);
}

/* Name: white-to-blue gradient text with a soft blue glow (static) */
.hero .hero-content h1 .highlight {
  white-space: nowrap;
  background: linear-gradient(90deg, #ffffff 0%, #8cc4ff 45%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(0, 123, 255, 0.35));
}

/* More breathing room on very tall screens */
@media (min-height: 1000px) {
  .hero {
    padding: 100px 0;
  }
}

.hero .hero-content h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.hero .hero-content h2 .typed {
  color: var(--accent-color);
  font-weight: 600;
}

.hero .hero-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  /* Straight left and right edges */
  text-align: justify;
  hyphens: auto;
}

.hero .hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* ── Hero: profile image ───────────────────────────────────── */
.hero .hero-image {
  position: relative;
}

/* inline-block: shrinks to the photo, so the badges stay around it */
.hero .hero-image .image-wrapper {
  display: inline-block;
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

/* Round photo, edge to edge (no border), with a deep shadow underneath */
.hero .hero-image .image-wrapper img {
  display: block;
  width: min(340px, 70vw);
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 60px rgba(0, 123, 255, 0.12);
}

/* Static depth: soft light at the top-left and a darker edge, so the photo
   looks slightly rounded like a sphere (nothing moves) */
.hero .hero-image .image-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 45%),
    radial-gradient(circle at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.35) 100%);
}

/* ── Hero: floating skill badges around the photo ──────────── */
/* (shown from 768px up, hidden on phones) */
.floating-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-badge {
  display: none;
}

@media (min-width: 768px) {
  .floating-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    background: var(--surface-color);
    padding: 6px 12px;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--accent-color), transparent 75%);
    white-space: nowrap;
    z-index: 3;
  }

  .floating-badge i {
    font-size: 0.85rem;
  }

  /* Two badges on each side, slightly outside the photo.
     Different delays so they don't float in sync. */
  .floating-badge.python {
    top: 10%;
    left: -6%;
  }

  .floating-badge.sql {
    bottom: 14%;
    left: -3%;
    animation-delay: 1.5s;
  }

  .floating-badge.power-bi {
    top: 26%;
    right: -16%;
    animation-delay: 1s;
  }

  .floating-badge.data-science {
    bottom: 16%;
    right: -12%;
    animation-delay: 2.2s;
  }

  @media (prefers-reduced-motion: no-preference) {
    .floating-badge {
      animation-name: ambientFloat;
      animation-duration: 3.5s;
      animation-timing-function: ease-in-out;
      animation-iteration-count: infinite;
    }
  }
}

/* Gentle up-and-down float */
@keyframes ambientFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ── Hero: buttons (Resume / Projects / Let's Talk) ────────── */
.hero-actions .hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  padding: 12px 30px;
  border-radius: 50px;
  border: 2px solid;
  background: #0a0a0a;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

/* Desktop: the whole hero fits on one screen */
@media (min-width: 992px) {
  #hero {
    padding: 20px 0;
    min-height: calc(100vh - 200px);
  }

  /* Photo sized by the screen height */
  .hero .hero-image .image-wrapper img {
    width: min(340px, 48vh);
  }

  /* Short screens: smaller text and photo */
  @media (max-height: 700px) {
    #hero h1 {
      font-size: 2.2rem;
    }

    #hero p {
      font-size: 0.9rem;
      margin-bottom: 15px;
    }

    .hero .hero-image .image-wrapper img {
      width: min(260px, 40vh);
    }
  }
}

/* Hover: the button turns white */
.hero-btn:hover {
  background: #f8fafc !important;
  border-color: #f8fafc !important;
  color: #0f172a !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* The icon grows slightly on hover */
.hero-btn i {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.hero-btn:hover i {
  transform: scale(1.2);
}


/*--------------------------------------------------------------
  # 4.2 About (about.html)
--------------------------------------------------------------*/

/* ── Profile card ──────────────────────────────────────────── */
.profile-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem 2rem;
  overflow: visible; /* the photo sticks out above the card */
  transition: var(--transition-smooth);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.profile-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, var(--glass-border), transparent, var(--glass-border));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.profile-card:hover {
  transform: translateY(-12px) scale(1.02);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.4);
}

/* Round photo with a purple-to-blue ring and a soft glow */
.profile-photo {
  position: relative;
  width: 180px;
  height: 180px;
  margin: -85px auto 1.5rem auto;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.4);
  z-index: 2;
}

.profile-photo::after {
  content: '';
  position: absolute;
  inset: -10px;
  background: inherit;
  filter: blur(20px);
  opacity: 0.3;
  z-index: -1;
  border-radius: 50%;
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #0f172a;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.profile-role {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--neon-blue);
  margin-bottom: 1.5rem;
}

.profile-quote {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
  border-left: 3px solid var(--neon-purple);
  padding-left: 1rem;
  margin: 0 auto;
}

/* ── About text ────────────────────────────────────────────── */
.about-text p {
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.about-text p strong {
  color: var(--text-primary);
}

.about-text .signature {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  font-family: var(--heading-font);
  color: var(--neon-blue);
  font-weight: 600;
}

/* ── Timeline (2023 → today) ───────────────────────────────── */
section.timeline {
  display: grid;
  position: relative;
}

/* Central vertical line */
section.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom,
      transparent,
      #1a4fa0 8%,
      #2563eb 50%,
      #1a4fa0 92%,
      transparent);
  transform: translateX(-50%);
}

/* One timeline entry: text on one side, icon on the other */
article.timeline-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 3rem;
  position: relative;
  padding-bottom: 3.5rem;
  align-items: center;
}

article.timeline-item:last-child {
  padding-bottom: 0;
}

/* Dot on the central line */
article.timeline-item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #93c5fd;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.2), 0 0 16px rgba(37, 99, 235, 0.5);
  z-index: 2;
}

/* Text box */
.timeline-content {
  background: linear-gradient(135deg, rgba(15, 35, 80, 0.85), rgba(10, 25, 60, 0.9));
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
  backdrop-filter: blur(8px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow:
    0 8px 32px rgba(37, 99, 235, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.timeline-content .timeline-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4a9eff;
  margin-bottom: 0.4rem;
}

.timeline-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e8f0ff;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.timeline-content time {
  display: block;
  font-family: monospace;
  font-weight: 700;
  font-size: 2.2rem;
  color: #2563eb;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.timeline-content hr {
  border: none;
  border-top: 1px solid rgba(37, 99, 235, 0.25);
  margin-bottom: 0.75rem;
}

.timeline-content p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #9db4d8;
}

/* Timeline icon box */
.timeline-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-icon-box {
  width: min(100%, 11rem);
  aspect-ratio: 1;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #0f2350, #0a1940);
  border: 1px solid rgba(37, 99, 235, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(37, 99, 235, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-icon-box:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 12px 36px rgba(37, 99, 235, 0.25),
    0 0 60px rgba(37, 99, 235, 0.15);
}

.timeline-icon-box svg {
  width: 56%;
  height: 56%;
}

/* Odd items: content LEFT, icon RIGHT */
article.timeline-item:nth-child(odd) .timeline-content {
  grid-column: 1;
  grid-row: 1;
}

article.timeline-item:nth-child(odd) .timeline-icon {
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-start;
}

/* Even items: icon LEFT, content RIGHT */
article.timeline-item:nth-child(even) .timeline-content {
  grid-column: 2;
  grid-row: 1;
}

article.timeline-item:nth-child(even) .timeline-icon {
  grid-column: 1;
  grid-row: 1;
  justify-content: flex-end;
}


/* ── Tech stack title and grid ─────────────────────────────── */
.toolbox-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

/* Flex + wrap so an incomplete last row is centered instead of stuck to the left */
.toolbox-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
  max-width: 760px; /* at most 5 icons per row: 9 icons -> 5 + 4 */
  margin: 0 auto;
}

.toolbox-item {
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease, filter 0.3s ease;
  color: inherit;
}

/* svg = the inline GitHub logo, sized like the other icons */
.toolbox-item img,
.toolbox-item svg {
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
}

.toolbox-item:hover {
  transform: translateY(-10px);
  filter: drop-shadow(0 0 8px var(--card-primary));
}

.toolbox-item span {
  font-weight: 500;
  font-size: 0.9rem;
}


/*--------------------------------------------------------------
  # 4.3 Skills (skills.html)
--------------------------------------------------------------*/
.skills h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.skills p {
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
}

/* ── Flip cards: base and 3D flip ──────────────────────────── */
.skill-card {
  height: 380px;
  perspective: 1500px;
  margin-bottom: 30px;
  border-radius: 25px;
  transition: transform 300ms ease-out, box-shadow 300ms ease-out;
}

.skill-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
  border-radius: 25px;
}

/* Turned by a click (main.js adds .is-flipped) */
.skill-card.is-flipped .skill-card-inner {
  transform: rotateY(180deg);
}

/* Front and back faces */
.skill-front,
.skill-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 25px;
  background: rgba(10, 20, 30, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ── Flip cards: 3D tilt and light that follows the mouse ──── */
/* main.js tilts .skill-card toward the mouse and
   sets --glow-x / --glow-y (the light position, in %). */
.skill-card.is-tilting {
  transition-duration: 150ms;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

/* The light: a soft white spot on top of each face */
.skill-front::after,
.skill-back::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, -20%),
      rgba(255, 255, 255, 0.2),
      rgba(0, 0, 0, 0.06) 60%);
}

/* The back is turned around, so its light is mirrored left-right */
.skill-back::after {
  background: radial-gradient(circle at calc(100% - var(--glow-x, 50%)) var(--glow-y, -20%),
      rgba(255, 255, 255, 0.2),
      rgba(0, 0, 0, 0.06) 60%);
}

/* ── Flip cards: front side ────────────────────────────────── */
/* Breathing glow in the card's color (--card-color is set in the HTML) */
.skill-front::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 25px;
  background: radial-gradient(circle at center, var(--card-color) 0%, transparent 70%);
  filter: blur(20px);
  opacity: 0.35;
  z-index: 0;
  animation: dynamicPulse 3.5s ease-in-out infinite;
}

/* Keep content above the glow */
.skill-front>* {
  position: relative;
  z-index: 1;
}

@keyframes dynamicPulse {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.92);
  }

  50% {
    opacity: 0.45;
    transform: scale(1.05);
  }
}

/* Logo and title float slightly above the card */
.skill-main {
  transform: translateZ(50px);
  text-align: center;
}

.skill-logo {
  width: 110px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}

/* Card with two logos (Git & GitHub): smaller logos side by side */
.skill-logo-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
}

.skill-logo-pair .skill-logo {
  width: 80px;
  margin-bottom: 0;
}

.skill-logo-icon {
  font-size: 80px;
  line-height: 1;
  color: #fff;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}

/* Only as wide as its text and centered (otherwise it stretches to the widest
   element in the card, e.g. the two logos on Git & GitHub, and looks off-center) */
.skill-level {
  display: flex;
  width: fit-content;
  margin: 0 auto;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 15px;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--card-color);
  border: 1px solid var(--card-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.level-dot {
  width: 6px;
  height: 6px;
  background: var(--card-color);
  border-radius: 50%;
  animation: dotPulse 1.5s infinite;
}

@keyframes dotPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ── Flip cards: back side ─────────────────────────────────── */
.skill-back {
  transform: rotateY(180deg);
  padding: 25px;
  align-items: flex-start;
  text-align: left;
  border-top: 3px solid var(--card-color);
}

.skill-back-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  border-bottom: 2px solid var(--card-color);
  padding-bottom: 5px;
}

.skill-tags span {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.7rem;
  color: #ccc;
  margin: 0 4px 6px 0;
  transition: all 0.3s ease;
}

.skill-tags span:hover {
  border-color: var(--card-color);
  color: white;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-list li {
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-list li i {
  color: var(--card-color);
}

/* ── Flip cards: "click to see more" hint (front) ──────────── */
.flip-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.skill-card:hover .flip-hint {
  opacity: 1;
}

.flip-hint-icon {
  font-size: 1rem;
  color: var(--card-color);
  animation: tapHint 1.8s ease-in-out infinite;
}

/* The little hand "taps" up and down */
@keyframes tapHint {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.flip-hint-text {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* ── Flip cards: "click to flip back" hint (back) ──────────── */
.flip-back-hint {
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s ease;
}

.skill-card:hover .flip-back-hint {
  color: var(--card-color);
}


/*--------------------------------------------------------------
  # 4.4 Resume (resume.html)
--------------------------------------------------------------*/

/* ── Education / Experience timeline ───────────────────────── */
.resume .resume-item {
  margin-bottom: 3rem;
}

.resume .resume-item .resume-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  position: relative;
  color: var(--heading-color);
}

.resume .resume-item .resume-title::after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent-color);
  bottom: 0;
  left: 0;
}

.resume .resume-item .resume-content {
  padding-left: 1.25rem;
  border-left: 2px solid color-mix(in srgb, var(--accent-color), transparent 85%);
  text-align: justify;
}

.resume .resume-item article {
  position: relative;
  margin-bottom: 2.5rem;
}

.resume .resume-item article::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  left: -1.8rem;
  top: 0.25rem;
  background: var(--background-color);
  border: 2px solid var(--accent-color);
}

.resume .resume-item article h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--heading-color);
}

.resume .resume-item article h4 {
  font-size: 1rem;
  background: color-mix(in srgb, var(--accent-color), transparent 92%);
  padding: 0.375rem 0.75rem;
  display: inline-block;
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--accent-color);
  border-radius: 4px;
}

.resume .resume-item article .org {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.resume .resume-item article p {
  margin-bottom: 1rem;
}

.resume .resume-item article ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.resume .resume-item article ul li {
  padding-bottom: 0.75rem;
  position: relative;
}

.resume .resume-item article ul li:last-child {
  padding-bottom: 0;
}

/* ── Soft skills list ──────────────────────────────────────── */
.resume-item .list-group-item {
  padding: 15px 20px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-align: justify;
}

.resume-item .list-group-item span {
  width: 100%;
  padding-right: 5px;
}

.resume-item .list-group-item:last-child {
  border-bottom: none;
}

/* min-width keeps the text lined up after icons of different widths */
.resume-item .list-group-item i {
  font-size: 1.2rem;
  min-width: 30px;
}

.resume-item .list-group-item strong {
  color: var(--accent-color);
  margin-right: 5px;
}

/* Hover: light background and a small slide */
.resume-item .list-group-item:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  padding-left: 10px;
}

/* ── "View / Download CV" button ───────────────────────────── */
.cv {
  text-align: center;
  margin: 40px 0 10px;
}

.cv h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.cv-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 24px;
}

.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 28px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.2s ease;
}

.cv-btn i {
  font-size: 15px;
  color: var(--accent-color);
  transition: color 0.25s ease;
}

/* Hover: border and text brighten, button lifts slightly */
.cv-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Press feedback */
.cv-btn:active {
  transform: translateY(0);
}


/*--------------------------------------------------------------
  # 4.5 Portfolio (portfolio.html)
--------------------------------------------------------------*/

/* ── Grid: as many 300px+ columns as fit ───────────────────── */
.projects {
  padding: 2rem 0.5rem 3rem;
  font-family: sans-serif;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Lower perspective = stronger 3D tilt (main.js tilts the card) */
.project {
  perspective: 1200px;
}

/* ── Project card ──────────────────────────────────────────── */
.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--bs-body-color);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transform-style: preserve-3d;
  transition: transform 0.07s linear, box-shadow 0.35s ease;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 48px rgba(0, 0, 0, 0.6);
  will-change: transform;
  overflow: hidden;
  position: relative;
}


/* ========================
   PROJECT COLORS
   Each card (.project) sets two variables in the HTML:
   --accent-rgb (e.g. 245,158,11) and --accent-light.
   main.js copies them to the preview window.
   ======================== */
.project-category,
.portfolio .modal-title {
  color: var(--accent-light);
}

.project-badge .dot {
  background: rgb(var(--accent-rgb));
}

.portfolio .modal-content {
  background: #121214;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}

.portfolio .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


/* ========================
   GLOW BORDER (hover only)
   Absolute overlay that fades in on hover.
   ======================== */
.glow-border {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 0 60px rgba(var(--accent-rgb), 0.08);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.project-card:hover .glow-border {
  opacity: 1;
}

/* Content sits above the glow border overlay */
.project-content {
  position: relative;
  z-index: 1;
}


/* ========================
   SHIMMER SWEEP (hover)
   A diagonal light streak that slides across on hover.
   Starts off-screen left, travels to off-screen right.
   ======================== */
.shimmer {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.045) 50%, transparent 65%);
  pointer-events: none;
  z-index: 20;
  transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .shimmer {
  left: 160%;
}


/* ========================
   CARD IMAGE AREA
   Fixed height; the image zooms inside it on hover.
   ======================== */
.project-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Gradient overlay: fades image bottom into card background */
.project-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(10, 15, 26, 0.95) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Project image that opens the preview window: a <button> styled like the plain image */
.preview-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Image: zooms in and darkens on card hover */
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
  filter: brightness(0.65) saturate(0.8);
}

.project-card:hover .project-img img {
  transform: scale(1.09);
  filter: brightness(0.4) saturate(1.15);
}

/* Category badge overlaid on the image (top-left) */
.project-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  font-family: monospace;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

/* Colored dot inside the badge */
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}


/* ========================
   GITHUB BUTTON (top-right of image)
   Pill expand animation on hover:
   starts as a circle icon, expands to show label text.
   ======================== */
.github-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 20, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  /* Animate: width, border-radius, bg, color, padding */
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.25s, border-color 0.25s, color 0.25s,
    padding 0.35s;
  overflow: hidden;
  white-space: nowrap;
}

.github-btn i {
  font-size: 18px;
  flex-shrink: 0;
  transition: color 0.25s;
}

/* Hidden label — revealed by expanding max-width on hover */
.github-btn-text {
  font-size: 12px;
  font-weight: 600;
  font-family: sans-serif;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s 0.1s, margin 0.35s;
  margin-left: 0;
  letter-spacing: 0.01em;
}

/* Hover state: circle → pill, dark → white, show label */
.github-btn:hover {
  width: 130px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
  color: #0a0f1a;
  padding: 0 14px 0 10px;
}

.github-btn:hover i {
  color: #0a0f1a;
}

.github-btn:hover .github-btn-text {
  max-width: 100px;
  opacity: 1;
  margin-left: 7px;
}


/* ========================
   CARD TITLE AREA
   Overlaps the image bottom via negative margin-top.
   ======================== */
.project-head {
  padding: 0 18px 14px;
  margin-top: -32px;
  position: relative;
  z-index: 3;
}

.project-category {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: monospace;
  margin-bottom: 5px;
}

.project-title {
  margin-bottom: 0.5rem;
  font-size: 17px;
  font-weight: 600;
  color: #edf2ff;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}


/* ========================
   TOGGLE BUTTON (+ / ×)
   The two <span> elements form a "+" shape.
   When .open is added to the card, they rotate
   into an "×" shape via CSS transforms.
   ======================== */
.toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

/* Horizontal bar of the + */
.toggle-btn span {
  display: block;
  width: 10px;
  height: 1.5px;
  border-radius: 2px;
  background: rgba(200, 210, 230, 0.7);
  position: absolute;
  transition: transform 0.22s ease, background 0.2s;
}

.toggle-btn .bar-h {
  transform: rotate(0);
}

/* Vertical bar: rotated 90° to form the + cross */
.toggle-btn .bar-v {
  transform: rotate(90deg);
}

/* When card is open: button turns red and bars form × */
.project-card.open .toggle-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.project-card.open .toggle-btn span {
  background: #f87171;
}

.project-card.open .toggle-btn .bar-h {
  transform: rotate(45deg);
}

.project-card.open .toggle-btn .bar-v {
  transform: rotate(135deg);
}


/* ========================
   EXPANDABLE DETAIL PANEL (flap)
   Uses max-height trick for smooth CSS height animation.
   Inner element fades + slides up after the container opens.
   ======================== */
.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 18px;
}

/* Outer: clips content and animates from 0 → max-height */
.details {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Inner: fades in with a slight upward slide (staggered delay) */
.details-inner {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s 0.12s, transform 0.25s 0.12s;
  padding: 16px 18px 0;
}

/* .open class triggers both layers */
.project-card.open .details {
  max-height: 260px;
}

.project-card.open .details-inner {
  opacity: 1;
  transform: translateY(0);
}


/* ========================
   PANEL CONTENT: description and tags
   ======================== */
.project-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(180, 195, 225, 0.55);
  margin-bottom: 14px;
}

/* Tag colors: --tag-rgb sets the background and border tint */
.project-card .tag {
  background: rgba(var(--tag-rgb), 0.1);
  border: 1px solid rgba(var(--tag-rgb), 0.2);
}

.project-card .tag i {
  font-size: 11px;
}

.tag-yellow { --tag-rgb: 255, 193, 7; color: #ffc107; }
.tag-purple { --tag-rgb: 168, 85, 247; color: #d8b4fe; }
.tag-sky { --tag-rgb: 56, 189, 248; color: #bae6fd; }
.tag-cyan { --tag-rgb: 56, 189, 248; color: #7dd3fc; }
.tag-amber { --tag-rgb: 245, 158, 11; color: #fcd34d; }
.tag-teal { --tag-rgb: 20, 184, 166; color: #99f6e4; }
.tag-emerald { --tag-rgb: 16, 185, 129; color: #6ee7b7; }
.tag-violet { --tag-rgb: 139, 92, 246; color: #c4b5fd; }
.tag-blue { --tag-rgb: 59, 130, 246; color: #93c5fd; }
.tag-orange { --tag-rgb: 249, 115, 22; color: #fdba74; }
.tag-pink { --tag-rgb: 236, 72, 153; color: #f9a8d4; }

/* ========================
   STATS ROW
   Quick-glance metrics at the bottom of the card.
   ======================== */
.stats {
  display: flex;
  gap: 20px;
  padding: 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
  font-family: monospace;
  color: #bae6fd;
}

/* The first number takes the card's color */
.stat:first-child .stat-value {
  color: var(--accent-light);
}

.stat-label {
  font-size: 9.5px;
  color: rgba(148, 163, 184, 0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 1px;
}


/* ========================
   CARD FOOTER
   Repo meta (branch, language)
   ======================== */
.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.project-meta {
  display: flex;
  gap: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.38);
}

.meta-item i {
  font-size: 12px;
}

/* Icon colors: branch, language, notebook, Streamlit */
.meta-item .bi-git { color: #d41c03; }
.meta-item .bi-code-slash { color: #38bdf8; }
.meta-item .bi-journal-code { color: #f57c00; }
.meta-item .bi-bar-chart-line-fill { color: #ff4b4b; }
.meta-item .bi-file-earmark-bar-graph { color: #f2c811; }
.meta-item .bi-filetype-js { color: #f7df1e; }

/* "Live site" link in the card footer */
.meta-link {
  text-decoration: none;
}

.meta-link:hover {
  color: var(--accent-light);
}


/*--------------------------------------------------------------
  # 4.6 Contact (contact.html)
  Rounded glass cards: hours, email/location and socials on the
  left, the form on the right.
--------------------------------------------------------------*/
.contact .title-icon {
  color: #b2afff;
}

.text-gradient {
  background: linear-gradient(135deg, #7b76e4, #b2afff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass-card {
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 28px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.glass-card:hover {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* Round icon with a soft indigo glow */
.round-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.15);
  color: #a5a1ff;
  font-size: 1.15rem;
  box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.06);
}

.round-icon-lg {
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
  margin: 0 auto 1rem;
  box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.07), 0 0 30px rgba(79, 70, 229, 0.25);
}

.card-title-sm {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* ── Working hours ─────────────────────────────────────────── */
.hours-card {
  text-align: center;
}

.hours-days {
  color: #a5a1ff;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.hours-time {
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hours-time span {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
}

/* "Available now" / "Closed" badge (colors are set by main.js) */
#status-badge {
  font-size: 0.75rem;
  padding: 7px 14px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

/* ── Email and location rows ───────────────────────────────── */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  color: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.contact-row:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.3);
  color: inherit;
}

.contact-item {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.contact-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.contact-value {
  color: var(--text-primary);
  font-weight: 500;
  overflow-wrap: anywhere;
}

a.contact-value:hover {
  color: #a5a1ff;
}

.copy-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.copy-btn:hover {
  color: #fff;
  background: rgba(79, 70, 229, 0.25);
  border-color: rgba(79, 70, 229, 0.5);
}

/* ── Social links: round buttons, brand color on hover ─────── */
.social-card {
  text-align: center;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 1rem;
}

.social-btn {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a0a0a0;
  font-size: 1.35rem;
  transition: transform 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.social-btn:hover {
  transform: translateY(-4px);
}

.social-btn.linkedin:hover {
  color: #0a8fd8;
  border-color: rgba(0, 119, 181, 0.5);
  box-shadow: 0 8px 20px rgba(0, 119, 181, 0.25);
}

.social-btn.github:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

.social-btn.whatsapp:hover {
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.5);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.2);
}

/* ── Form ──────────────────────────────────────────────────── */
.form-card {
  padding: 2.25rem;
}

.form-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.form-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.contact-form .form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 6px 14px;
}

/* Pill-shaped fields */
.contact-form .form-control {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: #fff;
  padding: 12px 20px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.contact-form textarea.form-control {
  border-radius: 22px;
  min-height: 160px;
  resize: vertical;
}

.contact-form .form-control::placeholder {
  color: rgba(148, 163, 184, 0.55);
}

.contact-form .form-control:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: #6d67f0;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
  color: #fff;
}

/* Error shown above the send button (filled in by main.js) */
.form-error {
  margin: 0;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Pill button, indigo to blue */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 32px;
  border: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, #4f46e5, var(--accent-color));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.submit-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.45);
}

.submit-btn:disabled {
  opacity: 0.7;
  transform: none;
}

/* ── "Message sent" window ─────────────────────────────────── */
.success-modal {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
}

.success-icon {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.07), 0 0 30px rgba(34, 197, 94, 0.25);
}

.success-text {
  color: var(--text-secondary);
}

.success-text span {
  color: var(--text-primary);
  font-weight: 700;
}


/*--------------------------------------------------------------
  # 4.7 Keyboard focus
--------------------------------------------------------------*/

/* Visible outline when moving with the keyboard (Tab) */
.menu-btn:focus-visible,
.skill-card:focus-visible,
.preview-btn:focus-visible,
.toggle-btn:focus-visible,
.github-btn:focus-visible,
.copy-btn:focus-visible,
.footer-icon:focus-visible,
.submit-btn:focus-visible,
.social-btn:focus-visible,
.scroll-top:focus-visible {
  outline: 2px solid var(--accent-color, #1387c1);
  outline-offset: 3px;
}


/*==============================================================
  # 5. MOBILE
  Every rule for small screens, grouped by page.
  Phones are up to 576px, tablets up to 992px, the menu turns
  into the hamburger below 1200px.
==============================================================*/

/*--------------------------------------------------------------
  # 5.1 Shared (sections, titles)
--------------------------------------------------------------*/

@media (max-width: 1199px) {
  section,
  .section {
    scroll-margin-top: 66px;
  }
}

@media (max-width: 576px) {
  /* Phones: smaller title and side lines so the title stays on one line */
  .section-title h1 {
    font-size: 26px;
  }

  .section-title h1:before,
  .section-title h1:after {
    width: 24px;
  }

  .section-title h1:before {
    margin-right: 10px;
  }

  .section-title h1:after {
    margin-left: 10px;
  }
}

/*--------------------------------------------------------------
  # 5.2 Navigation menu (hamburger + full-screen menu)
--------------------------------------------------------------*/

@media (max-width: 1199px) {
  /* ── Open menu: full-screen dark overlay ───────────────────── */
  .menu-open {
    overflow: hidden;
    /* Locks body scroll while menu is open */
  }

  .menu-open .navmenu {
    position: fixed;
    inset: 0;
    /* Deep dark background — full screen */
    background: #0a0f1a;
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ── Open menu: centered column of links ───────────────────── */
  .menu-open .navmenu ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Separator lines handle spacing */
    padding: 0;
    margin: 0;
    width: 100%;
  }

  /* ── Individual nav items ───────────────────────────────────── */
  .menu-open .navmenu ul li {
    width: 100%;
    text-align: center;
    /* Thin separator line between items (matches the reference) */
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .menu-open .navmenu ul li:last-child {
    border-bottom: none;
  }

  /* ── Nav links ──────────────────────────────────────────────── */
  .menu-open .navmenu a {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center text horizontally */
    padding: 22px 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    font-weight: 500;
    font-family: var(--nav-font, 'Poppins', sans-serif);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    width: 100%;
  }

  /* Hover: accent color highlight */
  .menu-open .navmenu a:hover,
  .menu-open .navmenu .active {
    color: var(--accent-color, #1387c1);
    background: rgba(255, 255, 255, 0.03);
  }

  /* ── Open menu: close button (×) ───────────────────────────── */
  /* Position the toggle button at the top of the overlay */
  .menu-open .menu-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 32px;
    z-index: 9999;
    transition: color 0.2s, transform 0.2s;
  }

  .menu-open .menu-btn:hover {
    color: #fff;
    transform: scale(1.1);
  }

  /* ── Base mobile styles: hamburger button, hidden link list ── */
  .menu-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--nav-color);
    font-size: 28px;
    line-height: 0;
    margin-right: 10px;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 9999;
  }

  .navmenu {
    padding: 0;
    z-index: 9997;
  }

  .navmenu ul {
    display: none;
    list-style: none;
  }
}

/*--------------------------------------------------------------
  # 5.3 Home (index.html)
--------------------------------------------------------------*/

@media (max-width: 992px) {
  .hero .hero-content {
    text-align: center;
    margin-bottom: 3rem;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero .hero-content h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .hero .hero-actions {
    flex-direction: column;
  }
}

/*--------------------------------------------------------------
  # 5.4 About (about.html)
--------------------------------------------------------------*/

@media (max-width: 640px) {
  section.timeline::before {
    left: 1.5rem;
  }

  article.timeline-item {
    grid-template-columns: 1fr;
    padding-left: 3.5rem;
    gap: 1rem;
  }

  article.timeline-item::before {
    left: 1.5rem;
    top: 1.5rem;
    transform: translateX(-50%);
  }

  article.timeline-item:nth-child(odd) .timeline-content,
  article.timeline-item:nth-child(even) .timeline-content {
    grid-column: 1;
    grid-row: 2;
  }

  article.timeline-item:nth-child(odd) .timeline-icon,
  article.timeline-item:nth-child(even) .timeline-icon {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
  }

  .timeline-icon-box {
    width: 5rem;
    aspect-ratio: 1;
    border-radius: 0.75rem;
  }
}

/*--------------------------------------------------------------
  # 5.5 Resume (resume.html)
--------------------------------------------------------------*/

@media (max-width: 991.98px) {
  .resume .resume-item {
    margin-bottom: 2rem;
  }
}

@media (max-width: 767.98px) {
  .resume .resume-item .resume-content {
    padding-left: 1rem;
  }

  .resume .resume-item article::before {
    left: -2rem;
  }
}


/*--------------------------------------------------------------
  # 5.6 Contact (contact.html)
--------------------------------------------------------------*/

@media (max-width: 576px) {
  .glass-card,
  .form-card {
    padding: 1.5rem 1.25rem;
  }

  .contact-card {
    padding: 0.75rem;
  }

  .contact-value {
    font-size: 0.9rem;
  }
}
