/* @link https://utopia.fyi/type/calculator?c=320,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

:root {
  --step--2: clamp(0.7813rem, 0.7747rem + 0.0326vw, 0.8rem);
  --step--1: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1rem);
  --step-0: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
  --step-1: clamp(1.35rem, 1.2761rem + 0.3696vw, 1.5625rem);
  --step-2: clamp(1.62rem, 1.5041rem + 0.5793vw, 1.9531rem);
  --step-3: clamp(1.944rem, 1.771rem + 0.8651vw, 2.4414rem);
  --step-4: clamp(2.3328rem, 2.0827rem + 1.2504vw, 3.0518rem);
  --step-5: clamp(2.7994rem, 2.4462rem + 1.7658vw, 3.8147rem);
}

/* @link https://utopia.fyi/space/calculator?c=320,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

:root {
  --space-3xs: clamp(0.3125rem, 0.3125rem + 0vw, 0.3125rem);
  --space-2xs: clamp(0.5625rem, 0.5408rem + 0.1087vw, 0.625rem);
  --space-xs: clamp(0.875rem, 0.8533rem + 0.1087vw, 0.9375rem);
  --space-s: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
  --space-m: clamp(1.6875rem, 1.6223rem + 0.3261vw, 1.875rem);
  --space-l: clamp(2.25rem, 2.163rem + 0.4348vw, 2.5rem);
  --space-xl: clamp(3.375rem, 3.2446rem + 0.6522vw, 3.75rem);
  --space-2xl: clamp(4.5rem, 4.3261rem + 0.8696vw, 5rem);
  --space-3xl: clamp(6.75rem, 6.4891rem + 1.3043vw, 7.5rem);

  /* One-up pairs */
  --space-3xs-2xs: clamp(0.3125rem, 0.2038rem + 0.5435vw, 0.625rem);
  --space-2xs-xs: clamp(0.5625rem, 0.4321rem + 0.6522vw, 0.9375rem);
  --space-xs-s: clamp(0.875rem, 0.7446rem + 0.6522vw, 1.25rem);
  --space-s-m: clamp(1.125rem, 0.8641rem + 1.3043vw, 1.875rem);
  --space-m-l: clamp(1.6875rem, 1.4049rem + 1.413vw, 2.5rem);
  --space-l-xl: clamp(2.25rem, 1.7283rem + 2.6087vw, 3.75rem);
  --space-xl-2xl: clamp(3.375rem, 2.8098rem + 2.8261vw, 5rem);
  --space-2xl-3xl: clamp(4.5rem, 3.4565rem + 5.2174vw, 7.5rem);

  /* Custom pairs */
  --space-s-l: clamp(1.125rem, 0.6467rem + 2.3913vw, 2.5rem);
}

/**
 * CORE CONFIG
 * This powers everything from utility class generation to breakpoints
 * to enabling/disabling pre-built components/utilities.
 */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: sans-serif;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  letter-spacing: -0.01em;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
}

:focus {
  outline: 2px dashed #00ff19;
  outline-offset: 0.25rem;
}

main:focus {
  outline: none;
}

h1,
.h1 {
  font-size: var(--step-5);
}

h2,
.h2 {
  font-size: var(--step-4);
}

h3,
.h3 {
  font-size: var(--step-3);
}

h4,
.h4 {
  font-size: var(--step-2);
}

h5,
.h5 {
  font-size: var(--step-1);
}

