:root {
    --color-black: #111;
    --color-dark: #222;
    --color-gray: #555;
    --color-light-gray: #666;
    --color-orange: #ff4d00;
    --color-bg: #f7f7f7;
    --color-white: #ffffff;
    --color-border: #ddd;
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 4px;
    --transition: all 0.3s ease
}

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

html {
    scroll-behavior: smooth
}

body {
    font-family: var(--font-heading);
    background: repeating-linear-gradient(-45deg, #f5f5f5, #f5f5f5 6px, #f2f2f2 6px, #f2f2f2 12px);
    color: var(--color-gray);
    line-height: 1.6;
    opacity: 0;
    animation: pageFade .8s ease-in forwards;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none
}

img {
    pointer-events: none;
    user-select: none
}

@keyframes pageFade {
    to {
        opacity: 1
    }
}

.navbar {
    animation: fadeInUp .8s ease forwards;
    opacity: 0;
    animation-delay: .1s
}

.hero {
    animation: fadeInUp .8s ease forwards;
    opacity: 0;
    animation-delay: .2s
}

.about {
    animation: fadeInUp .8s ease forwards;
    opacity: 0;
    animation-delay: .3s
}

.skills {
    animation: fadeInUp .8s ease forwards;
    opacity: 0;
    animation-delay: .4s
}

.projects {
    animation: fadeInUp .8s ease forwards;
    opacity: 0;
    animation-delay: .5s
}

.certifications {
    animation: fadeInUp .8s ease forwards;
    opacity: 0;
    animation-delay: .6s
}

.education {
    animation: fadeInUp .8s ease forwards;
    opacity: 0;
    animation-delay: .7s
}

.factory-footer {
    animation: fadeInUp .8s ease forwards;
    opacity: 0;
    animation-delay: .8s
}

@keyframes fadeInBody {
    to {
        opacity: 1
    }
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .5s ease, visibility .5s ease
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff4d00;
    border-radius: 50%;
    animation: spin 1s linear infinite
}

@keyframes spin {
    0% {
        transform: rotate(0)
    }

    100% {
        transform: rotate(360deg)
    }
}

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

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-black);
    font-weight: 700
}

h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -2px
}

h2 {
    font-size: 2.5rem;
    font-weight: 700
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-dark)
}

p {
    font-size: 1.1rem;
    color: var(--color-gray)
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: all .3s ease;
    padding: 1.2rem 0
}

.navbar.scrolled {
    padding: .8rem 0;
    box-shadow: var(--shadow-md)
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%
}

.nav-logo {
    margin-right: auto
}

.nav-actions {
    display: none
}

@media (max-width:768px) {
    .nav-actions {
        display: flex;
        gap: 10px;
        align-items: center
    }
}

.nav-logo a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-black);
    letter-spacing: -1px;
    text-decoration: none
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-gray);
    font-weight: 500;
    position: relative
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-orange);
    transition: width .3s ease
}

.nav-links a.active::after,
.nav-links a:hover::after {
    width: 100%
}

.resume-btn {
    padding: 10px 24px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 6px;
    transition: all .25s ease;
    font-family: var(--font-mono);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    color: var(--color-black)
}

.resume-btn:hover {
    background: #000;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12)
}

.mobile-resume-btn {
    display: none
}

.typing-cursor {
    color: #ff4d00;
    font-weight: 500;
    animation: none
}

.typing-cursor.blink {
    animation: cursorBlink 1s infinite
}

@keyframes cursorBlink {

    0%,
    50% {
        opacity: 1
    }

    100%,
    51% {
        opacity: 0
    }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--spacing-md);
    padding-top: 20px
}

section {
    position: relative;
    margin: var(--spacing-xl) 0;
    padding: 60px var(--spacing-md) var(--spacing-md) var(--spacing-md);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease, transform .8s ease
}

section.fade-in {
    opacity: 1;
    transform: translateY(0)
}

.orange-indicator {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 8px;
    height: 8px;
    background: #ff4d00;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 10px rgba(255, 77, 0, .3)
}

.cert-card>.orange-indicator,
.edu-card>.orange-indicator {
    top: 10px;
    left: 14px
}

.section-label {
    position: absolute;
    top: 30px;
    bottom: 30px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--color-light-gray);
    text-transform: uppercase;
    letter-spacing: 2px
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-orange);
    margin: var(--spacing-sm) auto 0
}

