/* =========================================================
   THEME VARIABLES
   ========================================================= */
:root {
  --accent: #32CD32;
  --accent-soft: rgba(50, 205, 50, .10);
  --accent-border: rgba(50, 205, 50, .35);

  /* Name / heading gradient */
  --name-gradient-start: #172033;
  --name-gradient-mid: #344054;
  --name-gradient-end: #172033;

  --text: #172033;
  --muted: #526075;
  --border: #dfe5ee;

  --page: #ffffff;
  --section: #ffffff;
  --hero-bg: #f5f8f5;
  --card: rgba(255, 255, 255, .96);

  --shadow:
    0 12px 28px rgba(15, 23, 42, .10);

  --logo-bg: rgba(255, 255, 255, .85);
  --logo-shadow:
    0 3px 10px rgba(15, 23, 42, .08);
}

/* =========================================================
   DARK THEME
   ========================================================= */
[data-theme="dark"] {
  --text: #eef4ef;
  --muted: #aeb9b1;
  --border: #29332d;

  --page: #0b0f0c;
  --section: #0b0f0c;
  --hero-bg: #0d120f;
  --card: rgba(18, 24, 20, .96);

  --shadow:
    0 18px 40px rgba(0, 0, 0, .35);

  --logo-bg: rgba(255, 255, 255, .08);
  --logo-shadow:
    0 4px 14px rgba(0, 0, 0, .25);

  /* Name / heading gradient */
  --name-gradient-start: #F1F5F2;
  --name-gradient-mid: #B8C7BC;
  --name-gradient-end: #F1F5F2;
}

/* =========================================================
   RESET
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.55;
  transition: background-color .35s ease, color .35s ease;
}

button,
input,
textarea {
  font: inherit;
}

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

/* Active states for touch — mirrors the desktop hover */
.project-card:active {
  transform: translateY(-6px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, .14);
}

[data-theme="dark"] .project-card:active {
  box-shadow: 0 22px 45px rgba(0, 0, 0, .4);
}

.social:active {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, .85);
  border-color: var(--accent-border);
}

[data-theme="dark"] .social:active {
  background: rgba(255, 255, 255, .07);
}

.scroll-card:active {
  transform: translateX(-50%) translateY(-4px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme-option:active {
  color: var(--accent);
  background: var(--accent-soft);
}

/* =========================================================
   SHARED
   ========================================================= */
.container {
  width: min(1100px, calc(100% - 40px));
  margin-inline: auto;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  padding-top: 22px;
}

.header-inner {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================================================
   LOGO
   ========================================================= */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--logo-bg);
  box-shadow: var(--logo-shadow);
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.logo-name {
  font-family: "Varela Round", sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -.02em;
}

/* =========================================================
   THEME SWITCHER
   ========================================================= */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(15, 23, 42, .05);
}

[data-theme="dark"] .theme-switcher {
  background: rgba(18, 24, 20, .72);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .20);
}

.theme-option {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    background .2s ease,
    color .2s ease,
    transform .2s ease;
}

.theme-option svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-option:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.theme-option.active {
  color: #071007;
  background: var(--accent);
  box-shadow:
    0 3px 8px
    rgba(50, 205, 50, .22);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  background-color: var(--hero-bg);
  background-image:
    linear-gradient(
      rgba(104, 119, 145, .11) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(104, 119, 145, .11) 1px,
      transparent 1px
    );
  background-size: 26px 26px;
  transition: background-color .35s ease;
}

/* =========================================================
   HERO FADE
   ========================================================= */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      transparent,
      var(--page)
    );
}

/* =========================================================
   HERO CONTENT
   ========================================================= */
.hero-content {
  position: relative;
  z-index: 2;
  transform: translateY(-12px);
}

.hero h1 {
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin-bottom: 24px;
  padding-bottom: 0.08em;
}

/* =========================================================
   NAME GRADIENT
   ========================================================= */
/*
  Deliberately NOT using the green accent here.

  Green is reserved for:
  - logo
  - theme switcher
  - icons
  - hover states
  - borders
  - interactive elements

  The name stays sophisticated and neutral.
*/
.gradient-text {
  background:
    linear-gradient(
      105deg,
      var(--name-gradient-start) 0%,
      var(--name-gradient-mid) 50%,
      var(--name-gradient-end) 100%
    );

  -webkit-background-clip:
    text;

  background-clip:
    text;

  -webkit-text-fill-color:
    transparent;

  color:
    transparent;
}


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

.hero-subtitle {
  color:
    var(--muted);

  font-size:
    clamp(
      1.05rem,
      2vw,
      1.4rem
    );

  margin-bottom:
    34px;
}


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

.hero-skills {
  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 12px;
}


/* =========================================================
   PILLS
   ========================================================= */

.pill {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding:
    8px 15px;

  border-radius:
    999px;

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

  background:
    rgba(255, 255, 255, .65);

  color:
    var(--muted);

  font-size:
    14px;

  font-weight:
    500;

  white-space:
    nowrap;

  transition:
    border-color .2s ease,
    background .2s ease,
    color .2s ease;
}


[data-theme="dark"] .pill {
  background:
    rgba(255, 255, 255, .035);
}


.hero .pill {
  border-color:
    rgba(50, 205, 50, .22);

  background:
    rgba(50, 205, 50, .06);

  color:
    var(--text);
}


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