/* create the wrappers */
.wrapper {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}
.wrapper_inner {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* define some constants */
.flex {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}
@media (max-width: 468px) {
  .flex {
    flex-wrap: wrap;
  }
}
.flex_center {
  justify-content: center;
}
.flex_around {
  justify-content: space-around;
}
.flex_between {
  justify-content: space-between;
}
@media (max-width: 468px) {
  .flex_around {
    justify-content: center;
  }
  .flex_between {
    justify-content: center;
  }
}
.text_center {
  text-align: center;
}
.text_right {
  text-align: right;
}

/* define spacing */
.padding-top-3xs {
  padding: var(--space-3xs);
}

/* Specify the colors for the sections */
section {
  padding: var(--space-2xl) var(--space-l);
}
section#hero {
  background: linear-gradient(rgba(26, 26, 64, 0.9), rgba(26, 26, 64, 0.9)),
    url("/assets/background_image.jpg");
  padding-bottom: 4px;
  background-size: cover;
  background-position: top;
  background-attachment: scroll;
  color: #fafafa;
  --color-accent: #8a2be2;
}
section#about {
  background-color: #ffffff;
  color: #333;
  --color-accent: #ffd700;
}
section#work {
  background-color: #87ceeb;
  color: #0c0c0c;
  --color-accent: #2e8b57;
}
section#contact {
  background-color: #4b0082;
  color: #e6e6fa;
  --color-accent: #ff4500;
}
section#footer {
  background-color: #1a1a40;
  color: #fafafa;
  --color-accent: #8a2be2;
}

/* style the header */
.site_header {
  padding: var(--space-s) 0;
  background: linear-gradient(rgba(26, 26, 64, 0.9), rgba(26, 26, 64, 0.9));
}
.site_header_nav ul li a {
  text-decoration: none;
  color: #fff;
}

/* hero css */
.hero_content {
  padding: var(--space-3xl) 0;
}
.hero_content h1 {
  margin-bottom: var(--space-s);
}
.hero_social {
  padding-top: var(--space-3xl);
}

/* about section */
.about_content {
  padding: var(--space-xl) 0;
  transform: skewX(-10deg);
}
@media (max-width: 468px) {
  .about_content {
    transform: skewX(0deg);
  }
}
.about_figure {
  padding: var(--space-xl) 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 2px solid #ccc;
  display: inline-block;
  padding: 5px;
}
.about_img {
  width: 300px;
  height: 200px;
  object-fit: cover;
}
.about_caption {
  padding: var(--space-3xs) 0;
}

/* work section */
.work_logos {
  margin-top: var(--space-xl);
}

/* contact section */
.contact_form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form_group {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 5px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

textarea {
  resize: vertical;
  height: 150px;
}

button[type="submit"] {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}

button[type="submit"]:hover {
  background-color: #0056b3;
}

/* footer section */
section#footer {
  padding: var(--space-l) var(--space-l);
}

/* App Cards Styling */
.apps_grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  padding: 0 2rem;
}

.app_card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.app_card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.app_logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.app_name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.app_description {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

/* Project Detail Page */
.project_detail {
  display: none;
  padding: 4rem 2rem;
}

.project_detail.active {
  display: block;
}

.back_button {
  background: #333;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  margin: 0;
  position: fixed;
  top: calc(var(--space-l) + 0.5rem);
  left: calc(var(--space-l));
  z-index: 9999;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: background 0.3s ease;
}

.back_button:hover {
  background: #555;
}

@media (max-width: 468px) {
  .back_button {
    /* On small screens keep it in normal flow to avoid covering content */
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 1.5rem;
    box-shadow: none;
    z-index: 2;
  }
}

/* Ensure project header is pushed down so fixed back button doesn't overlap */
.project_detail .project_header {
  margin-top: calc(var(--space-l) + 0.25rem);
}

@media (max-width: 468px) {
  .project_detail .project_header {
    margin-top: 0;
  }
}

.project_header {
  margin-bottom: 3rem;
}

.project_title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.project_meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.meta_item {
  display: flex;
  flex-direction: column;
}

.meta_label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.meta_value {
  color: #666;
}

.screenshots_grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.screenshot_item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.screenshot_item img {
  width: 100%;
  height: auto;
  display: block;
}

.section_title {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
  border-bottom: 2px solid #333;
  padding-bottom: 0.5rem;
}

.tech_stack {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.tech_badge {
  background: #f0f0f0;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.performance_metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.metric_card {
  background: #f8f8f8;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.metric_value {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
}

.metric_label {
  color: #666;
  margin-top: 0.5rem;
}