.hero {
    margin-top: 100px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    border: 2px solid var(--color-border)
}

@media (max-width:768px) {
    .hero {
        margin-top: 30px
    }
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--spacing-lg);
    align-items: center;
    width: 100%
}

.hero-left {
    padding: var(--spacing-md)
}

.hero-dot {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 10px;
    height: 10px;
    background: #ff6a00;
    border-radius: 50%;
    animation: pulseDot 2s infinite ease-in-out;
    z-index: 10
}

@keyframes pulseDot {
    0% {
        transform: scale(1);
        opacity: 1
    }

    50% {
        transform: scale(1.4);
        opacity: .6
    }

    100% {
        transform: scale(1);
        opacity: 1
    }
}

.hero-container {
    animation: heroEnter .8s ease forwards;
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 4px 26px rgba(0, 0, 0, .08)
}

@keyframes heroEnter {
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.hero-title {
    margin-bottom: 20px;
    animation: fadeInUp 1s ease
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-dark);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
    animation: fadeInUp 1.2s ease
}

.typewriter {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-gray);
    margin-bottom: 20px;
    min-height: 60px;
    padding-right: 5px;
    white-space: normal;
    overflow: visible
}

.hero-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    margin: 14px 0
}

.hero-buttons .btn-text {
    display: none
}

.hero-buttons .btn-icon {
    background: 0 0;
    border: none;
    padding: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease
}

.hero-buttons .btn-icon:hover {
    border: none;
    box-shadow: 0 0 16px rgba(255, 255, 255, .6);
    transform: scale(1.1)
}

.hero-buttons .btn-icon .btn-icon-svg {
    width: 24px;
    height: 24px;
    display: inline-block;
    transition: filter .3s ease
}

.hero-buttons .btn-icon:hover .btn-icon-svg {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, .8))
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: 0 0;
    color: var(--color-black);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative
}

.btn:hover {
    border-color: var(--color-orange);
    box-shadow: 0 0 12px rgba(255, 77, 0, .3);
    transform: translateY(-2px)
}

.hero-right {
    display: flex;
    justify-content: center;
    align-items: center
}

.browser-mock {
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md)
}

.browser-header {
    background: #f0f0f0;
    padding: 12px 15px;
    border-bottom: 1px solid var(--color-border)
}

.browser-dots {
    display: flex;
    gap: 8px
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc
}

.browser-dots span:first-child {
    background: #ff5f56
}

.browser-dots span:nth-child(2) {
    background: #ffbd2e
}

.browser-dots span:nth-child(3) {
    background: #27c93f
}

.browser-content {
    padding: var(--spacing-lg);
    background: var(--color-white);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: flex-start
}

.code-lines {
    font-family: var(--font-mono);
    font-size: 2.8 rem;
    color: var(--color-gray);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-left: 0;
    align-items: flex-start
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.window-frame {
    width: 100%;
    background: #f2f2f2;
    height: 26px;
    padding: 4px 10px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center
}

.window-dots {
    display: flex;
    gap: 8px
}

.window-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block
}

.window-dots span:first-child {
    background: #ff5f56
}

.window-dots span:nth-child(2) {
    background: #ffbd2e
}

.window-dots span:nth-child(3) {
    background: #27c93f
}

.nav-toggle {
    display: none;
    background: 0 0;
    border: none;
    cursor: pointer;
    padding: 8px
}

.nav-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-black);
    margin: 4px 0;
    transition: transform .2s ease, opacity .2s ease
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    max-width: 85%;
    background: var(--color-white);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.2, .9, .2, 1);
    z-index: 2000;
    display: flex;
    align-items: flex-start
}

.mobile-menu.open {
    transform: translateX(0)
}

.mobile-menu-inner {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.mobile-menu-inner a {
    font-family: var(--font-mono);
    font-size: .95rem;
    text-transform: uppercase;
    color: var(--color-black);
    padding: 8px 6px
}

.mobile-resume {
    align-self: flex-start;
    padding: 8px 14px;
    font-size: .85rem
}

.footer-phone {
    text-decoration: none;
    font-family: var(--font-mono);
    color: #888;
    transition: opacity .12s ease
}

.footer-phone:hover {
    text-decoration: underline;
    opacity: .95
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-lg);
    align-items: center
}

.about-left {
    display: flex;
    justify-content: center
}

.image-frame {
    width: 250px;
    height: 250px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, .1)
}

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

.about-right h2 {
    margin-bottom: var(--spacing-md)
}

