/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {
  --bg-gradient:
    linear-gradient(
      135deg,
      #f0f9ff 0%,
      #e0e7ff 50%,
      #fae8ff 100%
    );

  --nav-bg: rgba(255, 255, 255, 0.92);

  --bg: #f3f1ea;
  --bg-secondary: #e9e7df;

  --paper: #f3f1ea;
  --paper-2: #e9e7df;

  --ink: #171717;
  --muted: #66645f;

  --line: #171717;

  --accent: #d94b3f;
  --accent-dark: #b9362d;

  --white: #fffdf8;

  --max: 1180px;

  --navy: #0f2747;

  --border: #e2e8f0;

  --card-bg: #f8fafc;

  --text-muted: #64748b;

  --radius: 16px;

  --shadow:
    0 10px 30px rgba(15, 39, 71, 0.08);

  --transition:
    0.25s ease;
}


/* =========================================================
   RESET
========================================================= */

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


html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}


body {
  min-height: 100vh;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--ink);

  background:
    var(--bg-gradient);

  line-height: 1.6;

  overflow-x: hidden;
}


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


button,
input,
textarea {
  font: inherit;
}


button {
  cursor: pointer;
}


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


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


/* =========================================================
   ACCESSIBILITY
========================================================= */

.skip-link {
  position: fixed;

  left: 16px;
  top: -100px;

  z-index: 9999;

  padding: 10px 16px;

  color: #ffffff;
  background: var(--navy);

  border-radius: 8px;

  transition: top var(--transition);
}


.skip-link:focus {
  top: 16px;
}


/* =========================================================
   HEADER
========================================================= */

.site-header,
header {
  position: sticky;

  top: 0;

  z-index: 1000;

  width: 100%;

  background: var(--nav-bg);

  backdrop-filter: blur(14px);

  border-bottom: 2px solid var(--ink);
}


.site-header {
  min-height: 72px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 30px;

  padding: 14px 30px;
}


.brand-mark {
  flex-shrink: 0;

  font-size: 1.2rem;

  font-weight: 800;

  letter-spacing: -0.03em;

  color: var(--navy);
}


.nav-wrap {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 20px;

  min-width: 0;
}


.main-nav,
#nav-menu {
  display: flex;

  align-items: center;

  gap: 8px;
}


.main-nav a,
#nav-menu a {
  position: relative;

  padding: 8px 12px;

  font-size: 0.92rem;

  font-weight: 700;

  white-space: nowrap;

  border-radius: 8px;

  transition:
    background var(--transition),
    color var(--transition);
}


.main-nav a:hover,
#nav-menu a:hover {
  color: #ffffff;

  background: var(--navy);
}


.main-nav a.active,
#nav-menu a.active {
  color: #ffffff;

  background: var(--accent);
}


.header-actions {
  display: flex;

  align-items: center;

  gap: 10px;
}


.menu-toggle {
  display: none;

  width: 44px;
  height: 44px;

  padding: 8px;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  gap: 5px;

  border: 2px solid var(--ink);

  border-radius: 8px;

  background: var(--white);
}


.menu-toggle span {
  display: block;

  width: 22px;
  height: 2px;

  background: var(--ink);

  transition: transform var(--transition);
}


/* =========================================================
   HERO
========================================================= */

.hero {
  width: 100%;

  padding:
    clamp(60px, 9vw, 110px)
    24px
    clamp(50px, 7vw, 90px);

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.75),
      rgba(255, 255, 255, 0.35)
    );

  border-bottom: 2px solid var(--ink);
}


.hero-inner {
  width: min(var(--max), 100%);

  margin: 0 auto;

  display: grid;

  grid-template-columns:
    minmax(180px, 280px)
    minmax(0, 1fr);

  align-items: center;

  gap: clamp(35px, 7vw, 90px);
}


.profile-photo {
  width: 100%;

  aspect-ratio: 1 / 1;

  object-fit: cover;

  border: 3px solid var(--ink);

  border-radius: 50%;

  background: var(--paper-2);

  box-shadow:
    12px 12px 0 var(--accent);
}


.hero-text {
  min-width: 0;
}


.hero-text h1 {
  margin-bottom: 12px;

  font-size:
    clamp(2.3rem, 6vw, 5rem);

  line-height: 0.98;

  letter-spacing: -0.06em;

  color: var(--navy);
}


.hero-subline {
  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 18px;

  margin-bottom: 20px;
}


.hero-subline p {
  font-size: clamp(1rem, 2vw, 1.25rem);

  font-weight: 700;

  color: var(--ink);
}


