/* .project-card */
/* project-type */
/* #nav-menu */
/* #lang-toggle */

* {
    line-height: 1.4em;
    text-decoration: none
}

:root {
    /* Primery Colors */
    --prim-bg-color: #111827;
    --text-color: #fcfafa;
    --link-color: var(--text-color);
    --highlight-color: var(--text-color);
    --sec-color: #9c9b94;
    --body-font-size: 18px;
    --h1-font-size: 24px;
    --h2-font-size: 48px;
    --h2-mobile-font-size: 42px;
    --sec-font-size: 14px;
    --call-out-border: #DC3C22;
    --ui-color: #E6E4D9;
    --footer-bg: #002FA7;

    /* Secondary Colors */
    color-scheme: light dark;
    --bg-color: #FFFCF0;
    --bg2-color: #F2F0E5;
    --link-underline-color: color-mix(in srgb, #1C1B1A 40%, transparent);
    --text-2-color: #1C1B1A;
    --text2-2-color: #6F6E69;
    --ui-color: #E6E4D9;
    --footer-bg: #002FA7;
    --footer-text: #E6E4D9;
    --call-out-bg: #25d366;
    --call-out-border: #DC3C22;
    --shadow-color: rgba(255, 255, 255, .15);
}

/* Unified theme variables */
/* Default theme = light */
:root {
    --bg: var(--bg-color);
    --text: var(--text-2-color);
    --link: var(--text-2-color);
    --highlight: var(--text2-2-color);
    --sec: var(--text2-2-color);
    --sh: var(--call-out-bg);
}

/* Dark theme overrides */
body.light-theme {
    /*  */
    --bg: var(--prim-bg-color);
    --text: var(--text-color);
    --link: var(--link-color);
    --highlight: var(--highlight-color);
    --sec: var(--sec-color);
    --sh: var(--shadow-color);
}

body {
    margin: 0;
    padding: 0;
    font-family: sofia, serif;
    font-weight: 300;
    font-style: normal;
    font-size: var(--body-font-size);
    color: var(--text);
    background-color: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center
}

@font-face {
    font-family: sofia;
    src: url(../fonts/sofiapro-light.otf)
}

@font-face {
    font-family: inter;
    src: url(../fonts/Inter_28pt-ExtraLight.ttf)
}

@font-face {
    font-family: taviraj;
    src: url(../fonts/Taviraj-Medium.ttf)
}

h1 {
    font-family: taviraj, serif;
    font-weight: 500;
    font-style: normal;
    font-size: var(--h1-font-size);
    text-decoration: none;
    margin-bottom: 60px;
    margin-top: 34px
}

h1 a,
h1 a:hover {
    text-decoration: none;
    border: 0
}

h2 {
    font-family: inter, serif;
    font-weight: 200;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: var(--h2-font-size);
    letter-spacing: -.015em
}

.content {
    width: 70%;
    max-width: 700px;
    padding: 50px
}

@media only screen and (max-width:768px) {
    [class*=content] {
        width: 90%;
        padding: 20px
    }

    h2 {
        font-size: var(--h2-mobile-font-size)
    }
}

a {
    color: var(--link);
    border-bottom: dotted var(--text) 1px
}

a:hover {
    border-bottom: solid var(--text) 1px;
    color: var(--highlight)
}

img {
    float: left;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    overflow: hidden;
    width: 64px;
    height: 64px;
    margin-right: 10px
}

ul {
    list-style-type: none;
    margin: 25px 0 0;
    padding: 0
}

li {
    margin-bottom: 25px
}

li .project-meta {
    color: var(--sec);
    font-size: var(--sec-font-size);
    margin-left: 22px
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0
}

@media only screen and (max-width:768px) {
    .project-grid {
        grid-template-columns: repeat(1, 1fr)
    }
}

.project-card {
    position: relative;
    background: rgba(255, 255, 255, 5%);
    border-radius: 6px;
    padding: 20px;
    transition: transform .2s, background-color .2s;
    cursor: pointer;
    box-shadow: 0 0.3px 1px var(--sh);
}

.project-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 8%)
}

.project-type {
    position: absolute;
    top: 0;
    right: 16px;
    height: 24px;
    line-height: 24px;
    background: var(--sh);
    color: rgba(255, 255, 255, .7);
    padding: 0 8px;
    font-size: 12px;
    border-radius: 0 0 4px 4px;
    letter-spacing: .5px
}

.project-header {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 12px
}

.project-emoji {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: flex-end
}

.project-title {
    font-family: inter, serif;
    font-weight: 200;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: 18px;
    letter-spacing: -.015em;
    line-height: 1;
    color: var(--text)
}

.project-description {
    color: var(--sec);
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4
}

.project-date {
    color: var(--sec);
    font-size: 12px
}

.project-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: none
}

