/* Carrd.co Clone - Exact Styles */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}
body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote::before,blockquote::after,q::before,q::after{content:'';content:none;}
table{border-collapse:collapse;border-spacing:0;}
body{-webkit-text-size-adjust:none}
mark{background-color:transparent;color:inherit}
input::-moz-focus-inner{border:0;padding:0}
input[type="text"],input[type="email"],select,textarea{-moz-appearance:none;-webkit-appearance:none;-ms-appearance:none;appearance:none}

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --background-height: 100vh;
    --viewport-height: 100vh;
    
    /* Light mode colors */
    --bg-primary: #F8F4F1;
    --text-primary: #4A4A4A;
    --border-color: #595959;
    --pattern-color: rgba(74,74,74,0.141);
}

/* Dark mode colors */
body.dark-mode {
    --bg-primary: #1a1a1a;
    --text-primary: #e5e5e5;
    --border-color: #a6a6a6;
    --pattern-color: rgba(229,229,229,0.141);
}

/* Auto dark mode based on system preference */
@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) {
        --bg-primary: #1a1a1a;
        --text-primary: #e5e5e5;
        --border-color: #a6a6a6;
        --pattern-color: rgba(229,229,229,0.141);
    }
}

html {
    font-size: 15pt;
}

body {
    line-height: 1.0;
    min-height: var(--viewport-height);
    min-width: 320px;
    overflow-x: hidden;
    word-wrap: break-word;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

body::before {
    background-attachment: scroll;
    content: '';
    display: block;
    height: var(--background-height);
    left: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    transform: scale(1);
    width: 100vw;
    z-index: 0;
    background-size: 1024px;
    background-position: center;
    background-repeat: repeat;
    transition: opacity 0.3s ease;
}

/* Light mode pattern */
body::before {
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20height%3D%22512%22%20preserveAspectRatio%3D%22none%22%3E%20%3Cstyle%20type%3D%22text%2Fcss%22%3E%20path%20%7B%20fill%3A%20none%3B%20stroke%3A%20rgba(74,74,74,0.141)%3B%20stroke-width%3A%201.01px%3B%20stroke-linecap%3A%20round%3B%20stroke-linejoin%3A%20round%3B%20%7D%20%3C%2Fstyle%3E%20%3Cpath%20vector-effect%3D%22non-scaling-stroke%22%20d%3D%22M424%2C331.8c0%2C12.5-6.7%2C24.1-17.5%2C30.3l-132%2C76.2c-10.8%2C6.3-24.2%2C6.3-35%2C0l-132-76.2%20C96.7%2C355.8%2C90%2C344.3%2C90%2C331.8V179.2c0-12.5%2C6.7-24.1%2C17.5-30.3l132-76.2c10.8-6.3%2C24.2-6.3%2C35%2C0l132%2C76.2%20c10.8%2C6.3%2C17.5%2C17.8%2C17.5%2C30.3V331.8z%20M238.5%2C73l-256%2C147.6%20M273.5%2C439l252.1-145.4%20M256%2C634.7V378.3c0-12.5%2C6.7-24.1%2C17.5-30.3%20l252.1-145.4%20M256-122.7v256.4c0%2C12.5-6.7%2C24.1-17.5%2C30.3l-256%2C147.6%22%2F%3E%3C%2Fsvg%3E');
}

/* Dark mode pattern */
body.dark-mode::before,
:root:not(.light-mode) body::before {
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20height%3D%22512%22%20preserveAspectRatio%3D%22none%22%3E%20%3Cstyle%20type%3D%22text%2Fcss%22%3E%20path%20%7B%20fill%3A%20none%3B%20stroke%3A%20rgba(229,229,229,0.141)%3B%20stroke-width%3A%201.01px%3B%20stroke-linecap%3A%20round%3B%20stroke-linejoin%3A%20round%3B%20%7D%20%3C%2Fstyle%3E%20%3Cpath%20vector-effect%3D%22non-scaling-stroke%22%20d%3D%22M424%2C331.8c0%2C12.5-6.7%2C24.1-17.5%2C30.3l-132%2C76.2c-10.8%2C6.3-24.2%2C6.3-35%2C0l-132-76.2%20C96.7%2C355.8%2C90%2C344.3%2C90%2C331.8V179.2c0-12.5%2C6.7-24.1%2C17.5-30.3l132-76.2c10.8-6.3%2C24.2-6.3%2C35%2C0l132%2C76.2%20c10.8%2C6.3%2C17.5%2C17.8%2C17.5%2C30.3V331.8z%20M238.5%2C73l-256%2C147.6%20M273.5%2C439l252.1-145.4%20M256%2C634.7V378.3c0-12.5%2C6.7-24.1%2C17.5-30.3%20l252.1-145.4%20M256-122.7v256.4c0%2C12.5-6.7%2C24.1-17.5%2C30.3l-256%2C147.6%22%2F%3E%3C%2Fsvg%3E');
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) body::before {
        background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20height%3D%22512%22%20preserveAspectRatio%3D%22none%22%3E%20%3Cstyle%20type%3D%22text%2Fcss%22%3E%20path%20%7B%20fill%3A%20none%3B%20stroke%3A%20rgba(229,229,229,0.141)%3B%20stroke-width%3A%201.01px%3B%20stroke-linecap%3A%20round%3B%20stroke-linejoin%3A%20round%3B%20%7D%20%3C%2Fstyle%3E%20%3Cpath%20vector-effect%3D%22non-scaling-stroke%22%20d%3D%22M424%2C331.8c0%2C12.5-6.7%2C24.1-17.5%2C30.3l-132%2C76.2c-10.8%2C6.3-24.2%2C6.3-35%2C0l-132-76.2%20C96.7%2C355.8%2C90%2C344.3%2C90%2C331.8V179.2c0-12.5%2C6.7-24.1%2C17.5-30.3l132-76.2c10.8-6.3%2C24.2-6.3%2C35%2C0l132%2C76.2%20c10.8%2C6.3%2C17.5%2C17.8%2C17.5%2C30.3V331.8z%20M238.5%2C73l-256%2C147.6%20M273.5%2C439l252.1-145.4%20M256%2C634.7V378.3c0-12.5%2C6.7-24.1%2C17.5-30.3%20l252.1-145.4%20M256-122.7v256.4c0%2C12.5-6.7%2C24.1-17.5%2C30.3l-256%2C147.6%22%2F%3E%3C%2Fsvg%3E');
    }
}