.hero-intro,
.about-text {
  max-width: 760px;

  font-size: 1.05rem;

  line-height: 1.8;
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-height: 44px;

  padding: 10px 18px;

  border: 2px solid var(--ink);

  border-radius: 8px;

  font-weight: 800;

  cursor: pointer;

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


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


.btn-primary {
  color: #ffffff;

  background: var(--accent);

  border-color: var(--ink);

  box-shadow:
    4px 4px 0 var(--ink);
}


.btn-primary:hover {
  background: var(--accent-dark);

  box-shadow:
    6px 6px 0 var(--ink);
}




/* =========================================================
   MAIN CONTAINER
========================================================= */

.container {
  width: min(var(--max), calc(100% - 40px));

  margin: 0 auto;
}


/* =========================================================
   SECTIONS
========================================================= */

.section-box {
  margin: 50px 0;

  padding: clamp(24px, 4vw, 42px);

  background: rgba(255, 255, 255, 0.82);

  border: 2px solid var(--ink);

  border-radius: var(--radius);

  box-shadow: var(--shadow);

  scroll-margin-top: 100px;
}


.section-box > h2 {
  margin-bottom: 28px;

  font-size:
    clamp(1.7rem, 4vw, 2.4rem);

  line-height: 1.1;

  letter-spacing: -0.04em;

  color: var(--navy);
}


/* =========================================================
   PROJECTS + EDUCATION
   AUTOMATIC NUMBER OF CARDS PER ROW
========================================================= */

#public-site .grid {
  display: flex;

  flex-wrap: wrap;

  align-items: stretch;

  justify-content: flex-start;

  gap: 22px;
}


/*
   Default:
   3 cards per row on desktop.
*/

#public-site .grid > .card {
  flex:
    0 1
    calc(33.333% - 15px);

  max-width:
    calc(33.333% - 15px);

  min-width: 0;

  width: 100%;

  box-sizing: border-box;
}


/*
   If there is only ONE card,
   don't stretch it across the whole page.
*/

#public-site .grid > .card:only-child {
  flex-basis: min(100%, 420px);

  max-width: 420px;
}


/*
   If there are exactly TWO cards,
   display them side-by-side.
*/

#public-site .grid > .card:nth-child(1):nth-last-child(2),
#public-site .grid > .card:nth-child(2):nth-last-child(1) {
  flex-basis:
    calc(50% - 11px);

  max-width:
    calc(50% - 11px);
}


/* =========================================================
   CERTIFICATES
========================================================= */

#public-site .cert-grid {
  display: flex;

  flex-wrap: wrap;

  align-items: stretch;

  justify-content: flex-start;

  gap: 20px;
}


#public-site .cert-grid > .cert-card {
  flex:
    0 1
    calc(33.333% - 14px);

  max-width:
    calc(33.333% - 14px);

  min-width: 0;

  width: 100%;

  box-sizing: border-box;
}


/* One certificate */

#public-site .cert-grid > .cert-card:only-child {
  flex-basis: min(100%, 420px);

  max-width: 420px;
}


/* Two certificates */

#public-site .cert-grid > .cert-card:nth-child(1):nth-last-child(2),
#public-site .cert-grid > .cert-card:nth-child(2):nth-last-child(1) {
  flex-basis:
    calc(50% - 10px);

  max-width:
    calc(50% - 10px);
}


/* =========================================================
   GENERAL CARD
========================================================= */

#public-site .card {
  position: relative;

  display: flex;

  flex-direction: column;

  overflow: hidden;

  padding: 24px;

  background: var(--white);

  border: 2px solid var(--ink);

  border-radius: 12px;

  box-shadow:
    6px 6px 0 var(--ink);

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}


#public-site .card:hover {
  /* Box-shadow is kept static on hover here; depth is now entirely driven by the hardware-accelerated translate3d from the JS script */
  box-shadow: 6px 6px 0 var(--ink), 0 12px 24px rgba(0, 150, 255, 0.15);
}

#public-site .card h3 {
  margin-bottom: 10px;

  font-size: 1.25rem;

  line-height: 1.25;

  color: var(--navy);
}


#public-site .card p {
  line-height: 1.7;
}


#public-site .card img {
  width: 100%;

  max-height: 280px;

  object-fit: cover;

  margin-bottom: 18px;

  border: 1px solid var(--border);

  border-radius: 8px;
}


/* =========================================================
   CERTIFICATE CARD
========================================================= */

#public-site .cert-card {
  position: relative;

  display: flex;

  flex-direction: column;

  overflow: hidden;

  padding: 20px;

  background: var(--white);

  border: 2px solid var(--ink);

  border-radius: 12px;

  box-shadow:
    5px 5px 0 var(--ink);

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}


#public-site .cert-card:hover {
  transform: translateY(-4px);

  box-shadow:
    8px 8px 0 var(--ink);
}


#public-site .cert-card h3 {
  margin-bottom: 10px;

  font-size: 1.15rem;

  line-height: 1.3;

  color: var(--navy);
}