.scroll-card {
  position: absolute;

  z-index: 3;

  left: 50%;

  bottom: 27px;

  width: 50px;
  height: 50px;

  display: grid;

  place-items: center;

  transform:
    translateX(-50%);

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

  border-radius:
    50%;

  background:
    rgba(255, 255, 255, .72);

  backdrop-filter:
    blur(12px);

  color:
    var(--accent);

  box-shadow:
    0 8px 24px
    rgba(15, 23, 42, .09);

  transition:
    transform .2s ease,
    background .2s ease,
    border-color .2s ease;
}


[data-theme="dark"] .scroll-card {
  background:
    rgba(15, 21, 17, .78);

  box-shadow:
    0 10px 25px
    rgba(0, 0, 0, .25);
}


.scroll-card:hover {
  transform:
    translateX(-50%)
    translateY(-4px);

  border-color:
    var(--accent);

  background:
    var(--accent-soft);
}

.scroll-card svg {
  width: 20px;
  height: 20px;
}

/* =========================================================
   PROJECTS
   ========================================================= */
.projects {
  position: relative;
  background: var(--section);
  padding: 45px 0 90px;
  transition: background-color .35s ease;
}

.section-title {
  /* Reduced from clamp(2rem, 3vw, 2.45rem) */
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.035em;
  margin-bottom: 45px;
  font-weight: 800;
  text-align: center;
}

/* =========================================================
   PROJECT GRID
   ========================================================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

/* =========================================================
   PROJECT CARD
   ========================================================= */
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);

  transition:
    transform .25s ease,
    box-shadow .25s ease,
    background-color .35s ease,
    border-color .35s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, .14);
}


[data-theme="dark"] .project-card:hover {
  box-shadow:0 22px 45px rgba(0, 0, 0, .4);
}

/* =========================================================
   PROJECT IMAGE
   ========================================================= */
.project-image {
  height: 350px;
  position: relative;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* =========================================================
   PROJECT INFO
   ========================================================= */

.project-info {
  padding:
    27px 29px 27px;
}


.project-info h3 {
  font-size:
    1.42rem;

  line-height:
    1.2;

  letter-spacing:
    -.02em;

  margin-bottom:
    10px;
}


.project-info p {
  color:
    var(--muted);

  font-size:
    1rem;

  line-height:
    1.48;

  min-height:
    50px;

  margin-bottom:
    19px;
}


.tech-list {
  display:
    flex;

  flex-wrap:
    wrap;

  gap:
    9px;
}


.tech-list .pill {
  padding:
    6px 12px;

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

  background:
    var(--accent-soft);

  color:
    var(--text);

  font-size:
    13px;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  padding: 0 0 90px;
  background: var(--section);
}

.contact-panel {
  border-radius: 15px;
  padding: 45px;
  background:
    linear-gradient(
      rgba(93, 111, 139, .08) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(93, 111, 139, .08) 1px,
      transparent 1px
    ),
    var(--card);
  background-size:
    26px 26px,
    26px 26px,
    100% 100%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-intro {
  max-width: 650px;
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 1.02rem;
}

/* =========================================================
   SOCIAL CARDS
   ========================================================= */
.socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 45px;
}

.social {
  width: 150px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, .55);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition:
    transform .2s ease,
    background .2s ease,
    border-color .2s ease,
    color .2s ease;
}

[data-theme="dark"] .social {
  background: rgba(255, 255, 255, .035);
}

.social:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, .85);
  border-color: var(--accent-border);
}

[data-theme="dark"] .social:hover {
  background: rgba(255, 255, 255, .07);
}

.social svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {

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


  .project-image {
    height:
      330px;
  }
}


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

@media (max-width: 560px) {

  .container,
  .header-inner {
    width:
      calc(100% - 28px);
  }


  .site-header {
    padding-top:
      15px;
  }


  .logo-name {
    display:
      none;
  }


  .logo-mark {
    width:
      40px;

    height:
      40px;

    min-width:
      40px;

    min-height:
      40px;

    flex:
      0 0 40px;
  }


  .hero {
    min-height:
      100svh;

    background-size:
      24px 24px;
  }


  .hero-content {
    transform:
      translateY(-5px);
  }


  .hero h1 {
    font-size: clamp(2.7rem, 12vw, 3.4rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
    padding-bottom: 0.08em;
  }


  .hero-subtitle {
    font-size:
      1rem;

    margin-bottom:
      28px;
  }


  .hero-skills {
    gap:
      8px;
  }


  .hero .pill {
    padding:
      7px 11px;

    font-size:
      13px;
  }


  .scroll-card {
    bottom:
      18px;

    width:
      46px;

    height:
      46px;
  }


  .scroll-card svg {
    width:
      18px;

    height:
      18px;
  }


  .projects {
    padding:
      42px 0 65px;
  }


  .section-title {
    margin-bottom:
      30px;
  }


  .project-image {
    height:
      260px;
  }


  .project-info {
    padding:
      22px 20px;
  }


  .project-info p {
    font-size:
      .96rem;
  }


  .contact {
    padding-bottom:
      40px;
  }


  .contact-panel {
    padding:
      38px 17px 40px;

    border-radius:
      17px;
  }


  .contact-intro {
    font-size: .96rem;
  }

  .socials {
    flex-direction:
      column;

    align-items:
      center;

    gap:
      10px;
  }


  .social {
    width:
      min(
        100%,
        260px
      );

    min-height:
      58px;
  }
}