.project-link:hover {
    border: none
}


/* nav button */
/* Floating buttons */
#floating-buttons {
    position: fixed;
    right: 40px;
    top: 40px;
    z-index: 1000;
    display: grid;
    grid-template-columns: auto auto;
    /* left stack + right button */
    grid-template-rows: auto auto;
    /* two rows */
    gap: 3px;
    align-items: center;
}

/* Place buttons in the grid */
#lang-toggle {
    grid-column: 2;
    grid-row: 1;
}

#menu-toggle {
    grid-column: 2;
    grid-row: 2;
    margin-top: -5px;
}

#theme-button {
    grid-column: 1;
    grid-row: 1 / span 2;
    /* spans both rows */
    align-self: center;
    /* vertically centered */
}

#menu-toggle,
#lang-toggle,
#theme-button {
    width: 25px;
    height: 25px;
    border: 0.00002px solid var(--sh);
    border-radius: 50%;
    background: transparent;
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    margin-top: 6px;
}

#menu-toggle:hover,
#lang-toggle:hover,
#theme-button:hover {
    background: rgba(252, 250, 250, 0.2);
    transform: scale(1.05);
}

/* Navigation menu */
#nav-menu {
    position: fixed;
    top: 70px;
    right: 40px;
    background: transparent;
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px transparent;
    z-index: 999;
    display: none;
    flex-direction: column;
    min-width: 200px;
    border: 1px solid transparent;
}

#nav-menu.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

#nav-menu a {
    padding: 12px 15px;
    text-decoration: none;
    background: rgba(252, 250, 250, 0.1);
    color: var(--text);
    border-radius: 5px;
    transition: background 0.2s;
    margin: 5px 0;
    display: flex;
    align-items: center;
}


#nav-menu a i {
    margin-right: 10px;
    font-size: 18px;
    color: var(--sh);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Responsive adjustments */
@media (max-width: 768px) {
    #floating-buttons {
        right: 15px;
        top: 15px;
    }

    #menu-toggle,
    #lang-toggle,
    #theme-button {
        width: 25px;
        height: 25px;
        font-size: 16px;
    }

    #nav-menu {
        right: 15px;
        top: 60px;
    }
}

/*Post Call-out */

.post {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--ui-color);
}

@media(max-width:700px) {
    .post {
        margin-bottom: 2rem
    }
}

.call-out h1,
.call-out h2 {
    display: inline;
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    padding: 0
}

.call-out h1 a,
.call-out h2 a {
    text-decoration: none;
    border-bottom: none;
    color: var(--text)
}

.call-out h1 a:hover,
.call-out h2 a:hover {
    text-decoration: none;
    border-bottom: none
}

.call-out p:first-of-type {
    display: inline;
    margin: 0;
    padding: 0
}

.post.call-out {
    position: relative;
    border-top: 6px solid var(--call-out-border);
    background-color: var(--sh);
    padding: 1.5rem 1rem;
    margin-top: 1rem;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px
}

.post.call-out .help-icon {
    float: right;
    color: var(--text);
    opacity: .7;
    transition: opacity .2s, color .2s;
    vertical-align: middle;
    z-index: 2;
    text-decoration: none;
    border-bottom: none
}

.post.call-out .help-icon:hover,
.post.call-out .help-icon:focus {
    color: var(--link);
    opacity: 1;
    text-decoration: none;
    border-bottom: none
}

.post.call-out .help-icon-svg {
    vertical-align: middle
}




/* WhatsApp Floating Button */
#contact-toggle {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background: #25d366; /* WhatsApp green */
  color: white;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 1100;
}

#contact-toggle:hover {
  background: #1ebd5a;
  transform: scale(1.1);
}

/* Overlay */
#contact-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1090;
}

/* Popup Box */
#contact-box {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 40px;
  width: 320px;
  background: #fff;
  color: #333;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  padding: 20px;
  z-index: 1101;
  text-align: center; /* Center header & button */
}

#contact-box.show,
#contact-overlay.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.contact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-header h3 {
  color: #25d366;
  font-weight: bold;
  margin: 0 auto;
  text-align: center;
  flex: 1;
}

#contact-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #25d366;
}

/* Center form fields */
#contact-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-group {
  margin-top: 12px;
  width: 80%; /* 80% width for each field */
  text-align: left; /* Align labels to the left inside the centered group */
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #444;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  box-sizing: border-box;
}

.submit-btn {
  margin-top: 15px;
  width: 80%;
  padding: 10px;
  background: #25d366;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: #1ebd5a;
}

#form-result {
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
}

/* Mobile: center popup */
@media (max-width: 768px) {
  #contact-box {
    bottom: auto;
    right: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 360px;
    max-height: 80%;
    overflow-y: auto;
  }

  #contact-toggle {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