#public-site .cert-card img {
  width: 100%;

  max-height: 260px;

  object-fit: contain;

  margin-bottom: 16px;

  background: #ffffff;

  border-radius: 8px;
}


/* =========================================================
   SKILLS
========================================================= */

.skills-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.skills-wrapper > * {
  max-width: 100%;
}

/* Compact individual skill boxes */
.skills-wrapper .badge,
.skill,
.skill-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  color: var(--navy);
  background: var(--card-bg);
  border: 1px solid var(--ink);
  border-radius: 7px;
  font-size: 0.78rem;
  line-height: 1.25;
  font-weight: 700;
}

.skills-wrapper .badge-name {
  white-space: nowrap;
}

.skills-wrapper .badge-category {
  font-size: 0.68rem;
  font-weight: 600;
}

.skills-wrapper .badge-level {
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.64rem;
  line-height: 1.1;
}


/* =========================================================
   CONTACT
========================================================= */

.contact-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 0.8fr)
    minmax(0, 1.2fr);

  gap: 28px;

  align-items: start;
}


.contact-card-info {
  padding: 24px;

  background: var(--white);

  border: 2px solid var(--ink);

  border-radius: 12px;
}


.contact-card-info p {
  display: flex;

  flex-direction: column;

  gap: 3px;

  padding: 14px 0;

  border-bottom: 1px solid var(--border);
}


.contact-card-info p:last-of-type {
  border-bottom: 0;
}


.contact-card-info strong {
  color: var(--navy);

  font-size: 0.85rem;

  text-transform: uppercase;

  letter-spacing: 0.06em;
}


.contact-card-info span {
  word-break: break-word;
}


.social-links {
  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  margin-top: 18px;
}


.social-links a {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-height: 40px;

  padding: 8px 12px;

  color: var(--navy);

  background: var(--paper);

  border: 2px solid var(--ink);

  border-radius: 8px;

  font-weight: 700;

  transition:
    background var(--transition),
    color var(--transition);
}


.social-links a:hover {
  color: #ffffff;

  background: var(--navy);
}


/* =========================================================
   FORM
========================================================= */

#contact-form {
  padding: 24px;

  background: var(--white);

  border: 2px solid var(--ink);

  border-radius: 12px;
}


.form-group {
  display: flex;

  flex-direction: column;

  gap: 7px;

  margin-bottom: 18px;
}


.form-group label {
  font-size: 0.9rem;

  font-weight: 800;

  color: var(--navy);
}


.form-group input,
.form-group textarea {
  width: 100%;

  padding: 12px 14px;

  color: var(--ink);

  background: #ffffff;

  border: 2px solid var(--ink);

  border-radius: 8px;

  outline: none;

  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}


.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 3px rgba(217, 75, 63, 0.14);
}


.form-group textarea {
  min-height: 130px;

  resize: vertical;
}


.contact-submit {
  width: 100%;
}


.contact-status {
  min-height: 20px;

  margin-top: 12px;

  font-weight: 600;

  font-size: 0.9rem;
}


.hp-field {
  position: absolute;

  left: -9999px;

  width: 1px;

  height: 1px;

  overflow: hidden;

  opacity: 0;

  pointer-events: none;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer,
footer {
  margin-top: 70px;

  padding: 30px 20px;

  text-align: center;

  color: #ffffff;

  background: var(--navy);

  border-top: 2px solid var(--ink);

  font-size: 0.9rem;
}


/* =========================================================
   BACK TO TOP
========================================================= */

.back-to-top {
  position: fixed;

  right: 22px;

  bottom: 22px;

  z-index: 900;

  width: 46px;

  height: 46px;

  display: flex;

  align-items: center;

  justify-content: center;

  color: #ffffff;

  background: var(--accent);

  border: 2px solid var(--ink);

  border-radius: 50%;

  box-shadow:
    4px 4px 0 var(--ink);

  font-size: 1.3rem;

  font-weight: 900;

  opacity: 0;

  visibility: hidden;

  transform: translateY(10px);

  transition:
    opacity var(--transition),
    visibility var(--transition),
    transform var(--transition);
}


.back-to-top.show {
  opacity: 1;

  visibility: visible;

  transform: translateY(0);
}


.back-to-top:hover {
  background: var(--accent-dark);

  transform:
    translateY(-3px);
}


/* =========================================================
   TABLE / MEDIA SAFETY
========================================================= */

#public-site .card table,
#public-site .cert-card table {
  width: 100%;

  max-width: 100%;

  overflow-x: auto;
}


#public-site video {
  display: block;

  width: 100%;

  max-width: 100%;

  border-radius: 8px;
}


#public-site iframe {
  max-width: 100%;

  border: 0;

  border-radius: 8px;
}