u {
    text-decoration: underline;
}

strong {
    color: inherit;
    font-weight: bolder;
}

em {
    font-style: italic;
}

a {
    color: inherit;
    text-decoration: underline;
    transition: color 0.25s ease;
}

.site-wrapper {
    -webkit-overflow-scrolling: touch;
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: var(--viewport-height);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.site-main {
    --alignment: left;
    --flex-alignment: flex-start;
    align-items: center;
    display: flex;
    flex-grow: 0;
    flex-shrink: 0;
    justify-content: center;
    max-width: 100%;
    position: relative;
    text-align: var(--alignment);
    z-index: 1;
    transition: opacity 0.75s ease 0s,transform 0.75s ease 0s;
}

.site-main > .inner {
    --padding-horizontal: 3rem;
    --padding-vertical: 3rem;
    --spacing: 2rem;
    --width: 32rem;
    max-width: 100%;
    position: relative;
    width: var(--width);
    z-index: 1;
    padding: var(--padding-vertical) var(--padding-horizontal);
}

.site-main > .inner > * {
    margin-top: var(--spacing);
    margin-bottom: var(--spacing);
}

.site-main > .inner > :first-child {
    margin-top: 0 !important;
}

.site-main > .inner > :last-child {
    margin-bottom: 0 !important;
}

body.is-loading .site-main {
    opacity: 0;
    transform: scale(0.97875);
}

/* Text Components */
.text-component {
    position: relative;
}

.text-component span.p {
    display: block;
    position: relative;
}

.text-component.instance-1 {
    text-transform: uppercase;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    font-size: 4.625em;
    line-height: 1.25;
    font-weight: 400;
    transition: color 0.3s ease;
}

.text-component.instance-1 a {
    text-decoration: underline;
}

.text-component.instance-1 a:hover {
    text-decoration: none;
}

.text-component.instance-1 span.p:nth-child(n + 2) {
    margin-top: 1rem;
}

.text-component.instance-1 > * {
    display: inline-block;
    line-height: 1.2;
}

.text-component.instance-3 {
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1em;
    line-height: 1.875;
    font-weight: 400;
    transition: color 0.3s ease;
}

.text-component.instance-3 a {
    text-decoration: underline;
}

.text-component.instance-3 a:hover {
    text-decoration: none;
}

.text-component.instance-3 span.p:nth-child(n + 2) {
    margin-top: 1rem;
}

/* Icons Component */
.icons-component {
    display: flex;
    flex-wrap: wrap;
    justify-content: var(--flex-alignment);
    letter-spacing: 0;
    padding: 0;
}

.icons-component > li {
    position: relative;
    z-index: 1;
}

.icons-component > li > a {
    align-items: center;
    display: flex;
    justify-content: center;
}

.icons-component > li > a > svg {
    display: block;
    pointer-events: none;
    position: relative;
}

.icons-component > li > a > .label {
    display: none;
}

.icons-component.instance-1 {
    font-size: 1.625em;
    gap: 1rem;
}

.icons-component.instance-1:not(:first-child) {
    margin-top: 2.5rem !important;
}

.icons-component.instance-1:not(:last-child) {
    margin-bottom: 2.5rem !important;
}

.icons-component.instance-1 > li > a {
    border-radius: 0.75rem;
    height: 2em;
    width: 2em;
    border: solid 1px var(--border-color);
    transition: transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.icons-component.instance-1 > li > a > svg {
    height: 60%;
    width: 60%;
    fill: var(--text-primary);
    transition: fill 0.25s ease;
}

.icons-component.instance-1 > li > a:hover {
    transform: translateY(-16.5%);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    display: block;
}

.theme-toggle .moon-icon {
    display: none;
}

body.dark-mode .theme-toggle .sun-icon,
:root:not(.light-mode) .theme-toggle .sun-icon {
    display: none;
}

body.dark-mode .theme-toggle .moon-icon,
:root:not(.light-mode) .theme-toggle .moon-icon {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) .theme-toggle .sun-icon {
        display: none;
    }
    
    :root:not(.light-mode) .theme-toggle .moon-icon {
        display: block;
    }
}

/* Responsive Design */
@media (max-width: 1680px) {
    html {
        font-size: 11pt;
    }
}

@media (max-width: 1280px) {
    html {
        font-size: 11pt;
    }
}

@media (max-width: 980px) {
    html {
        font-size: 9pt;
    }
}

@media (max-width: 736px) {
    html {
        font-size: 11pt;
    }
    
    .site-main > .inner {
        --padding-horizontal: 2rem;
        --padding-vertical: 3rem;
        --spacing: 2rem;
    }
    
    .text-component.instance-1 {
        letter-spacing: 0rem;
        width: 100%;
        font-size: 3.5em;
        line-height: 1.25;
    }
    
    .text-component.instance-3 {
        letter-spacing: 0rem;
        width: 100%;
        font-size: 1em;
        line-height: 1.875;
    }
    
    .icons-component.instance-1 {
        font-size: 1.625em;
        gap: 1rem;
    }
    
    .icons-component.instance-1:not(:first-child) {
        margin-top: 1.875rem !important;
    }
    
    .icons-component.instance-1:not(:last-child) {
        margin-bottom: 1.875rem !important;
    }
}

@media (max-width: 480px) {
    .site-main > .inner {
        --spacing: 1.75rem;
    }
}

@media (max-width: 360px) {
    .site-main > .inner {
        --padding-horizontal: 1.5rem;
        --padding-vertical: 2.25rem;
        --spacing: 1.5rem;
    }
    
    .text-component.instance-1 {
        font-size: 3.5em;
    }
    
    .text-component.instance-3 {
        font-size: 1em;
    }
    
    .icons-component.instance-1 {
        gap: 0.75rem;
    }
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-white);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.profile-image {
    margin-bottom: 30px;
}

.profile-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin: 0 auto;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-description {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--text-white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border-color: var(--text-white);
}

.btn-secondary:hover {
    background: var(--text-white);
    color: var(--primary-color);
}

/* About Section */
#about {
    background: var(--bg-white);
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Skills Section */
#skills {
    background: var(--bg-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.skill-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.skill-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Projects Section */
#projects {
    background: var(--bg-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.project-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder {
    font-size: 80px;
}

.project-info {
    padding: 30px;
}

.project-info h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.project-info p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-light);
    color: var(--text-dark);
    border-radius: 6px;
}

/* Contact Section */
#contact {
    background: var(--bg-light);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-white);
    border-radius: 50%;
    color: var(--text-dark);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: var(--text-white);
    padding: 30px 0;
    text-align: center;
}

footer p {
    font-size: 14px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-description {
        font-size: 16px;
    }

    .section-title {
        font-size: 32px;
    }

    section {
        padding: 60px 0;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

    .profile-circle {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    .container {
        padding: 0 15px;
    }
}
