*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100vw;
  font-family: ProductSansRegular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html.scroll-lock {
  overflow-y: hidden !important;
  position: fixed;
  width: 100vw;
}

html.scroll-lock > body > *:not(.search-overlay):not(.modal):not(.header):not(.fullscreen-menu) {
  pointer-events: none;
  user-select: none;
  touch-action: none;
}

html.scroll-lock .header {
  border-bottom: transparent;
  background: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 0.2s ease, backdrop-filter 0.2s ease, border-color 0.2s ease; 
}

.search-overlay.active,
.modal.active,
.search-overlay.active *,
.modal.active * {
  pointer-events: auto;
  touch-action: auto;
}

a {
  color: var(--link);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 12px;
}

.header {
  background: var(--header-bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: var(--z-index-header);
  transition: background 0.2s ease 0.2s, backdrop-filter 0.2s ease 0.2s border-color 0.2s ease 0.2s;
}

body.amoled-dark .header {
  border-bottom: transparent;
}

.header-container {
  max-width: 100%;
  height: 60px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.header-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  height: 40px;
}

.header-logo img {
  height: 100%;
  width: auto;
  transition: opacity 0.3s;
}

.header-logo .logo-dark { display: none; }
body.dark .header-logo .logo-light { display: none; }
body.dark .header-logo .logo-dark { display: block; }
body.amoled-dark .header-logo .logo-light { display: none; }
body.amoled-dark .header-logo .logo-dark { display: block; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

input::-webkit-search-decoration,
input::-webkit-search-cancel-button,
input::-webkit-search-results-decoration,
input::-webkit-search-results-button {
  display: none !important;
}

.header-nav {
    display: none;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1rem;
}

.hero-card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 1.5rem;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 4px 12px var(--hero-accent);
  border: 1px solid var(--border);
  max-width: 500px;
  width: 100%;
}

.hero-card-title {
  font-size: 1.5rem;
  font-weight: bold;
}

.hero-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.profile-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 15%;
}

.img-background {
  background: var(--logo-bg);
  border: 1px solid var(--logo-border);
  border-radius: 15%;
}

.img-background .logo-dark {
    display: none;
}

body.dark .img-background .logo-light {
    display: none;
}

body.dark .img-background .logo-dark {
    display: block;
}

body.amoled-dark .img-background .logo-light {
  display: none;
}

body.amoled-dark .img-background .logo-dark {
  display: block;
}

.lead, .verse {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.second {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text);
  opacity: 0.9;
}

.verse {
  font-style: italic;
  color: var(--accent);
  margin: 0.8rem 0;
}

.meta {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.page-description {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0.5rem 2rem;
  flex-grow: 1;
}

.section-title {
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: bold;
  text-align: center;
  padding-left: 0;
}

.skills-section {
    padding: 2rem 0;
}

.skills-category h4 {
    font-size: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

.projects-section {
  margin-top: 1.5rem;
  padding: 0 0.5rem;
  overflow: visible;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 0;
}

.projects-grid .featured-project-card {
    grid-column: 1 / -1;
    padding: 1.5rem;
}

.projects-grid .featured-project-card .card-header-row {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.projects-grid .featured-project-card .project-logo-wrapper {
    width: 80px;
    height: 80px;
}

.projects-grid .featured-project-card .project-info {
    height: 80px;
}

.projects-grid .featured-project-card h3 {
    font-size: 1.3rem;
    line-height: 1.3;
    -webkit-line-clamp: 1;
    max-height: calc(1.3rem * 1.3 * 1);
    min-height: calc(1.3rem * 1.3 * 1);
}

.projects-grid .featured-project-card .project-description {
    font-size: 0.95rem;
    line-height: 1.4;
    -webkit-line-clamp: 1;
    max-height: calc(0.95rem * 1.4 * 1);
    min-height: calc(0.95rem * 1.4 * 1);
}

.projects-grid .featured-project-card > .button-group-active {
    order: 3;
    margin-top: 2rem;
    align-self: flex-start;
}

.projects-grid .featured-project-card > .button {
    align-self: flex-start;
    order: 3;
    margin-top: 2rem;
}

.contact-section .lead {
  color: var(--meta-text);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0;
  max-width: 900px;
  margin: 0 auto;
}

#footer-placeholder {
  height: 0;
}

.footer {
  background: var(--footer-bg);
  color: var(--text);
  padding: 1.5rem 1rem;
  margin-top: auto;
  line-height: 1.3;
  font-size: 1.2rem;
}

.footer-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-top {
  margin: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 15%;
    overflow: hidden;
    flex-shrink: 0;
    margin: 0;
    padding-right: 1rem;
}

.footer-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.footer-logo-wrapper .logo-dark { display: none;
}

body.dark .footer-logo-wrapper .logo-light { 
  display: none;
}
  
body.dark .footer-logo-wrapper .logo-dark { 
  display: block;
}

body.amoled-dark .footer-logo-wrapper .logo-light {
  display: none;
}

body.amoled-dark .footer-logo-wrapper .logo-dark {
  display: block;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.footer-description {
  font-size: 0.9rem;
  opacity: 0.9;
  color: var(--text);
  line-height: 1.5;
}

.footer-container {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 1.5rem 1rem;
  border-left: none;
  padding-left: 0;
  margin: 0 0 1rem 0;
}

.footer-section {
  text-align: left;
  flex: 1 1 100%;
  min-width: 150px;
}

.footer-section h3 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0;
}

.footer a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  font-size: 0.8rem;
  line-height: 1.3;
}

.footer a:hover {
  opacity: 1;
}

.no-contact {
  font-style: italic;
  opacity: 0.7;
  margin-bottom: 0;
  font-size: 0.8rem;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.copyright {
  display: inline-block;
  font-size: 1.2rem;
  margin: 0.2rem 0.3rem 0;
  vertical-align: middle;
}

.footer-bottom .name {
  text-decoration: underline;
}

.footer .meta {
  font-style: italic;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.5;
}