/* =========================================================
   900px
========================================================= */

@media (max-width: 900px) {

  .site-header,
  header {
    padding: 12px 20px;
  }


  .main-nav,
  #nav-menu {
    gap: 4px;
  }


  .main-nav a,
  #nav-menu a {
    padding: 7px 8px;

    font-size: 0.85rem;
  }


  .hero-inner {
    grid-template-columns:
      minmax(160px, 220px)
      minmax(0, 1fr);

    gap: 40px;
  }


  .container {
    width: min(var(--max), calc(100% - 30px));
  }


  /*
     Projects / Education / Certificates
     become two columns.
  */

  #public-site .grid > .card,
  #public-site .grid > .card:nth-child(1):nth-last-child(2),
  #public-site .grid > .card:nth-child(2):nth-last-child(1),
  #public-site .cert-grid > .cert-card,
  #public-site .cert-grid > .cert-card:nth-child(1):nth-last-child(2),
  #public-site .cert-grid > .cert-card:nth-child(2):nth-last-child(1) {
    flex-basis:
      calc(50% - 11px);

    max-width:
      calc(50% - 11px);
  }


  /*
     One card remains compact.
  */

  #public-site .grid > .card:only-child,
  #public-site .cert-grid > .cert-card:only-child {
    flex-basis: min(100%, 420px);

    max-width: 420px;
  }


  .contact-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   MOBILE NAVIGATION
========================================================= */

@media (max-width: 760px) {

  .site-header,
  header {
    position: sticky;

    min-height: 64px;

    padding: 10px 16px;
  }


  .brand-mark {
    font-size: 1.05rem;
  }


  .menu-toggle {
    display: flex;
  }


  .nav-wrap {
    position: relative;
  }


  .main-nav,
  #nav-menu {
    position: absolute;

    top: calc(100% + 12px);

    right: 0;

    width: min(280px, calc(100vw - 32px));

    display: none;

    flex-direction: column;

    align-items: stretch;

    gap: 5px;

    padding: 12px;

    background: rgba(255, 255, 255, 0.98);

    border: 2px solid var(--ink);

    border-radius: 12px;

    box-shadow:
      6px 6px 0 var(--ink);
  }


  .main-nav.open,
  #nav-menu.open {
    display: flex;
  }


  .main-nav a,
  #nav-menu a {
    width: 100%;

    padding: 12px;

    text-align: left;

    font-size: 0.95rem;
  }

}


/* =========================================================
   620px
========================================================= */

@media (max-width: 620px) {

  html {
    scroll-padding-top: 80px;
  }


  .site-header,
  header {
    padding: 10px 14px;
  }


  .hero {
    padding:
      50px 18px
      45px;
  }


  .hero-inner {
    grid-template-columns: 1fr;

    gap: 32px;

    text-align: center;
  }


  .profile-photo {
    width: min(210px, 65vw);

    margin: 0 auto;

    box-shadow:
      8px 8px 0 var(--accent);
  }


  .hero-text h1 {
    font-size:
      clamp(2.2rem, 12vw, 3.6rem);
  }


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


  .hero-intro,
  .about-text {
    margin: 0 auto;

    font-size: 0.95rem;
  }


  .container {
    width: calc(100% - 20px);
  }


  .section-box {
    margin: 30px 0;

    padding: 20px 16px;

    border-radius: 12px;
  }


  .section-box > h2 {
    margin-bottom: 20px;

    font-size: 1.65rem;
  }


  /*
     One card per row on mobile.
  */

  #public-site .grid,
  #public-site .cert-grid {
    gap: 16px;
  }


  #public-site .grid > .card,
  #public-site .grid > .card:nth-child(1):nth-last-child(2),
  #public-site .grid > .card:nth-child(2):nth-last-child(1),
  #public-site .cert-grid > .cert-card,
  #public-site .cert-grid > .cert-card:nth-child(1):nth-last-child(2),
  #public-site .cert-grid > .cert-card:nth-child(2):nth-last-child(1) {
    flex-basis: 100%;

    max-width: 100%;
  }


  #public-site .grid > .card:only-child,
  #public-site .cert-grid > .cert-card:only-child {
    flex-basis: 100%;

    max-width: 100%;
  }


  #public-site .card,
  #public-site .cert-card {
    padding: 18px;

    box-shadow:
      4px 4px 0 var(--ink);
  }


  .contact-card-info,
  #contact-form {
    padding: 18px;
  }


  .back-to-top {
    right: 14px;

    bottom: 14px;

    width: 42px;

    height: 42px;
  }

}


/* =========================================================
   VERY SMALL DEVICES
========================================================= */