.about-right p {
    margin-bottom: var(--spacing-sm)
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md)
}

.skill-card {
    position: relative;
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition)
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md)
}

.skill-card h3 {
    margin-bottom: var(--spacing-sm);
    position: relative
}

.skill-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-orange);
    transition: width .3s ease
}

.skill-card:hover h3::after {
    width: 50%
}

.skill-card p {
    font-family: var(--font-mono);
    font-size: .95rem;
    line-height: 1.8
}

/* ================================
   PROJECTS SECTION – FIXED & ALIGNED
================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  align-items: stretch;
}

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.project-card > .orange-indicator {
  display: none;
}

.window-frame {
  position: relative;
  z-index: 3;
}

.project-image-overlay {
  display: none;
}

.project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: rgba(255, 255, 255, 0.98);
}

.project-content h3 {
  margin-bottom: 6px;
}

.tech-stack {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-orange);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 500;
}

.project-content p {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex-grow: 1;
}

.project-buttons {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: auto;
}

.btn-small {
  padding: 8px 20px;
  background: transparent;
  color: var(--color-black);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.btn-small::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-orange);
  transition: width 0.3s ease;
}

.btn-small:hover::after {
  width: 60%;
}

.btn-small:hover {
  border-color: var(--color-orange);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto
}

.cert-card {
    position: relative;
    padding: 28px 24px 24px 24px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: var(--transition);
    display: flex;
    flex-direction: column
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1)
}

.cert-card h3 {
    color: #111;
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 600
}

.cert-card p {
    font-family: var(--font-mono);
    font-size: .9rem;
    color: #666;
    margin-bottom: 16px
}

.view-cert-btn {
    font-family: var(--font-mono);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    background: 0 0;
    color: var(--color-black);
    border: 1px solid #e3e3e3;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    margin-top: auto
}

.view-cert-btn:hover {
    border-color: #ff4d00;
    color: #ff4d00;
    transform: translateY(-2px)
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md)
}

.edu-card {
    position: relative;
    padding: 28px 24px 24px 24px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: var(--transition)
}

.edu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1)
}

.edu-card h3 {
    color: #111;
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 600
}

.edu-card p {
    font-family: var(--font-mono);
    font-size: .9rem;
    color: #666;
    margin-bottom: 12px
}

.edu-date {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: #ff4d00;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500
}

.contact {
    display: flex;
    justify-content: center;
    align-items: center
}

.contact-card {
    position: relative;
    max-width: 600px;
    width: 100%;
    padding: var(--spacing-lg);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    text-align: center
}

.contact-card h2 {
    margin-bottom: var(--spacing-lg)
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md)
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs)
}

.contact-label {
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--color-light-gray);
    text-transform: uppercase;
    letter-spacing: 2px
}

.contact-item a {
    font-size: 1.3rem;
    color: var(--color-black);
    font-weight: 500;
    position: relative;
    display: inline-block
}

.contact-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-orange);
    transition: width .3s ease
}

.contact-item a:hover::after {
    width: 100%
}

.factory-footer {
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    padding: 1.5rem 0;
    margin-top: var(--spacing-xl)
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center
}

.footer-left {
    display: flex;
    gap: 1.5rem;
    align-items: center
}

.footer-left a {
    color: #888;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center
}

.footer-left a:hover {
    color: #ff4d00
}

.footer-right {
    display: flex;
    align-items: center;
    gap: .75rem
}

.footer-copyright,
.footer-info {
    font-family: var(--font-mono);
    font-size: .7rem;
    color: #888;
    white-space: nowrap
}

.footer-divider {
    color: #444;
    font-size: .7rem;
    user-select: none;
    margin: 0 .25rem
}

.footer-copyright {
    color: #999
}

.floating-scroll-top {
    position: fixed;
    bottom: 120px;
    right: 60px;
    width: 50px;
    height: 50px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
    color: #111
}

.floating-scroll-top.show {
    opacity: 1;
    visibility: visible
}

.floating-scroll-top:hover {
    background: #f5f5f5;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .15)
}

.pdf-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .6);
    opacity: 0;
    transition: opacity .3s ease;
    align-items: center;
    justify-content: center
}

.pdf-modal.show {
    display: flex
}

.pdf-modal.active {
    opacity: 1
}

.pdf-modal-content {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    height: 90vh;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2)
}

.pdf-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: var(--transition);
    line-height: 1
}

.pdf-modal-close:hover {
    background: #ff4d00;
    color: #fff;
    border-color: #ff4d00
}

#pdfViewer {
    width: 100%;
    height: 100%;
    border-radius: 8px
}

@media (max-width:1024px) {
    h1 {
        font-size: 3rem
    }

    h2 {
        font-size: 2rem
    }

    .nav-links {
        gap: var(--spacing-md)
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md)
    }

    .hero-right {
        order: -1
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .projects-grid {
        grid-template-columns: 1fr
    }

    .cert-grid {
        grid-template-columns: 1fr
    }

    .education-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md)
    }

    .footer-right {
        align-items: flex-start
    }
}

@media (max-width:768px) {
    .hero-content {
        display: flex;
        flex-direction: column;
        gap: 12px
    }

    .hero-left {
        order: 0;
        padding: 0 16px
    }

    .hero-right {
        order: 1;
        display: flex;
        justify-content: center;
        padding: 0 16px 12px 16px
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 20px
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 8px
    }

    .hero-buttons {
        margin-top: 8px;
        gap: 12px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center
    }

    .hero-buttons .btn-icon {
        padding: 6px
    }

    .hero-buttons .btn {
        padding: 10px 18px;
        font-size: 15px
    }

    .typewriter {
        font-size: 14px;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: break-word;
        height: auto;
        padding-right: 0
    }

    .typing-cursor {
        color: var(--color-orange);
        font-weight: 700;
        display: inline-block
    }

    .navbar {
        display: flex;
        justify-content: center;
        padding: 12px 0
    }

    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between !important;
        padding: 0 16px;
        width: 100%;
        gap: 0
    }

    .nav-logo a {
        font-size: 20px
    }

    .nav-links,
    .nav-resume {
        display: none !important
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 12px
    }

    .mobile-resume-btn {
        display: inline-block;
        background: #000;
        color: #fff;
        padding: 8px 16px;
        border-radius: 4px;
        font-size: 14px;
        font-weight: 600
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 4px
    }

    .nav-toggle .bar {
        width: 24px;
        height: 2px;
        border-radius: 2px;
        background: #000
    }

    .mobile-menu-inner {
        padding-top: 60px
    }

    .mobile-menu-back {
        position: absolute;
        top: 20px;
        left: 20px;
        background: 0 0;
        border: none;
        cursor: pointer;
        padding: 8px
    }

    .container {
        padding-top: 60px
    }

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

    .cert-card,
    .edu-card,
    .skill-card {
        padding-top: 40px !important;
        position: relative
    }

    .orange-indicator {
        top: 14px !important;
        left: 14px !important
    }

    .cert-card h3,
    .edu-card h3,
    .skill-card h3 {
        margin-top: 6px;
        font-size: 1.1rem;
        line-height: 1.4;
        padding-right: 15px
    }

    .skills-grid {
        grid-template-columns: 1fr !important;
        gap: 16px
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px
    }

    .project-card {
        display: block;
        padding: 0 !important;
        margin-bottom: 0;
        border-radius: var(--border-radius)
    }

    .project-image-overlay {
        display: none
    }

    .project-card:active .project-image-overlay,
    .project-card:hover .project-image-overlay {
        opacity: 1
    }

    .project-content {
        padding: 16px !important
    }

    .project-content h3 {
        font-size: 1.15rem;
        margin-bottom: 6px
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 20px
    }

    .about-right {
        text-align: left !important;
        padding: 0 8px
    }

    .cert-grid,
    .education-grid {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .footer-container {
        flex-direction: row-reverse !important;
        gap: 8px;
        text-align: left;
        padding: 12px 16px;
        align-items: center;
        justify-content: space-between
    }

    .factory-footer {
        padding: 10px 0;
        margin-top: 10px
    }

    .footer-left {
        justify-content: flex-end;
        gap: 12px
    }

    .footer-right {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start
    }

    .footer-divider {
        display: none
    }

    .floating-scroll-top {
        width: 40px;
        height: 40px;
        bottom: 150px;
        right: 60px;
        background: #fff;
        border: 1px solid #eee;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .1)
    }
}

@media (max-width:480px) {
    h1 {
        font-size: 1.6rem
    }

    h2 {
        font-size: 1.35rem
    }

    .container {
        padding: 10px;
        padding-top: 80px
    }

    .floating-scroll-top {
        bottom: 130px;
        right: 16px
    }
}