@media (max-width: 380px) {

  .brand-mark {
    font-size: 0.95rem;
  }


  .hero {
    padding-left: 14px;

    padding-right: 14px;
  }


  .section-box {
    padding: 18px 13px;
  }


  #public-site .card,
  #public-site .cert-card {
    padding: 15px;
  }


  .btn {
    width: 100%;
  }


  .hero-subline {
    width: 100%;
  }

}


/* =========================================================
   DARK MODE
========================================================= */

@media (prefers-color-scheme: dark) {

  :root {
    --bg: #111827;

    --bg-secondary: #1f2937;

    --ink: #f8fafc;

    --muted: #cbd5e1;

    --line: #f8fafc;

    --white: #18202d;

    --card-bg: #1e293b;

    --border: #475569;
  }


  body {
    background:
      linear-gradient(
        135deg,
        #111827 0%,
        #172554 50%,
        #1e1b4b 100%
      );

    color: var(--ink);
  }


  .site-header,
  header {
    background: rgba(15, 23, 42, 0.94);
  }


  .brand-mark {
    color: #ffffff;
  }


  .main-nav a,
  #nav-menu a {
    color: #e2e8f0;
  }


  .hero {
    background:
      rgba(15, 23, 42, 0.6);
  }


  .hero-text h1,
  .section-box > h2,
  #public-site .card h3,
  #public-site .cert-card h3 {
    color: #ffffff;
  }


  .section-box,
  #public-site .card,
  #public-site .cert-card,
  .contact-card-info,
  #contact-form {
    background: rgba(24, 32, 45, 0.94);
  }


  .form-group input,
  .form-group textarea {
    color: #ffffff;

    background: #0f172a;

    border-color: #64748b;
  }


  .menu-toggle {
    color: #ffffff;

    background: #1e293b;

    border-color: #f8fafc;
  }


  .menu-toggle span {
    background: #ffffff;
  }


  .main-nav a:hover,
  #nav-menu a:hover {
    background: #ffffff;

    color: #0f172a;
  }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }


  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;
  }

}

/* =========================================================
   PROFILE SWITCHER
========================================================= */

.profile-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}


.profile-switcher {
  width: 100%;

  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 8px;
}


.profile-switch-btn {
  min-height: 46px;

  padding: 10px 16px;

  color: var(--navy);

  background: var(--white);

  border: 2px solid var(--ink);

  border-radius: 9px;

  font-size: 0.9rem;

  font-weight: 800;

  cursor: pointer;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}


.profile-switch-btn:hover {
  transform: translateY(-2px);

  box-shadow: 3px 3px 0 var(--ink);
}


.profile-switch-btn.active {
  color: #ffffff;

  background: var(--accent);

  box-shadow: 3px 3px 0 var(--ink);
}


/* =========================================================
   ACADEMIC / BLOG VIEW
========================================================= */

.academic-view-hidden {
  display: none !important;
}


.blog-view-hidden {
  display: none !important;
}


.professional-view-hidden {
  display: none !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 620px) {

  .profile-area {
    width: min(100%, 280px);

    margin: 0 auto;

    gap: 18px;
  }


  .profile-switcher {
    gap: 6px;
    grid-template-columns: repeat(3, 1fr);
  }


  .profile-switch-btn {
    min-height: 44px;

    padding: 9px 10px;

    font-size: 0.85rem;
  }

}



/* Dedicated blog page */
.blog-page{padding-top:30px;padding-bottom:60px}.blog-page-heading{margin-bottom:30px}.blog-page-heading h1{margin:0 0 10px}.blog-page-heading p{line-height:1.7}.blog-row{display:grid;grid-template-columns:minmax(0,1fr) 34%;gap:30px;align-items:center;padding:28px 0;border-top:2px solid var(--ink)}.blog-row:first-child{border-top:0;padding-top:0}.blog-row-copy h2{margin:0 0 12px}.blog-row-copy p{line-height:1.8;white-space:pre-line}.blog-row-image img,.blog-image-placeholder{width:100%;aspect-ratio:16/9;object-fit:cover;border:2px solid var(--ink);border-radius:10px}.blog-image-placeholder{display:grid;place-items:center;color:var(--text-muted);border-style:dashed}.blog-admin-item{align-items:center}

/* Education: college information + video side-by-side on larger screens */
#education-container{display:flex;flex-direction:column;gap:24px}.education-entry{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:stretch}.education-entry .card{height:100%;box-sizing:border-box}.education-video .card-media{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px}.education-video-placeholder{min-height:220px;display:grid;place-items:center;border:2px dashed var(--border);border-radius:8px;color:var(--text-muted);font-weight:800}

/* Admin layout cleanup */
#admin-site .container{max-width:1100px;margin:0 auto;padding:24px 18px}#admin-site .tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}#admin-site .tab-btn{padding:11px 15px;border:2px solid var(--ink);border-radius:9px;background:var(--white);font-weight:800;cursor:pointer}#admin-site .tab-btn.active{background:var(--accent);color:#fff}#admin-site .tab-content{border:2px solid var(--ink);border-radius:12px;padding:24px;background:var(--white)}#admin-site .form-group{margin-bottom:16px}#admin-site input,#admin-site textarea,#admin-site select{width:100%;box-sizing:border-box;padding:11px;border:1px solid var(--border);border-radius:8px}#admin-site .list-item{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid var(--border)}#admin-site .list-item-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:700px){.education-entry{grid-template-columns:1fr}.education-video{order:2}.blog-row{grid-template-columns:1fr;gap:18px}#admin-site .tab-content{padding:16px}#admin-site .tabs{display:grid;grid-template-columns:1fr 1fr}#admin-site .tab-btn{width:100%}#admin-site .list-item{align-items:flex-start;flex-direction:column}.blog-row-image{order:2}}

/* =========================================================
   ADMIN DASHBOARD — RESPONSIVE / COMPACT / LARGE SCREEN
========================================================= */

#admin-site {
  --admin-content: 1180px;
  --admin-gap: clamp(14px, 2vw, 24px);
  background: var(--bg-gradient);
}

#admin-site #auth-section {
  width: min(100% - 32px, 460px);
  margin: clamp(28px, 8vh, 80px) auto;
  padding: clamp(22px, 4vw, 34px);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 7px 7px 0 var(--ink);
}

#admin-site #dashboard-section > header {
  width: 100%;
  padding: 14px clamp(16px, 3vw, 34px);
}

#admin-site #dashboard-section > header h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  line-height: 1.15;
}

#admin-site #dashboard-section > header nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

#admin-site .container {
  width: min(100% - 32px, var(--admin-content));
  padding: clamp(16px, 2.5vw, 30px) 0 48px;
}

#admin-site .tab-content {
  width: 100%;
  min-width: 0;
}


#admin-site .tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: var(--admin-gap);
}

#admin-site .tab-btn {
  min-height: 46px;
  padding: 10px 12px;
  white-space: normal;
  line-height: 1.2;
  font-size: clamp(.82rem, 1.3vw, .95rem);
  box-shadow: 2px 2px 0 transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

#admin-site .tab-btn:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--ink);
}

#admin-site .tab-content {
  display: none;
  padding: clamp(18px, 3vw, 30px);
  border-radius: 14px;
  box-shadow: 5px 5px 0 rgba(23, 23, 23, .12);
}

#admin-site .tab-content h3 {
  margin-bottom: 16px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

#admin-site .settings-block {
  padding: clamp(14px, 2vw, 20px);
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}

#admin-site .form-group {
  gap: 7px;
  margin-bottom: 15px;
}

#admin-site .form-group input:not([type="file"]),
#admin-site .form-group textarea,
#admin-site .form-group select,
#admin-site input:not([type="file"]),
#admin-site textarea,
#admin-site select {
  min-height: 44px;
  padding: 10px 12px;
}

#admin-site textarea {
  min-height: 120px;
}

/* File inputs get their own comfortable drop-box instead of a tiny native control. */
#admin-site input[type="file"] {
  width: 100%;
  min-height: 48px;
  padding: 8px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

#admin-site input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--card-bg);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

/* Profile photo: fixed responsive preview box, consistent on every device. */
#admin-site #photo-preview-container {
  width: min(100%, 320px);
  aspect-ratio: 4 / 5;
  min-height: 220px;
  margin: 18px auto 4px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 4px 4px 0 var(--ink);
}

#admin-site #photo-preview-container .profile-preview {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  display: block;
  object-fit: cover;
  object-position: center;
}

#admin-site #photo-preview-container:empty::before {
  content: "Photo preview";
  color: var(--text-muted);
  font-weight: 700;
}

/* Media/status areas stay inside the form instead of stretching the page. */
#admin-site [id$="-image-status"],
#admin-site [id$="-media-status"],
#admin-site [id$="-report-status"] {
  max-width: 100%;
  overflow-wrap: anywhere;
}

#admin-site .list-item {
  min-width: 0;
  padding: 13px 0;
  gap: 12px;
}

#admin-site .list-item > span:not(.drag-handle):first-of-type {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

#admin-site .list-item-actions {
  flex: 0 0 auto;
}

#admin-site .btn {
  min-height: 42px;
  padding: 9px 14px;
}

@media (min-width: 1100px) {
  #admin-site .tabs {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #admin-site .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #admin-site .container {
    width: min(100% - 20px, var(--admin-content));
  }

  #admin-site #dashboard-section > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  #admin-site #dashboard-section > header nav {
    width: 100%;
    justify-content: flex-start;
  }

  #admin-site .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  #admin-site .tab-btn {
    min-height: 44px;
    padding: 9px 8px;
  }

  #admin-site .list-item {
    align-items: stretch;
  }

  #admin-site .list-item-actions {
    width: 100%;
  }

  #admin-site .list-item-actions .btn {
    flex: 1 1 120px;
  }

  #admin-site #photo-preview-container {
    width: min(100%, 260px);
    min-height: 200px;
  }
}

@media (max-width: 420px) {
  #admin-site #auth-section {
    width: min(100% - 20px, 460px);
    padding: 20px 16px;
  }

  #admin-site .tabs {
    grid-template-columns: 1fr 1fr;
  }

  #admin-site .tab-content {
    padding: 14px;
  }

  #admin-site .settings-block {
    padding: 12px;
  }

  #admin-site .btn {
    width: 100%;
  }

  #admin-site #dashboard-section > header nav .btn,
  #admin-site #dashboard-section > header nav a {
    flex: 1 1 100%;
    text-align: center;
  }

  #admin-site #photo-preview-container {
    width: min(100%, 230px);
    min-height: 180px;
  }
}


/* Admin menu: show exactly one section at a time */
#admin-site .tab-content.active { display: block; }

/* Blog rows without an uploaded picture use the full available width. */
.blog-row:not(:has(.blog-row-image)){grid-template-columns:1fr;}

/* =========================================================
   PROJECT / PROFESSIONAL CARD MEDIA OPTIMIZATION
   Keep the card and video frame visually proportional.
========================================================= */
#public-site .project-card,
#public-site .professional-card {
  padding: 18px;
}

#public-site .project-card .card-media,
#public-site .professional-card .card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: none;
  object-fit: cover;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper-2);
}

#public-site .project-card h3,
#public-site .professional-card h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
}

#public-site .project-card p,
#public-site .professional-card p {
  margin-bottom: 0;
  line-height: 1.55;
}

@media (max-width: 700px) {
  #public-site .project-card,
  #public-site .professional-card {
    padding: 15px;
  }
}
 
/* ===================================================
   MOVING / SCROLL EFFECTS
=================================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover effect */
.project-card,
.skill-card,
.education-card,
.experience-card,
.stat-card {
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.project-card:hover,
.skill-card:hover,
.education-card:hover,
.experience-card:hover,
.stat-card:hover {
    /* Transform parameters are removed here because JavaScript handles the 3D calculation dynamically */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 0 25px rgba(0, 170, 255, 0.12);
}


/* Images zoom slightly */
.project-card img,
.profile-image img {
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

/* Buttons */
button,
.btn,
a.button {
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

button:hover,
.btn:hover,
a.button:hover {
    transform: translateY(-3px);
}

/* Navigation hover */
nav a {
    transition:
        color 0.3s ease,
        transform 0.3s ease;
}

nav a:hover {
    transform: translateY(-2px);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* =========================================================
   🚀 AEROSPACE MOTION SYSTEM
========================================================= */

/* Space particle layer */
.space-particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* Deep-space atmosphere */
body {
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -3;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(0, 150, 255, 0.08),
            transparent 30%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(100, 0, 255, 0.07),
            transparent 30%
        );
    animation: spaceBreathing 8s ease-in-out infinite alternate;
}

@keyframes spaceBreathing {
    from {
        opacity: 0.55;
    }
    to {
        opacity: 1;
    }
}

/* =========================================================
   🚀 AEROSPACE MOTION SYSTEM
========================================================= */

/* Space particle layer layer tracking */
.space-particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}

body {
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -3;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 150, 255, 0.08), transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(100, 0, 255, 0.07), transparent 30%);
    animation: spaceBreathing 8s ease-in-out infinite alternate;
}

@keyframes spaceBreathing {
    from { opacity: 0.55; }
    to { opacity: 1; }
}

/* =========================================================
   ORBITAL PROFILE EFFECT (Fixed Selector Linkage)
========================================================= */

/* Remapped to target your profile-photo node directly */
.profile-photo {
    position: relative;
    transform-style: preserve-3d;
}

/* The wrapper of your photo needs this orbit container class in your HTML, or we bind it directly: */
.hero-inner {
    position: relative;
}

.hero-inner::before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    top: 50%;
    left: 140px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 180, 255, 0.35);
    border-radius: 50%;
    animation: orbitSpin 12s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes orbitSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* =========================================================
   AEROSPACE CARD HOVER (Synchronized Transitions)
========================================================= */

.project-card,
.skill-card,
.education-card,
.experience-card,
.professional-card {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform; /* Tells the browser engine to use GPU acceleration */
    transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

.project-card::before,
.skill-card::before,
.education-card::before,
.professional-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.project-card:hover::before,
.skill-card:hover::before,
.education-card:hover::before,
.professional-card:hover::before {
    left: 150%;
}

/* =========================================================
   HUD SCANNING EFFECT
========================================================= */

.project-card::after,
.skill-card::after,
.professional-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.6), transparent);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.project-card:hover::after,
.skill-card:hover::after,
.professional-card:hover::after {
    opacity: 1;
    animation: scanLine 2s linear infinite;
}

@keyframes scanLine {
    from { top: 0%; }
    to { top: 100%; }
}

/* =========================================================
   HERO FLOATING EFFECT (Fixed Linkage)
========================================================= */

/* Adjusted to map directly to your existing .hero-text container element */
.hero-text {
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* =========================================================
   SHOOTING STAR
========================================================= */

.shooting-star {
    position: fixed;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95));
    pointer-events: none;
    z-index: -1;
    transform: rotate(-35deg);
    animation: shootingStar 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes shootingStar {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-35deg);
    }
    15% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate(-600px, 600px) rotate(-35deg);
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .space-particles,
    body::before,
    .hero-text,
    .hero-inner::before {
        animation: none !important;
    }
    .project-card,
    .skill-card,
    .education-card,
    .professional-card {
        transform: none !important;
        transition: none !important;
    }
}

.profile-image {
    position: relative;
}

.profile-image::before {
    content: "";
    position: absolute;
    inset: -18px;
    border: 1px solid rgba(0, 180, 255, 0.45);
    border-radius: 50%;
    animation: orbitSpin 8s linear infinite;
    pointer-events: none;
}

.profile-image::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    left: -23px;
    border-radius: 50%;
    background: #00bfff;
    box-shadow:
        0 0 10px #00bfff,
        0 0 25px #00bfff;
    animation: orbitDot 5s linear infinite;
    pointer-events: none;
}

@keyframes orbitSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes orbitDot {
    from {
        transform: rotate(0deg) translateX(80px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(80px) rotate(-360deg);
    }
}

/* =========================================================
   AEROSPACE CARD HOVER
========================================================= */

.project-card,
.skill-card,
.education-card,
.experience-card,
.stat-card {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition:
        transform 0.4s cubic-bezier(.2,.8,.2,1),
        box-shadow 0.4s ease;
}

.project-card::before,
.skill-card::before,
.education-card::before,
.experience-card::before,
.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 70%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.15),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.project-card:hover::before,
.skill-card:hover::before,
.education-card:hover::before,
.experience-card:hover::before,
.stat-card:hover::before {
    left: 150%;
}

.project-card:hover,
.skill-card:hover,
.education-card:hover,
.experience-card:hover,
.stat-card:hover {
    transform: translateY(-10px) scale(1.015);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.25),
        0 0 25px rgba(0, 170, 255, 0.12);
}

/* =========================================================
   HUD SCANNING EFFECT
========================================================= */

.project-card::after,
.skill-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 200, 255, 0.8),
        transparent
    );
    opacity: 0;
    pointer-events: none;
}

.project-card:hover::after,
.skill-card:hover::after {
    opacity: 1;
    animation: scanLine 1.5s linear infinite;
}

@keyframes scanLine {
    from {
        top: 0%;
    }
    to {
        top: 100%;
    }
}

/* =========================================================
   HERO FLOATING EFFECT
========================================================= */

.hero-content {
    animation: heroFloat 6s ease-in-out infinite;
}

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

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

/* =========================================================
   SHOOTING STAR
========================================================= */

.shooting-star {
    position: fixed;
    width: 100px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.9)
    );
    pointer-events: none;
    z-index: -1;
    transform: rotate(-35deg);
    animation: shootingStar 1.5s linear forwards;
}

@keyframes shootingStar {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-35deg);
    }

    15% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-500px, 500px) rotate(-35deg);
    }
}

/* =========================================================
   SECTION GLOW
========================================================= */

section {
    position: relative;
}

section::before {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(0, 150, 255, 0.04);
    filter: blur(60px);
    pointer-events: none;
    animation: sectionGlow 7s ease-in-out infinite alternate;
}

@keyframes sectionGlow {
    from {
        transform: translateX(-30px);
    }

    to {
        transform: translateX(30px);
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .space-particles,
    body::before,
    .profile-image::before,
    .profile-image::after,
    .hero-content,
    section::before {
        animation: none !important;
    }

    .project-card:hover,
    .skill-card:hover,
    .education-card:hover,
    .experience-card:hover,
    .stat-card:hover {
        transform: none !important;
    }
}

/* Mobile optimization */
@media (max-width: 768px) {

    .profile-image::before {
        inset: -10px;
    }

    .profile-image::after {
        display: none;
    }

    .hero-content {
        animation-duration: 8s;
    }
}
